Skip to content

Commit

Permalink
cmake: allow to oversubscribe the machine during MPI tests
Browse files Browse the repository at this point in the history
Beginning with version 3.0, OpenMPI's mpirun refuses to start
more processes than there are physical processor cores on the
machine.

To allow oversubcribing, the 'OMPI_MCA_rmaps_base_oversubscribe'
environment variable can be set to 1.
  • Loading branch information
andrea-iob committed Jan 15, 2020
1 parent 8f451fc commit c88160a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,11 @@ function(addTest TEST_NAME TEST_SOURCES TEST_LIBRARIES WORKING_DIRECTORY N_PROCS
# Add test
add_test(NAME ${TEST_NAME} COMMAND ${TEST_EXEC} ${TEST_ARGS} WORKING_DIRECTORY "${WORKING_DIRECTORY}")

# Set test variables
if (${N_PROCS} GREATER 1)
set_tests_properties(${TEST_NAME} PROPERTIES ENVIRONMENT OMPI_MCA_rmaps_base_oversubscribe=1)
endif()

endfunction()

#------------------------------------------------------------------------------------#
Expand Down

0 comments on commit c88160a

Please sign in to comment.