From 9d9760a0f38ea099e92ebff7f748911efc1b1c47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20H=C3=A9nin?= Date: Wed, 3 Jan 2024 19:38:33 +0100 Subject: [PATCH] Fix MPI run, report errors --- .../tests/interface/010_MPI_multi-sim/run.sh | 2 +- gromacs/tests/interface/run_tests.sh | 21 +++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/gromacs/tests/interface/010_MPI_multi-sim/run.sh b/gromacs/tests/interface/010_MPI_multi-sim/run.sh index 054ae6836..e8dea1c5d 100755 --- a/gromacs/tests/interface/010_MPI_multi-sim/run.sh +++ b/gromacs/tests/interface/010_MPI_multi-sim/run.sh @@ -10,7 +10,7 @@ if [ "$1" ] then COMMAND=$1 else - COMMAND="mpirun -np 16 gmx_mpi_d" + COMMAND="mpirun -np 16 -oversubscribe mpirun gmx_mpi_d" fi $COMMAND -multidir a b c d -s test.tpr -deffnm test -replex 10 -reseed 376 2>&1 | tee test.out diff --git a/gromacs/tests/interface/run_tests.sh b/gromacs/tests/interface/run_tests.sh index 642725c3b..2f1a6d479 100755 --- a/gromacs/tests/interface/run_tests.sh +++ b/gromacs/tests/interface/run_tests.sh @@ -9,12 +9,33 @@ fi tests=([0-9][0-9][0-9]_*) tests=(${tests[@]/010_MPI_multi-sim}) +ALL_SUCCESS=1 + ../library/run_tests.sh ${tests[@]} +if [ $? -ne 0 ] +then + ALL_SUCCESS=0 +fi + # Run tests that depend on an MPI build if source ${TOPDIR}/devel-tools/load-openmpi.sh ; then if cd 010_MPI_multi-sim ; then ./run.sh + if [ $? -ne 0 ] + then + ALL_SUCCESS=0 + fi cd - fi fi + + +if [ $ALL_SUCCESS -eq 1 ] +then + echo "$(${TPUT_GREEN})All tests succeeded.$(${TPUT_CLEAR})" + exit 0 +else + echo "$(${TPUT_RED})There were failed tests.$(${TPUT_CLEAR})" + exit 1 +fi