(j3.2006) LOCK/UNLOCK question
Aleksandar Donev
donev1
Wed Jun 17 05:36:23 EDT 2009
Malcolm Cohen wrote:
> "During an execution of a statement that invokes more than one
> procedure, at most one invocation shall cause execution of an image
> control statement other than CRITICAL or END CRITICAL."
>
> I am puzzled as to why this doesn't allow LOCK/UNLOCK, since these are
> data-object equivalents to CRITICAL/END-CRITICAL. Yes this is only
> "good" if the LOCK/UNLOCK are either correctly "paired" within each
> procedure or if they operate on disjoint locks
By good do you mean "legal"? We can and perhaps should allow LOCK/UNLOCK
as well, but then there is the danger that someone may in fact write
code where the correct functioning depends on the procedures being
executed in the same order on all images, which we do not want to
guarantee. What rule tells that user that his code is "not good"? Either
we should give proper semantics, in which case we tell the compilers to
disable optimizations (or some such), or we need some additional
constraints/restrictions.
As an aside, I argued and still believe that we need a CRITICAL(lock)
construct for exactly these sort of reasons. I was not at the J3 meeting
where my proposal was rejected so I do not know the reasons, but given
that proposal was rejected my suggestion is to keep things "safe" and
keep the existing text.
> An oversight? Deliberate?
I seem to recall a direct discussion of this point at the last meeting
but am not certain. I am cc'ing Nick since he was also there and may
care about this issue.
Best,
Aleks
--
Aleksandar Donev, Ph.D.
Lawrence Postdoctoral Fellow @ LLNL
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://cims.nyu.edu/~donev
More information about the J3
mailing list