Skip to content

Commit 1befc52

Browse files
author
Marc Coiffier
committed
Move some Intel compiler options to the idfx_test module
1 parent 8f4f477 commit 1befc52

3 files changed

Lines changed: 12 additions & 6 deletions

File tree

.github/workflows/idefix-ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
name: CPU Jobs (icc)
2929
uses: ./.github/workflows/idefix-ci-jobs.yml
3030
with:
31-
TESTME_OPTIONS: -Werror
31+
TESTME_OPTIONS: -intel -Werror
3232
IDEFIX_COMPILER: icc
3333

3434
gcc-jobs:
@@ -45,4 +45,4 @@ jobs:
4545
uses: ./.github/workflows/idefix-ci-jobs.yml
4646
with:
4747
TESTME_OPTIONS: -cuda -Werror
48-
IDEFIX_COMPILER: cuda
48+
IDEFIX_COMPILER: nvcc

pytools/idfx_test.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,10 @@ def __init__ (self):
5858
help="Test on Nvidia GPU using CUDA",
5959
action="store_true")
6060

61+
parser.add_argument("-intel",
62+
help="Test compiling with Intel OneAPI",
63+
action="store_true")
64+
6165
parser.add_argument("-hip",
6266
help="Test on AMD GPU using HIP",
6367
action="store_true")
@@ -119,6 +123,12 @@ def configure(self,definitionFile=""):
119123
# disable Async cuda malloc for tests performed on old UCX implementations
120124
comm.append("-DKokkos_ENABLE_IMPL_CUDA_MALLOC_ASYNC=OFF")
121125

126+
if self.intel:
127+
# disable fmad operations on Cuda to make it compatible with CPU arithmetics
128+
comm.append("-DIdefix_CXX_FLAGS=-fp-model=strict")
129+
comm.append("-DCMAKE_CXX_COMPILER=icpx")
130+
comm.append("-DCMAKE_C_COMPILER=icx")
131+
122132
if self.hip:
123133
comm.append("-DKokkos_ENABLE_HIP=ON")
124134
# disable fmad operations on HIP to make it compatible with CPU arithmetics

scripts/ci/run-tests

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
#!/usr/bin/env bash
22
if [ "$IDEFIX_COMPILER" == icc ]; then
33
source /opt/intel/oneapi/setvars.sh
4-
export CC=icx
5-
export CXX=icpx
6-
export CFLAGS="-fp-model=strict"
7-
export CXXFLAGS="-fp-model=strict"
84
fi
95
set -ue
106
cd "$1"

0 commit comments

Comments
 (0)