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/3] 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/3] 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 From afd31b98014e93fa0f0dab596ac7c334497a95df Mon Sep 17 00:00:00 2001 From: Marco van Hulten Date: Wed, 3 Jun 2026 15:27:00 +0200 Subject: [PATCH 3/3] Use correct MPIEXEC_EXECUTABLE Set this in machine environment file and do not set everywhere to $SLURM_SRUN. On JSC machines srun is used, but on Marvin mpirun must be used. The latter requirement may relate to the missing or incomplete support of PMIx on Marvin. --- env/jsc.2025.intel.psmpi | 1 + env/ubuntu.gnu.openmpi | 1 + env/uni-bonn.gnu.openmpi | 1 + 3 files changed, 3 insertions(+) diff --git a/env/jsc.2025.intel.psmpi b/env/jsc.2025.intel.psmpi index fd52f7fd..710f41f4 100644 --- a/env/jsc.2025.intel.psmpi +++ b/env/jsc.2025.intel.psmpi @@ -66,6 +66,7 @@ export CC=mpicc export FC=mpif90 export CXX=mpicxx export MPI_HOME=$EBROOTPSMPI +export MPIEXEC_EXECUTABLE=$(which srun) # Display compiler settings module list diff --git a/env/ubuntu.gnu.openmpi b/env/ubuntu.gnu.openmpi index d9efe2fc..4875ecf8 100644 --- a/env/ubuntu.gnu.openmpi +++ b/env/ubuntu.gnu.openmpi @@ -10,6 +10,7 @@ export CC=mpicc export FC=mpif90 export CXX=mpicxx export MPI_HOME=/usr/lib/x86_64-linux-gnu/openmpi +export MPIEXEC_EXECUTABLE=$(which srun) export SYSTEMNAME="UBUNTU" export STAGE=$(lsb_release -sr) diff --git a/env/uni-bonn.gnu.openmpi b/env/uni-bonn.gnu.openmpi index 905253d8..fca4ac00 100644 --- a/env/uni-bonn.gnu.openmpi +++ b/env/uni-bonn.gnu.openmpi @@ -40,6 +40,7 @@ export CC=mpicc export FC=mpif90 export CXX=mpicxx export MPI_HOME=$EBROOTOPENMPI +export MPIEXEC_EXECUTABLE=$(which mpirun) # Display compiler settings module list