12.07.2015 Views

PGI User's Guide

PGI User's Guide

PGI User's Guide

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 5. Using OpenMP• An explicit task is a task generated when a task construct is encountered during execution.• An implicit task is a task generated by the implicit parallel region or generated when a parallelconstruct is encountered during execution.Task constructA task directive plus a structured blockTask regionThe dynamic sequence of instructions produced by the execution of a task by a thread.Fortran Parallelization DirectivesParallelization directives are comments in a program that are interpreted by the <strong>PGI</strong> Fortran compilers whenthe option –mp is specified on the command line. The form of a parallelization directive is:sentinel directive_name [clauses]With the exception of the SGI-compatible DOACROSS directive, the sentinel must comply with these rules:• Be one of these: !$OMP, C$OMP, or *$OMP.• Must start in column 1 (one).• Must appear as a single word without embedded white space.• The sentinel marking a DOACROSS directive is C$.The directive_name can be any of the directives listed in Table 5.1, “Directive and Pragma Summary Table”.The valid clauses depend on the directive. The “OpenMP Reference Information” chapter of the <strong>PGI</strong> CompilerReference Manual provides a list of directives and their clauses, their usage, and examples.In addition to the sentinel rules, the directive must also comply with these rules:• Standard Fortran syntax restrictions, such as line length, case insensitivity, and so on, apply to the directiveline.• Initial directive lines must have a space or zero in column six.• Continuation directive lines must have a character other than a space or a zero in column six. Continuationlines for C$DOACROSS directives are specified using the C$& sentinel.• Directives which are presented in pairs must be used in pairs.Clauses associated with directives have these characteristics:• The order in which clauses appear in the parallelization directives is not significant.• Commas separate clauses within the directives, but commas are not allowed between the directive name andthe first clause.• Clauses on directives may be repeated as needed, subject to the restrictions listed in the description of eachclause.59

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!