Skip to content

Commit d34be21

Browse files
authored
add warning if JULIA_MPI_BINARY is inconsistent with MPIPreferences (#641)
1 parent 4cd7118 commit d34be21

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

src/MPI.jl

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,23 @@ include("mpiexec_wrapper.jl")
9797
include("deprecated.jl")
9898

9999
function __init__()
100+
101+
# an empty string was used to indicate "default"
102+
# https://github.com/JuliaParallel/MPI.jl/blob/v0.19.2/deps/build.jl#L142
103+
mpi_env_binary = get(ENV, "JULIA_MPI_BINARY", "")
104+
if mpi_env_binary != "" && mpi_env_binary != MPIPreferences.binary
105+
@info """
106+
The JULIA_MPI_BINARY environment variable is no longer used to configure the MPI binary.
107+
Please use the MPIPreferences.jl package instead:
108+
109+
MPIPreferences.use_system_binary() # use the system binary
110+
MPIPreferences.use_jll_binary() # use JLL binary
111+
112+
See https://juliaparallel.org/MPI.jl/stable/configuration/ for more details
113+
114+
""" ENV["JULIA_MPI_BINARY"]=mpi_env_binary MPIPreferences.binary
115+
end
116+
100117
@static if Sys.isunix()
101118
# dlopen the MPI library before any ccall:
102119
# - RTLD_GLOBAL is required for Open MPI

0 commit comments

Comments
 (0)