Intel® Fortran Compiler 19.0 Developer Guide and Reference

STAT= and ERRMSG= Specifiers in Image Control Statements

If the STAT= specifier appears, successful execution of the EVENT POST, EVENT WAIT, LOCK, SYNC ALL, SYNC IMAGES, SYNC MEMORY, or UNLOCK statement causes the specified variable to become defined with the value zero. In a given image control statement, the stat-var in a STAT= specifier, the err-var in an ERRMSG= specifier, the log-var in an ACQUIRED_LOCK= specifier, and an event variable or lock variable must not depend on one another.

If the STAT= specifier appears in an EVENT WAIT or a SYNC MEMORY statement and an error occurs, stat-var is defined with a processor-dependent positive value that is different from the value of STAT_STOPPED_IMAGE.

The images involved in the execution of an EVENT POST statement are the image executing the statement and the image on which the event variable is located.

If the STAT= specifier appears in an EVENT POST, SYNC ALL, or SYNC IMAGES statement and execution of one of these statements involves synchronization with an image that has initiated termination, the variable becomes defined with the value of the constant STAT_STOPPED_IMAGE in the intrinsic module ISO_FORTRAN_ENV. If any other error condition occurs during execution of one of these statements, the variable becomes defined with a processor-dependent positive integer value that is different from the value of STAT_STOPPED_IMAGE.

If the STAT= specifier appears in a SYNC ALL or SYNC IMAGES statement and the error STAT_STOPPED_IMAGES occurs, the effect of executing the statement is the same as that of executing the SYNC_MEMORY statement.

If the STAT= specifier appears in a LOCK statement and the lock variable is locked by the executing image, the specified variable becomes defined with the value of STAT_LOCKED. If the STAT= specifier appears in an UNLOCK statement and the lock variable has the value unlocked, the variable specified by the STAT= specifier becomes defined with the value of STAT_UNLOCKED. If the STAT= specifier appears in an UNLOCK statement and the lock variable is locked by a different image, the specified variable becomes defined with the value STAT_LOCKED_OTHER_IMAGE. The named constants STAT_LOCKED, STAT_UNLOCKED, and STAT_LOCKED_OTHER_IMAGE are defined in the intrinsic module ISO_FORTRAN_ENV.

If any other error condition occurs during execution of a LOCK or UNLOCK statement, the specified variable becomes defined with a positive integer value that is different from STAT_LOCKED, STAT_UNLOCKED, and STAT_LOCKED_OTHER_IMAGE.

If an error condition occurs during execution of an image control statement that does not contain the STAT= specifier, error termination is initiated.

If an ERRMSG= specifier appears in a LOCK, SYNC ALL, SYNC IMAGES, SYNC MEMORY, or UNLOCK statement, and an error condition occurs during execution of that statement, the processor shall assign an explanatory message to the specified variable. If no such condition occurs, the processor shall not change the value of the variable.

The set of error conditions that can occur in an image control statement is processor dependent.