## 15.2.3 OpenMP Fortran API Compiler Directives (TU*X only)

Compaq Fortran supplies parallel directives that comply with OpenMP Fortran Application Program Interface (API) specification Version 1.0.

Use these directives when writing new programs for parallel execution.

This section describes conditional compilation rules, nesting and binding rules, and the following directives:

- ATOMIC (Section 15.2.3.2)

  Specifies that a specific memory location is to be updated dynamically.

- BARRIER (Section 15.2.3.3)

  Synchronizes all the threads in a team.

- CRITICAL (Section 15.2.3.4)

  Restricts access for a block of code to only one thread at a time.

- DO (Section 15.2.3.5)

  Specifies that the iterations of the immediately following DO loop must be executed in parallel.

- FLUSH (Section 15.2.3.6)

  Specifies synchronization points where the implementation must have a consistent view of memory.

- MASTER (Section 15.2.3.7)

  Specifies a block of code to be executed by the master thread of the team.

- ORDERED (Section 15.2.3.8)

  Specifies a block of code to be executed sequentially.

- PARALLEL (Section 15.2.3.9)

  Defines a parallel region.

- PARALLEL DO (Section 15.2.3.10)

  Defines a parallel region that contains a single DO directive.

- PARALLEL SECTIONS (Section 15.2.3.11)

  Defines a parallel region that contains SECTIONS directives.

- SECTIONS (Section 15.2.3.12)

  Specifies a block of code to be divided among threads in a team (a worksharing area).

- SINGLE (Section 15.2.3.13)

  Specifies a block of code to be executed by only one thread in a team.

- THREADPRIVATE (Section 15.2.3.14)

  Makes named common blocks private to a thread but global within the thread.

The OpenMP parallel directives can be grouped into the categories shown in Table 15-3.

Table 15-3 Categories of OpenMP Fortran Parallel Directives (TU*X only)

Category | Description
--- | ---
Parallel region | Defines a parallel region: PARALLEL
Work-sharing | Divide the execution of the enclosed block of code among the members of the team that encounter it: DO and SECTIONS
Combined parallel work-sharing | Shortcut for denoting a parallel region that contains only one work-sharing construct: PARALLEL DO and PARALLEL SECTIONS
Synchronization | Provide various aspects of synchronization; for example, access to a block of code, or execution order of statements within a block of code: ATOMIC, BARRIER, CRITICAL, FLUSH, MASTER, and ORDERED.
Data Environment | Control the data environment during the execution of parallel constructs: THREADPRIVATE

For More Information:

- On how to use these directives, see your user manual.
- On OpenMP, see `http://www.openmp.org/`

Previous Page Next Page Table of Contents