From 83b0a6b67f241068680cb31189f8f4704b18994b Mon Sep 17 00:00:00 2001 From: "Godoy, William F" Date: Wed, 17 Oct 2018 07:43:59 -0400 Subject: [PATCH] #725 enable test with mpi oversubscribe OMPI_MCA_rmaps_base_oversubscribe=yes must be passed to cmake or be an env variable --- CMakeLists.txt | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index aa07d03b86..484a1a5324 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -134,8 +134,14 @@ if(ADIOS2_HAVE_MPI) cmake_host_system_information(RESULT ncores QUERY NUMBER_OF_PHYSICAL_CORES) message("-- Found MPI nprocs = " ${ncores}) if(ncores LESS 4) - message("-- Reducing MPI nprocs to " ${ncores} " for tests") - set(MPIEXEC_MAX_NUMPROCS ${NPROCS}) + if (NOT "$ENV{OMPI_MCA_rmaps_base_oversubscribe}" STREQUAL "yes") + message("-- Reducing MPI nprocs to " ${ncores} " for tests") + set(MPIEXEC_MAX_NUMPROCS ${ncores}) + else() + message("-- Found OMPI_MCA_rmaps_base_oversubscribe") + set(MPIEXEC_MAX_NUMPROCS 4) + message("-- Setting MPI nprocs = " ${MPIEXEC_MAX_NUMPROCS}) + endif() endif() # Workaround for MPI forcing the link of C++ bindings add_definitions(-DOMPI_SKIP_MPICXX -DMPICH_SKIP_MPICXX)