Skip to content

Commit c2954fb

Browse files
committed
Fixed -q on mpirun from Open MPI 5.
1 parent 7a9381d commit c2954fb

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/psij/launchers/scripts/mpi_launch.sh

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,20 @@ _PSI_J_PROCESS_COUNT="$1"
66
shift
77

88
IS_OPENMPI=0
9-
if mpirun -version | grep "Open MPI" >/dev/null 2>&1; then
9+
IS_OPENMPI_5=0
10+
if mpirun -version | grep "(Open MPI) 5" >/dev/null 2>&1; then
11+
IS_OPENMPI_5=1
12+
elif mpirun -version | grep "Open MPI" >/dev/null 2>&1; then
1013
IS_OPENMPI=1
1114
fi
1215

1316
pre_launch
1417

1518
set +e
16-
if [ "$IS_OPENMPI" == "1" ]; then
19+
if [ "$IS_OPENMPI_5" == "1" ]; then
20+
# there is no -q parameter in OMPI 5
21+
mpirun --oversubscribe -n $_PSI_J_PROCESS_COUNT "$@" 1>$_PSI_J_STDOUT 2>$_PSI_J_STDERR <$_PSI_J_STDIN
22+
elif [ "$IS_OPENMPI" == "1" ]; then
1723
mpirun --oversubscribe -q -n $_PSI_J_PROCESS_COUNT "$@" 1>$_PSI_J_STDOUT 2>$_PSI_J_STDERR <$_PSI_J_STDIN
1824
else
1925
mpirun -n $_PSI_J_PROCESS_COUNT "$@" 1>$_PSI_J_STDOUT 2>$_PSI_J_STDERR <$_PSI_J_STDIN

0 commit comments

Comments
 (0)