SYNC MEMORY statement

Standard: F77 F90 F95 F2003 F2008 F2018 Example program


<Syntax>

SYNC MEMORY [ ( [ sync-stat-list ] ) ]
sync-stat-list ::= sync-stat [ , sync-stat ]...
sync-stat ::= STAT = stat-variable | ERRMSG = errmsg-variable

<Semantics>

In multiple image execution of a coarray program, a SYNC MEMORY statement is a segment divider that does not do any synchronisation itself. It may be useful, to preserve coarray access semantics, in conjunction with some other mechanism that performs a synchronisation. Note that it is very easy to make mistakes using this, and due to parallel non-determinacy this might well not be noticed, so this is not recommended for normal use.

If the STAT= clause is present, zero is assigned to the stat-variable if no error occurs, and a positive value if an error occurs. If the ERRMSG= clause is present and an error occurs, the errmsg-variable is assigned an explanatory message; it remains unchanged if no error occurs.

<Related>

ERRMSG= specifier, Image control statements, STAT= specifier, SYNC ALL statement, SYNC IMAGES statement, SYNC TEAM statement