Skip to content
  • Christian Pfeiffer's avatar
    FindMPI: Use physical cores for MPIEXEC_MAX_NUMPROCS · 1610f757
    Christian Pfeiffer authored and Brad King's avatar Brad King committed
    Since commit v3.9.0-rc1~224^2~1 (FindMPI: MPIEXEC handling improvements,
    2017-04-21) the `ProcessorCount` module is being used to initialize
    `MPIEXEC_MAX_NUMPROCS`.  However, this leads to the logical cores being
    counted rather than the physical ones, and some MPI implementations like
    OpenMPI will error if mpiexec is called with that number.  Switch it to
    the number of physical cores using `cmake_host_system_information`.
    
    This ensures that if `MPIEXEC_MAX_NUMPROCS` is being used to set up MPI
    tests with CTest or similar that the tests won't spuriously fail due to
    OpenMPI refusing to start the application.
    1610f757