[MPI3 Fortran] Proposed solution for the volatile buffer problem

N.M. Maclaren nmm1 at cam.ac.uk
Wed Jan 14 16:03:21 CST 2009


On Jan 14 2009, Aleksandar Donev wrote:
>
>> Sorry, but THAT misses the point!  If the volatility applies just
>> over the actual call, then even flagging all of MyIsend, MyIrecv,
>> MyWait, MPI_Isend, MPI_Irecv and MPI_Wait won't help. 
>
>Actually, only the MPI routines themselves should be flagged. The 
>compiler would have to assume, in the absence of extra information, 
>that any routine may include a call to these "flagged" routines.

But that degrades performance for any procedure that calls another
procedure!

>> Remember that 
>> the update can occur at ANY time between starting the transfer and
>> waiting for its completion, including when control is inside
>> Transfer.
>
>But, isn't it prohibited to touch buffer while there is a pending 
>transfer? Just like we restrict for ASYNCHRONOUS variables in Fortran. 
>If so, then any access to any of the variables can be freely optimized, 
>with the *only* exception being that code cannot be moved accross 
>certain calls, that is, all variables need to be refreshed after and 
>flushed before.

Yes, but that doesn't help enough.

Firstly, you can pass an array to a procedure that uses copy-in/copy-out
but does not touch that array in that call, and that is illegal but goes
wrong.

Secondly, a compiler is allowed to assume that unreferenced parts of an
array are invariant, and so may copy more than it needs to - which can
sometimes be a lot faster.

>This is not to say I am advocating for Bill's proposal---I am a firm 
>believer that variables liable to change out of the blue *must* be 
>marked as such. But, I am trying to understand what you two are arguing 
>over...

Precisely.


Regards,
Nick Maclaren,
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 mailing list