-
Notifications
You must be signed in to change notification settings - Fork 8
Description
Problem
The all-caps Fortran binding listed in MPI-3.1 p658 for MPI_Status_f2f08()
and MPI_Status_f082f()
imply that the Fortran type TYPE(MPI_Status)
must be available in both the mpi
module and mpif.h
.
Upon discussion in the Fortran WG, and supported by other text in the standard, it was decided that the intent was actually to:
- Only define those all-caps functions in the
mpi
module (not in thempif.h
header file) - And therefore only make
TYPE(MPI_Status)
be available in thempi
module (not in thempif.h
header file).
This problem exists in both MPI-3.x and MPI-4.x (we will need 2 PRs).
Proposal
This errata adds clarification:
- Adds a text line that specifically states that the
MPI_Status_f2f08()
andMPI_Status_f082f()
routines are only available in Fortran via thempi
andmpi_f08
modules. - Adds annotation to the all-caps Fortran bindings indicating that it is only intended for the
mpi
module. - Adds an equivalent annotation in the Annex where these bindings are listed.
Impact on Implementations
Implementations can remove the MPI_Status_f*08*
routines and the declaration for TYPE(MPI_Status)
from mpif.h
.
In reality, neither current versions of Open MPI nor MPICH actually define TYPE(MPI_Status)
in mpif.h
or the mpi
module. 😲 This issue came up when Open MPI discovered their oversight and was discussing how to implement the missing functions (see open-mpi/ompi#7762).
Impact on Users
Joy and good fortune to all who can now easily understand from which interfaces these functions are available.
References
- Corresponding v4.x pull request: https://github.com/mpi-forum/mpi-standard/pull/255
- Latest PDF (30 July 2020): mpi40-fortran-status-errata-9defff98.pdf
- New text in this PDF:
- Pages 755-756
- Page 907
- Page 909
- Corresponding v3.x pull request: https://github.com/mpi-forum/mpi-standard/pull/262
- Latest PDF (30 July 2020): mpi3x-fortran-status-errata-1901a4ee.pdf
- New text in this PDF:
- Pages 689-690
- Page 835
- Page 837
See discussions on the MPI Fortran WG mailing list here: https://lists.mpi-forum.org/pipermail/mpiwg-fortran/2020-July/003554.html.
Summary (from Rolf R.):
In MPI-3.1:
- page 607 lines 18-24 require these types and the overloaded operators .EQ./.NE. for mpi_f08 module
- page 609 lines 34-36 require these types and the overloaded operators .EQ./.NE. for mpi module
- there is no such text on page 611-612 on mpif.h
And page 802 lines 9-15 also Show that it was never intented to add these types and routines to old mpif.h.