21.2. Implementation Requirements



Up: Application Binary Interface (ABI)
Next: The MPI ABI Header File and Shared Library
Previous: Introduction
Although the ABI is designed to be portable,
there are platform and implementation designs where it cannot
be supported, or is not useful to support.
Furthermore, backwards compatibility of existing implementation
ABIs is important to some users, and MPI implementations
may continue to support these.
The standard ABI is intended to support systems with the
following properties:
- Dynamic shared libraries, which are loaded
by the operating system or by the application,
are supported.
- The calling convention of C functions and the
sizes and alignment requirements of C standard
types are known constant properties of the system;
if the system possesses any means for changing
these, each choice constitutes a different,
incompatible system from the perspective of the MPI ABI.
- Addresses can be represented as 32- or 64-bit signed
integers and have a direct relationship with C pointers;
segmented addressing is not supported.
The following query functions are provided to allow MPI applications, tools,
and language bindings to determine whether an implementation provides ABI support
and, if so, which version of the ABI is supported.
MPI_ABI_GET_VERSION
and MPI_ABI_GET_INFO,
can be called at any time in an MPI program.
These functions must always be thread-safe, as defined in
Section MPI and Threads.
MPI_ABI_GET_VERSION(abi_major, abi_minor) |
OUT abi_major | ABI major version (integer) |
OUT abi_minor | ABI minor version (integer) |
C binding
int MPI_Abi_get_version(int *abi_major, int *abi_minor)
Fortran 2008 binding
MPI_Abi_get_version(abi_major, abi_minor, ierror)
INTEGER, INTENT(OUT) :: abi_major, abi_minor
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
Fortran binding
MPI_ABI_GET_VERSION(ABI_MAJOR, ABI_MINOR, IERROR)
INTEGER ABI_MAJOR, ABI_MINOR, IERROR
MPI_ABI_GET_VERSION produces the standard ABI version, if supported.
Otherwise, the values of the major and minor version are set to -1.
The ABI version is independent of the MPI specification version.
The major and minor version of the ABI associated with MPI-5.0
are 1 and 0.
The ABI version macros MPI_ABI_VERSION and
MPI_ABI_SUBVERSION are present in the MPI header and modules
so that applications can check for consistency between the compilation
environment and the properties of the implementation at runtime.
#define MPI_ABI_VERSION 1
#define MPI_ABI_SUBVERSION 0
INTEGER :: MPI_ABI_VERSION, MPI_ABI_SUBVERSION
PARAMETER (MPI_ABI_VERSION = 1)
PARAMETER (MPI_ABI_SUBVERSION = 0)
Backwards-compatible changes, such as the addition of new handle types,
will increment the minor version.
Backwards-incompatible changes will increment the major version.
The addition of new functions to the MPI API
does not change the ABI version.
The existing function MPI_GET_VERSION can be used
to query the version of the API supported and whether certain
functions are present in the MPI library.
MPI_ABI_GET_INFO(info) |
OUT info | ABI details info object (implementation-defined) (handle) |
C binding
int MPI_Abi_get_info(MPI_Info *info)
Fortran 2008 binding
MPI_Abi_get_info(info, ierror)
TYPE(MPI_Info), INTENT(OUT) :: info
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
Fortran binding
MPI_ABI_GET_INFO(INFO, IERROR)
INTEGER INFO, IERROR
Implementations may provide additional information related to the ABI.
The function MPI_ABI_GET_INFO allows the user to query
this information via an info object.
The following keys are predefined for this object:
-
"mpi_aint_size":
-
The size in bytes of MPI_Aint.
-
"mpi_count_size":
-
The size in bytes of MPI_Count.
-
"mpi_offset_size":
-
The size in bytes of MPI_Offset.



Up: Application Binary Interface (ABI)
Next: The MPI ABI Header File and Shared Library
Previous: Introduction
Return to MPI-5.0 Standard Index
Return to MPI Forum Home Page
(Unofficial) MPI-5.0 of June 9, 2025
HTML Generated on March 2, 2025