Skip to content
22 changes: 12 additions & 10 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
name = "MPI"
uuid = "da04e1cc-30fd-572f-bb4f-1f8673147195"
version = "0.20.24"
authors = []
version = "0.20.23"

[deps]
Distributed = "8ba89e20-285c-5b6f-9357-94700520ee1b"
DocStringExtensions = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae"
Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb"
MPIABI_jll = "b5ada748-db0f-5fc0-8972-9331c762740c"
MPICH_jll = "7cb0a576-ebde-5e09-9194-50597f1243b4"
MPIPreferences = "3da0fdf6-3ccc-4f1b-acd9-58baa6c99267"
MPItrampoline_jll = "f1f71cc9-e9ae-5b93-9b94-4fe0e1ad3748"
Expand All @@ -18,12 +19,21 @@ Requires = "ae029012-a4dd-5104-9daa-d747884805df"
Serialization = "9e88b42a-f829-5b0c-bbe9-9e923198166b"
Sockets = "6462fe0b-24de-5631-8697-dd941f90decc"

[weakdeps]
AMDGPU = "21141c5a-9bdb-4563-92ae-f87d6854732e"
CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba"

[extensions]
AMDGPUExt = "AMDGPU"
CUDAExt = "CUDA"

[compat]
Distributed = "1"
AMDGPU = "0.6, 0.7, 0.8, 0.9, 1, 2"
CUDA = "3, 4, 5"
Distributed = "1"
DocStringExtensions = "0.8, 0.9"
Libdl = "1"
MPIABI_jll = "0.1.1"
MPICH_jll = "4"
MPIPreferences = "0.1.8"
MPItrampoline_jll = "5"
Expand All @@ -35,14 +45,6 @@ Serialization = "1"
Sockets = "1"
julia = "1.10"

[extensions]
AMDGPUExt = "AMDGPU"
CUDAExt = "CUDA"

[extras]
AMDGPU = "21141c5a-9bdb-4563-92ae-f87d6854732e"
CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba"

[weakdeps]
AMDGPU = "21141c5a-9bdb-4563-92ae-f87d6854732e"
CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba"
2 changes: 1 addition & 1 deletion docs/src/knownissues.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ MPID_nem_tcp_get_business_card(397):
GetSockInterfaceAddr(370)..........: gethostbyname failed, bogon (errno 0)
```

A workaround is provided in the [documentation of the MOOSE framework](https://mooseframework.inl.gov/help/troubleshooting.html) and we report it here for reference:
A workaround is provided in the [documentation of the MOOSE framework](https://mooseframework.inl.gov/moose/help/troubleshooting.html) and we report it here for reference:

* obtain your hostname
```console
Expand Down
2 changes: 1 addition & 1 deletion lib/MPIPreferences/Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "MPIPreferences"
uuid = "3da0fdf6-3ccc-4f1b-acd9-58baa6c99267"
authors = []
version = "0.1.11"
version = "0.1.12"

[deps]
Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb"
Expand Down
32 changes: 18 additions & 14 deletions lib/MPIPreferences/src/MPIPreferences.jl
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@ const DEPS_LOADED = Ref(false)

The currently selected binary. The possible values are

- `"MPIABI_jll"`: use the binary provided by [MPIABI_jll](https://github.com/JuliaBinaryWrappers/MPIABI_jll.jl)
- `"MPICH_jll"`: use the binary provided by [MPICH_jll](https://github.com/JuliaBinaryWrappers/MPICH_jll.jl)
- `"OpenMPI_jll"`: use the binary provided by [OpenMPI_jll](https://github.com/JuliaBinaryWrappers/OpenMPI_jll.jl)
- `"MicrosoftMPI_jll"`: use binary provided by [MicrosoftMPI_jll](https://github.com/JuliaBinaryWrappers/MicrosoftMPI_jll.jl/)
- `"MPItrampoline_jll"`: use the binary provided by [MPItrampoline_jll](https://github.com/JuliaBinaryWrappers/MPItrampoline_jll.jl/)
- `"MicrosoftMPI_jll"`: use binary provided by [MicrosoftMPI_jll](https://github.com/JuliaBinaryWrappers/MicrosoftMPI_jll.jl/)
- `"OpenMPI_jll"`: use the binary provided by [OpenMPI_jll](https://github.com/JuliaBinaryWrappers/OpenMPI_jll.jl)
- `"system"`: use a system-provided binary.

"""
Expand All @@ -30,22 +31,24 @@ const binary = @load_preference("binary", Sys.iswindows() ? "MicrosoftMPI_jll" :

The ABI (application binary interface) of the currently selected binary. Supported values are:

- `"MPIABI"`: MPI-ABI-compatible ABI (https://www.mpi-form.org/)
- `"MPICH"`: MPICH-compatible ABI (https://www.mpich.org/abi/)
- `"OpenMPI"`: Open MPI compatible ABI (Open MPI, IBM Spectrum MPI, Fujitsu MPI)
- `"MicrosoftMPI"`: Microsoft MPI
- `"MPItrampoline"`: MPItrampoline
- `"HPE MPT"`: HPE MPT
- `"MicrosoftMPI"`: Microsoft MPI
- `"OpenMPI"`: Open MPI compatible ABI (Open MPI, IBM Spectrum MPI, Fujitsu MPI)
"""
const abi = if binary == "system"
@load_preference("abi")
elseif binary == "MicrosoftMPI_jll"
"MicrosoftMPI"
elseif binary == "MPIABI_jll"
"MPIABI"
elseif binary == "MPICH_jll"
"MPICH"
elseif binary == "OpenMPI_jll"
"OpenMPI"
elseif binary == "MPItrampoline_jll"
"MPItrampoline"
elseif binary == "MicrosoftMPI_jll"
"MicrosoftMPI"
elseif binary == "OpenMPI_jll"
"OpenMPI"
else
error("Unknown binary: $binary")
end
Expand All @@ -66,16 +69,17 @@ Switches the underlying MPI implementation to one provided by JLL packages. A
restart of Julia is required for the changes to take effect.

Available options are:
- `"MicrosoftMPI_jll"` (Only option and default on Windows)
- `"MPIABI_jll"`
- `"MPICH_jll"` (Default on all other platform)
- `"OpenMPI_jll"`
- `"MPItrampoline_jll"`
- `"MicrosoftMPI_jll"` (Only option and default on Windows)
- `"OpenMPI_jll"`

The `export_prefs` option determines whether the preferences being set should be
stored within `LocalPreferences.toml` or `Project.toml`.
"""
function use_jll_binary(binary = Sys.iswindows() ? "MicrosoftMPI_jll" : "MPICH_jll"; export_prefs=false, force=true)
known_binaries = ("MicrosoftMPI_jll", "MPICH_jll", "OpenMPI_jll", "MPItrampoline_jll")
known_binaries = ("MPIABI_jll", "MPICH_jll", "MicrosoftMPI_jll", "MPItrampoline_jll", "OpenMPI_jll")
binary in known_binaries ||
error("""
Unknown jll: $binary.
Expand Down Expand Up @@ -118,7 +122,7 @@ end

"""
use_system_binary(;
library_names = ["libmpi", "libmpi_ibm", "msmpi", "libmpich", "libmpi_cray", "libmpitrampoline"],
library_names = ["libmpi", "libmpi_abi", "libmpi_ibm", "msmpi", "libmpich", "libmpi_cray", "libmpitrampoline"],
extra_paths = String[],
mpiexec = "mpiexec",
abi = nothing,
Expand Down Expand Up @@ -162,7 +166,7 @@ Options:
- `force`: if `true`, the preferences are set even if they are already set.
"""
function use_system_binary(;
library_names=["libmpi", "libmpi_ibm", "msmpi", "libmpich", "libmpi_cray", "libmpitrampoline"],
library_names=["libmpi", "libmpi_abi", "libmpi_ibm", "msmpi", "libmpich", "libmpi_cray", "libmpitrampoline"],
extra_paths=String[],
mpiexec="mpiexec",
abi=nothing,
Expand Down
31 changes: 18 additions & 13 deletions src/api/api.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,21 @@ export MPI_Aint, MPI_Count, MPI_Offset, MPI_Status,
import MPIPreferences
using Libdl

if MPIPreferences.binary == "MPICH_jll"
import MPICH_jll: MPICH_jll, libmpi, libmpi_handle, mpiexec
const libmpiconstants = nothing
elseif MPIPreferences.binary == "OpenMPI_jll"
import OpenMPI_jll: OpenMPI_jll, libmpi, libmpi_handle, mpiexec
if MPIPreferences.binary == "MPIABI_jll"
import MPIABI_jll: MPIABI_jll, libmpi, libmpi_handle, mpiexec
const libmpiconstants = nothing
elseif MPIPreferences.binary == "MicrosoftMPI_jll"
import MicrosoftMPI_jll: MicrosoftMPI_jll, libmpi, libmpi_handle, mpiexec
elseif MPIPreferences.binary == "MPICH_jll"
import MPICH_jll: MPICH_jll, libmpi, libmpi_handle, mpiexec
const libmpiconstants = nothing
elseif MPIPreferences.binary == "MPItrampoline_jll"
import MPItrampoline_jll: MPItrampoline_jll, libmpi, libmpi_handle, mpiexec
const libmpiconstants = MPItrampoline_jll.libload_time_mpi_constants_path
elseif MPIPreferences.binary == "MicrosoftMPI_jll"
import MicrosoftMPI_jll: MicrosoftMPI_jll, libmpi, libmpi_handle, mpiexec
const libmpiconstants = nothing
elseif MPIPreferences.binary == "OpenMPI_jll"
import OpenMPI_jll: OpenMPI_jll, libmpi, libmpi_handle, mpiexec
const libmpiconstants = nothing
elseif MPIPreferences.binary == "system"
import MPIPreferences.System: libmpi, libmpi_handle, mpiexec
const libmpiconstants = nothing
Expand All @@ -33,7 +36,7 @@ const initexprs = Any[]
"""
@const_ref name T expr

Defines an constant binding
Defines a constant binding
```julia
const name = Ref{T}()
```
Expand All @@ -48,14 +51,16 @@ macro const_ref(name, T, expr)
:(const $(esc(name)) = Ref{$T}())
end

@static if MPIPreferences.abi == "MPICH"
@static if MPIPreferences.abi == "MPIABI"
include("mpiabi.jl")
elseif MPIPreferences.abi == "MPICH"
include("mpich.jl")
elseif MPIPreferences.abi == "OpenMPI"
include("openmpi.jl")
elseif MPIPreferences.abi == "MicrosoftMPI"
include("microsoftmpi.jl")
elseif MPIPreferences.abi == "MPItrampoline"
include("mpitrampoline.jl")
elseif MPIPreferences.abi == "MicrosoftMPI"
include("microsoftmpi.jl")
elseif MPIPreferences.abi == "OpenMPI"
include("openmpi.jl")
elseif MPIPreferences.abi == "HPE MPT"
include("mpt.jl")
else
Expand Down
Loading
Loading