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
76dba17c
Commit
76dba17c
authored
Oct 28, 2021
by
Alex Margolin
Browse files
FindMPI: add common paths and MPI releases
parent
f1869341
Pipeline
#253425
waiting for manual action with stages
in 12 minutes and 17 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Modules/FindMPI.cmake
View file @
76dba17c
...
...
@@ -339,6 +339,8 @@ set(_MPI_Cray_C_COMPILER_NAMES cc)
set
(
_MPI_Cray_CXX_COMPILER_NAMES CC
)
set
(
_MPI_Cray_Fortran_COMPILER_NAMES ftn
)
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 +1346,22 @@ 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
macro
(
MPI_search_mpi_release_folder MPI_RELEASE
)
foreach
(
_MPI_folder_prefix IN LISTS _MPI_COMMON_LOCATIONS
)
if
(
IS_DIRECTORY
"
${
_MPI_folder_prefix
}
/
${
MPI_RELEASE
}
"
)
list
(
APPEND MPI_HINT_DIRS
"
${
_MPI_folder_prefix
}
/
${
MPI_RELEASE
}
"
)
endif
()
endforeach
()
endmacro
()
# Add common MPI releases, to improve the chance of finding it
MPI_search_mpi_release_folder
(
openmpi
)
MPI_search_mpi_release_folder
(
mpich
)
MPI_search_mpi_release_folder
(
mvapich2
)
MPI_search_mpi_release_folder
(
mvapich
)
MPI_search_mpi_prefix_folder
(
"/opt/intel/oneapi/mpi"
)
# 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