>Date: Sat, 22 Nov 2014 22:32:25 +0100
>From: Tobias Burnus <[log in to unmask]>
>
>Anton Shterenlikht wrote:
>> Sorry, I don't get you. What specific prohibition
>> you refer to here?
>>
>> Are you saying this fragment violates the standard?
>>
>> integer :: i[*]
>> if ( this_image() .eq. 1 ) i = i[2]
>> if ( this_image() .eq. 2 ) i = i[1]
>>
>> I didn't think so.
>
>Well, if it doesn't violate, you can surely tell us what exactly the
>consistent output on a standard conforming processor will be …
Well, the output is unpredictable, of course.
That's the whole point of this program.
Your phrasing suggests that a standard conforming
program always produceses a consistent output.
Clearly this is not always the case.
Using an uninitialised variable is allowed by
the standard, yet the results are unpredictable.
>
>
>Quoting the standard:
>
>"if a variable is defined on an image in a segment, it shall not be
>referenced, defined, or become undefined in a segment on another image
>unless the segments are ordered,"
Yes, this is my error. Somehow I interpreted Sec. 8.5.2 par. 1 that
since there are no image control statements in this program, then
there are no segments. I can see my error now. The program always
has at least one segment.
>
>(Quote from 14-007r2, 8.5.2 Segments, paragraph 3, third bulletpoint,
>p191, (lines 4:6).)
I can only get access to http://j3-fortran.org/doc/year/10/10-007r1.pdf.
Is the draft version you quote available in open access?
>I'd claim that changing "i" on image 2 and referencing it from image 1 –
>and changing "i" on image 1 and referencing it from image 2 happens in
>the same segment – and I do not see any ordering between the segments.
Yes, you are right and I'm wrong.
Thank you
Anton
|