Skip to content

Commit

Permalink
Move some Intel compiler options to the idfx_test module
Browse files Browse the repository at this point in the history
  • Loading branch information
Marc Coiffier committed Dec 13, 2024
1 parent 8f4f477 commit 1befc52
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/idefix-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
name: CPU Jobs (icc)
uses: ./.github/workflows/idefix-ci-jobs.yml
with:
TESTME_OPTIONS: -Werror
TESTME_OPTIONS: -intel -Werror
IDEFIX_COMPILER: icc

gcc-jobs:
Expand All @@ -45,4 +45,4 @@ jobs:
uses: ./.github/workflows/idefix-ci-jobs.yml
with:
TESTME_OPTIONS: -cuda -Werror
IDEFIX_COMPILER: cuda
IDEFIX_COMPILER: nvcc
10 changes: 10 additions & 0 deletions pytools/idfx_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ def __init__ (self):
help="Test on Nvidia GPU using CUDA",
action="store_true")

parser.add_argument("-intel",
help="Test compiling with Intel OneAPI",
action="store_true")

parser.add_argument("-hip",
help="Test on AMD GPU using HIP",
action="store_true")
Expand Down Expand Up @@ -119,6 +123,12 @@ def configure(self,definitionFile=""):
# disable Async cuda malloc for tests performed on old UCX implementations
comm.append("-DKokkos_ENABLE_IMPL_CUDA_MALLOC_ASYNC=OFF")

if self.intel:
# disable fmad operations on Cuda to make it compatible with CPU arithmetics
comm.append("-DIdefix_CXX_FLAGS=-fp-model=strict")
comm.append("-DCMAKE_CXX_COMPILER=icpx")
comm.append("-DCMAKE_C_COMPILER=icx")

if self.hip:
comm.append("-DKokkos_ENABLE_HIP=ON")
# disable fmad operations on HIP to make it compatible with CPU arithmetics
Expand Down
4 changes: 0 additions & 4 deletions scripts/ci/run-tests
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
#!/usr/bin/env bash
if [ "$IDEFIX_COMPILER" == icc ]; then
source /opt/intel/oneapi/setvars.sh
export CC=icx
export CXX=icpx
export CFLAGS="-fp-model=strict"
export CXXFLAGS="-fp-model=strict"
fi
set -ue
cd "$1"
Expand Down

0 comments on commit 1befc52

Please sign in to comment.