Skip to content

Commit

Permalink
Simplified version
Browse files Browse the repository at this point in the history
  • Loading branch information
williamfgc committed Oct 17, 2018
1 parent 83b0a6b commit 22e44e5
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -131,18 +131,11 @@ adios_option(SysVShMem "Enable support for SysV Shared Memory IPC on *NIX" AUTO)
include(${PROJECT_SOURCE_DIR}/cmake/DetectOptions.cmake)

if(ADIOS2_HAVE_MPI)
cmake_host_system_information(RESULT ncores QUERY NUMBER_OF_PHYSICAL_CORES)
message("-- Found MPI nprocs = " ${ncores})
if(ncores LESS 4)
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()
if(MPIEXEC_MAX_NUMPROCS LESS 4 AND "$ENV{OMPI_MCA_rmaps_base_oversubscribe}")
message(STATUS "OpenMPI oversubscribe detected: raising MPIEXEC_MAX_NUMPROCS to 4 for testing")
set(MPIEXEC_MAX_NUMPROCS 4 CACHE STRING "" FORCE)
endif()

# Workaround for MPI forcing the link of C++ bindings
add_definitions(-DOMPI_SKIP_MPICXX -DMPICH_SKIP_MPICXX)
endif()
Expand Down

0 comments on commit 22e44e5

Please sign in to comment.