[MPI3 Fortran] [Fwd: Library-based ASYNCHRONOUS I/O and SYNC MEMORY]

Aleksandar Donev donev1 at llnl.gov
Tue Sep 9 12:02:19 CDT 2008


On Tuesday 09 September 2008 09:46, Iain Bason wrote:
> Well, my opinion at present is that we should allow the VOLATILE  
> attribute to be specified for procedures.  Any volatile procedure  
> would be presumed able to modify any variable.
Such a broad brush is too broad for Fortran. Surely it can only be variables 
with the TARGET, ASYNCHRONOUS, or VOLATILE attribute? Allowing modifications 
to local (on the stack) variables without a special attribute is IMO not OK. 
It simply makes no sense how this misterious routine could modify other 
variables and still satisfy the rest of the standard. For example, you do 
have to make sure that the standard instructs compilers against copy in/out 
if you actually want these asynchronous modifications to take place 
correctly.

Also, SYNC MEMORY + ASYNCHRONOUS (as I proposed) already achieves the above 
and it is already defined in semantics rather well. It also has defined the 
correct semantics, namely, that the asynchronous modification occurs for a 
certain *duration* of Fortran execution sequence, and not at the call itself. 
Sure, you can fake semantics to inhibit the optimizations that are a problem, 
but why not define the correct semantics to begin with?

VOLATILE attribute by itself achieves it in a certain sense as well, although 
there there is no specificity as to where the modification occurs, it could 
be any time, anywhere outside the program.

Best,
Aleks

-- 
Aleksandar Donev, Ph.D.
Lawrence Postdoctoral Fellow @ Lawrence Livermore National Laboratory
High Performance Computational Materials Science and Chemistry
E-mail: donev1 at llnl.gov
Phone: (925) 424-6816  Fax: (925) 423-0785
Address: P.O.Box 808, L-367, Livermore, CA 94551-9900
Web: http://cherrypit.princeton.edu/donev




More information about the mpiwg-fortran mailing list