SYNC ALL statement
Standard: F77 F90 F95 F2003 F2008 F2018 Example program
<Syntax>
SYNC ALL [ ( [ sync-stat-list ] ) ]
sync-stat-list ::= sync-stat [ , sync-stat ]
sync-stat ::= STAT = stat-variable | ERRMSG = errmsg-variable
A stat-variable must be a non-coindexed scalar Integer variable, and should be able to represent values from −9999 to +9999. An errmsg-variable must be a non-coindexed scalar Character variable with default kind.
<Semantics>
In multiple image execution of a coarray program, execution of a SYNC ALL statement synchronises with corresponding SYNC ALL statement executions on other images in the current team; the segment following the nth execution of a SYNC ALL statement on one image follows all the segments that preceded the nth execution of a SYNC ALL statement on every other image in the current team.
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 IMAGES statement, SYNC TEAM statement