EVENT POST statement

Standard: F77 F90 F95 F2003 F2008 F2018 Example program


<Syntax>

EVENT POST ( event-variable [ , sync-stat ]... )

sync-stat ::= STAT = stat-variable | ERRMSG = errmsg-variable

The event-variable must be of type EVENT_TYPE from the intrinsic module ISO_FORTRAN_ENV. Any variable of that type must be a coarray or a subcomponent of a coarray.

At most one STAT= and at most one ERRMSG= is allowed. A stat-variable must be a non-coindexed scalar Integer variable, and should be able to support values from −9999 to +9999, i.e. it should be at least 16 bits. An errmsg-variable must be a non-coindexed default Character variable.

<Semantics>

Execution of an EVENT POST statement increments the event-variable's “event count” (this count is initially zero). The event-variable will usually be a coindexed variable, as it is rarely useful for an image to post an event to itself.

EVENT POST is an image control statement, beginning a new segment of execution. Synchronisation is one-sided: the segments before execution of EVENT POST precede the segments after the corresponding EVENT WAIT execution.

If STAT= appears and the post is successful, zero is assigned to the stat-variable. If the image on which the event-variable is located has stopped, STAT_STOPPED_IMAGE is assigned to the stat-variable; if the image has failed, STAT_FAILED_IMAGE is assigned, and if any other error occurs, some other positive value is assigned. If STAT= does not appear and an error occurs, the program will be error-terminated. If both STAT= and ERRMSG= appear, and any error occurs, an explanatory message is assigned to the errmsg-variable.

<Related>

ERRMSG= specifier, EVENT WAIT statement, Image control statements, STAT= specifier