From 8e2301984213b20b19dbba4f05bd048d65549a7e Mon Sep 17 00:00:00 2001 From: Marco van Hulten Date: Mon, 18 Aug 2025 15:32:14 +0200 Subject: [PATCH 1/2] Set MPI-executable for ParFlow to $SLURM_SRUN when Slurm This is needed when GCC+OpenMPI is used. This is tested on JURECA. With Intel+ParaStationMPI this already went right; there is no effect when compiling with Intel LLVM. It only has effect if ${SLURM_SRUN} is set, which means it is a Slurm system (as is already assumed). Resolves: #87 --- cmake/BuildParFlow.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/cmake/BuildParFlow.cmake b/cmake/BuildParFlow.cmake index 708e14a4..7a638eb8 100644 --- a/cmake/BuildParFlow.cmake +++ b/cmake/BuildParFlow.cmake @@ -57,6 +57,7 @@ endif() find_program(SLURM_SRUN srun DOC "Path to the SLURM srun executable") if(SLURM_SRUN) set(ENABLE_SLURM "ON") + set(MPIEXEC_EXECUTABLE "${SLURM_SRUN}") else() set(ENABLE_SLURM "OFF") endif() From 30bfbcbcd241223f084719a51aed88a040dccdbb Mon Sep 17 00:00:00 2001 From: Marco van Hulten Date: Tue, 26 Aug 2025 11:44:15 +0200 Subject: [PATCH 2/2] Use srun on JSC machines --- cmake/BuildParFlow.cmake | 1 - env/jsc.2025.gnu.openmpi | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/BuildParFlow.cmake b/cmake/BuildParFlow.cmake index 7a638eb8..708e14a4 100644 --- a/cmake/BuildParFlow.cmake +++ b/cmake/BuildParFlow.cmake @@ -57,7 +57,6 @@ endif() find_program(SLURM_SRUN srun DOC "Path to the SLURM srun executable") if(SLURM_SRUN) set(ENABLE_SLURM "ON") - set(MPIEXEC_EXECUTABLE "${SLURM_SRUN}") else() set(ENABLE_SLURM "OFF") endif() diff --git a/env/jsc.2025.gnu.openmpi b/env/jsc.2025.gnu.openmpi index c7e68cb4..a64b6f22 100644 --- a/env/jsc.2025.gnu.openmpi +++ b/env/jsc.2025.gnu.openmpi @@ -57,6 +57,7 @@ export CC=mpicc export FC=mpif90 export CXX=mpicxx export MPI_HOME=$EBROOTOPENMPI +export MPIEXEC_EXECUTABLE=$(which srun) # Display compiler settings module list