Commit 8e53aaa9 authored by Alex Margolin's avatar Alex Margolin Committed by Alex Margolin
Browse files

FindMPI: add common paths and MPI releases

parent f1869341
Pipeline #253847 waiting for manual action with stages
in 12 minutes and 25 seconds
......@@ -339,6 +339,10 @@ set(_MPI_Cray_C_COMPILER_NAMES cc)
set(_MPI_Cray_Fortran_COMPILER_NAMES ftn)
# Common releases and locations, for cases where MPI is installed by not in $PATH
set(_MPI_COMMON_RELEASES openmpi mpich mvapich2 mvapich)
set(_MPI_COMMON_LOCATIONS /usr/lib /usr/lib64 /usr/local)
# Prepend vendor-specific compiler wrappers to the list. If we don't know the compiler,
# attempt all of them.
# By attempting vendor-specific compiler names first, we should avoid situations where the compiler wrapper
......@@ -1344,6 +1348,15 @@ elseif("${CMAKE_HOST_SYSTEM_NAME}" STREQUAL "FreeBSD")
# This macro enumerates installations of an MPI release in common locations on the system
foreach(_MPI_release_name IN LISTS _MPI_COMMON_RELEASES)
foreach(_MPI_folder_prefix IN LISTS _MPI_COMMON_LOCATIONS)
if(IS_DIRECTORY "${_MPI_folder_prefix}/${_MPI_release_name}")
list(APPEND MPI_HINT_DIRS "${_MPI_folder_prefix}/${MPI_RELEASE}")
# Most MPI distributions have some form of mpiexec or mpirun which gives us something we can look for.
# The MPI standard does not mandate the existence of either, but instead only makes requirements if a distribution
# ships an mpiexec program (mpirun executables are not regulated by the standard).
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment