(j3.2006) (SC22WG5.3880) [ukfortran] [MPI3 Fortran] MPI non-blocking transfers
Van Snyder
Van.Snyder
Thu Jan 22 00:04:01 UTC 2009
On Wed, 2009-01-21 at 15:41 -0800, N.M. Maclaren wrote:
> On Jan 21 2009, Aleksandar Donev wrote:
> >
> >> As someone with experience of installing and supporting multiple
> >> different MPI's on multiple different systems, it is thoroughly
> >> undesirable.
> >
> >Anyone on the Fortran committee should find it "undesirable" that we
> >have a problem we know about, that can be solved, appears in many
> >codes, and is usually attributed to the language (instead of the MPI
> >Forum). We ought to fix this. It is simply our duty as the guardians of
> >the language.
>
> 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?
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.
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.
When compiling the calling routine, the compiler can only see the
interface of the called routine, not all of its guts, so it doesn't know
whether the called routine actually contains an asynchronous I/O
statement or WAIT statement, or if there's one somewhere down its call
tree -- and it doesn't and can't care. So what's the difference if the
wait is inside the MPI library?
More information about the J3
mailing list