Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Alex Margolin
CMake
Commits
8e53aaa9
Commit
8e53aaa9
authored
Oct 28, 2021
by
Alex Margolin
Committed by
Alex Margolin
Oct 31, 2021
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
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Modules/FindMPI.cmake
View file @
8e53aaa9
...
...
@@ -339,6 +339,10 @@ set(_MPI_Cray_C_COMPILER_NAMES cc)
set
(
_MPI_Cray_CXX_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")
MPI_search_mpi_prefix_folder
(
"/usr/local/mpi"
)
endif
()
# 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
}
"
)
endif
()
endforeach
()
endforeach
()
# 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).
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment