(j3.2006) BLOCK-type statement

Bill Long longb
Fri May 30 14:15:21 EDT 2008

Aleksandar Donev wrote:
> On Friday 30 May 2008 08:52, Bill Long wrote:
>> (Technically, you can get by with coarrays and any local variable with
>> the TARGET attribute, but in practice, this will entail some sort of
>> "fence" hardware instruction that will  take care of all local memory
>> operations as a side effect.)
> I don't care about "practice" versus "theory". The theory should cover the 
> practice, and also the *future* practice. At present, SYNC MEMORY *only* 
> works for TARGETs and coarrays, period. Unless we explicitly say otherwise, 
> not in some hand-waving Note, but in clear, well-defined normative text.

The "hand-waving Note" is there to explain what is intended.  We don't 
refer to "memory operations" in the normative text.  Just because text 
is in a Note does not mean it should be ignored.

> What is wrong with this?
> --------------------
> Within a segment, objects with the ASYNCHRONOUS attribute may be modified by 
> means external to the processor (like VOLATILEs) in addition to Fortran 
> pending I/O. The object may not be referenced or defined during such 
> segments.
> --------------------

Every executable statement in the program is part of some segment.  
Which ones are the "such segments"?

> Even better, so as to not require changing existing codes (too much) or 
> writing wrappers that do nothing more than add a SYNC MEMORY, I propose 
> adding the SYNC attribute to procedures, that will cause any CALL  to them to 
> have the effect of a SYNC MEMORY (executed both at the start and end of the 
> execution), i.e., would make such CALLs image-control statements. Example:

This is back to Dick's original proposal.  It does have the nice feature 
that the user could write coarray library routines and make calls to 
them segment boundaries automatically (similar to the originally 
proposed intrinsics like co_sum()). This could be worth considering 
independent of the MPI considerations.


Bill Long                                   longb at cray.com
Fortran Technical Support    &              voice: 651-605-9024
Bioinformatics Software Development         fax:   651-605-9142
Cray Inc., 1340 Mendota Heights Rd., Mendota Heights, MN, 55120


More information about the J3 mailing list