## 15.2.4 Compaq Fortran Parallel Compiler Directives (TU*X only)

Compaq Fortran supplies parallel directives that you can use for compatibility with older programs that were written for parallel execution.

This section describes the following parallel directives:

- BARRIER (Section 15.2.4.1)

  Synchronizes all the threads in a team.

- CHUNK (Section 15.2.4.2)

  Sets a default chunksize to adjust the number of iterations assigned to a thread.

- COPYIN (Section 15.2.4.3)

  Copies the values of listed data objects from the master thread to PRIVATE data objects of the same name in slave threads.

- CRITICAL SECTION (Section 15.2.4.4)

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

- INSTANCE (Section 15.2.4.5)

  Specifies the availability of named common blocks.

- MP_SCHEDTYPE (Section 15.2.4.6)

  Sets a default run-time scheduling type.

- PARALLEL (Section 15.2.4.7)

  Defines a parallel region.

- PARALLEL DO (Section 15.2.4.8)

  Defines a parallel region that contains a single DO directive.

- PARALLEL SECTIONS (Section 15.2.4.9)

  Defines a parallel region that contains SECTIONS directives.

- PDO (Section 15.2.4.10)

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

- PDONE (Section 15.2.4.11)

  Terminates the current parallel DO loop.

- PSECTIONS (Section 15.2.4.12)

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

- SINGLE PROCESS (Section 15.2.4.13)

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

- TASKCOMMON (Section 15.2.4.14)

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

The Compaq Fortran parallel directives can be grouped into the categories shown in Table 15-4.

Table 15-4 Categories of Compaq 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: PDO, PSECTIONS, and SINGLE PROCESS
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: BARRIER and CRITICAL SECTION
Data Environment | Control the data environment during the execution of parallel constructs: COPYIN, INSTANCE, and TASKCOMMON
Execution Defaults | Specify a default chunk or schedule type: CHUNK and MP_SCHEDTYPE

For details on how to use these directives, see your user manual.

Previous Page Next Page Table of Contents