Skip to content

Commit

Permalink
Add MPICHABI support for Cray MPICH (#379)
Browse files Browse the repository at this point in the history
* Add MPICHABI support for Cray MPICH

Co-authored-by: Samuel Omlin <[email protected]>
Co-authored-by: Simon Byrne <[email protected]>
  • Loading branch information
3 people authored May 8, 2020
1 parent 3e52a3a commit 1971a5c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
4 changes: 3 additions & 1 deletion deps/build.jl
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,9 @@ if binary == "system"
impl, version = identify_implementation()
if (impl == MPICH && version >= v"3.1" ||
impl == IntelMPI && version > v"2014" ||
impl == MVAPICH && version >= v"2")
impl == MVAPICH && version >= v"2" ||
impl == CrayMPICH && version >= v"7")
# https://www.mpich.org/abi/
abi = "MPICH"
elseif impl == OpenMPI || impl == IBMSpectrumMPI
abi = "OpenMPI"
Expand Down
9 changes: 9 additions & 0 deletions src/implementations.jl
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ An enum corresponding to known MPI implementations
- `IntelMPI`: [Intel MPI](https://software.intel.com/en-us/mpi-library)
- `SpectrimMPI`: [IBM Spectrum MPI](https://www.ibm.com/us-en/marketplace/spectrum-mpi)
- `MVAPICH`: [MVAPICH](http://mvapich.cse.ohio-state.edu/)
- `CrayMPICH`: Part of the Cray Message Passing Toolkit (MPT)
# See also
Expand All @@ -61,6 +62,7 @@ An enum corresponding to known MPI implementations
IntelMPI
IBMSpectrumMPI
MVAPICH
CrayMPICH
end

"""
Expand Down Expand Up @@ -117,6 +119,13 @@ function identify_implementation()
if (m = match(r"^MVAPICH2? Version\s*:\t(\S*)\n", MPI_LIBRARY_VERSION_STRING)) !== nothing
version = VersionNumber(m.captures[1])
end

elseif occursin("CRAY MPICH", MPI_LIBRARY_VERSION_STRING)
impl = CrayMPICH
# "MPI VERSION : CRAY MPICH version 7.7.10 (ANL base 3.2)\n"
if (m = match(r"CRAY MPICH version (\d+.\d+.\d+)", MPI_LIBRARY_VERSION_STRING)) !== nothing
version = VersionNumber(m.captures[1])
end
end

return impl, version
Expand Down

0 comments on commit 1971a5c

Please sign in to comment.