Skip to content

Unify integer constants between mpi.h and the Fortran interfaces #10526

Open
@jsquyres

Description

@jsquyres

Per discussion in #10491, OMPI currently has two sources of truth for public integer constants:

  1. mpi.h.in
  2. 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, and MPI_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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions