[MPI3 Fortran] Proposing changes to Fortran 2008

Aleksandar Donev donev1 at llnl.gov
Wed Apr 16 17:19:39 CDT 2008


On Wednesday 16 April 2008 09:33, Hubert Ritzdorf wrote:

> the application program would not work.
The Fortran standard cannot ever be changed to say that under whatever 
compilation flag or setting it suddenly becomes illegal to pass array 
sections as arguments.

> I hate destroying running application programs
The committee hates it even more to destroy conforming (stronger statement 
than running, since it means the standard guarantees they will run on any 
conforming compiler) programs!

> By the way. What does the 2003 compiler/runtime say if the application
> program
> (*) tries to perform an asynchronous read/write of an non-contiguous
> array section
>      and
> (*)  pass this array-section to a subroutine which requires copy-in/copy
> out before the WAIT statement is executed ?
In short, if all async stuff happens inside the routine, the actual does not 
have to have the ASYNCHRONOUS attribute, only the dummy. In this case, there 
is absolutely no problem of any sort with copying.

If there is no pending i/o when the procedure is called (i.e., nothing async 
happens while the procedure is running), the dummy does not have to be async. 
Again, no problem with copy in/out.

Only when there is async i/o both in the caller and callee, as is the case 
when the procedure starts an async operation that completes later, both dummy 
and actual should have the attribute (this is not enforced by the compiler). 
In this case copying is avoided by compile-time constraints that put 
restrictions on what kind of actual arguments can be passed to what kind of 
dummy.

> VOLATILE is different. Volatile means that other processes/threads may
> change the data. 
Exactly what happens here---MPI runtime is that other process. What if I try 
to access a variable while async I/O is still pending (no WAIT completed 
yet)? Shouldn't the compiler reload the latest value from memory. Or am I not 
allowed to do that? Frankly, I don't know the answer. I cannot see anything 
in the standard...I will ask.

> MPI nonblocking communication is quite similar to asynchronous read/write.
Yes, OK, let's agree on that.
> Therefore, an extension of ASYNCHRONOUS  attribute for MPI or other
> communication libraries would be most appropriate and should cause minimal
> conflicts with the actual Fortran standard.
OK again.

> You can take most of the 
> description
> of the ASYNCHRONOUS attribute and replace input/output by communication
> (only the WAIT doesn't fit, since MPI_Wait is not know by the Fortran
> standard).
The point of the asynchronous attribute, as stated in notes, is: The async 
attribute has been introduced to warn the compiler that optimizations 
involving movement of code across wait statements are not OK. So without 
wait, what exactly is the meaning of the attribute. I.E., what does it tell 
the compiler to do differently?

Best,
Aleks



More information about the mpiwg-fortran mailing list