Skip to content

Commit 393c5b8

Browse files
authored
[MPIPreferences] Add libmpi_cray to default names and improve error message (#614)
1 parent a8d4d64 commit 393c5b8

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

lib/MPIPreferences/src/MPIPreferences.jl

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ end
8686

8787
"""
8888
MPIPreferences.use_system_binary(;
89-
library_names = ["libmpi", "libmpi_ibm", "msmpi", "libmpich", "libmpitrampoline"],
89+
library_names = ["libmpi", "libmpi_ibm", "msmpi", "libmpich", "libmpi_cray", "libmpitrampoline"],
9090
mpiexec = "mpiexec",
9191
abi = nothing,
9292
export_prefs = false,
@@ -115,7 +115,7 @@ Options:
115115
- `force`: if `true`, the preferences are set even if they are already set.
116116
"""
117117
function use_system_binary(;
118-
library_names=["libmpi", "libmpi_ibm", "msmpi", "libmpich", "libmpitrampoline"],
118+
library_names=["libmpi", "libmpi_ibm", "msmpi", "libmpich", "libmpi_cray", "libmpitrampoline"],
119119
mpiexec="mpiexec",
120120
abi=nothing,
121121
export_prefs=false,
@@ -127,7 +127,11 @@ function use_system_binary(;
127127
find_library(library_names)
128128
end
129129
if libmpi == ""
130-
error("MPI library could not be found")
130+
error("""
131+
MPI library could not be found with the following name(s):
132+
$(library_names)
133+
If you want to try different name(s) for the MPI library, use
134+
MPIPreferences.use_system_binary(; library_names=[...])""")
131135
end
132136
if isnothing(abi)
133137
abi = identify_abi(libmpi)

0 commit comments

Comments
 (0)