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 …
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,"
(Quote from 14-007r2, 8.5.2 Segments, paragraph 3, third bulletpoint,
p191, (lines 4:6).)
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.
Tobias
|