From fbb9cf8c444cdfd93c4a16350e3974c185ae0e22 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Thu, 11 Dec 2025 16:56:41 -0500 Subject: [PATCH 01/13] New ABI: MPIABI --- lib/MPIPreferences/src/MPIPreferences.jl | 32 +- src/api/mpiabi.jl | 440 +++++++++++++++++++++++ 2 files changed, 458 insertions(+), 14 deletions(-) create mode 100644 src/api/mpiabi.jl 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/mpiabi.jl b/src/api/mpiabi.jl new file mode 100644 index 000000000..7ad071d12 --- /dev/null +++ b/src/api/mpiabi.jl @@ -0,0 +1,440 @@ +const MPI_VERSION = 5 +const MPI_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_internal::NTuple{5,Cint} +end + +const MPI_Op = Ptr{Cvoid} +@const_ref MPI_OP_NULL MPI_Op 0x00000020 +@const_ref MPI_SUM MPI_Op 0x00000021 +@const_ref MPI_MIN MPI_Op 0x00000022 +@const_ref MPI_MAX MPI_Op 0x00000023 +@const_ref MPI_PROD MPI_Op 0x00000024 +@const_ref MPI_BAND MPI_Op 0x00000028 +@const_ref MPI_BOR MPI_Op 0x00000029 +@const_ref MPI_BXOR MPI_Op 0x0000002a +@const_ref MPI_LAND MPI_Op 0x00000030 +@const_ref MPI_LOR MPI_Op 0x00000031 +@const_ref MPI_LXOR MPI_Op 0x00000032 +@const_ref MPI_MINLOC MPI_Op 0x00000038 +@const_ref MPI_MAXLOC MPI_Op 0x00000039 +@const_ref MPI_REPLACE MPI_Op 0x0000003c +@const_ref MPI_NO_OP MPI_Op 0x0000003d + +const MPI_Comm = Ptr{Cvoid} +@const_ref MPI_COMM_NULL MPI_Comm 0x00000100 +@const_ref MPI_COMM_WORLD MPI_Comm 0x00000101 +@const_ref MPI_COMM_SELF MPI_Comm 0x00000102 + +const MPI_Group = Ptr{Cvoid} +@const_ref MPI_GROUP_NULL MPI_Group 0x00000108 +@const_ref MPI_GROUP_EMPTY MPI_Group 0x00000109 + +const MPI_Win = Ptr{Cvoid} +@const_ref MPI_WIN_NULL MPI_Win 0x00000110 + +const MPI_File = Ptr{Cvoid} +@const_ref MPI_FILE_NULL MPI_File 0x00000118 + +const MPI_Session = Ptr{Cvoid} +@const_ref MPI_SESSION_NULL MPI_Session 0x00000120 + +const MPI_Message = Ptr{Cvoid} +@const_ref MPI_MESSAGE_NULL MPI_Message 0x00000128 +@const_ref MPI_MESSAGE_NO_PROC MPI_Message 0x00000129 + +const MPI_Info = Ptr{Cvoid} +@const_ref MPI_INFO_NULL MPI_Info 0x00000130 +@const_ref MPI_INFO_ENV MPI_Info 0x00000131 + +const MPI_Errhandler = Ptr{Cvoid} +@const_ref MPI_ERRHANDLER_NULL MPI_Errhandler 0x00000140 +@const_ref MPI_ERRORS_ARE_FATAL MPI_Errhandler 0x00000141 +@const_ref MPI_ERRORS_RETURN MPI_Errhandler 0x00000142 +@const_ref MPI_ERRORS_ABORT MPI_Errhandler 0x00000143 + +const MPI_Request = Ptr{Cvoid} +@const_ref MPI_REQUEST_NULL MPI_Request 0x00000180 + +const MPI_Datatype = Ptr{Cvoid} +@const_ref MPI_DATATYPE_NULL MPI_Datatype 0x00000200 +@const_ref MPI_AINT MPI_Datatype 0x00000201 +@const_ref MPI_COUNT MPI_Datatype 0x00000202 +@const_ref MPI_OFFSET MPI_Datatype 0x00000203 +@const_ref MPI_PACKED MPI_Datatype 0x00000207 +@const_ref MPI_SHORT MPI_Datatype 0x00000208 +@const_ref MPI_INT MPI_Datatype 0x00000209 +@const_ref MPI_LONG MPI_Datatype 0x0000020a +@const_ref MPI_LONG_LONG MPI_Datatype 0x0000020b +const MPI_LONG_LONG_INT = MPI_LONG_LONG +@const_ref MPI_UNSIGNED_SHORT MPI_Datatype 0x0000020c +@const_ref MPI_UNSIGNED MPI_Datatype 0x0000020d +@const_ref MPI_UNSIGNED_LONG MPI_Datatype 0x0000020e +@const_ref MPI_UNSIGNED_LONG_LONG MPI_Datatype 0x0000020f +@const_ref MPI_FLOAT MPI_Datatype 0x00000210 +@const_ref MPI_C_FLOAT_COMPLEX MPI_Datatype 0x00000212 +const MPI_C_COMPLEX = MPI_C_FLOAT_COMPLEX +@const_ref MPI_CXX_FLOAT_COMPLEX MPI_Datatype 0x00000213 +@const_ref MPI_DOUBLE MPI_Datatype 0x00000214 +@const_ref MPI_C_DOUBLE_COMPLEX MPI_Datatype 0x00000216 +@const_ref MPI_CXX_DOUBLE_COMPLEX MPI_Datatype 0x00000217 +@const_ref MPI_LOGICAL MPI_Datatype 0x00000218 +@const_ref MPI_INTEGER MPI_Datatype 0x00000219 +@const_ref MPI_REAL MPI_Datatype 0x0000021a +@const_ref MPI_COMPLEX MPI_Datatype 0x0000021b +@const_ref MPI_DOUBLE_PRECISION MPI_Datatype 0x0000021c +@const_ref MPI_DOUBLE_COMPLEX MPI_Datatype 0x0000021d +@const_ref MPI_LONG_DOUBLE MPI_Datatype 0x00000220 +@const_ref MPI_C_LONG_DOUBLE_COMPLEX MPI_Datatype 0x00000224 +@const_ref MPI_CXX_LONG_DOUBLE_COMPLEX MPI_Datatype 0x00000225 +@const_ref MPI_FLOAT_INT MPI_Datatype 0x00000228 +@const_ref MPI_DOUBLE_INT MPI_Datatype 0x00000229 +@const_ref MPI_LONG_INT MPI_Datatype 0x0000022a +@const_ref MPI_2INT MPI_Datatype 0x0000022b +@const_ref MPI_SHORT_INT MPI_Datatype 0x0000022c +@const_ref MPI_LONG_DOUBLE_INT MPI_Datatype 0x0000022d +@const_ref MPI_2REAL MPI_Datatype 0x00000230 +@const_ref MPI_2DOUBLE_PRECISION MPI_Datatype 0x00000231 +@const_ref MPI_2INTEGER MPI_Datatype 0x00000232 +@const_ref MPI_C_BOOL MPI_Datatype 0x00000238 +@const_ref MPI_CXX_BOOL MPI_Datatype 0x00000239 +@const_ref MPI_WCHAR MPI_Datatype 0x0000023c +@const_ref MPI_INT8_T MPI_Datatype 0x00000240 +@const_ref MPI_UINT8_T MPI_Datatype 0x00000241 +@const_ref MPI_CHAR MPI_Datatype 0x00000243 +@const_ref MPI_SIGNED_CHAR MPI_Datatype 0x00000244 +@const_ref MPI_UNSIGNED_CHAR MPI_Datatype 0x00000245 +@const_ref MPI_BYTE MPI_Datatype 0x00000247 +@const_ref MPI_INT16_T MPI_Datatype 0x00000248 +@const_ref MPI_UINT16_T MPI_Datatype 0x00000249 +@const_ref MPI_INT32_T MPI_Datatype 0x00000250 +@const_ref MPI_UINT32_T MPI_Datatype 0x00000251 +@const_ref MPI_INT64_T MPI_Datatype 0x00000258 +@const_ref MPI_UINT64_T MPI_Datatype 0x00000259 +@const_ref MPIX_LOGICAL1 MPI_Datatype 0x000002c0 +@const_ref MPI_INTEGER1 MPI_Datatype 0x000002c1 +@const_ref MPIX_REAL1 MPI_Datatype 0x000002c2 +@const_ref MPI_CHARACTER MPI_Datatype 0x000002c3 +@const_ref MPIX_LOGICAL2 MPI_Datatype 0x000002c8 +@const_ref MPI_INTEGER2 MPI_Datatype 0x000002c9 +@const_ref MPI_REAL2 MPI_Datatype 0x000002ca +@const_ref MPIX_LOGICAL4 MPI_Datatype 0x000002d0 +@const_ref MPI_INTEGER4 MPI_Datatype 0x000002d1 +@const_ref MPI_REAL4 MPI_Datatype 0x000002d2 +@const_ref MPI_COMPLEX4 MPI_Datatype 0x000002d3 +@const_ref MPIX_LOGICAL8 MPI_Datatype 0x000002d8 +@const_ref MPI_INTEGER8 MPI_Datatype 0x000002d9 +@const_ref MPI_REAL8 MPI_Datatype 0x000002da +@const_ref MPI_COMPLEX8 MPI_Datatype 0x000002db +@const_ref MPIX_LOGICAL16 MPI_Datatype 0x000002e0 +@const_ref MPI_INTEGER16 MPI_Datatype 0x000002e1 +@const_ref MPI_REAL16 MPI_Datatype 0x000002e2 +@const_ref MPI_COMPLEX16 MPI_Datatype 0x000002e3 +@const_ref MPI_COMPLEX32 MPI_Datatype 0x000002eb + +# Status indexing - must match MPI_Status definition +@const_ref MPI_F_SOURCE Cint 0 +@const_ref MPI_F_TAG Cint 1 +@const_ref MPI_F_ERROR Cint 2 +# Fortran status array size and reserved index values (in C) +@const_ref MPI_F_STATUS_SIZE Cint 8 + +# 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_PROC_ABORTED Cint 44 +@const_ref MPI_ERR_QUOTA Cint 45 +@const_ref MPI_ERR_READ_ONLY Cint 46 +@const_ref MPI_ERR_RMA_ATTACH Cint 47 +@const_ref MPI_ERR_RMA_CONFLICT Cint 48 +@const_ref MPI_ERR_RMA_RANGE Cint 49 +@const_ref MPI_ERR_RMA_SHARED Cint 50 +@const_ref MPI_ERR_RMA_SYNC Cint 51 +@const_ref MPI_ERR_RMA_FLAVOR Cint 52 +@const_ref MPI_ERR_SERVICE Cint 53 +@const_ref MPI_ERR_SESSION Cint 54 +@const_ref MPI_ERR_SIZE Cint 55 +@const_ref MPI_ERR_SPAWN Cint 56 +@const_ref MPI_ERR_UNSUPPORTED_DATAREP Cint 57 +@const_ref MPI_ERR_UNSUPPORTED_OPERATION Cint 58 +@const_ref MPI_ERR_VALUE_TOO_LARGE Cint 59 +@const_ref MPI_ERR_WIN Cint 60 +@const_ref MPI_ERR_ERRHANDLER Cint 61 +@const_ref MPI_T_ERR_CANNOT_INIT Cint 1000 +@const_ref MPI_T_ERR_NOT_ACCESSIBLE Cint 1001 +@const_ref MPI_T_ERR_NOT_INITIALIZED Cint 1002 +@const_ref MPI_T_ERR_NOT_SUPPORTED Cint 1003 +@const_ref MPI_T_ERR_MEMORY Cint 1004 +@const_ref MPI_T_ERR_INVALID Cint 1005 +@const_ref MPI_T_ERR_INVALID_INDEX Cint 1006 +@const_ref MPI_T_ERR_INVALID_ITEM Cint 1007 +@const_ref MPI_T_ERR_INVALID_SESSION Cint 1008 +@const_ref MPI_T_ERR_INVALID_HANDLE Cint 1009 +@const_ref MPI_T_ERR_INVALID_NAME Cint 1010 +@const_ref MPI_T_ERR_OUT_OF_HANDLES Cint 1011 +@const_ref MPI_T_ERR_OUT_OF_SESSIONS Cint 1012 +@const_ref MPI_T_ERR_CVAR_SET_NOT_NOW Cint 1013 +@const_ref MPI_T_ERR_CVAR_SET_NEVER Cint 1014 +@const_ref MPI_T_ERR_PVAR_NO_WRITE Cint 1015 +@const_ref MPI_T_ERR_PVAR_NO_STARTSTOP Cint 1016 +@const_ref MPI_T_ERR_PVAR_NO_ATOMIC Cint 1017 +@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 + +# Constants Specifying Empty or Ignored Input +@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} 4 +@const_ref MPI_WEIGHTS_EMPTY Ptr{Cint} 5 + +# Other constants +const MPI_BSEND_OVERHEAD = Cint(512) # MPICH=96, OMPI=128 + +# String size constants +const MPI_MAX_DATAREP_STRING = Cint(128) # MPICH=OMPI=128 (MPICH has it in `mpio.h`) +const MPI_MAX_ERROR_STRING = Cint(512) # MPICH was bigger +const MPI_MAX_INFO_KEY = Cint(256) # MPICH was bigger +const MPI_MAX_INFO_VAL = Cint(1024) # MPICH was bigger +const MPI_MAX_LIBRARY_VERSION_STRING = Cint(8192) # MPICH was bigger +const MPI_MAX_OBJECT_NAME = Cint(128) # MPICH was bigger +const MPI_MAX_PORT_NAME = Cint(1024) # OMPI was bigger +const MPI_MAX_PROCESSOR_NAME = Cint(256) # OMPI was bigger +const MPI_MAX_STRINGTAG_LEN = Cint(1024) # OMPI was bigger (v5.0+) +const MPI_MAX_PSET_NAME_LEN = Cint(512) # OMPI was bigger (v5.0+) + +# Mode Constants +# must be powers-of-2 to support OR-ing +# Files +@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 +# Windows +@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 + +# rank sentinels - must be negative +@const_ref MPI_ANY_SOURCE Cint -1 +@const_ref MPI_PROC_NULL Cint -2 +@const_ref MPI_ROOT Cint -3 + +# tag sentinels - should be negative +@const_ref MPI_ANY_TAG Cint -31 + +# attribute constant - should be negative +@const_ref MPI_KEYVAL_INVALID Cint -127 + +# special displacement for sequential access file - should be negative +@const_ref MPI_DISPLACEMENT_CURRENT Cint -255 + +# multi-purpose sentinel - must be negative +@const_ref MPI_UNDEFINED Cint -32766 # make it match OMPI and MPICH + +# Environmental inquiry keys and Predefined Attribute Keys +# Threads Constants +# These values are monotonic; i.e., SINGLE < FUNNELED < SERIALIZED < MULTIPLE. +@const_ref MPI_THREAD_SINGLE Cint 0 +@const_ref MPI_THREAD_FUNNELED Cint 1 +@const_ref MPI_THREAD_SERIALIZED Cint 2 +@const_ref MPI_THREAD_MULTIPLE Cint 7 # in case we need other threading levels below MULTIPLE + +# Array Datatype Order +@const_ref MPI_ORDER_C Cint 0xC # 12 +@const_ref MPI_ORDER_FORTRAN Cint 0xF # 15 + +# 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 + +# RMA Lock Constants - arbitrary values +@const_ref MPI_LOCK_SHARED Cint 21 +@const_ref MPI_LOCK_EXCLUSIVE Cint 22 + +# MPI Window Models +@const_ref MPI_WIN_UNIFIED Cint 31 +@const_ref MPI_WIN_SEPARATE Cint 32 + +# MPI Window Create Flavors +@const_ref MPI_WIN_FLAVOR_ALLOCATE Cint 41 +@const_ref MPI_WIN_FLAVOR_CREATE Cint 42 +@const_ref MPI_WIN_FLAVOR_DYNAMIC Cint 43 +@const_ref MPI_WIN_FLAVOR_SHARED Cint 44 + +# Results of communicator and group comparisons +@const_ref MPI_IDENT Cint 101 +@const_ref MPI_CONGRUENT Cint 102 +@const_ref MPI_SIMILAR Cint 103 +@const_ref MPI_UNEQUAL Cint 104 + +# MPI_Topo_test +@const_ref MPI_GRAPH Cint 201 +@const_ref MPI_DIST_GRAPH Cint 202 +@const_ref MPI_CART Cint 203 + +# Datatype Decoding Constants +@const_ref MPI_COMBINER_NAMED Cint 301 +@const_ref MPI_COMBINER_DUP Cint 302 +@const_ref MPI_COMBINER_CONTIGUOUS Cint 303 +@const_ref MPI_COMBINER_VECTOR Cint 304 +@const_ref MPI_COMBINER_HVECTOR Cint 305 +@const_ref MPI_COMBINER_INDEXED Cint 306 +@const_ref MPI_COMBINER_HINDEXED Cint 307 +@const_ref MPI_COMBINER_INDEXED_BLOCK Cint 308 +@const_ref MPI_COMBINER_HINDEXED_BLOCK Cint 309 +@const_ref MPI_COMBINER_STRUCT Cint 310 +@const_ref MPI_COMBINER_SUBARRAY Cint 311 +@const_ref MPI_COMBINER_DARRAY Cint 312 +@const_ref MPI_COMBINER_F90_REAL Cint 313 +@const_ref MPI_COMBINER_F90_COMPLEX Cint 314 +@const_ref MPI_COMBINER_F90_INTEGER Cint 315 +@const_ref MPI_COMBINER_RESIZED Cint 316 +@const_ref MPI_COMBINER_VALUE_INDEX Cint 317 + +# File Position Constants +@const_ref MPI_SEEK_CUR Cint 601 +@const_ref MPI_SEEK_END Cint 602 +@const_ref MPI_SEEK_SET Cint 603 + +# Fortran Datatype Matching Constants +@const_ref MPIX_TYPECLASS_LOGICAL Cint 801 +@const_ref MPI_TYPECLASS_INTEGER Cint 802 +@const_ref MPI_TYPECLASS_REAL Cint 803 +@const_ref MPI_TYPECLASS_COMPLEX Cint 804 + +# Communicator split type constants - arbitrary values +@const_ref MPI_COMM_TYPE_SHARED Cint 1001 +@const_ref MPI_COMM_TYPE_HW_UNGUIDED Cint 1002 +@const_ref MPI_COMM_TYPE_HW_GUIDED Cint 1003 +@const_ref MPI_COMM_TYPE_RESOURCE_GUIDED Cint 1004 + +# These apply to MPI_COMM_WORLD +@const_ref MPI_TAG_UB Cint 10001 +@const_ref MPI_IO Cint 10002 +@const_ref MPI_HOST Cint 10003 +@const_ref MPI_WTIME_IS_GLOBAL Cint 10004 +@const_ref MPI_APPNUM Cint 10005 +@const_ref MPI_LASTUSEDCODE Cint 10006 +@const_ref MPI_UNIVERSE_SIZE Cint 10007 + +# Predefined Attribute Keys +# These apply to Windows +@const_ref MPI_WIN_BASE Cint 20001 +@const_ref MPI_WIN_DISP_UNIT Cint 20002 +@const_ref MPI_WIN_SIZE Cint 20003 +@const_ref MPI_WIN_CREATE_FLAVOR Cint 20004 +@const_ref MPI_WIN_MODEL Cint 20005 + +const MPI_Copy_function = Cvoid +const MPI_Delete_function = Cvoid + +const MPI_User_function = Cvoid +const MPI_User_function_c = Cvoid + +const MPI_Grequest_cancel_function = Cvoid +const MPI_Grequest_free_function = Cvoid +const MPI_Grequest_query_function = Cvoid + +const MPI_Datarep_conversion_function = Cvoid +const MPI_Datarep_extent_function = Cvoid +const MPI_Datarep_conversion_function_c = 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_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} 0x0 +@const_ref MPI_DUP_FN Ptr{MPI_Copy_function} 0x1 +@const_ref MPI_NULL_DELETE_FN Ptr{MPI_Delete_function} 0x0 +@const_ref MPI_COMM_NULL_COPY_FN Ptr{MPI_Comm_copy_attr_function} 0x0 +@const_ref MPI_COMM_DUP_FN Ptr{MPI_Comm_copy_attr_function} 0x1 +@const_ref MPI_COMM_NULL_DELETE_FN Ptr{MPI_Comm_delete_attr_function} 0x0 +@const_ref MPI_TYPE_NULL_COPY_FN Ptr{MPI_Type_copy_attr_function} 0x0 +@const_ref MPI_TYPE_DUP_FN Ptr{MPI_Type_copy_attr_function} 0x1 +@const_ref MPI_TYPE_NULL_DELETE_FN Ptr{MPI_Type_delete_attr_function} 0x0 +@const_ref MPI_WIN_NULL_COPY_FN Ptr{MPI_Win_copy_attr_function} 0x0 +@const_ref MPI_WIN_DUP_FN Ptr{MPI_Win_copy_attr_function} 0x1 +@const_ref MPI_WIN_NULL_DELETE_FN Ptr{MPI_Win_delete_attr_function} 0x0 +@const_ref MPI_CONVERSION_FN_NULL Ptr{MPI_Datarep_conversion_function} 0x0 +@const_ref MPI_CONVERSION_FN_NULL_C Ptr{MPI_Datarep_conversion_function_c} 0x0 From 4892fc98939844db488c77452d590bf261ace8a4 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Thu, 11 Dec 2025 18:48:51 -0500 Subject: [PATCH 02/13] New dependency MPIABI_jll --- Project.toml | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/Project.toml b/Project.toml index ccbddc9db..c3611aed6 100644 --- a/Project.toml +++ b/Project.toml @@ -1,12 +1,13 @@ name = "MPI" uuid = "da04e1cc-30fd-572f-bb4f-1f8673147195" -authors = [] version = "0.20.23" +authors = [] [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" From 6c364a75163bf0c377e5695e2ff3bf324775da62 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Thu, 11 Dec 2025 18:53:54 -0500 Subject: [PATCH 03/13] Bump versions --- Project.toml | 2 +- lib/MPIPreferences/Project.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Project.toml b/Project.toml index c3611aed6..34537ce18 100644 --- a/Project.toml +++ b/Project.toml @@ -1,6 +1,6 @@ name = "MPI" uuid = "da04e1cc-30fd-572f-bb4f-1f8673147195" -version = "0.20.23" +version = "0.20.24" authors = [] [deps] 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" From 125129a3a1ef0dd72bd7080ca9461b45f2a885f3 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Fri, 12 Dec 2025 09:52:20 -0500 Subject: [PATCH 04/13] Support MPIABI --- src/api/api.jl | 31 ++++++++++++++++++------------- src/implementations.jl | 12 +++++++----- 2 files changed, 25 insertions(+), 18 deletions(-) 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/implementations.jl b/src/implementations.jl index 1f431bbac..337811616 100644 --- a/src/implementations.jl +++ b/src/implementations.jl @@ -98,14 +98,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) From 29e59f7925a3898f2fa591969372469855f4c709 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Fri, 12 Dec 2025 09:52:31 -0500 Subject: [PATCH 05/13] Update MPIABI constants --- src/api/mpiabi.jl | 750 +++++++++++++++++++++++----------------------- 1 file changed, 374 insertions(+), 376 deletions(-) diff --git a/src/api/mpiabi.jl b/src/api/mpiabi.jl index 7ad071d12..9fd417daa 100644 --- a/src/api/mpiabi.jl +++ b/src/api/mpiabi.jl @@ -1,11 +1,14 @@ -const MPI_VERSION = 5 +const MPI_VERSION = 5 const MPI_SUBVERSION = 0 -const MPI_Aint = Int +const MPI_ABI_VERSION = 1 +const MPI_ABI_SUBVERSION = 0 + +const MPI_Aint = Int const MPI_Offset = Int64 -const MPI_Count = Int64 +const MPI_Count = Int64 -const MPI_Fint = Int32 +const MPI_Fint = Int32 struct MPI_Status MPI_SOURCE::Cint @@ -15,398 +18,389 @@ struct MPI_Status end const MPI_Op = Ptr{Cvoid} -@const_ref MPI_OP_NULL MPI_Op 0x00000020 -@const_ref MPI_SUM MPI_Op 0x00000021 -@const_ref MPI_MIN MPI_Op 0x00000022 -@const_ref MPI_MAX MPI_Op 0x00000023 -@const_ref MPI_PROD MPI_Op 0x00000024 -@const_ref MPI_BAND MPI_Op 0x00000028 -@const_ref MPI_BOR MPI_Op 0x00000029 -@const_ref MPI_BXOR MPI_Op 0x0000002a -@const_ref MPI_LAND MPI_Op 0x00000030 -@const_ref MPI_LOR MPI_Op 0x00000031 -@const_ref MPI_LXOR MPI_Op 0x00000032 -@const_ref MPI_MINLOC MPI_Op 0x00000038 -@const_ref MPI_MAXLOC MPI_Op 0x00000039 -@const_ref MPI_REPLACE MPI_Op 0x0000003c -@const_ref MPI_NO_OP MPI_Op 0x0000003d +@const_ref MPI_OP_NULL MPI_Op 0x00000020 +@const_ref MPI_SUM MPI_Op 0x00000021 +@const_ref MPI_MIN MPI_Op 0x00000022 +@const_ref MPI_MAX MPI_Op 0x00000023 +@const_ref MPI_PROD MPI_Op 0x00000024 +@const_ref MPI_BAND MPI_Op 0x00000028 +@const_ref MPI_BOR MPI_Op 0x00000029 +@const_ref MPI_BXOR MPI_Op 0x0000002a +@const_ref MPI_LAND MPI_Op 0x00000030 +@const_ref MPI_LOR MPI_Op 0x00000031 +@const_ref MPI_LXOR MPI_Op 0x00000032 +@const_ref MPI_MINLOC MPI_Op 0x00000038 +@const_ref MPI_MAXLOC MPI_Op 0x00000039 +@const_ref MPI_REPLACE MPI_Op 0x0000003c +@const_ref MPI_NO_OP MPI_Op 0x0000003d const MPI_Comm = Ptr{Cvoid} -@const_ref MPI_COMM_NULL MPI_Comm 0x00000100 -@const_ref MPI_COMM_WORLD MPI_Comm 0x00000101 -@const_ref MPI_COMM_SELF MPI_Comm 0x00000102 +@const_ref MPI_COMM_NULL MPI_Comm 0x00000100 +@const_ref MPI_COMM_WORLD MPI_Comm 0x00000101 +@const_ref MPI_COMM_SELF MPI_Comm 0x00000102 const MPI_Group = Ptr{Cvoid} -@const_ref MPI_GROUP_NULL MPI_Group 0x00000108 -@const_ref MPI_GROUP_EMPTY MPI_Group 0x00000109 +@const_ref MPI_GROUP_NULL MPI_Group 0x00000108 +@const_ref MPI_GROUP_EMPTY MPI_Group 0x00000109 const MPI_Win = Ptr{Cvoid} -@const_ref MPI_WIN_NULL MPI_Win 0x00000110 +@const_ref MPI_WIN_NULL MPI_Win 0x00000110 const MPI_File = Ptr{Cvoid} -@const_ref MPI_FILE_NULL MPI_File 0x00000118 +@const_ref MPI_FILE_NULL MPI_File 0x00000118 const MPI_Session = Ptr{Cvoid} -@const_ref MPI_SESSION_NULL MPI_Session 0x00000120 +@const_ref MPI_SESSION_NULL MPI_Session 0x00000120 const MPI_Message = Ptr{Cvoid} -@const_ref MPI_MESSAGE_NULL MPI_Message 0x00000128 -@const_ref MPI_MESSAGE_NO_PROC MPI_Message 0x00000129 +@const_ref MPI_MESSAGE_NULL MPI_Message 0x00000128 +@const_ref MPI_MESSAGE_NO_PROC MPI_Message 0x00000129 const MPI_Info = Ptr{Cvoid} -@const_ref MPI_INFO_NULL MPI_Info 0x00000130 -@const_ref MPI_INFO_ENV MPI_Info 0x00000131 +@const_ref MPI_INFO_NULL MPI_Info 0x00000130 +@const_ref MPI_INFO_ENV MPI_Info 0x00000131 const MPI_Errhandler = Ptr{Cvoid} -@const_ref MPI_ERRHANDLER_NULL MPI_Errhandler 0x00000140 -@const_ref MPI_ERRORS_ARE_FATAL MPI_Errhandler 0x00000141 -@const_ref MPI_ERRORS_RETURN MPI_Errhandler 0x00000142 -@const_ref MPI_ERRORS_ABORT MPI_Errhandler 0x00000143 +@const_ref MPI_ERRHANDLER_NULL MPI_Errhandler 0x00000140 +@const_ref MPI_ERRORS_ARE_FATAL MPI_Errhandler 0x00000141 +@const_ref MPI_ERRORS_ABORT MPI_Errhandler 0x00000142 +@const_ref MPI_ERRORS_RETURN MPI_Errhandler 0x00000143 const MPI_Request = Ptr{Cvoid} -@const_ref MPI_REQUEST_NULL MPI_Request 0x00000180 +@const_ref MPI_REQUEST_NULL MPI_Request 0x00000180 const MPI_Datatype = Ptr{Cvoid} -@const_ref MPI_DATATYPE_NULL MPI_Datatype 0x00000200 -@const_ref MPI_AINT MPI_Datatype 0x00000201 -@const_ref MPI_COUNT MPI_Datatype 0x00000202 -@const_ref MPI_OFFSET MPI_Datatype 0x00000203 -@const_ref MPI_PACKED MPI_Datatype 0x00000207 -@const_ref MPI_SHORT MPI_Datatype 0x00000208 -@const_ref MPI_INT MPI_Datatype 0x00000209 -@const_ref MPI_LONG MPI_Datatype 0x0000020a -@const_ref MPI_LONG_LONG MPI_Datatype 0x0000020b -const MPI_LONG_LONG_INT = MPI_LONG_LONG -@const_ref MPI_UNSIGNED_SHORT MPI_Datatype 0x0000020c -@const_ref MPI_UNSIGNED MPI_Datatype 0x0000020d -@const_ref MPI_UNSIGNED_LONG MPI_Datatype 0x0000020e -@const_ref MPI_UNSIGNED_LONG_LONG MPI_Datatype 0x0000020f -@const_ref MPI_FLOAT MPI_Datatype 0x00000210 -@const_ref MPI_C_FLOAT_COMPLEX MPI_Datatype 0x00000212 -const MPI_C_COMPLEX = MPI_C_FLOAT_COMPLEX -@const_ref MPI_CXX_FLOAT_COMPLEX MPI_Datatype 0x00000213 -@const_ref MPI_DOUBLE MPI_Datatype 0x00000214 -@const_ref MPI_C_DOUBLE_COMPLEX MPI_Datatype 0x00000216 -@const_ref MPI_CXX_DOUBLE_COMPLEX MPI_Datatype 0x00000217 -@const_ref MPI_LOGICAL MPI_Datatype 0x00000218 -@const_ref MPI_INTEGER MPI_Datatype 0x00000219 -@const_ref MPI_REAL MPI_Datatype 0x0000021a -@const_ref MPI_COMPLEX MPI_Datatype 0x0000021b -@const_ref MPI_DOUBLE_PRECISION MPI_Datatype 0x0000021c -@const_ref MPI_DOUBLE_COMPLEX MPI_Datatype 0x0000021d -@const_ref MPI_LONG_DOUBLE MPI_Datatype 0x00000220 -@const_ref MPI_C_LONG_DOUBLE_COMPLEX MPI_Datatype 0x00000224 -@const_ref MPI_CXX_LONG_DOUBLE_COMPLEX MPI_Datatype 0x00000225 -@const_ref MPI_FLOAT_INT MPI_Datatype 0x00000228 -@const_ref MPI_DOUBLE_INT MPI_Datatype 0x00000229 -@const_ref MPI_LONG_INT MPI_Datatype 0x0000022a -@const_ref MPI_2INT MPI_Datatype 0x0000022b -@const_ref MPI_SHORT_INT MPI_Datatype 0x0000022c -@const_ref MPI_LONG_DOUBLE_INT MPI_Datatype 0x0000022d -@const_ref MPI_2REAL MPI_Datatype 0x00000230 -@const_ref MPI_2DOUBLE_PRECISION MPI_Datatype 0x00000231 -@const_ref MPI_2INTEGER MPI_Datatype 0x00000232 -@const_ref MPI_C_BOOL MPI_Datatype 0x00000238 -@const_ref MPI_CXX_BOOL MPI_Datatype 0x00000239 -@const_ref MPI_WCHAR MPI_Datatype 0x0000023c -@const_ref MPI_INT8_T MPI_Datatype 0x00000240 -@const_ref MPI_UINT8_T MPI_Datatype 0x00000241 -@const_ref MPI_CHAR MPI_Datatype 0x00000243 -@const_ref MPI_SIGNED_CHAR MPI_Datatype 0x00000244 -@const_ref MPI_UNSIGNED_CHAR MPI_Datatype 0x00000245 -@const_ref MPI_BYTE MPI_Datatype 0x00000247 -@const_ref MPI_INT16_T MPI_Datatype 0x00000248 -@const_ref MPI_UINT16_T MPI_Datatype 0x00000249 -@const_ref MPI_INT32_T MPI_Datatype 0x00000250 -@const_ref MPI_UINT32_T MPI_Datatype 0x00000251 -@const_ref MPI_INT64_T MPI_Datatype 0x00000258 -@const_ref MPI_UINT64_T MPI_Datatype 0x00000259 -@const_ref MPIX_LOGICAL1 MPI_Datatype 0x000002c0 -@const_ref MPI_INTEGER1 MPI_Datatype 0x000002c1 -@const_ref MPIX_REAL1 MPI_Datatype 0x000002c2 -@const_ref MPI_CHARACTER MPI_Datatype 0x000002c3 -@const_ref MPIX_LOGICAL2 MPI_Datatype 0x000002c8 -@const_ref MPI_INTEGER2 MPI_Datatype 0x000002c9 -@const_ref MPI_REAL2 MPI_Datatype 0x000002ca -@const_ref MPIX_LOGICAL4 MPI_Datatype 0x000002d0 -@const_ref MPI_INTEGER4 MPI_Datatype 0x000002d1 -@const_ref MPI_REAL4 MPI_Datatype 0x000002d2 -@const_ref MPI_COMPLEX4 MPI_Datatype 0x000002d3 -@const_ref MPIX_LOGICAL8 MPI_Datatype 0x000002d8 -@const_ref MPI_INTEGER8 MPI_Datatype 0x000002d9 -@const_ref MPI_REAL8 MPI_Datatype 0x000002da -@const_ref MPI_COMPLEX8 MPI_Datatype 0x000002db -@const_ref MPIX_LOGICAL16 MPI_Datatype 0x000002e0 -@const_ref MPI_INTEGER16 MPI_Datatype 0x000002e1 -@const_ref MPI_REAL16 MPI_Datatype 0x000002e2 -@const_ref MPI_COMPLEX16 MPI_Datatype 0x000002e3 -@const_ref MPI_COMPLEX32 MPI_Datatype 0x000002eb - -# Status indexing - must match MPI_Status definition -@const_ref MPI_F_SOURCE Cint 0 -@const_ref MPI_F_TAG Cint 1 -@const_ref MPI_F_ERROR Cint 2 -# Fortran status array size and reserved index values (in C) -@const_ref MPI_F_STATUS_SIZE Cint 8 - -# 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_PROC_ABORTED Cint 44 -@const_ref MPI_ERR_QUOTA Cint 45 -@const_ref MPI_ERR_READ_ONLY Cint 46 -@const_ref MPI_ERR_RMA_ATTACH Cint 47 -@const_ref MPI_ERR_RMA_CONFLICT Cint 48 -@const_ref MPI_ERR_RMA_RANGE Cint 49 -@const_ref MPI_ERR_RMA_SHARED Cint 50 -@const_ref MPI_ERR_RMA_SYNC Cint 51 -@const_ref MPI_ERR_RMA_FLAVOR Cint 52 -@const_ref MPI_ERR_SERVICE Cint 53 -@const_ref MPI_ERR_SESSION Cint 54 -@const_ref MPI_ERR_SIZE Cint 55 -@const_ref MPI_ERR_SPAWN Cint 56 -@const_ref MPI_ERR_UNSUPPORTED_DATAREP Cint 57 -@const_ref MPI_ERR_UNSUPPORTED_OPERATION Cint 58 -@const_ref MPI_ERR_VALUE_TOO_LARGE Cint 59 -@const_ref MPI_ERR_WIN Cint 60 -@const_ref MPI_ERR_ERRHANDLER Cint 61 -@const_ref MPI_T_ERR_CANNOT_INIT Cint 1000 -@const_ref MPI_T_ERR_NOT_ACCESSIBLE Cint 1001 -@const_ref MPI_T_ERR_NOT_INITIALIZED Cint 1002 -@const_ref MPI_T_ERR_NOT_SUPPORTED Cint 1003 -@const_ref MPI_T_ERR_MEMORY Cint 1004 -@const_ref MPI_T_ERR_INVALID Cint 1005 -@const_ref MPI_T_ERR_INVALID_INDEX Cint 1006 -@const_ref MPI_T_ERR_INVALID_ITEM Cint 1007 -@const_ref MPI_T_ERR_INVALID_SESSION Cint 1008 -@const_ref MPI_T_ERR_INVALID_HANDLE Cint 1009 -@const_ref MPI_T_ERR_INVALID_NAME Cint 1010 -@const_ref MPI_T_ERR_OUT_OF_HANDLES Cint 1011 -@const_ref MPI_T_ERR_OUT_OF_SESSIONS Cint 1012 -@const_ref MPI_T_ERR_CVAR_SET_NOT_NOW Cint 1013 -@const_ref MPI_T_ERR_CVAR_SET_NEVER Cint 1014 -@const_ref MPI_T_ERR_PVAR_NO_WRITE Cint 1015 -@const_ref MPI_T_ERR_PVAR_NO_STARTSTOP Cint 1016 -@const_ref MPI_T_ERR_PVAR_NO_ATOMIC Cint 1017 -@const_ref MPI_ERR_LASTCODE Cint 0x3fff +@const_ref MPI_DATATYPE_NULL MPI_Datatype 0x00000200 +@const_ref MPI_AINT MPI_Datatype 0x00000201 +@const_ref MPI_COUNT MPI_Datatype 0x00000202 +@const_ref MPI_OFFSET MPI_Datatype 0x00000203 +@const_ref MPI_PACKED MPI_Datatype 0x00000207 +@const_ref MPI_SHORT MPI_Datatype 0x00000208 +@const_ref MPI_INT MPI_Datatype 0x00000209 +@const_ref MPI_LONG MPI_Datatype 0x0000020a +@const_ref MPI_LONG_LONG MPI_Datatype 0x0000020b +const MPI_LONG_LONG_INT = MPI_LONG_LONG +@const_ref MPI_UNSIGNED_SHORT MPI_Datatype 0x0000020c +@const_ref MPI_UNSIGNED MPI_Datatype 0x0000020d +@const_ref MPI_UNSIGNED_LONG MPI_Datatype 0x0000020e +@const_ref MPI_UNSIGNED_LONG_LONG MPI_Datatype 0x0000020f +@const_ref MPI_FLOAT MPI_Datatype 0x00000210 +@const_ref MPI_C_FLOAT_COMPLEX MPI_Datatype 0x00000212 +const MPI_C_COMPLEX = MPI_C_FLOAT_COMPLEX +@const_ref MPI_CXX_FLOAT_COMPLEX MPI_Datatype 0x00000213 +@const_ref MPI_DOUBLE MPI_Datatype 0x00000214 +@const_ref MPI_C_DOUBLE_COMPLEX MPI_Datatype 0x00000216 +@const_ref MPI_CXX_DOUBLE_COMPLEX MPI_Datatype 0x00000217 +@const_ref MPI_LOGICAL MPI_Datatype 0x00000218 +@const_ref MPI_INTEGER MPI_Datatype 0x00000219 +@const_ref MPI_REAL MPI_Datatype 0x0000021a +@const_ref MPI_COMPLEX MPI_Datatype 0x0000021b +@const_ref MPI_DOUBLE_PRECISION MPI_Datatype 0x0000021c +@const_ref MPI_DOUBLE_COMPLEX MPI_Datatype 0x0000021d +@const_ref MPI_CHARACTER MPI_Datatype 0x0000021e +@const_ref MPI_LONG_DOUBLE MPI_Datatype 0x00000220 +@const_ref MPI_C_LONG_DOUBLE_COMPLEX MPI_Datatype 0x00000224 +@const_ref MPI_CXX_LONG_DOUBLE_COMPLEX MPI_Datatype 0x00000225 +@const_ref MPI_FLOAT_INT MPI_Datatype 0x00000228 +@const_ref MPI_DOUBLE_INT MPI_Datatype 0x00000229 +@const_ref MPI_LONG_INT MPI_Datatype 0x0000022a +@const_ref MPI_2INT MPI_Datatype 0x0000022b +@const_ref MPI_SHORT_INT MPI_Datatype 0x0000022c +@const_ref MPI_LONG_DOUBLE_INT MPI_Datatype 0x0000022d +@const_ref MPI_2REAL MPI_Datatype 0x00000230 +@const_ref MPI_2DOUBLE_PRECISION MPI_Datatype 0x00000231 +@const_ref MPI_2INTEGER MPI_Datatype 0x00000232 +@const_ref MPI_C_BOOL MPI_Datatype 0x00000238 +@const_ref MPI_CXX_BOOL MPI_Datatype 0x00000239 +@const_ref MPI_WCHAR MPI_Datatype 0x0000023c +@const_ref MPI_INT8_T MPI_Datatype 0x00000240 +@const_ref MPI_UINT8_T MPI_Datatype 0x00000241 +@const_ref MPI_CHAR MPI_Datatype 0x00000243 +@const_ref MPI_SIGNED_CHAR MPI_Datatype 0x00000244 +@const_ref MPI_UNSIGNED_CHAR MPI_Datatype 0x00000245 +@const_ref MPI_BYTE MPI_Datatype 0x00000247 +@const_ref MPI_INT16_T MPI_Datatype 0x00000248 +@const_ref MPI_UINT16_T MPI_Datatype 0x00000249 +@const_ref MPI_INT32_T MPI_Datatype 0x00000250 +@const_ref MPI_UINT32_T MPI_Datatype 0x00000251 +@const_ref MPI_INT64_T MPI_Datatype 0x00000258 +@const_ref MPI_UINT64_T MPI_Datatype 0x00000259 +@const_ref MPI_LOGICAL1 MPI_Datatype 0x000002c0 +@const_ref MPI_INTEGER1 MPI_Datatype 0x000002c1 +@const_ref MPI_LOGICAL2 MPI_Datatype 0x000002c8 +@const_ref MPI_INTEGER2 MPI_Datatype 0x000002c9 +@const_ref MPI_REAL2 MPI_Datatype 0x000002ca +@const_ref MPI_LOGICAL4 MPI_Datatype 0x000002d0 +@const_ref MPI_INTEGER4 MPI_Datatype 0x000002d1 +@const_ref MPI_REAL4 MPI_Datatype 0x000002d2 +@const_ref MPI_COMPLEX4 MPI_Datatype 0x000002d3 +@const_ref MPI_LOGICAL8 MPI_Datatype 0x000002d8 +@const_ref MPI_INTEGER8 MPI_Datatype 0x000002d9 +@const_ref MPI_REAL8 MPI_Datatype 0x000002da +@const_ref MPI_COMPLEX8 MPI_Datatype 0x000002db +@const_ref MPI_LOGICAL16 MPI_Datatype 0x000002e0 +@const_ref MPI_INTEGER16 MPI_Datatype 0x000002e1 +@const_ref MPI_REAL16 MPI_Datatype 0x000002e2 +@const_ref MPI_COMPLEX16 MPI_Datatype 0x000002e3 +@const_ref MPI_COMPLEX32 MPI_Datatype 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 - -# Constants Specifying Empty or Ignored Input -@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} 4 -@const_ref MPI_WEIGHTS_EMPTY Ptr{Cint} 5 - -# Other constants -const MPI_BSEND_OVERHEAD = Cint(512) # MPICH=96, OMPI=128 - -# String size constants -const MPI_MAX_DATAREP_STRING = Cint(128) # MPICH=OMPI=128 (MPICH has it in `mpio.h`) -const MPI_MAX_ERROR_STRING = Cint(512) # MPICH was bigger -const MPI_MAX_INFO_KEY = Cint(256) # MPICH was bigger -const MPI_MAX_INFO_VAL = Cint(1024) # MPICH was bigger -const MPI_MAX_LIBRARY_VERSION_STRING = Cint(8192) # MPICH was bigger -const MPI_MAX_OBJECT_NAME = Cint(128) # MPICH was bigger -const MPI_MAX_PORT_NAME = Cint(1024) # OMPI was bigger -const MPI_MAX_PROCESSOR_NAME = Cint(256) # OMPI was bigger -const MPI_MAX_STRINGTAG_LEN = Cint(1024) # OMPI was bigger (v5.0+) -const MPI_MAX_PSET_NAME_LEN = Cint(512) # OMPI was bigger (v5.0+) - -# Mode Constants -# must be powers-of-2 to support OR-ing -# Files -@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 -# Windows -@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 - -# rank sentinels - must be negative -@const_ref MPI_ANY_SOURCE Cint -1 -@const_ref MPI_PROC_NULL Cint -2 -@const_ref MPI_ROOT Cint -3 - -# tag sentinels - should be negative -@const_ref MPI_ANY_TAG Cint -31 - -# attribute constant - should be negative -@const_ref MPI_KEYVAL_INVALID Cint -127 - -# special displacement for sequential access file - should be negative -@const_ref MPI_DISPLACEMENT_CURRENT Cint -255 - -# multi-purpose sentinel - must be negative -@const_ref MPI_UNDEFINED Cint -32766 # make it match OMPI and MPICH - -# Environmental inquiry keys and Predefined Attribute Keys -# Threads Constants -# These values are monotonic; i.e., SINGLE < FUNNELED < SERIALIZED < MULTIPLE. -@const_ref MPI_THREAD_SINGLE Cint 0 -@const_ref MPI_THREAD_FUNNELED Cint 1 -@const_ref MPI_THREAD_SERIALIZED Cint 2 -@const_ref MPI_THREAD_MULTIPLE Cint 7 # in case we need other threading levels below MULTIPLE +@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 # 12 -@const_ref MPI_ORDER_FORTRAN Cint 0xF # 15 +@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 - -# RMA Lock Constants - arbitrary values -@const_ref MPI_LOCK_SHARED Cint 21 -@const_ref MPI_LOCK_EXCLUSIVE Cint 22 - -# MPI Window Models -@const_ref MPI_WIN_UNIFIED Cint 31 -@const_ref MPI_WIN_SEPARATE Cint 32 - -# MPI Window Create Flavors -@const_ref MPI_WIN_FLAVOR_ALLOCATE Cint 41 -@const_ref MPI_WIN_FLAVOR_CREATE Cint 42 -@const_ref MPI_WIN_FLAVOR_DYNAMIC Cint 43 -@const_ref MPI_WIN_FLAVOR_SHARED Cint 44 - -# Results of communicator and group comparisons -@const_ref MPI_IDENT Cint 101 -@const_ref MPI_CONGRUENT Cint 102 -@const_ref MPI_SIMILAR Cint 103 -@const_ref MPI_UNEQUAL Cint 104 - -# MPI_Topo_test -@const_ref MPI_GRAPH Cint 201 -@const_ref MPI_DIST_GRAPH Cint 202 -@const_ref MPI_CART Cint 203 - -# Datatype Decoding Constants -@const_ref MPI_COMBINER_NAMED Cint 301 -@const_ref MPI_COMBINER_DUP Cint 302 -@const_ref MPI_COMBINER_CONTIGUOUS Cint 303 -@const_ref MPI_COMBINER_VECTOR Cint 304 -@const_ref MPI_COMBINER_HVECTOR Cint 305 -@const_ref MPI_COMBINER_INDEXED Cint 306 -@const_ref MPI_COMBINER_HINDEXED Cint 307 -@const_ref MPI_COMBINER_INDEXED_BLOCK Cint 308 -@const_ref MPI_COMBINER_HINDEXED_BLOCK Cint 309 -@const_ref MPI_COMBINER_STRUCT Cint 310 -@const_ref MPI_COMBINER_SUBARRAY Cint 311 -@const_ref MPI_COMBINER_DARRAY Cint 312 -@const_ref MPI_COMBINER_F90_REAL Cint 313 -@const_ref MPI_COMBINER_F90_COMPLEX Cint 314 -@const_ref MPI_COMBINER_F90_INTEGER Cint 315 -@const_ref MPI_COMBINER_RESIZED Cint 316 -@const_ref MPI_COMBINER_VALUE_INDEX Cint 317 - -# File Position Constants -@const_ref MPI_SEEK_CUR Cint 601 -@const_ref MPI_SEEK_END Cint 602 -@const_ref MPI_SEEK_SET Cint 603 - -# Fortran Datatype Matching Constants -@const_ref MPIX_TYPECLASS_LOGICAL Cint 801 -@const_ref MPI_TYPECLASS_INTEGER Cint 802 -@const_ref MPI_TYPECLASS_REAL Cint 803 -@const_ref MPI_TYPECLASS_COMPLEX Cint 804 - -# Communicator split type constants - arbitrary values -@const_ref MPI_COMM_TYPE_SHARED Cint 1001 -@const_ref MPI_COMM_TYPE_HW_UNGUIDED Cint 1002 -@const_ref MPI_COMM_TYPE_HW_GUIDED Cint 1003 -@const_ref MPI_COMM_TYPE_RESOURCE_GUIDED Cint 1004 - -# These apply to MPI_COMM_WORLD -@const_ref MPI_TAG_UB Cint 10001 -@const_ref MPI_IO Cint 10002 -@const_ref MPI_HOST Cint 10003 -@const_ref MPI_WTIME_IS_GLOBAL Cint 10004 -@const_ref MPI_APPNUM Cint 10005 -@const_ref MPI_LASTUSEDCODE Cint 10006 -@const_ref MPI_UNIVERSE_SIZE Cint 10007 +@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 -# These apply to Windows -@const_ref MPI_WIN_BASE Cint 20001 -@const_ref MPI_WIN_DISP_UNIT Cint 20002 -@const_ref MPI_WIN_SIZE Cint 20003 -@const_ref MPI_WIN_CREATE_FLAVOR Cint 20004 -@const_ref MPI_WIN_MODEL Cint 20005 - -const MPI_Copy_function = Cvoid -const MPI_Delete_function = Cvoid +# 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_cancel_function = Cvoid -const MPI_Grequest_free_function = Cvoid const MPI_Grequest_query_function = Cvoid +const MPI_Grequest_free_function = Cvoid +const MPI_Grequest_cancel_function = Cvoid -const MPI_Datarep_conversion_function = Cvoid -const MPI_Datarep_extent_function = Cvoid -const MPI_Datarep_conversion_function_c = 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 @@ -414,6 +408,10 @@ 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 @@ -424,17 +422,17 @@ 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} 0x0 -@const_ref MPI_DUP_FN Ptr{MPI_Copy_function} 0x1 -@const_ref MPI_NULL_DELETE_FN Ptr{MPI_Delete_function} 0x0 -@const_ref MPI_COMM_NULL_COPY_FN Ptr{MPI_Comm_copy_attr_function} 0x0 -@const_ref MPI_COMM_DUP_FN Ptr{MPI_Comm_copy_attr_function} 0x1 -@const_ref MPI_COMM_NULL_DELETE_FN Ptr{MPI_Comm_delete_attr_function} 0x0 -@const_ref MPI_TYPE_NULL_COPY_FN Ptr{MPI_Type_copy_attr_function} 0x0 -@const_ref MPI_TYPE_DUP_FN Ptr{MPI_Type_copy_attr_function} 0x1 -@const_ref MPI_TYPE_NULL_DELETE_FN Ptr{MPI_Type_delete_attr_function} 0x0 -@const_ref MPI_WIN_NULL_COPY_FN Ptr{MPI_Win_copy_attr_function} 0x0 -@const_ref MPI_WIN_DUP_FN Ptr{MPI_Win_copy_attr_function} 0x1 -@const_ref MPI_WIN_NULL_DELETE_FN Ptr{MPI_Win_delete_attr_function} 0x0 -@const_ref MPI_CONVERSION_FN_NULL Ptr{MPI_Datarep_conversion_function} 0x0 -@const_ref MPI_CONVERSION_FN_NULL_C Ptr{MPI_Datarep_conversion_function_c} 0x0 +@const_ref MPI_NULL_COPY_FN Ptr{MPI_Copy_function} 0x0 +@const_ref MPI_DUP_FN Ptr{MPI_Copy_function} 0x1 +@const_ref MPI_NULL_DELETE_FN Ptr{MPI_Delete_function} 0x0 +@const_ref MPI_COMM_NULL_COPY_FN Ptr{MPI_Comm_copy_attr_function} 0x0 +@const_ref MPI_COMM_DUP_FN Ptr{MPI_Comm_copy_attr_function} 0x1 +@const_ref MPI_COMM_NULL_DELETE_FN Ptr{MPI_Comm_delete_attr_function} 0x0 +@const_ref MPI_TYPE_NULL_COPY_FN Ptr{MPI_Type_copy_attr_function} 0x0 +@const_ref MPI_TYPE_DUP_FN Ptr{MPI_Type_copy_attr_function} 0x1 +@const_ref MPI_TYPE_NULL_DELETE_FN Ptr{MPI_Type_delete_attr_function} 0x0 +@const_ref MPI_WIN_NULL_COPY_FN Ptr{MPI_Win_copy_attr_function} 0x0 +@const_ref MPI_WIN_DUP_FN Ptr{MPI_Win_copy_attr_function} 0x1 +@const_ref MPI_WIN_NULL_DELETE_FN Ptr{MPI_Win_delete_attr_function} 0x0 +@const_ref MPI_CONVERSION_FN_NULL Ptr{MPI_Datarep_conversion_function} 0x0 +@const_ref MPI_CONVERSION_FN_NULL_C Ptr{MPI_Datarep_conversion_function_c} 0x0 From bc2e922932263308d514094663cec22438cee39c Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Fri, 12 Dec 2025 09:57:31 -0500 Subject: [PATCH 06/13] Update MPI_Status definition --- src/api/mpiabi.jl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/api/mpiabi.jl b/src/api/mpiabi.jl index 9fd417daa..440ecd67c 100644 --- a/src/api/mpiabi.jl +++ b/src/api/mpiabi.jl @@ -14,7 +14,11 @@ struct MPI_Status MPI_SOURCE::Cint MPI_TAG::Cint MPI_ERROR::Cint - MPI_internal::NTuple{5,Cint} + MPI_internal1::Cint + MPI_internal2::Cint + MPI_internal3::Cint + MPI_internal4::Cint + MPI_internal5::Cint end const MPI_Op = Ptr{Cvoid} From 02ef0d3f6881a249f2f56199ceceead2d5030046 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Fri, 12 Dec 2025 10:39:02 -0500 Subject: [PATCH 07/13] Update predefined MPI callbacks --- src/api/mpiabi.jl | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/api/mpiabi.jl b/src/api/mpiabi.jl index 440ecd67c..f77292f69 100644 --- a/src/api/mpiabi.jl +++ b/src/api/mpiabi.jl @@ -426,17 +426,17 @@ 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} 0x0 -@const_ref MPI_DUP_FN Ptr{MPI_Copy_function} 0x1 -@const_ref MPI_NULL_DELETE_FN Ptr{MPI_Delete_function} 0x0 -@const_ref MPI_COMM_NULL_COPY_FN Ptr{MPI_Comm_copy_attr_function} 0x0 -@const_ref MPI_COMM_DUP_FN Ptr{MPI_Comm_copy_attr_function} 0x1 -@const_ref MPI_COMM_NULL_DELETE_FN Ptr{MPI_Comm_delete_attr_function} 0x0 -@const_ref MPI_TYPE_NULL_COPY_FN Ptr{MPI_Type_copy_attr_function} 0x0 -@const_ref MPI_TYPE_DUP_FN Ptr{MPI_Type_copy_attr_function} 0x1 -@const_ref MPI_TYPE_NULL_DELETE_FN Ptr{MPI_Type_delete_attr_function} 0x0 -@const_ref MPI_WIN_NULL_COPY_FN Ptr{MPI_Win_copy_attr_function} 0x0 -@const_ref MPI_WIN_DUP_FN Ptr{MPI_Win_copy_attr_function} 0x1 -@const_ref MPI_WIN_NULL_DELETE_FN Ptr{MPI_Win_delete_attr_function} 0x0 -@const_ref MPI_CONVERSION_FN_NULL Ptr{MPI_Datarep_conversion_function} 0x0 -@const_ref MPI_CONVERSION_FN_NULL_C Ptr{MPI_Datarep_conversion_function_c} 0x0 +@const_ref MPI_NULL_COPY_FN Ptr{MPI_Copy_function} 0 +@const_ref MPI_DUP_FN Ptr{MPI_Copy_function} 1 +@const_ref MPI_NULL_DELETE_FN Ptr{MPI_Delete_function} 0 +@const_ref MPI_COMM_NULL_COPY_FN Ptr{MPI_Comm_copy_attr_function} 0 +@const_ref MPI_COMM_DUP_FN Ptr{MPI_Comm_copy_attr_function} 1 +@const_ref MPI_COMM_NULL_DELETE_FN Ptr{MPI_Comm_delete_attr_function} 0 +@const_ref MPI_TYPE_NULL_COPY_FN Ptr{MPI_Type_copy_attr_function} 0 +@const_ref MPI_TYPE_DUP_FN Ptr{MPI_Type_copy_attr_function} 1 +@const_ref MPI_TYPE_NULL_DELETE_FN Ptr{MPI_Type_delete_attr_function} 0 +@const_ref MPI_WIN_NULL_COPY_FN Ptr{MPI_Win_copy_attr_function} 0 +@const_ref MPI_WIN_DUP_FN Ptr{MPI_Win_copy_attr_function} 1 +@const_ref MPI_WIN_NULL_DELETE_FN Ptr{MPI_Win_delete_attr_function} 0 +@const_ref MPI_CONVERSION_FN_NULL Ptr{MPI_Datarep_conversion_function} 0 +@const_ref MPI_CONVERSION_FN_NULL_C Ptr{MPI_Datarep_conversion_function_c} 0 From e68f40e067bf593f5da1a330651a8356dbb6709f Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Fri, 12 Dec 2025 10:45:23 -0500 Subject: [PATCH 08/13] Convert some constant to UInt --- src/api/mpiabi.jl | 234 +++++++++++++++++++++++----------------------- 1 file changed, 117 insertions(+), 117 deletions(-) diff --git a/src/api/mpiabi.jl b/src/api/mpiabi.jl index f77292f69..03263bef6 100644 --- a/src/api/mpiabi.jl +++ b/src/api/mpiabi.jl @@ -22,131 +22,131 @@ struct MPI_Status end const MPI_Op = Ptr{Cvoid} -@const_ref MPI_OP_NULL MPI_Op 0x00000020 -@const_ref MPI_SUM MPI_Op 0x00000021 -@const_ref MPI_MIN MPI_Op 0x00000022 -@const_ref MPI_MAX MPI_Op 0x00000023 -@const_ref MPI_PROD MPI_Op 0x00000024 -@const_ref MPI_BAND MPI_Op 0x00000028 -@const_ref MPI_BOR MPI_Op 0x00000029 -@const_ref MPI_BXOR MPI_Op 0x0000002a -@const_ref MPI_LAND MPI_Op 0x00000030 -@const_ref MPI_LOR MPI_Op 0x00000031 -@const_ref MPI_LXOR MPI_Op 0x00000032 -@const_ref MPI_MINLOC MPI_Op 0x00000038 -@const_ref MPI_MAXLOC MPI_Op 0x00000039 -@const_ref MPI_REPLACE MPI_Op 0x0000003c -@const_ref MPI_NO_OP MPI_Op 0x0000003d +@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 0x00000100 -@const_ref MPI_COMM_WORLD MPI_Comm 0x00000101 -@const_ref MPI_COMM_SELF MPI_Comm 0x00000102 +@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 0x00000108 -@const_ref MPI_GROUP_EMPTY MPI_Group 0x00000109 +@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 0x00000110 +@const_ref MPI_WIN_NULL MPI_Win UInt(0x00000110) const MPI_File = Ptr{Cvoid} -@const_ref MPI_FILE_NULL MPI_File 0x00000118 +@const_ref MPI_FILE_NULL MPI_File UInt(0x00000118) const MPI_Session = Ptr{Cvoid} -@const_ref MPI_SESSION_NULL MPI_Session 0x00000120 +@const_ref MPI_SESSION_NULL MPI_Session UInt(0x00000120) const MPI_Message = Ptr{Cvoid} -@const_ref MPI_MESSAGE_NULL MPI_Message 0x00000128 -@const_ref MPI_MESSAGE_NO_PROC MPI_Message 0x00000129 +@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 0x00000130 -@const_ref MPI_INFO_ENV MPI_Info 0x00000131 +@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 0x00000140 -@const_ref MPI_ERRORS_ARE_FATAL MPI_Errhandler 0x00000141 -@const_ref MPI_ERRORS_ABORT MPI_Errhandler 0x00000142 -@const_ref MPI_ERRORS_RETURN MPI_Errhandler 0x00000143 +@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 0x00000180 +@const_ref MPI_REQUEST_NULL MPI_Request UInt(0x00000180) const MPI_Datatype = Ptr{Cvoid} -@const_ref MPI_DATATYPE_NULL MPI_Datatype 0x00000200 -@const_ref MPI_AINT MPI_Datatype 0x00000201 -@const_ref MPI_COUNT MPI_Datatype 0x00000202 -@const_ref MPI_OFFSET MPI_Datatype 0x00000203 -@const_ref MPI_PACKED MPI_Datatype 0x00000207 -@const_ref MPI_SHORT MPI_Datatype 0x00000208 -@const_ref MPI_INT MPI_Datatype 0x00000209 -@const_ref MPI_LONG MPI_Datatype 0x0000020a -@const_ref MPI_LONG_LONG MPI_Datatype 0x0000020b +@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 0x0000020c -@const_ref MPI_UNSIGNED MPI_Datatype 0x0000020d -@const_ref MPI_UNSIGNED_LONG MPI_Datatype 0x0000020e -@const_ref MPI_UNSIGNED_LONG_LONG MPI_Datatype 0x0000020f -@const_ref MPI_FLOAT MPI_Datatype 0x00000210 -@const_ref MPI_C_FLOAT_COMPLEX MPI_Datatype 0x00000212 +@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 0x00000213 -@const_ref MPI_DOUBLE MPI_Datatype 0x00000214 -@const_ref MPI_C_DOUBLE_COMPLEX MPI_Datatype 0x00000216 -@const_ref MPI_CXX_DOUBLE_COMPLEX MPI_Datatype 0x00000217 -@const_ref MPI_LOGICAL MPI_Datatype 0x00000218 -@const_ref MPI_INTEGER MPI_Datatype 0x00000219 -@const_ref MPI_REAL MPI_Datatype 0x0000021a -@const_ref MPI_COMPLEX MPI_Datatype 0x0000021b -@const_ref MPI_DOUBLE_PRECISION MPI_Datatype 0x0000021c -@const_ref MPI_DOUBLE_COMPLEX MPI_Datatype 0x0000021d -@const_ref MPI_CHARACTER MPI_Datatype 0x0000021e -@const_ref MPI_LONG_DOUBLE MPI_Datatype 0x00000220 -@const_ref MPI_C_LONG_DOUBLE_COMPLEX MPI_Datatype 0x00000224 -@const_ref MPI_CXX_LONG_DOUBLE_COMPLEX MPI_Datatype 0x00000225 -@const_ref MPI_FLOAT_INT MPI_Datatype 0x00000228 -@const_ref MPI_DOUBLE_INT MPI_Datatype 0x00000229 -@const_ref MPI_LONG_INT MPI_Datatype 0x0000022a -@const_ref MPI_2INT MPI_Datatype 0x0000022b -@const_ref MPI_SHORT_INT MPI_Datatype 0x0000022c -@const_ref MPI_LONG_DOUBLE_INT MPI_Datatype 0x0000022d -@const_ref MPI_2REAL MPI_Datatype 0x00000230 -@const_ref MPI_2DOUBLE_PRECISION MPI_Datatype 0x00000231 -@const_ref MPI_2INTEGER MPI_Datatype 0x00000232 -@const_ref MPI_C_BOOL MPI_Datatype 0x00000238 -@const_ref MPI_CXX_BOOL MPI_Datatype 0x00000239 -@const_ref MPI_WCHAR MPI_Datatype 0x0000023c -@const_ref MPI_INT8_T MPI_Datatype 0x00000240 -@const_ref MPI_UINT8_T MPI_Datatype 0x00000241 -@const_ref MPI_CHAR MPI_Datatype 0x00000243 -@const_ref MPI_SIGNED_CHAR MPI_Datatype 0x00000244 -@const_ref MPI_UNSIGNED_CHAR MPI_Datatype 0x00000245 -@const_ref MPI_BYTE MPI_Datatype 0x00000247 -@const_ref MPI_INT16_T MPI_Datatype 0x00000248 -@const_ref MPI_UINT16_T MPI_Datatype 0x00000249 -@const_ref MPI_INT32_T MPI_Datatype 0x00000250 -@const_ref MPI_UINT32_T MPI_Datatype 0x00000251 -@const_ref MPI_INT64_T MPI_Datatype 0x00000258 -@const_ref MPI_UINT64_T MPI_Datatype 0x00000259 -@const_ref MPI_LOGICAL1 MPI_Datatype 0x000002c0 -@const_ref MPI_INTEGER1 MPI_Datatype 0x000002c1 -@const_ref MPI_LOGICAL2 MPI_Datatype 0x000002c8 -@const_ref MPI_INTEGER2 MPI_Datatype 0x000002c9 -@const_ref MPI_REAL2 MPI_Datatype 0x000002ca -@const_ref MPI_LOGICAL4 MPI_Datatype 0x000002d0 -@const_ref MPI_INTEGER4 MPI_Datatype 0x000002d1 -@const_ref MPI_REAL4 MPI_Datatype 0x000002d2 -@const_ref MPI_COMPLEX4 MPI_Datatype 0x000002d3 -@const_ref MPI_LOGICAL8 MPI_Datatype 0x000002d8 -@const_ref MPI_INTEGER8 MPI_Datatype 0x000002d9 -@const_ref MPI_REAL8 MPI_Datatype 0x000002da -@const_ref MPI_COMPLEX8 MPI_Datatype 0x000002db -@const_ref MPI_LOGICAL16 MPI_Datatype 0x000002e0 -@const_ref MPI_INTEGER16 MPI_Datatype 0x000002e1 -@const_ref MPI_REAL16 MPI_Datatype 0x000002e2 -@const_ref MPI_COMPLEX16 MPI_Datatype 0x000002e3 -@const_ref MPI_COMPLEX32 MPI_Datatype 0x000002eb +@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 @@ -426,17 +426,17 @@ 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} 0 -@const_ref MPI_DUP_FN Ptr{MPI_Copy_function} 1 -@const_ref MPI_NULL_DELETE_FN Ptr{MPI_Delete_function} 0 -@const_ref MPI_COMM_NULL_COPY_FN Ptr{MPI_Comm_copy_attr_function} 0 -@const_ref MPI_COMM_DUP_FN Ptr{MPI_Comm_copy_attr_function} 1 -@const_ref MPI_COMM_NULL_DELETE_FN Ptr{MPI_Comm_delete_attr_function} 0 -@const_ref MPI_TYPE_NULL_COPY_FN Ptr{MPI_Type_copy_attr_function} 0 -@const_ref MPI_TYPE_DUP_FN Ptr{MPI_Type_copy_attr_function} 1 -@const_ref MPI_TYPE_NULL_DELETE_FN Ptr{MPI_Type_delete_attr_function} 0 -@const_ref MPI_WIN_NULL_COPY_FN Ptr{MPI_Win_copy_attr_function} 0 -@const_ref MPI_WIN_DUP_FN Ptr{MPI_Win_copy_attr_function} 1 -@const_ref MPI_WIN_NULL_DELETE_FN Ptr{MPI_Win_delete_attr_function} 0 -@const_ref MPI_CONVERSION_FN_NULL Ptr{MPI_Datarep_conversion_function} 0 -@const_ref MPI_CONVERSION_FN_NULL_C Ptr{MPI_Datarep_conversion_function_c} 0 +@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) From 518f8f0ce13d60f51749317a498db9620938fb2a Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Fri, 12 Dec 2025 10:59:09 -0500 Subject: [PATCH 09/13] Temporarily implement MPI_Abi_get_version --- src/api/api.jl | 7 +++++++ src/implementations.jl | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/src/api/api.jl b/src/api/api.jl index 5b731c3b6..6999c091c 100644 --- a/src/api/api.jl +++ b/src/api/api.jl @@ -140,6 +140,13 @@ end include("generated_api.jl") +# We define this function here temporarily. This call will fail for +# MPI <5. Once we regenerate the API for MPI 5.0, this should go away +# again. +function MPI_Abi_get_version(major, minor) + @mpicall ccall((:MPI_Abi_get_version, libmpi), Cint, (Ptr{Cint}, Ptr{Cint}), major, minor) +end + for handle in [ :MPI_Comm, :MPI_Datatype, diff --git a/src/implementations.jl b/src/implementations.jl index 337811616..d283d3e85 100644 --- a/src/implementations.jl +++ b/src/implementations.jl @@ -70,6 +70,13 @@ function Get_version() VersionNumber(major[], minor[]) end +function Abi_get_version() + major = Ref{Cint}() + minor = Ref{Cint}() + API.MPI_Abi_get_version(major, minor) + VersionNumber(major[], minor[]) +end + """ MPI_VERSION :: VersionNumber From 046e293707051f9f1ddb54935ad0e1ffc85d7328 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Fri, 19 Dec 2025 15:34:59 -0500 Subject: [PATCH 10/13] MPI_Abi_get_version: New function --- src/api/api.jl | 8 +++++++- src/implementations.jl | 22 ++++++++++++++++++---- 2 files changed, 25 insertions(+), 5 deletions(-) diff --git a/src/api/api.jl b/src/api/api.jl index 6999c091c..282caee2c 100644 --- a/src/api/api.jl +++ b/src/api/api.jl @@ -144,7 +144,13 @@ include("generated_api.jl") # MPI <5. Once we regenerate the API for MPI 5.0, this should go away # again. function MPI_Abi_get_version(major, minor) - @mpicall ccall((:MPI_Abi_get_version, libmpi), Cint, (Ptr{Cint}, Ptr{Cint}), major, minor) + try + @mpicall ccall((:MPI_Abi_get_version, libmpi), Cint, (Ptr{Cint}, Ptr{Cint}), major, minor) + catch + # This is an older MPI implementation which does not support the MPI ABI. + major[] = -1 + minor[] = -1 + end end for handle in [ diff --git a/src/implementations.jl b/src/implementations.jl index d283d3e85..142823a83 100644 --- a/src/implementations.jl +++ b/src/implementations.jl @@ -70,22 +70,35 @@ function Get_version() VersionNumber(major[], minor[]) end +""" + MPI_VERSION :: VersionNumber + +The supported version of the MPI standard. + +# External links +$(_doc_external("MPI_Get_version")) +""" +const MPI_VERSION = Get_version() + + function Abi_get_version() major = Ref{Cint}() minor = Ref{Cint}() API.MPI_Abi_get_version(major, minor) + major[] == -1 && return nothing VersionNumber(major[], minor[]) end """ - MPI_VERSION :: VersionNumber + MPI_ABI_VERSION :: Union{Nothing,VersionNumber} -The supported version of the MPI standard. +The supported version of the MPI ABI standard. # External links -$(_doc_external("MPI_Get_version")) +$(_doc_external("MPI_Abi_get_version")) """ -const MPI_VERSION = Get_version() +const MPI_ABI_VERSION = Abi_get_version() + using PkgVersion """ @@ -122,6 +135,7 @@ function versioninfo(io::IO=stdout) println(io, " libmpi: ", API.libmpi) println(io, " libmpi dlpath: ", Libdl.dlpath(API.libmpi)) println(io, " MPI version: ", Get_version()) + println(io, " MPI ABI version: ", Abi_get_version()) println(io, " Library version: ") for line in split(Get_library_version(), '\n') println(io, " ", line) From 3a3eaba5284e491105aeb36d185c782875fedee2 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Fri, 19 Dec 2025 19:14:22 -0500 Subject: [PATCH 11/13] docs: Document MPI.MPI_ABI_VERSION --- docs/src/reference/library.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/src/reference/library.md b/docs/src/reference/library.md index 302015ff6..caf2d4ccb 100644 --- a/docs/src/reference/library.md +++ b/docs/src/reference/library.md @@ -4,6 +4,7 @@ ```@docs MPI.MPI_VERSION +MPI.MPI_ABI_VERSION MPI.MPI_LIBRARY MPI.MPI_LIBRARY_VERSION MPI.MPI_LIBRARY_VERSION_STRING From a6384d38add850afefa06b4cb59aad0c40346ac4 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Sat, 20 Dec 2025 10:24:43 -0500 Subject: [PATCH 12/13] Remove MPI_Abi_get_version --- docs/src/reference/library.md | 1 - src/api/api.jl | 13 ------------- src/implementations.jl | 20 -------------------- 3 files changed, 34 deletions(-) diff --git a/docs/src/reference/library.md b/docs/src/reference/library.md index caf2d4ccb..302015ff6 100644 --- a/docs/src/reference/library.md +++ b/docs/src/reference/library.md @@ -4,7 +4,6 @@ ```@docs MPI.MPI_VERSION -MPI.MPI_ABI_VERSION MPI.MPI_LIBRARY MPI.MPI_LIBRARY_VERSION MPI.MPI_LIBRARY_VERSION_STRING diff --git a/src/api/api.jl b/src/api/api.jl index 282caee2c..5b731c3b6 100644 --- a/src/api/api.jl +++ b/src/api/api.jl @@ -140,19 +140,6 @@ end include("generated_api.jl") -# We define this function here temporarily. This call will fail for -# MPI <5. Once we regenerate the API for MPI 5.0, this should go away -# again. -function MPI_Abi_get_version(major, minor) - try - @mpicall ccall((:MPI_Abi_get_version, libmpi), Cint, (Ptr{Cint}, Ptr{Cint}), major, minor) - catch - # This is an older MPI implementation which does not support the MPI ABI. - major[] = -1 - minor[] = -1 - end -end - for handle in [ :MPI_Comm, :MPI_Datatype, diff --git a/src/implementations.jl b/src/implementations.jl index 142823a83..05b295aca 100644 --- a/src/implementations.jl +++ b/src/implementations.jl @@ -81,25 +81,6 @@ $(_doc_external("MPI_Get_version")) const MPI_VERSION = Get_version() -function Abi_get_version() - major = Ref{Cint}() - minor = Ref{Cint}() - API.MPI_Abi_get_version(major, minor) - major[] == -1 && return nothing - VersionNumber(major[], minor[]) -end - -""" - MPI_ABI_VERSION :: Union{Nothing,VersionNumber} - -The supported version of the MPI ABI standard. - -# External links -$(_doc_external("MPI_Abi_get_version")) -""" -const MPI_ABI_VERSION = Abi_get_version() - - using PkgVersion """ MPI.versioninfo(io::IO=stdout) @@ -135,7 +116,6 @@ function versioninfo(io::IO=stdout) println(io, " libmpi: ", API.libmpi) println(io, " libmpi dlpath: ", Libdl.dlpath(API.libmpi)) println(io, " MPI version: ", Get_version()) - println(io, " MPI ABI version: ", Abi_get_version()) println(io, " Library version: ") for line in split(Get_library_version(), '\n') println(io, " ", line) From b274a5e1a35bae6296b3b237d112776911fc63d8 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Sat, 20 Dec 2025 11:11:26 -0500 Subject: [PATCH 13/13] Update link to MOOSE --- docs/src/knownissues.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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