-
Notifications
You must be signed in to change notification settings - Fork 8
Description
Problem
@dalcinl and I were looking at this yesterday and trying to figure out why we have a way to test for only these two Fortran buffer sentinels, and no others.
My hypothesis is that these are used to write tools interception of the Fortran interface in C, because tools may look at the status coming back out from the implementation to know how many bytes are written.
Does anyone actually use these? The only references I can find online are to cases where they are broken by compiler optimization.
Two global variables of type MPI_Fint*, MPI_F_STATUS_IGNORE and MPI_F_STATUSES_IGNORE are declared in mpi.h. They can be used to test, in C, whether f_status is the Fortran value of MPI_STATUS_IGNORE or MPI_STATUSES_IGNORE defined in the mpi module or (deprecated) mpif.h. These are global variables, not C constant expressions and cannot be used in places where C requires constant expressions. Their value is defined only between the calls to MPI_INIT and MPI_FINALIZE and should not be changed by user code.
Proposal
There should be rationale/advice about what these are for, because it's not obvious why they exist and why other buffer sentinels are not.
Changes to the Text
TODO
Impact on Implementations
None
Impact on Users
Probably none
References and Pull Requests
ABI