Closed jeffhammond closed 8 months ago
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.
This is indeed a tools thing; in Score-P we look at status for all requests--not only the size but the source and tag (for message matching in trace files) and cancellation checking. And, for this reason, a STATUS_IGNORE
argument from the user gets replaced with a tool-allocated status/array of statuses which we then will restore on the way back out.
Does Score-P intercept the Fortran API with C code? That is, do you use MPI_F_STATUS_IGNORE
?
MUST handles the value through wrap.py: https://github.com/LLNL/wrap/blob/81ab913690105d6810e4545caf610db1e7596f52/wrap.py#L1253
If the value from Fortran is equal this value, we don't use status_c2f to return the status to Fortran and we pass status ignore to the pmpi call.
I think, having similar values for sentinels like mpi_bottom would make the life much easier :)
Does Score-P intercept the Fortran API with C code? That is, do you use MPI_F_STATUS_IGNORE?
Yes and yes-ish. We have a callback mechanism that grabs the value of MPI_F_STATUS_IGNORE
and caches it as a C variable, which is gross but apparently necessary in some cases.
@jeffhammond Does this answer your question?
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.
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