<html>
<!-- BEGIN WEBMAIL STATIONERY -->
<head></head>
<body>
<!-- WEBMAIL STATIONERY notheme -->
<div></div>

 
<!--&lt;BR&gt;-->
<div>&nbsp;</div>
<blockquote style="border-left: 2px solid rgb(16, 16, 255); padding-left: 5px; margin-left: 5px;">
 -------------- Original message from Bill Long &lt;longb@cray.com&gt;: --------------
<br>
<br>
<br>&gt; 
<br>&gt; 
<br>&gt; Aleksandar Donev wrote:
<br>&gt; &gt; Malcolm Cohen wrote:
<br>&gt; &gt; 
<br>&gt; &gt;&gt; "During an execution of a statement that invokes more than one
<br>&gt; &gt;&gt; procedure, at most one invocation shall cause execution of an image
<br>&gt; &gt;&gt; control statement other than CRITICAL or END CRITICAL."
<br>&gt; 
<br>&gt; 
<br>&gt; We've mucked around with the list of image control statements, and I 
<br>&gt; think just overlooked updating this sentence.  Given the similar nature 
<br>&gt; of LOCK/UNLOCK and CRITICAL/END CRITICAL, it seems reasonable to treat 
<br>&gt; them the same here.  <br>Isn't one big difference that lock/unlock isn't a block construct.&nbsp; If I understand<br>it right, there's no requirement that the lock and unlock statement be in the<br>same procedure.&nbsp; [I don't even think you need an unlock statement.]&nbsp; What would<br>prevent the optimizer from invoking the procedure with the unlock first? &nbsp; <br><br>Dick Hendrickson<br><br><br>&gt;As Malcolm points out, a reasonable user might want 
<br>&gt; to use this capability.  The key point here is that execution of none of 
<br>&gt; these involves (at least semantically) the cooperative participation of 
<br>&gt; any other image.  Actually, SYNC MEMORY falls into the same class.  I 
<br>&gt; would further argue that STOP should be allowed in such a function.  We 
<br>&gt; want people to be able to deal with error cases in the usual ways.  If 
<br>&gt; someone executes a STOP statement in one of the two functions referenced 
<br>&gt; in a statement, the second function will never get executed anyway 
<br>&gt; unless the functions are executing in separate local threads. Even then, 
<br>&gt;    allowing STOP should cause no problem.
<br>&gt; 
<br>&gt; 
<br>&gt; Cheers,
<br>&gt; Bill
<br>&gt; 
<br>&gt; 
<br>&gt; 
<br>&gt; &gt;&gt;
<br>&gt; &gt;&gt; I am puzzled as to why this doesn't allow LOCK/UNLOCK, since these are
<br>&gt; &gt;&gt; data-object equivalents to CRITICAL/END-CRITICAL. Yes this is only
<br>&gt; &gt;&gt; "good" if the LOCK/UNLOCK are either correctly "paired" within each
<br>&gt; &gt;&gt; procedure or if they operate on disjoint locks
<br>&gt; &gt; By good do you mean "legal"? We can and perhaps should allow LOCK/UNLOCK 
<br>&gt; &gt; as well, but then there is the danger that someone may in fact write 
<br>&gt; &gt; code where the correct functioning depends on the procedures being 
<br>&gt; &gt; executed in the same order on all images, which we do not want to 
<br>&gt; &gt; guarantee. What rule tells that user that his code is "not good"? Either 
<br>&gt; &gt; we should give proper semantics, in which case we tell the compilers to 
<br>&gt; &gt; disable optimizations (or some such), or we need some additional 
<br>&gt; &gt; constraints/restrictions.
<br>&gt; &gt; 
<br>&gt; &gt; As an aside, I argued and still believe that we need a CRITICAL(lock) 
<br>&gt; &gt; construct for exactly these sort of reasons. I was not at the J3 meeting 
<br>&gt; &gt; where my proposal was rejected so I do not know the reasons, but given 
<br>&gt; &gt; that proposal was rejected my suggestion is to keep things "safe" and 
<br>&gt; &gt; keep the existing text.
<br>&gt; &gt; 
<br>&gt; &gt;  &gt; An oversight? Deliberate?
<br>&gt; &gt; I seem to recall a direct discussion of this point at the last meeting 
<br>&gt; &gt; but am not certain. I am cc'ing Nick since he was also there and may 
<br>&gt; &gt; care about this issue.
<br>&gt; &gt; 
<br>&gt; &gt; Best,
<br>&gt; &gt; Aleks
<br>&gt; &gt; 
<br>&gt; 
<br>&gt; -- 
<br>&gt; Bill Long                                   longb@cray.com
<br>&gt; Fortran Technical Support    &amp;              voice: 651-605-9024
<br>&gt; Bioinformatics Software Development         fax:   651-605-9142
<br>&gt; Cray Inc., 1340 Mendota Heights Rd., Mendota Heights, MN, 55120
<br>&gt; 
<br>&gt; 
<br>&gt; _______________________________________________
<br>&gt; J3 mailing list
<br>&gt; J3@j3-fortran.org
<br>&gt; http://j3-fortran.org/mailman/listinfo/j3

</blockquote>




<!-- END WEBMAIL STATIONERY -->

</body>
</html>