Intel® Fortran Compiler Classic and Intel® Fortran Compiler Developer Guide and Reference

ID 767251
Date 3/22/2024
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

ERROR Directive for OpenMP

OpenMP* Fortran Compiler Directive: Causes the compiler or runtime system to process an error condition. This feature is only available for ifx.

Syntax

!$OMP ERROR [clause[[,] clause]... ]

clause

Is one or more of the following:

  • AT (action-time)

    Determines when an implementation processes an error condition.

    action-time is COMPILATION or EXECUTION.

    If action-time is COMPILATION and the directive appears in the specification part of a program unit, the error action occurs during compilation. If the directive appears in the executable part of the program unit that is not reachable at runtime, the error action may or may not occur.

    If action-time is EXECUTION, the error action occurs when a thread encounters the directive. An ERROR direction that specifies AT (EXECUTION) is considered an executable directive.

    If an AT clause is not specified in the ERROR directive, it is as if AT (COMPILATION) was specified.

  • MESSAGE (scalar-default-char-expression)

    Specifies a message string to be included in the implementation defined message issued when the error action occurs.

    If action-time is COMPILATION, scalar-default-char-expression must be a constant.

  • SEVERITY (level)

    Indicates the severity level of the error.

    level is WARNING or FATAL.

    If level is WARNING, a message containing scalar-default-char-expression is displayed and processing (compilation of execution) continues.

    If level is FATAL, a message containing scalar-default-char-expression is displayed and program termination is initiated.

    If a SEVERITY clause is not specified in the ERROR directive, it is as if SEVERITY (FATAL) was specified.

The ERROR directive is a utility directive that causes either the compiler or the runtime system to flag an error condition producing an implementation defined error message.

The directive is pure only if COMPILATION is specified for the AT clause, or the AT clause does not appear. Pure directives can appear in Fortran PURE procedures.

Each clause can appear at most once in the ERROR directive.