diff options
author | Brad King <brad.king@kitware.com> | 2017-10-24 14:41:44 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2017-10-24 14:41:44 (GMT) |
commit | 143b2e7b21a1b58a1737a1413beaf49004b9577c (patch) | |
tree | b5897a7300fe07e7d40f035bdbaebdd710dcebaa /Modules | |
parent | d9430d17390ef5a6badef9083b113853d08d0478 (diff) | |
parent | 1610f757aca30ec2228e6cb9286338264f032545 (diff) | |
download | CMake-143b2e7b21a1b58a1737a1413beaf49004b9577c.zip CMake-143b2e7b21a1b58a1737a1413beaf49004b9577c.tar.gz CMake-143b2e7b21a1b58a1737a1413beaf49004b9577c.tar.bz2 |
Merge branch 'findmpi-core-count' into release-3.10
Merge-request: !1405
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/FindMPI.cmake | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/Modules/FindMPI.cmake b/Modules/FindMPI.cmake index 578fcd2..7f4c44c 100644 --- a/Modules/FindMPI.cmake +++ b/Modules/FindMPI.cmake @@ -1036,13 +1036,8 @@ set(MPIEXEC_NUMPROC_FLAG "-n" CACHE STRING "Flag used by MPI to specify the num set(MPIEXEC_PREFLAGS "" CACHE STRING "These flags will be directly before the executable that is being run by mpiexec.") set(MPIEXEC_POSTFLAGS "" CACHE STRING "These flags will be placed after all flags passed to mpiexec.") -# Set the number of processes to the processor count and the previous default -# of 2 if that couldn't be determined. -include(${CMAKE_CURRENT_LIST_DIR}/ProcessorCount.cmake) -ProcessorCount(_MPIEXEC_NUMPROCS) -if("${_MPIEXEC_NUMPROCS}" EQUAL "0") - set(_MPIEXEC_NUMPROCS 2) -endif() +# Set the number of processes to the physical processor count +cmake_host_system_information(RESULT _MPIEXEC_NUMPROCS QUERY NUMBER_OF_PHYSICAL_CORES) set(MPIEXEC_MAX_NUMPROCS "${_MPIEXEC_NUMPROCS}" CACHE STRING "Maximum number of processors available to run MPI applications.") unset(_MPIEXEC_NUMPROCS) mark_as_advanced(MPIEXEC_EXECUTABLE MPIEXEC_NUMPROC_FLAG MPIEXEC_PREFLAGS MPIEXEC_POSTFLAGS MPIEXEC_MAX_NUMPROCS) |