Skip to content

Commit e77a9fe

Browse files
jameshcorbettCamStan
authored andcommitted
ci: allow mpirun oversubscription
Problem: amd64 runners using OpenMPI were failing with messages like the following: ``` There are not enough slots available in the system to satisfy the 4 slots that were requested by the application ``` The problem seems to be the GitHub Runners do not have many resources. As a workaround, add an option to oversubscribe resources.
1 parent 9d370e5 commit e77a9fe

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

cmake/SCR_ADD_TEST.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
FUNCTION(SCR_LAUNCHER_PARMS procs)
22
IF(${SCR_RESOURCE_MANAGER} STREQUAL "NONE")
33
SET(test_launcher "mpirun" PARENT_SCOPE)
4-
SET(test_param "-np ${procs}" PARENT_SCOPE)
4+
SET(test_param "-np ${procs} ${MPIRUN_FLAGS}" PARENT_SCOPE)
55
ELSEIF(${SCR_RESOURCE_MANAGER} STREQUAL "SLURM")
66
SET(test_launcher "srun" PARENT_SCOPE)
77
SET(test_param "-t 5 -N ${procs} -n ${procs}" PARENT_SCOPE)

src/test/checks_run.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,12 @@ ulimit -c unlimited
3939
source /etc/profile.d/modules.sh
4040
module load mpi
4141

42+
if mpirun -V | grep "Open MPI"; then
43+
# without this flag, in GitHub Action Runners, mpirun will complain that there
44+
# aren't enough resources
45+
ARGS="-DMPIRUN_FLAGS='--map-by :OVERSUBSCRIBE' ${ARGS}"
46+
fi
47+
4248

4349
POSTCHECKCMDS=":"
4450
# Enable coverage for $CC-coverage build

0 commit comments

Comments
 (0)