2. Compiling and Running OpenMP Programs
3. Implementation-Defined Behaviors
6. Automatic Scoping of Variables
A. Placement of Clauses on Directives
B.1 Converting Legacy Fortran Directives
B.1.1 Converting Sun-Style Fortran Directives
B.1.1.1 Issues Between Sun-Style Fortran Directives and OpenMP
B.1.2 Converting Cray-Style Fortran Directives
B.1.2.1 Issues Between Cray-Style Fortran Directives and OpenMP Directives
The C compiler accepts legacy pragmas for explicit parallelization. These are described in the C User’s Guide. As with the Fortran directives, these are only suggestions.
The legacy parallelization pragmas are:
Table B-5 Converting Legacy C Parallelization Pragmas to OpenMP
|
The taskloop pragma can take on one or more of the following optional clauses.
Table B-6 taskloop Optional Clauses and OpenMP Equivalents
|
The schedtype(spec) clause accepts the following scheduling specifications.
Table B-7 SCHEDTYPE Scheduling and OpenMP schedule Equivalents
|
OpenMP scopes variables declared within a parallel construct as private. A default(none) clause on a #pragma omp parallel for directive causes the compiler to flag variables not scoped explicitly.
Since there is no serial_loop directive, mixing automatic and explicit OpenMP parallelization may have different effects: some loops may be automatically parallelized that would not have been with legacy C directives.
Because OpenMP provides a richer parallelism model, it is often possible to get better performance by redesigning the parallelism strategies of a program that uses legacy C directives to take advantage of these features.