[MPI3 Fortran] (j3.2006) (SC22WG5.3886) [ukfortran] [MPI3 Fortran] MPI non-blocking transfers
nmm1 at cam.ac.uk
Thu Jan 22 13:27:27 CST 2009
On Jan 22 2009, Bill Long wrote:
>Except that the WAIT statement does have at least some semantics that
>the compiler understands. Which raises an interesting point.
VERY dubiously. The identifier is an integer value, and provides no
direct indication of the affector.
> Nick has
>pointed out several places where it is theoretically possible for the
>compiler optimizer to cause problems because the "invisible hand" of the
>MPI runtime currently "owns" part of the program's memory space and
>either expects it to remain static (sends) or modifies it (receives).
That is correct. Just like Fortran asynchronous I/O.
>Fortran already has an attribute designed exactly for this situation -
>VOLATILE. VOLATILE and ASYNCHRONOUS normally appear together in the
>standard since they are so similar in effect. The one difference (from
>the compiler's point of view) is that the volatility of a variable with
>the asynchronous attribute can be "turned off" when the compiler sees a
>global WAIT. If we modify the ASYNCHRONOUS attribute to be used to
>solve the issues with MPI calls, then WAIT is no longer special, and
>VOLATILE and ASYNCHRONOUS become functionally identical.
That is completely wrong, as Jim and Aleks have said. The one thing that
they have in common is that the compiler mustn't move them.
VOLATILE states that the variable may be change at any time, and the
compiler had better generate code that is robust against that, which is
incompatible with almost all optimisation.
ASYNCHRONOUS says that either the variable is not special (and hence may
be optimised as normal) or it is 'in use' and the program may not access
it. All that the compiler is forbidden from doing is from moving code
from where the variable might be in the first state into where it might
be in the second - and those changes can happen ONLY in subroutine calls
and special I/O statements.
> (The other is that it incorrectly suggests that MPI calls
>have something to do with I/O which is not the case (except for the
>actual MPI I/O calls).)
As Aleks has told you, that is wrong. Stream I/O to a FIFO is a form
of I/O, and MPI point-to-point transfers and simply a form of that.
That has been accepted, and all forms of such message passing referred
to as I/O, since before any of us started computing.
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 mpiwg-fortran