Skip to content

Commit b4e54b2

Browse files
authored
Merge pull request QMCPACK#5573 from ye-luo/omptarget-reduction-slm
Select the reduction algorithm using SLM when using icpx.
2 parents fe08b35 + 5b1714b commit b4e54b2

2 files changed

Lines changed: 5 additions & 6 deletions

File tree

CMake/IntelCompilers.cmake

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ if(QMC_OMP)
3636
CACHE STRING "Offload target architecture")
3737
set(OPENMP_OFFLOAD_COMPILE_OPTIONS "-fopenmp-targets=${OFFLOAD_TARGET}")
3838
endif()
39+
# Select the intra-team reduction implementation using shared local memory.
40+
set(OPENMP_OFFLOAD_COMPILE_OPTIONS "${OPENMP_OFFLOAD_COMPILE_OPTIONS} -mllvm -vpo-paropt-atomic-free-reduction-slm=true" )
3941
endif(ENABLE_OFFLOAD)
4042
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fiopenmp")
4143
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fiopenmp")

config/build_alcf_aurora_icpx.sh

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22
# This recipe is intended for ALCF Aurora https://www.alcf.anl.gov/support-center/aurora-sunspot
3-
# last revision: Apr 25th 2025
3+
# last revision: Jul 11th 2025
44
#
55
# How to invoke this script?
66
# build_alcf_aurora_icpx.sh # build all the variants assuming the current directory is the source directory.
@@ -52,7 +52,6 @@ for name in gpu_real_MP gpu_real gpu_cplx_MP gpu_cplx \
5252
do
5353

5454
CMAKE_FLAGS="-DCMAKE_BUILD_TYPE=$TYPE -DMPIEXEC_PREFLAGS='--cpu-bind;depth;-d;8'"
55-
unset CMAKE_CXX_FLAGS
5655

5756
if [[ $name == *"cplx"* ]]; then
5857
CMAKE_FLAGS="$CMAKE_FLAGS -DQMC_COMPLEX=ON"
@@ -64,7 +63,6 @@ fi
6463

6564
if [[ $name == *"gpu"* ]]; then
6665
CMAKE_FLAGS="$CMAKE_FLAGS -DQMC_GPU_ARCHS=intel_gpu_pvc"
67-
CMAKE_CXX_FLAGS="-mllvm -vpo-paropt-atomic-free-reduction-slm=true"
6866
fi
6967

7068
folder=build_${Machine}_${Compiler}_${name}
@@ -76,15 +74,14 @@ fi
7674
echo "**********************************"
7775
echo "folder $folder"
7876
echo "CMAKE_FLAGS: $CMAKE_FLAGS"
79-
echo "CMAKE_CXX_FLAGS: $CMAKE_CXX_FLAGS"
8077
echo "**********************************"
8178

8279
mkdir $folder
8380
cd $folder
8481

8582
if [ ! -f CMakeCache.txt ] ; then
86-
cmake $CMAKE_FLAGS -DCMAKE_CXX_FLAGS="$CMAKE_CXX_FLAGS" \
87-
-DCMAKE_C_COMPILER=mpicc -DCMAKE_CXX_COMPILER=mpicxx $source_folder
83+
cmake -DCMAKE_C_COMPILER=mpicc -DCMAKE_CXX_COMPILER=mpicxx \
84+
$CMAKE_FLAGS $source_folder
8885
fi
8986

9087
if [[ -v install_folder ]]; then

0 commit comments

Comments
 (0)