Re: [Mpi-22] Another MPI-2.2 attribute ambiguity?
On May 14, 2009, at 1:05 PM, Jeff Squyres wrote:
Another question about this issue...
Since all fortran values are passed by reference, does the MPI care if the callback function changes the EXTRA_STATE value? I see 2 choices:
1. The MPI copies the value of extra_state when MPI_*_CREATE_KEVAL is invoked to internal storage. This internal storage is passed to all the callbacks when invoked. If any of the callbacks change the value, then subsequent invocations of the callback get the changed value.
2. The MPI copies the value of extra_state when MPI_*_CREATE_KEVAL is invoked to internal storage. This internal storage is copied any time a callback is invoked; the copy is passed to the callback (and freed when the callback returns). In this way, the same EXTRA_STATE value that was originally passed to the keyval constructor will always be passed to any callbacks.
What do current MPI implementations do?
OMPI's development trunk has been updated to do #1; I'm wondering if it should do #2.
I wondered about that too. I don't think that the Fortran standard has anything to say about it, so it's really a matter of what would be most useful to MPI users. Of course, if the MPI spec said that EXTRA_STATE was INTENT(IN) then there would be no ambiguity. Iain
participants (1)
-
unknown@example.com