(j3.2006) (SC22WG5.4256) [ukfortran] Question on locks

Aleksandar Donev adonev
Wed Apr 21 18:49:04 EDT 2010


On Wednesday 21 April 2010, N.M. Maclaren wrote:

> What locks don't provide is
> a barrier - i.e. a polint at which two images synchronise, and
> everything before is before, and everything after is after.  They
> provide a one-way ordering.
OK, Nick triggered my memory. He is right. The reason we took the 
"implied sync memory" is that locks provide one-way ordering, and allow 
for code-movement (i.e., reading register values or preloading etc.) in 
one direction, but not the other. This was specifically requested by 
some optimization people (from the C++ committee) and semantically much 
better anyway.

So the answer to your question is "no, sync memory is not required in 
Note 8.44." As Nick mentioned, Note 8.40 uses atomics and it does 
require the sync memories.

Aleks

-- 
Aleksandar Donev, Ph.D.
Luis W. Alvarez Postdoctoral Fellow
Center for Computational Sciences and Engineering (https://ccse.lbl.gov)
Lawrence Berkeley National Laboratory (http://www.lbl.gov)
E-mail: adonev at lbl.gov
Phone: (510) 486-5782  Fax: (510) 486-6900
Address: MS 50A-1148, LBL, 1 Cyclotron Rd., Berkeley, CA 94720
Web: http://cims.nyu.edu/~donev/




More information about the J3 mailing list