@@ -4,12 +4,10 @@ Last updated: November 2025
44
55This README describes the current approach to supporting the MPI-5
66Application Binary Interface (ABI). The MPI ABI is described in
7- Chapter 21 of the MPI-5 standard. The standardizes values for
7+ Chapter 20 of the MPI-5 standard. The standardized values for
88constants, etc. are presented in Appendix A of that document.
99
10- At this time, Open MPI is only supporting the 'c' ABI functionality
11- although the Fortran related query methods presented in Chapter 21
12- are supported.
10+ Open MPI supports the 'c' ABI functionality described in that chapter.
1311
1412## What does having a defined ABI mean to applications?
1513
@@ -21,10 +19,14 @@ This only applies to dynamically linked applications.
2119In principle a single mpi.h include file can be used, for example
2220the one provided at https://github.com/mpi-forum/mpi-abi-stubs .
2321
24- Chapter 21 specifies the shared library name (soname) of the ABI MPI
25- library and its file name (libmpi\_ abi). The major and minor versions
26- of the library are specified in this chapter as well. The name of
27- the compiler wrapper - mpicc\_ abi - is also specified.
22+ The MPI ABI specifies the file name of the ABI MPI
23+ library (libmpi_abi). It does not explicitly specify the shared library
24+ name(SONAME), but it presumably is libmpi_abi.0. Note we need for this to
25+ by the same name as that used by the MPICH implementation of the MPI ABI.
26+ The major and minor versions of the library are specified in this chapter as well.
27+ See the top level VERSION file for adjusting the SONAME.
28+
29+ The name of the compiler wrapper - mpicc_abi - is also specified.
2830
2931## Refactor of Open MPI to support the MPI ABI
3032
@@ -39,14 +41,14 @@ libraries are linked. The structure is depicted below:
3941
4042 MPI ABI OMPI ABI
4143 +----------------------+----------------------+
42- | libmpi \_ abi .la | libmpi.la |
44+ | libmpi_abi .la | libmpi.la |
4345 +----------------------+----------------------+
44- | libopen \_ mpi .la |
46+ | libopen_mpi .la |
4547 +----------------------+----------------------+
4648
4749Note the ability to change the name of the OMPI ABI library (libmpi.la)
4850is still supported, so in the code base Makefiles this library actually
49- appears as lib@OMPI \_ LIBMPI \_ NAME @.la).
51+ appears as lib@OMPI_LIBMPI_NAME @.la).
5052
5153Since the Fortran ABI is not currently supported, the Fortran libraries
5254are only linked against libmpi.so.0.
@@ -56,9 +58,9 @@ are only linked against libmpi.so.0.
5658The MPI and OMPI libraries are installed in the same <install-path >/lib
5759folder. They have different file names so this presents no problems.
5860The OMPI ABI include files are installed in <install-path >/include as usual.
59- The MPI ABI include file is installed in <install-path >/include/standard \_ abi .
60- The mpicc \_ abi compiler wrapper points the c compiler to the correct mpi.h and
61- links the the executable/shared library against libmpi \_ abi .
61+ The MPI ABI include file is installed in <install-path >/include/standard_abi .
62+ The mpicc_abi compiler wrapper points the c compiler to the correct mpi.h and
63+ links the executable/shared library against libmpi_abi .
6264
6365## Generating the ABI compliant mpi.h
6466
@@ -77,21 +79,23 @@ components:
77792 . two json files: mpi-standard-apis.json and mpi-standard-abi.json.
7880 The former is generated as part of the build process for the MPI standard.
7981 The later is generated via a tool (not yet incorporated in the upstream
80- mpi- standard code base). The tool converts the values embedded in the
82+ MPI standard code base). The tool converts the values embedded in the
8183 appendix A latex file into a json file specifying the values for MPI
82- constants, e.g. value of MPI \_ COMM \_ WORLD . These json files reside in
84+ constants, e.g. value of MPI_COMM_WORLD . These json files reside in
8385 the top level docs folder. Note the first json file is also used to
8486 generate makefile content.
8587
86- 3 . A tool - c \_ header .py was written to parse the two json files
88+ 3 . A tool - c_header .py was written to parse the two json files
8789 described above and generate the MPI ABI compliant mpi.h and a name mangled
8890 version - abi.h. Eventually this tool will be incorporated into the
8991 binding infrastructure. More on the binding infrastructure below.
9092 The tool uses methods from pympistandard.
9193
92- 4 . The c \_ header .py tool uses a template file - abi.h.in located in
94+ 4 . The c_header .py tool uses a template file - abi.h.in located in
9395 the ompi/mpi/c folder to generate the MPI ABI mpi.h and the name
94- mangled version - abi.h. The tool uses methods from pympistandard.
96+ mangled version - abi.h. The template is just used to structure how the
97+ various blocks of the resulting mpi.h are placed, not the actual content.
98+ The tool uses methods from pympistandard.
9599
96100## Generating the MPI ABI compliant c bindings
97101
@@ -103,7 +107,7 @@ This infrastructure uses templates (*.c.in) files to generate up to four
103107variants: OMPI ABI int count, OMPI ABI big count, MPI ABI int count,
104108MPI ABI big count. There are a small set of functions which have
105109only int count or big count. The templates for these files have
106- suffixes of (* .c.in \_ obc for big count only and * .c.in \_ nbc for int
110+ suffixes of (* .c.in_obc for big count only and * .c.in_nbc for int
107111count only).
108112
109113Note a number of procedures (e.g. all the _ f2c/_ c2f) are not present in
@@ -120,9 +124,9 @@ generated include both the OMPI ABI mpi.h and the name
120124mangled MPI ABI abi.h include files. Thus the generated source files
121125have two definitions of MPI predefined constants. As an example
122126in a MPI ABI source file there are two world communicator values defined:
123- MPI \_ COMM \_ WORLD , and MPI \_ COMM \_ WORLD \_ ABI \_ INTERNAL . The former
127+ MPI_COMM_WORLD , and MPI_COMM_WORLD_ABI_INTERNAL . The former
124128is the OMPI ABI defintion of the world communicator(address of a
125- global variable) , the later the MPI ABI value for this constant (an integer).
129+ global variable) , the later being the MPI ABI value for this constant (an integer).
126130
127131The bindings framework parses the input argument types to the function
128132and generates calls to appropriate converter methods to convert any MPI ABI
@@ -132,8 +136,8 @@ are converted from the OMPI ABI values back to MPI ABI ones.
132136This includes fields in MPI_Status objects which require conversion
133137(in particular error values) and error return values from the wrapped code.
134138
135- The bindings framework also generates two helper files - abi \_ converter .h
136- and abi \_ converter .c in addition to the generatedd OMPI and MPI ABI
139+ The bindings framework also generates two helper files - abi_converter .h
140+ and abi_converter .c in addition to the generatedd OMPI and MPI ABI
137141source files.
138142
139143There are several implications of this approach.
@@ -142,7 +146,7 @@ First very few changes have to made to the internal Open MPI source code.
142146
143147A second is that top level MPI ABI c entry points are expecting
144148argument values using MPI ABI constants. Thus calling top
145- level MPI functions from within libompi \_ mpi will not work
149+ level MPI functions from within libompi_mpi will not work
146150properly.
147151
148152A third is there are a few places in non-blocking/persistent
@@ -171,12 +175,12 @@ ops functions to allow for invocation of a translation routine to
171175convert the datatype argument from the OMPI ABI to MPI ABI values
172176as appropriate. A similar approach is taken for errhandlers.
173177
174- Generalized requests don't need speial support as the MPI Status
178+ Generalized requests don't need special support as the MPI Status
175179structure for both MPI and OMPI ABIs are similar enough as to not
176180require conversion.
177181
178182OMPI doesn't really support datarep functions so currently there
179- is no need for any argument conversion operations.
183+ is no need for any argument conversion operations for these functions .
180184
181185The MPI_T event implementation is just a set of stubs so there's
182186no need for special support for MPI_T_event callback functions.
0 commit comments