To: J3 09-212 From: Jim Xia Subject: memory operations and SYNC MEMORY Date: 2009 April 24 References: 09-007r1 There seems to be some conflicting views on what SYNC MEMORY should do with regard to memory operations. In particular, the draft doesn't specify what kind of memory operations are affected in the normative text. The only mention of memory operations is given in Note 8.38 as: "...ensures that all memory operations initiated in the preceding segments in its image complete before any memory operations in the subsequent segment in its image are initiated..." This seems to imply that those memory operations truly local to the image are also required to be guarded by the SYNC MEMORY statements. This is harmful for performance because it requires the most expensive memory fence to implement SYNC MEMORY, and prohibits optimization opportunities for memory operations that are truly local to the executing image. Since SYNC MEMORY statements specify segment boundaries so that different images can synchronize (specify segment ordering) with each other using synchronization primitives such as SYNC ALL or SYNC IMAGES, etc, it is therefore not necessary to require local memory operations to be fenced in by SYNC MEMORY. In addition, UPC specification has a similar construct to SYNC MEMORY: upc_fence. According to UPC V1.2, the upc_fence is to "insure[s] that all shared accesses issued before the fence are complete before any after it are issued." It clearly states that ONLY shared access memory operations are affected by upc_fence. This seems to introduce incompatibility between coarrays and UPC, which could result in difficulties in extending coarrays to be inter-operable with UPC shared arrays. It will be beneficial to implementers of coarrays and programmers to clarify that SYNC MEMORY only impact memory operations that are related to coarrays. EDITS: [193:19+] 8.5.5 SYNC MEMORY statement Prepend a paragraph in Note 8.38 "In the following paragraph, the term memory operation refers to any memory operation that cuases effects observable by other images."