Skip to content

Commit 94436c2

Browse files
authored
Merge pull request #507 from ExaWorks/quiet_mpirun
Add "quiet" flag for mpirun to avoid messages interfering with output capture.
2 parents 4dddf69 + c2954fb commit 94436c2

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,15 +6,21 @@ _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
1721
mpirun --oversubscribe -n $_PSI_J_PROCESS_COUNT "$@" 1>$_PSI_J_STDOUT 2>$_PSI_J_STDERR <$_PSI_J_STDIN
22+
elif [ "$IS_OPENMPI" == "1" ]; then
23+
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
2026
fi

0 commit comments

Comments
 (0)