Skip to content

Switch default MPI to MPItrampoline #528

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "MPI"
uuid = "da04e1cc-30fd-572f-bb4f-1f8673147195"
authors = []
version = "0.19.0"
version = "0.19.3"

[deps]
Distributed = "8ba89e20-285c-5b6f-9357-94700520ee1b"
Expand Down
40 changes: 2 additions & 38 deletions deps/build.jl
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@ if update_config
end
end

binary = get(config, "binary", "")
default_binary = Sys.iswindows() ? "MicrosoftMPI_jll" : "MPItrampoline_jll"
binary = get(config, "binary", default_binary)

# 2. generate deps.jl
if binary == "system"
Expand Down Expand Up @@ -131,43 +132,6 @@ if binary == "system"
end
end

elseif binary == ""

@info "using default MPI jll"

if Sys.iswindows()
using MicrosoftMPI_jll
# run(MicrosoftMPI_jll.generate_compile_time_mpi_constants())
cp("compile_time_mpi_constants_msmpi_$(Sys.ARCH).jl", "compile_time_mpi_constants.jl"; force=true)
else
using MPICH_jll
run(MPICH_jll.generate_compile_time_mpi_constants())
end

deps = quote
if Sys.iswindows()
using MicrosoftMPI_jll
const libmpiconstants = MicrosoftMPI_jll.libload_time_mpi_constants
const _mpiexec = MicrosoftMPI_jll.mpiexec
const mpiexec_path = MicrosoftMPI_jll.mpiexec_path
else
using MPICH_jll
const libmpiconstants = MPICH_jll.libload_time_mpi_constants
const _mpiexec = MPICH_jll.mpiexec
const mpiexec_path = MPICH_jll.mpiexec_path
end

function __init__deps()
if (haskey(ENV, "SLURM_JOBID") || haskey(ENV, "PBS_JOBID") || haskey(ENV, "LSB_JOBID")) &&
get(ENV, "JULIA_MPI_CLUSTER_WARN", "") != "n"
@warn """
You appear to be using MPI.jl with the default MPI binary on a cluster.
We recommend using the system-provided MPI, see the Configuration section of the MPI.jl docs.
"""
end
end
end

elseif binary == "MPICH_jll"

@info "using MPICH_jll"
Expand Down