[J3] US13. Put with Notify.
John Reid
John.Reid at stfc.ac.uk
Thu Sep 23 18:49:05 UTC 2021
Bader, Reinhold wrote:
> Hello John,
>
> your argument applies to the updates on the notify variable, but not (I think) for the coarray data that are being synchronized.
Whoops! I have overlooked this. [211:1-4] 11.6, para 5 is needed for
[212:15-17] 11.7.2, para 3, sentence 3. Revised draft paper attached.
Cheers,
John.
>
> So,
>
> - on image 2
>
> x[1, NOTIFY=nv[1]] = ... ! non-atomic assignment to x, atomic update of nv
>
> - on image 3
>
> y[1, NOTIFY=nv[1]] = ... ! non-atomic assignment to y, atomic update of nv
>
> - on image 1
>
> NOTIFY WAIT(nv, UNTIL_COUNT=2) ! atomic update of nv once both above statements have been executed.
>
> .... = x ... ! non-atomic reference to x (fine, due to the above WAIT)
> .... = y ... ! non-atomic reference to y (fine, due to the above WAIT)
>
> Now assume the above NOTIFY WAIT specifies an UNTIL_COUNT of 1. Then it is not clear to me how you can contend that "accesses to either x or y are undefined after the WAIT" without the two
> text blocks [211:1-4] and [212:15-17].
>
>
> Cheers
> Reinhold
>
>
> -----Ursprüngliche Nachricht-----
> Von: John Reid <John.Reid at stfc.ac.uk>
> Gesendet: Donnerstag, 23. September 2021 13:05
> An: Bader, Reinhold <Reinhold.Bader at lrz.de>; General J3 interest list <j3 at mailman.j3-fortran.org>; fortran standards email list for J3 <j3 at j3-fortran.org>
> Betreff: Re: AW: [J3] US13. Put with Notify.
>
> Reinhold,
>
> Thanks for the comment
>
> I see [212:15-17] as another sentence that should be removed. It is very hard to see what it is trying to say and anyway everything has been said by the previous sentences:
>
> "A coarray may be referenced or defined by execution of an atomic subroutine during the execution of a segment that is unordered relative to the execution of a segment in which the coarray is referenced or defined by execution of an atomic subroutine. An event variable or notify variable may be referenced or defined during the execution of a segment that is unordered relative to the execution of another segment in which that event variable or notify variable is defined."
>
> Note that [456:28-29] says
>
> "The effect of each update is as if the intrinsic subroutine ATOMIC_ADD were executed with a variable that stores the notify count as its ATOM argument."
>> You want to be able to deduce possible invalidity of data accesses if the UNTIL_COUNT is smaller than the number of notifications.
> This is clearly stated at [210:16-17]:
>
> "(2) the executing image waits until the count of the notify variable
> is greater than or equal to the threshold value or an error condition
> occurs;"
>
> Cheers,
>
> John.
>> Cheers
>> Reinhold
>>
>>
>> -----Ursprüngliche Nachricht-----
>> Von: J3 <j3-bounces at mailman.j3-fortran.org> Im Auftrag von John Reid via J3
>> Gesendet: Dienstag, 21. September 2021 21:24
>> An: fortran standards email list for J3 <j3 at j3-fortran.org>
>> Cc: John Reid <John.Reid at stfc.ac.uk>
>> Betreff: [J3] US13. Put with Notify.
>>
>> Dear all,
>>
>> I think I have found two glitches associated with US 13. Here is a draft paper. Any comments? I plan to put it on the web site at the end of this week.
>>
>> Cheers,
>>
>> John
>>
-------------- next part --------------
To: J3 J3/21-xxx
From: John Reid
Subject: US 13, Put with Notify
Date: 2021-September-23
Reference: 21-007r2
Discussion
----------
I think I have found a glitch associated with US 13. C1612 says:
"A named variable with declared type NOTIFY_TYPE shall be a coarray.
A named variable with a potential subobject component of
type NOTIFY_TYPE shall be a coarray."
This is modeled on C1604 which says
"A named variable with declared type EVENT_TYPE shall be a coarray.
A named variable with a noncoarray potential subobject component of
type EVENT_TYPE shall be a coarray."
The important adjective "noncoarray" is missing from the second
sentence of C1612. It is important because we should allow a noncoarray
variable that has a coarray potential subobject component of type
EVENT_TYPE.
Edit to 21-007r2
-----------------
[456:37] In 16.10.2.22 NOTIFY_TYPE, C1612, second sentence, add
"noncoarray" before "potential" to make the sentence read
"A named variable with a noncoarray potential subobject component of
type NOTIFY_TYPE shall be a coarray."
More information about the J3
mailing list