@@ -10,11 +10,38 @@ extern "C" {
1010#define MPI_VERSION 4
1111#define MPI_SUBVERSION 2
1212
13- typedef intptr_t MPI_Aint ;
14- typedef int64_t MPI_Offset ;
15- typedef int64_t MPI_Count ;
13+ /* MPI_Aint is defined to be intptr_t (or equivalent to it, if compiler support is absent).
14+ * The only acceptable alternative to intptr_t is the C89 type equivalent to it. */
15+ #if !defined(MPI_ABI_Aint )
16+ #define MPI_ABI_Aint intptr_t
17+ #endif
18+ typedef MPI_ABI_Aint MPI_Aint ;
19+ #undef MPI_ABI_Aint
20+
21+ /* MPI_Offset will be 64b on all relevant systems, although we permit support for
22+ * 128b offsets in cases where the underlying filesystem is 128b and MPI implementations
23+ * support that directly. */
24+ #if !defined(MPI_ABI_Offset )
25+ #define MPI_ABI_Offset int64_t
26+ #endif
27+ typedef MPI_ABI_Offset MPI_Offset ;
28+ #undef MPI_ABI_Offset
1629
17- typedef int MPI_Fint ;
30+ /* MPI_Count must be large enough to hold the larger of MPI_Aint and MPI_Offset.
31+ * Platforms where MPI_Aint is larger than MPI_Offset are extremely rare. */
32+ #if !defined(MPI_ABI_Count )
33+ #define MPI_ABI_Count MPI_Offset
34+ #endif
35+ typedef MPI_ABI_Count MPI_Count ;
36+ #undef MPI_ABI_Count
37+
38+ /* MPI_Fint must match the Fortran default INTEGER kind.
39+ * It is often equivalent to C int but most compilers support wider options. */
40+ #if !defined(MPI_ABI_Fint )
41+ #define MPI_ABI_Fint int
42+ #endif
43+ typedef MPI_ABI_Fint MPI_Fint ;
44+ #undef MPI_ABI_Fint
1845
1946typedef struct {
2047 int MPI_SOURCE ;
0 commit comments