diff --git a/Project.toml b/Project.toml index ccbddc9db..34537ce18 100644 --- a/Project.toml +++ b/Project.toml @@ -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" @@ -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" @@ -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" diff --git a/docs/src/knownissues.md b/docs/src/knownissues.md index 660651dfc..2e9e903e9 100644 --- a/docs/src/knownissues.md +++ b/docs/src/knownissues.md @@ -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 diff --git a/lib/MPIPreferences/Project.toml b/lib/MPIPreferences/Project.toml index 23cd2f778..ca94b07f7 100644 --- a/lib/MPIPreferences/Project.toml +++ b/lib/MPIPreferences/Project.toml @@ -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" diff --git a/lib/MPIPreferences/src/MPIPreferences.jl b/lib/MPIPreferences/src/MPIPreferences.jl index a65623cfe..a3e3a0689 100644 --- a/lib/MPIPreferences/src/MPIPreferences.jl +++ b/lib/MPIPreferences/src/MPIPreferences.jl @@ -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. """ @@ -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 @@ -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. @@ -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, @@ -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, diff --git a/src/api/api.jl b/src/api/api.jl index b46701c5b..5b731c3b6 100644 --- a/src/api/api.jl +++ b/src/api/api.jl @@ -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 @@ -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}() ``` @@ -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 diff --git a/src/api/mpiabi.jl b/src/api/mpiabi.jl new file mode 100644 index 000000000..03263bef6 --- /dev/null +++ b/src/api/mpiabi.jl @@ -0,0 +1,442 @@ +const MPI_VERSION = 5 +const MPI_SUBVERSION = 0 + +const MPI_ABI_VERSION = 1 +const MPI_ABI_SUBVERSION = 0 + +const MPI_Aint = Int +const MPI_Offset = Int64 +const MPI_Count = Int64 + +const MPI_Fint = Int32 + +struct MPI_Status + MPI_SOURCE::Cint + MPI_TAG::Cint + MPI_ERROR::Cint + MPI_internal1::Cint + MPI_internal2::Cint + MPI_internal3::Cint + MPI_internal4::Cint + MPI_internal5::Cint +end + +const MPI_Op = Ptr{Cvoid} +@const_ref MPI_OP_NULL MPI_Op UInt(0x00000020) +@const_ref MPI_SUM MPI_Op UInt(0x00000021) +@const_ref MPI_MIN MPI_Op UInt(0x00000022) +@const_ref MPI_MAX MPI_Op UInt(0x00000023) +@const_ref MPI_PROD MPI_Op UInt(0x00000024) +@const_ref MPI_BAND MPI_Op UInt(0x00000028) +@const_ref MPI_BOR MPI_Op UInt(0x00000029) +@const_ref MPI_BXOR MPI_Op UInt(0x0000002a) +@const_ref MPI_LAND MPI_Op UInt(0x00000030) +@const_ref MPI_LOR MPI_Op UInt(0x00000031) +@const_ref MPI_LXOR MPI_Op UInt(0x00000032) +@const_ref MPI_MINLOC MPI_Op UInt(0x00000038) +@const_ref MPI_MAXLOC MPI_Op UInt(0x00000039) +@const_ref MPI_REPLACE MPI_Op UInt(0x0000003c) +@const_ref MPI_NO_OP MPI_Op UInt(0x0000003d) + +const MPI_Comm = Ptr{Cvoid} +@const_ref MPI_COMM_NULL MPI_Comm UInt(0x00000100) +@const_ref MPI_COMM_WORLD MPI_Comm UInt(0x00000101) +@const_ref MPI_COMM_SELF MPI_Comm UInt(0x00000102) + +const MPI_Group = Ptr{Cvoid} +@const_ref MPI_GROUP_NULL MPI_Group UInt(0x00000108) +@const_ref MPI_GROUP_EMPTY MPI_Group UInt(0x00000109) + +const MPI_Win = Ptr{Cvoid} +@const_ref MPI_WIN_NULL MPI_Win UInt(0x00000110) + +const MPI_File = Ptr{Cvoid} +@const_ref MPI_FILE_NULL MPI_File UInt(0x00000118) + +const MPI_Session = Ptr{Cvoid} +@const_ref MPI_SESSION_NULL MPI_Session UInt(0x00000120) + +const MPI_Message = Ptr{Cvoid} +@const_ref MPI_MESSAGE_NULL MPI_Message UInt(0x00000128) +@const_ref MPI_MESSAGE_NO_PROC MPI_Message UInt(0x00000129) + +const MPI_Info = Ptr{Cvoid} +@const_ref MPI_INFO_NULL MPI_Info UInt(0x00000130) +@const_ref MPI_INFO_ENV MPI_Info UInt(0x00000131) + +const MPI_Errhandler = Ptr{Cvoid} +@const_ref MPI_ERRHANDLER_NULL MPI_Errhandler UInt(0x00000140) +@const_ref MPI_ERRORS_ARE_FATAL MPI_Errhandler UInt(0x00000141) +@const_ref MPI_ERRORS_ABORT MPI_Errhandler UInt(0x00000142) +@const_ref MPI_ERRORS_RETURN MPI_Errhandler UInt(0x00000143) + +const MPI_Request = Ptr{Cvoid} +@const_ref MPI_REQUEST_NULL MPI_Request UInt(0x00000180) + +const MPI_Datatype = Ptr{Cvoid} +@const_ref MPI_DATATYPE_NULL MPI_Datatype UInt(0x00000200) +@const_ref MPI_AINT MPI_Datatype UInt(0x00000201) +@const_ref MPI_COUNT MPI_Datatype UInt(0x00000202) +@const_ref MPI_OFFSET MPI_Datatype UInt(0x00000203) +@const_ref MPI_PACKED MPI_Datatype UInt(0x00000207) +@const_ref MPI_SHORT MPI_Datatype UInt(0x00000208) +@const_ref MPI_INT MPI_Datatype UInt(0x00000209) +@const_ref MPI_LONG MPI_Datatype UInt(0x0000020a) +@const_ref MPI_LONG_LONG MPI_Datatype UInt(0x0000020b) +const MPI_LONG_LONG_INT = MPI_LONG_LONG +@const_ref MPI_UNSIGNED_SHORT MPI_Datatype UInt(0x0000020c) +@const_ref MPI_UNSIGNED MPI_Datatype UInt(0x0000020d) +@const_ref MPI_UNSIGNED_LONG MPI_Datatype UInt(0x0000020e) +@const_ref MPI_UNSIGNED_LONG_LONG MPI_Datatype UInt(0x0000020f) +@const_ref MPI_FLOAT MPI_Datatype UInt(0x00000210) +@const_ref MPI_C_FLOAT_COMPLEX MPI_Datatype UInt(0x00000212) +const MPI_C_COMPLEX = MPI_C_FLOAT_COMPLEX +@const_ref MPI_CXX_FLOAT_COMPLEX MPI_Datatype UInt(0x00000213) +@const_ref MPI_DOUBLE MPI_Datatype UInt(0x00000214) +@const_ref MPI_C_DOUBLE_COMPLEX MPI_Datatype UInt(0x00000216) +@const_ref MPI_CXX_DOUBLE_COMPLEX MPI_Datatype UInt(0x00000217) +@const_ref MPI_LOGICAL MPI_Datatype UInt(0x00000218) +@const_ref MPI_INTEGER MPI_Datatype UInt(0x00000219) +@const_ref MPI_REAL MPI_Datatype UInt(0x0000021a) +@const_ref MPI_COMPLEX MPI_Datatype UInt(0x0000021b) +@const_ref MPI_DOUBLE_PRECISION MPI_Datatype UInt(0x0000021c) +@const_ref MPI_DOUBLE_COMPLEX MPI_Datatype UInt(0x0000021d) +@const_ref MPI_CHARACTER MPI_Datatype UInt(0x0000021e) +@const_ref MPI_LONG_DOUBLE MPI_Datatype UInt(0x00000220) +@const_ref MPI_C_LONG_DOUBLE_COMPLEX MPI_Datatype UInt(0x00000224) +@const_ref MPI_CXX_LONG_DOUBLE_COMPLEX MPI_Datatype UInt(0x00000225) +@const_ref MPI_FLOAT_INT MPI_Datatype UInt(0x00000228) +@const_ref MPI_DOUBLE_INT MPI_Datatype UInt(0x00000229) +@const_ref MPI_LONG_INT MPI_Datatype UInt(0x0000022a) +@const_ref MPI_2INT MPI_Datatype UInt(0x0000022b) +@const_ref MPI_SHORT_INT MPI_Datatype UInt(0x0000022c) +@const_ref MPI_LONG_DOUBLE_INT MPI_Datatype UInt(0x0000022d) +@const_ref MPI_2REAL MPI_Datatype UInt(0x00000230) +@const_ref MPI_2DOUBLE_PRECISION MPI_Datatype UInt(0x00000231) +@const_ref MPI_2INTEGER MPI_Datatype UInt(0x00000232) +@const_ref MPI_C_BOOL MPI_Datatype UInt(0x00000238) +@const_ref MPI_CXX_BOOL MPI_Datatype UInt(0x00000239) +@const_ref MPI_WCHAR MPI_Datatype UInt(0x0000023c) +@const_ref MPI_INT8_T MPI_Datatype UInt(0x00000240) +@const_ref MPI_UINT8_T MPI_Datatype UInt(0x00000241) +@const_ref MPI_CHAR MPI_Datatype UInt(0x00000243) +@const_ref MPI_SIGNED_CHAR MPI_Datatype UInt(0x00000244) +@const_ref MPI_UNSIGNED_CHAR MPI_Datatype UInt(0x00000245) +@const_ref MPI_BYTE MPI_Datatype UInt(0x00000247) +@const_ref MPI_INT16_T MPI_Datatype UInt(0x00000248) +@const_ref MPI_UINT16_T MPI_Datatype UInt(0x00000249) +@const_ref MPI_INT32_T MPI_Datatype UInt(0x00000250) +@const_ref MPI_UINT32_T MPI_Datatype UInt(0x00000251) +@const_ref MPI_INT64_T MPI_Datatype UInt(0x00000258) +@const_ref MPI_UINT64_T MPI_Datatype UInt(0x00000259) +@const_ref MPI_LOGICAL1 MPI_Datatype UInt(0x000002c0) +@const_ref MPI_INTEGER1 MPI_Datatype UInt(0x000002c1) +@const_ref MPI_LOGICAL2 MPI_Datatype UInt(0x000002c8) +@const_ref MPI_INTEGER2 MPI_Datatype UInt(0x000002c9) +@const_ref MPI_REAL2 MPI_Datatype UInt(0x000002ca) +@const_ref MPI_LOGICAL4 MPI_Datatype UInt(0x000002d0) +@const_ref MPI_INTEGER4 MPI_Datatype UInt(0x000002d1) +@const_ref MPI_REAL4 MPI_Datatype UInt(0x000002d2) +@const_ref MPI_COMPLEX4 MPI_Datatype UInt(0x000002d3) +@const_ref MPI_LOGICAL8 MPI_Datatype UInt(0x000002d8) +@const_ref MPI_INTEGER8 MPI_Datatype UInt(0x000002d9) +@const_ref MPI_REAL8 MPI_Datatype UInt(0x000002da) +@const_ref MPI_COMPLEX8 MPI_Datatype UInt(0x000002db) +@const_ref MPI_LOGICAL16 MPI_Datatype UInt(0x000002e0) +@const_ref MPI_INTEGER16 MPI_Datatype UInt(0x000002e1) +@const_ref MPI_REAL16 MPI_Datatype UInt(0x000002e2) +@const_ref MPI_COMPLEX16 MPI_Datatype UInt(0x000002e3) +@const_ref MPI_COMPLEX32 MPI_Datatype UInt(0x000002eb) + +# Fortran 1977 Status Size and Indices +@const_ref MPI_F_STATUS_SIZE Cint 8 +@const_ref MPI_F_SOURCE Cint 0 +@const_ref MPI_F_TAG Cint 1 +@const_ref MPI_F_ERROR Cint 2 + +# Error Classes +@const_ref MPI_SUCCESS Cint 0 + +@const_ref MPI_ERR_BUFFER Cint 1 +@const_ref MPI_ERR_COUNT Cint 2 +@const_ref MPI_ERR_TYPE Cint 3 +@const_ref MPI_ERR_TAG Cint 4 +@const_ref MPI_ERR_COMM Cint 5 +@const_ref MPI_ERR_RANK Cint 6 +@const_ref MPI_ERR_REQUEST Cint 7 +@const_ref MPI_ERR_ROOT Cint 8 +@const_ref MPI_ERR_GROUP Cint 9 +@const_ref MPI_ERR_OP Cint 10 +@const_ref MPI_ERR_TOPOLOGY Cint 11 +@const_ref MPI_ERR_DIMS Cint 12 +@const_ref MPI_ERR_ARG Cint 13 +@const_ref MPI_ERR_UNKNOWN Cint 14 +@const_ref MPI_ERR_TRUNCATE Cint 15 +@const_ref MPI_ERR_OTHER Cint 16 +@const_ref MPI_ERR_INTERN Cint 17 +@const_ref MPI_ERR_PENDING Cint 18 +@const_ref MPI_ERR_IN_STATUS Cint 19 +@const_ref MPI_ERR_ACCESS Cint 20 +@const_ref MPI_ERR_AMODE Cint 21 +@const_ref MPI_ERR_ASSERT Cint 22 +@const_ref MPI_ERR_BAD_FILE Cint 23 +@const_ref MPI_ERR_BASE Cint 24 +@const_ref MPI_ERR_CONVERSION Cint 25 +@const_ref MPI_ERR_DISP Cint 26 +@const_ref MPI_ERR_DUP_DATAREP Cint 27 +@const_ref MPI_ERR_FILE_EXISTS Cint 28 +@const_ref MPI_ERR_FILE_IN_USE Cint 29 +@const_ref MPI_ERR_FILE Cint 30 +@const_ref MPI_ERR_INFO_KEY Cint 31 +@const_ref MPI_ERR_INFO_NOKEY Cint 32 +@const_ref MPI_ERR_INFO_VALUE Cint 33 +@const_ref MPI_ERR_INFO Cint 34 +@const_ref MPI_ERR_IO Cint 35 +@const_ref MPI_ERR_KEYVAL Cint 36 +@const_ref MPI_ERR_LOCKTYPE Cint 37 +@const_ref MPI_ERR_NAME Cint 38 +@const_ref MPI_ERR_NO_MEM Cint 39 +@const_ref MPI_ERR_NOT_SAME Cint 40 +@const_ref MPI_ERR_NO_SPACE Cint 41 +@const_ref MPI_ERR_NO_SUCH_FILE Cint 42 +@const_ref MPI_ERR_PORT Cint 43 +@const_ref MPI_ERR_QUOTA Cint 44 +@const_ref MPI_ERR_READ_ONLY Cint 45 +@const_ref MPI_ERR_RMA_ATTACH Cint 46 +@const_ref MPI_ERR_RMA_CONFLICT Cint 47 +@const_ref MPI_ERR_RMA_RANGE Cint 48 +@const_ref MPI_ERR_RMA_SHARED Cint 49 +@const_ref MPI_ERR_RMA_SYNC Cint 50 +@const_ref MPI_ERR_SERVICE Cint 51 +@const_ref MPI_ERR_SIZE Cint 52 +@const_ref MPI_ERR_SPAWN Cint 53 +@const_ref MPI_ERR_UNSUPPORTED_DATAREP Cint 54 +@const_ref MPI_ERR_UNSUPPORTED_OPERATION Cint 55 +@const_ref MPI_ERR_WIN Cint 56 +@const_ref MPI_ERR_RMA_FLAVOR Cint 57 +@const_ref MPI_ERR_PROC_ABORTED Cint 58 +@const_ref MPI_ERR_VALUE_TOO_LARGE Cint 59 +@const_ref MPI_ERR_SESSION Cint 60 +@const_ref MPI_ERR_ERRHANDLER Cint 61 +@const_ref MPI_ERR_ABI Cint 62 + +@const_ref MPI_T_ERR_CANNOT_INIT Cint 1001 +@const_ref MPI_T_ERR_NOT_ACCESSIBLE Cint 1002 +@const_ref MPI_T_ERR_NOT_INITIALIZED Cint 1003 +@const_ref MPI_T_ERR_NOT_SUPPORTED Cint 1004 +@const_ref MPI_T_ERR_MEMORY Cint 1005 +@const_ref MPI_T_ERR_INVALID Cint 1006 +@const_ref MPI_T_ERR_INVALID_INDEX Cint 1007 +@const_ref MPI_T_ERR_INVALID_ITEM Cint 1008 +@const_ref MPI_T_ERR_INVALID_SESSION Cint 1009 +@const_ref MPI_T_ERR_INVALID_HANDLE Cint 1010 +@const_ref MPI_T_ERR_INVALID_NAME Cint 1011 +@const_ref MPI_T_ERR_OUT_OF_HANDLES Cint 1012 +@const_ref MPI_T_ERR_OUT_OF_SESSIONS Cint 1013 +@const_ref MPI_T_ERR_CVAR_SET_NOT_NOW Cint 1014 +@const_ref MPI_T_ERR_CVAR_SET_NEVER Cint 1015 +@const_ref MPI_T_ERR_PVAR_NO_WRITE Cint 1016 +@const_ref MPI_T_ERR_PVAR_NO_STARTSTOP Cint 1017 +@const_ref MPI_T_ERR_PVAR_NO_ATOMIC Cint 1018 + +@const_ref MPI_ERR_LASTCODE Cint 0x3fff + +# Buffer Address Constants +@const_ref MPI_BOTTOM Ptr{Cvoid} 0 +@const_ref MPI_IN_PLACE Ptr{Cvoid} 1 +@const_ref MPI_BUFFER_AUTOMATIC Ptr{Cvoid} 2 + +# Empty/Ignored Constants +@const_ref MPI_ARGV_NULL Ptr{Cvoid} 0 +@const_ref MPI_ARGVS_NULL Ptr{Cvoid} 0 +@const_ref MPI_ERRCODES_IGNORE Ptr{Cint} 0 +@const_ref MPI_STATUS_IGNORE Ptr{MPI_Status} 0 +@const_ref MPI_STATUSES_IGNORE Ptr{MPI_Status} 0 +@const_ref MPI_UNWEIGHTED Ptr{Cint} 10 +@const_ref MPI_WEIGHTS_EMPTY Ptr{Cint} 11 + +# Maximum Sizes for Strings +@const_ref MPI_MAX_DATAREP_STRING Cint 128 +@const_ref MPI_MAX_ERROR_STRING Cint 512 +@const_ref MPI_MAX_INFO_KEY Cint 256 +@const_ref MPI_MAX_INFO_VAL Cint 1024 +@const_ref MPI_MAX_LIBRARY_VERSION_STRING Cint 8192 +@const_ref MPI_MAX_OBJECT_NAME Cint 128 +@const_ref MPI_MAX_PORT_NAME Cint 1024 +@const_ref MPI_MAX_PROCESSOR_NAME Cint 256 +@const_ref MPI_MAX_STRINGTAG_LEN Cint 1024 +@const_ref MPI_MAX_PSET_NAME_LEN Cint 1024 +# Assorted Constants +@const_ref MPI_BSEND_OVERHEAD Cint 512 + +# Mode Constants - must be powers-of-2 to support OR-ing +# File Open Modes +@const_ref MPI_MODE_APPEND Cint 1 +@const_ref MPI_MODE_CREATE Cint 2 +@const_ref MPI_MODE_DELETE_ON_CLOSE Cint 4 +@const_ref MPI_MODE_EXCL Cint 8 +@const_ref MPI_MODE_RDONLY Cint 16 +@const_ref MPI_MODE_RDWR Cint 32 +@const_ref MPI_MODE_SEQUENTIAL Cint 64 +@const_ref MPI_MODE_UNIQUE_OPEN Cint 128 +@const_ref MPI_MODE_WRONLY Cint 256 +# Window Assertion Modes +@const_ref MPI_MODE_NOCHECK Cint 1024 +@const_ref MPI_MODE_NOPRECEDE Cint 2048 +@const_ref MPI_MODE_NOPUT Cint 4096 +@const_ref MPI_MODE_NOSTORE Cint 8192 +@const_ref MPI_MODE_NOSUCCEED Cint 16384 + +# Wildcard values - must be negative +@const_ref MPI_ANY_SOURCE Cint -1 +@const_ref MPI_ANY_TAG Cint -2 +# Rank sentinels - must be negative +@const_ref MPI_PROC_NULL Cint -3 +@const_ref MPI_ROOT Cint -4 +# Multi-purpose sentinel - must be negative +@const_ref MPI_UNDEFINED Cint -32766 + +# Thread Support - monotonic values, SINGLE < FUNNELED < SERIALIZED < MULTIPLE. +@const_ref MPI_THREAD_SINGLE Cint 0 +@const_ref MPI_THREAD_FUNNELED Cint 1024 +@const_ref MPI_THREAD_SERIALIZED Cint 2048 +@const_ref MPI_THREAD_MULTIPLE Cint 4096 + +# Array Datatype Order +@const_ref MPI_ORDER_C Cint 0xC +@const_ref MPI_ORDER_FORTRAN Cint 0xF + +# Array Datatype Distribution +@const_ref MPI_DISTRIBUTE_NONE Cint 16 +@const_ref MPI_DISTRIBUTE_BLOCK Cint 17 +@const_ref MPI_DISTRIBUTE_CYCLIC Cint 18 +@const_ref MPI_DISTRIBUTE_DFLT_DARG Cint 19 + +# Datatype Decoding Combiners +@const_ref MPI_COMBINER_NAMED Cint 101 +@const_ref MPI_COMBINER_DUP Cint 102 +@const_ref MPI_COMBINER_CONTIGUOUS Cint 103 +@const_ref MPI_COMBINER_VECTOR Cint 104 +@const_ref MPI_COMBINER_HVECTOR Cint 105 +@const_ref MPI_COMBINER_INDEXED Cint 106 +@const_ref MPI_COMBINER_HINDEXED Cint 107 +@const_ref MPI_COMBINER_INDEXED_BLOCK Cint 108 +@const_ref MPI_COMBINER_HINDEXED_BLOCK Cint 109 +@const_ref MPI_COMBINER_STRUCT Cint 110 +@const_ref MPI_COMBINER_SUBARRAY Cint 111 +@const_ref MPI_COMBINER_DARRAY Cint 112 +@const_ref MPI_COMBINER_F90_REAL Cint 113 +@const_ref MPI_COMBINER_F90_COMPLEX Cint 114 +@const_ref MPI_COMBINER_F90_INTEGER Cint 115 +@const_ref MPI_COMBINER_RESIZED Cint 116 +@const_ref MPI_COMBINER_VALUE_INDEX Cint 117 + +# Fortran Datatype Matching +@const_ref MPIX_TYPECLASS_LOGICAL Cint 191 +@const_ref MPI_TYPECLASS_INTEGER Cint 192 +@const_ref MPI_TYPECLASS_REAL Cint 193 +@const_ref MPI_TYPECLASS_COMPLEX Cint 194 + +# Communicator and Group Comparisons +@const_ref MPI_IDENT Cint 201 +@const_ref MPI_CONGRUENT Cint 202 +@const_ref MPI_SIMILAR Cint 203 +@const_ref MPI_UNEQUAL Cint 204 + +# Communicator Virtual Topology Types +@const_ref MPI_CART Cint 211 +@const_ref MPI_GRAPH Cint 212 +@const_ref MPI_DIST_GRAPH Cint 213 + +# Communicator Split Types +@const_ref MPI_COMM_TYPE_SHARED Cint 221 +@const_ref MPI_COMM_TYPE_HW_UNGUIDED Cint 222 +@const_ref MPI_COMM_TYPE_HW_GUIDED Cint 223 +@const_ref MPI_COMM_TYPE_RESOURCE_GUIDED Cint 224 + +# Window Lock Types +@const_ref MPI_LOCK_EXCLUSIVE Cint 301 +@const_ref MPI_LOCK_SHARED Cint 302 + +# Window Create Flavors +@const_ref MPI_WIN_FLAVOR_CREATE Cint 311 +@const_ref MPI_WIN_FLAVOR_ALLOCATE Cint 312 +@const_ref MPI_WIN_FLAVOR_DYNAMIC Cint 313 +@const_ref MPI_WIN_FLAVOR_SHARED Cint 314 + +# Window Memory Models +@const_ref MPI_WIN_UNIFIED Cint 321 +@const_ref MPI_WIN_SEPARATE Cint 322 + +# File Positioning +@const_ref MPI_SEEK_CUR Cint 401 +@const_ref MPI_SEEK_END Cint 402 +@const_ref MPI_SEEK_SET Cint 403 + +# File Operation Constants +@const_ref MPI_DISPLACEMENT_CURRENT MPI_Offset -1 + +# Predefined Attribute Keys +# Invalid Attribute Key +@const_ref MPI_KEYVAL_INVALID Cint 0 + +# Communicator +@const_ref MPI_TAG_UB Cint 501 +@const_ref MPI_IO Cint 502 +@const_ref MPI_HOST Cint 503 +@const_ref MPI_WTIME_IS_GLOBAL Cint 504 +@const_ref MPI_APPNUM Cint 505 +@const_ref MPI_LASTUSEDCODE Cint 506 +@const_ref MPI_UNIVERSE_SIZE Cint 507 + +# Window +@const_ref MPI_WIN_BASE Cint 601 +@const_ref MPI_WIN_DISP_UNIT Cint 602 +@const_ref MPI_WIN_SIZE Cint 603 +@const_ref MPI_WIN_CREATE_FLAVOR Cint 604 +@const_ref MPI_WIN_MODEL Cint 605 + +const MPI_User_function = Cvoid +const MPI_User_function_c = Cvoid + +const MPI_Grequest_query_function = Cvoid +const MPI_Grequest_free_function = Cvoid +const MPI_Grequest_cancel_function = Cvoid + +const MPI_Copy_function = Cvoid +const MPI_Delete_function = Cvoid +const MPI_Comm_copy_attr_function = Cvoid +const MPI_Comm_delete_attr_function = Cvoid +const MPI_Type_copy_attr_function = Cvoid +const MPI_Type_delete_attr_function = Cvoid +const MPI_Win_copy_attr_function = Cvoid +const MPI_Win_delete_attr_function = Cvoid + +const MPI_Datarep_extent_function = Cvoid +const MPI_Datarep_conversion_function = Cvoid +const MPI_Datarep_conversion_function_c = Cvoid + +const MPI_Comm_errhandler_function = Cvoid +const MPI_File_errhandler_function = Cvoid +const MPI_Win_errhandler_function = Cvoid +const MPI_Session_errhandler_function = Cvoid + +const MPI_Comm_errhandler_fn = MPI_Comm_errhandler_function +const MPI_File_errhandler_fn = MPI_File_errhandler_function +const MPI_Win_errhandler_fn = MPI_Win_errhandler_function +const MPI_Session_errhandler_fn = MPI_Session_errhandler_function + +@const_ref MPI_NULL_COPY_FN Ptr{MPI_Copy_function} UInt(0x0) +@const_ref MPI_DUP_FN Ptr{MPI_Copy_function} UInt(0x1) +@const_ref MPI_NULL_DELETE_FN Ptr{MPI_Delete_function} UInt(0x0) +@const_ref MPI_COMM_NULL_COPY_FN Ptr{MPI_Comm_copy_attr_function} UInt(0x0) +@const_ref MPI_COMM_DUP_FN Ptr{MPI_Comm_copy_attr_function} UInt(0x1) +@const_ref MPI_COMM_NULL_DELETE_FN Ptr{MPI_Comm_delete_attr_function} UInt(0x0) +@const_ref MPI_TYPE_NULL_COPY_FN Ptr{MPI_Type_copy_attr_function} UInt(0x0) +@const_ref MPI_TYPE_DUP_FN Ptr{MPI_Type_copy_attr_function} UInt(0x1) +@const_ref MPI_TYPE_NULL_DELETE_FN Ptr{MPI_Type_delete_attr_function} UInt(0x0) +@const_ref MPI_WIN_NULL_COPY_FN Ptr{MPI_Win_copy_attr_function} UInt(0x0) +@const_ref MPI_WIN_DUP_FN Ptr{MPI_Win_copy_attr_function} UInt(0x1) +@const_ref MPI_WIN_NULL_DELETE_FN Ptr{MPI_Win_delete_attr_function} UInt(0x0) +@const_ref MPI_CONVERSION_FN_NULL Ptr{MPI_Datarep_conversion_function} UInt(0x0) +@const_ref MPI_CONVERSION_FN_NULL_C Ptr{MPI_Datarep_conversion_function_c} UInt(0x0) diff --git a/src/implementations.jl b/src/implementations.jl index 1f431bbac..05b295aca 100644 --- a/src/implementations.jl +++ b/src/implementations.jl @@ -80,6 +80,7 @@ $(_doc_external("MPI_Get_version")) """ const MPI_VERSION = Get_version() + using PkgVersion """ MPI.versioninfo(io::IO=stdout) @@ -98,14 +99,16 @@ function versioninfo(io::IO=stdout) println(io, "Package versions") println(io, " MPI.jl: ", PkgVersion.@Version) println(io, " MPIPreferences.jl: ", PkgVersion.Version(MPIPreferences)) - if MPIPreferences.binary == "MPICH_jll" + if MPIPreferences.binary == "MPIABI_jll" + println(io, " MPIABI_jll: ", PkgVersion.Version(API.MPICH_jll)) + elseif MPIPreferences.binary == "MPICH_jll" println(io, " MPICH_jll: ", PkgVersion.Version(API.MPICH_jll)) - elseif MPIPreferences.binary == "OpenMPI_jll" - println(io, " OpenMPI_jll: ", PkgVersion.Version(API.OpenMPI_jll)) - elseif MPIPreferences.binary == "MicrosoftMPI_jll" - println(io, " MicrosoftMPI_jll: ", PkgVersion.Version(API.MicrosoftMPI_jll)) elseif MPIPreferences.binary == "MPItrampoline_jll" println(io, " MPItrampoline_jll ", PkgVersion.Version(API.MPItrampoline_jll)) + elseif MPIPreferences.binary == "MicrosoftMPI_jll" + println(io, " MicrosoftMPI_jll: ", PkgVersion.Version(API.MicrosoftMPI_jll)) + elseif MPIPreferences.binary == "OpenMPI_jll" + println(io, " OpenMPI_jll: ", PkgVersion.Version(API.OpenMPI_jll)) end println(io)