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

Aleksandar Donev donev1 at llnl.gov
Thu Jan 22 13:52:38 CST 2009


On Thursday 22 January 2009 11:40, Bill Long wrote:

> The only safe thing for the
> compiler to do is treat array as volatile throughout the subprogram
> containing these two calls.
No! For ASYNCHRONOUS, there is a restriction on the *programmer* that if 
array is referenced/defined, it is not currently a pending I/O 
affector. This is the same as for coarrays, which may make things 
clearer: If a coarray is defined/referenced, the compiler can fully 
optimize without worrying about other images, *in-between* 
image-control statements. The same logic applies for 
ASYNCHRONOUS---optimize unless you see a WAIT. Note however that some 
of the optimizations Nick mentioned should also be disabled for 
coarrays. Notably, a piece of a coarray that is *not* 
referenced/defined in a segment *may* indeed be referenced/defined by 
other images. So the optimizer must not touch those pieces, even in 
what would be harmless ways in a serial code.

For a classic (serial) optimizer, ASYNCHRONOUS and coarrayness and 
threading and all of those things are essentially the same: Something 
else, which is not included in the classic control/data flow analysis, 
can store/load certain values, which are marked in some sense (via 
CODIMENSION/ASYNCHRONOUS/VOLATILE attribute). Do you think all coarrays 
are effectively VOLATILE??? If not, then the same applies to 
ASYNCHRONOUS variables.

Aleks



More information about the mpiwg-fortran mailing list