Dear Anton,
>I'm trying to write a short demo coarray program
>illustrating a race condition.
Since that is prohibited by the standard, this means that your program is
"not standard-conforming Fortran".
>I find that I cannot do it with ifort v.15
>because it seems to apply image synchronisation
>even when it's not in the code.
>Is this an allowed compiler behaviour?
When your program violates the requirements of the standard, ANY behaviour
by the processor is permitted. There are no restrictions whatsoever on the
processor. It can execute your program backwards, reformat your disc
drives, send email, ANYTHING at all!
Obviously that includes executing your program as if the necessary SYNC
statements were present.
Depending on the underlying transport mechanisms, this behaviour of your
program could naturally arise from choices made by the implementation...
though only because the program is so simple -- it is highly likely that a
more complicated program that violates the segment ordering requirements
would produce indeterminate results.
Cheers,
--
....................Malcolm Cohen, NAG Oxford/Tokyo.
(Project Editor, ISO Fortran standard).
|