(j3.2006) (SC22WG5.3886) [ukfortran] [MPI3 Fortran] MPI non-blocking transfers

N.M. Maclaren nmm1
Thu Jan 22 05:06:51 EST 2009

On Jan 22 2009, Van Snyder wrote:
>> Yes. Equally seriously, the existing 'solutions' require all MPI 
>> programs that use the non-blocking calls to rely on undefined behaviour, 
>> that may (but is not required to be) supported by the processor by the 
>> use of compiler options (or otherwise). That's not acceptable in a 
>> reasonable language standard.
>Does the problem arise because the buffer doesn't appear as an actual
>argument in the call to the MPI wait routine, or is there another cause
>for it?

There is another, more important, reason.

It is critical that the buffer is not moved or accessed by copy-in/copy-out
between the initiation of the transfer and the wait.  The first could apply
with a compacting garbage collector, for example.  The second is not JUST
explicit argument passing, but includes compiler-generated procedure calls
and (as I said) even open code in some implementations.

That is why a buffer and all 'active' associated entities must be marked as
ASYNCHRONOUS or equivalent for the whole of that period.

>Assuming the problem is caused by the buffer not appearing as an actual
>argument, it's not a defect in Fortran but rather in the design of MPI.

If that were the whole problem, it would be.  It would also be a defect in
the design for the Fortran WAIT statement.

>One simple step toward solving the problem is to write an extra
>interface layer that includes the argument, which then calls the real
>MPI wait routine, not passing that argument.  Then declaring the buffer
>and the dummy argument of the wait routine interface layer to be
>ASYNCHRONOUS ought to work, according to the rules we already have in
>place for Fortran asynchronous I/O.

That is the solution which I thought about some time ago, and came to the
conclusion "don't start from here".

Nick Maclaren,
University of Cambridge Computing Service,
New Museums Site, Pembroke Street, Cambridge CB2 3QH, England.
Email:  nmm1 at cam.ac.uk
Tel.:  +44 1223 334761    Fax:  +44 1223 334679

More information about the J3 mailing list