(j3.2006) [MPI3 Fortran] Feedback from Fortran J3 meeting

Craig Rasmussen crasmussen
Wed May 28 11:25:47 EDT 2008


On May 28, 2008, at 5:02 AM, Dan Nagle wrote:

> Hello,
>
> On May 27, 2008, at 5:48 PM, Aleksandar Donev wrote:
>
>> Just apply the same rules as we apply to Fortran async I/O. The ASYNC
>> attribute must be given to the actual and the dummy in both the
>> routine that
>> starts the transfer and the scoping unit where that routine is
>> called, and
>> the same for ending the transfer, *and* also for anything that gets
>> executed
>> in-between the start and end of the transfer (the way I read it,
>> even if the
>> code does not touch the variable in question, the ASYNC attribute
>> must be
>> there, explicitly or implicitly).
>
> The volatile attribute doesn't do that.  It tells the compiler
> that the address is magic, and to always refer to the address
> rather than caching anything.  And volatile has nothing to do
> with the initiate-the-transfer call nor the wait call.  That is,
> volatile doesn't identify the _calls_ as magic, only the address.
> And block does not help because the two calls are likely
> in different scopes.
>
>> We cannot expect magic to happen and
>> suddenly all compilers to perform human-grade interprocedural
>> analysis. The
>> duty falls on the programmer.
>
> Yes.  My point exactly.  So what tools can we reasonable make
> that will help the programmer do a better job?
>
>>>
>> But the MPI specification is an onus on the programmer not to
>> interfere with
>> the data transfer while it is in progress.
>
> See my point above.
>
>> All we (J3) need is to make sure
>> the compiler does not do things behind the back of the programmer
>> (like move
>> code, do copying, store things in temporary storage, etc.) that the
>> programmer cannot control or know of, so as to at least give the
>> careful
>> programmer a chance to do it right.
>
> These are things that volatile doesn't guarantee to do.
> What is needed is a way to say "between here and there,
> don't touch this".

So Bill suggested earlier using the asynchronous attribute instead.   
Since MPI_Irecv/MPI_Wait specify asynchronous IO operations,  
ASYNCHRONOUS seems to me to be the correct syntax.

 From 5.3.4, "The base object of a variable shall have the  
ASYNCHRONOUS attribute in a scoping unit if
       - the variable appears in an executable statement or  
specification expression in that scoping unit and
       - any statement of the scoping unit is executed while the  
variable is a pending I/O storage sequence affector

Perhaps this would work if we modified the last line to be

       - any statement of the scoping unit is executed while the  
variable is a pending I/O storage sequence affector or becomes  
referenced or defined by an external I/O operation

>
> Well, the "bloat" goes somewhere.  Do we want to usefully address MPI
> and any similar specification?  I think we decided to do so.
>

I agree.

Regards,
Craig




More information about the J3 mailing list