Open
Description
Per discussion in #10491, OMPI currently has two sources of truth for public integer constants:
mpi.h.in
mpif-values.pl
(a script which writes out Fortran source files that get included by the various Fortran interfaces)
A lot of MPI constants are hard-coded to the same integer values in both places.
- Note that there are a few weird cases, such as the C values
MPI_F_SOURCE
,MPI_F_TAG
, andMPI_F_ERROR
which correspond to the Fortran values (MPI_SOURCE
-1), (MPI_TAG
-1), and (MPI_ERROR
-1)
This dual-source-of-truth strategy has been "good enough" for a long time, but it's error prone, and it has caused bugs in the past (e.g., where the C value was X and the Fortran value was Y, or where the C value was X and it wasn't defined in Fortran). We really should unify the integer constant values between mpi.h
and the public Fortran interfaces so that there is a single source of truth for all of these integer values.