10.07.2015 Views

PGI Fortran Reference manual - The Portland Group

PGI Fortran Reference manual - The Portland Group

PGI Fortran Reference manual - The Portland Group

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.

OpenMP Directives for <strong>Fortran</strong>LASTPRIVATE(list)Usage<strong>The</strong> PARALLEL SECTIONS / END SECTIONS directive pair define a non-iterative worksharingconstruct without the need to define an enclosing parallel region. Each section is executedby a single processor. If there are more processors than sections, some processors will have nowork and will jump to the implied barrier at the end of the construct. If there are more sectionsthan processors, one or more processors will execute more than one section.A SECTION directive may only appear within the lexical extent of the enclosing PARALLELSECTIONS / END SECTIONS directives. In addition, the code within the PARALLELSECTIONS / END SECTIONS directives must be a structured block, and the code in eachSECTION must be a structured block.Semantics are identical to a parallel region containing only an omp sections pragma andthe associated structured block. <strong>The</strong> available clauses are as defined in PARALLEL...ENDPARALLEL and DO...END DO.8.7.12. PARALLEL WORKSHARE<strong>The</strong> OpenMP PARALLEL WORKSHARE directive provides a short form method of including aWORKSHARE directive inside a PARALLEL construct.Syntax!$OMP PARALLEL WORKSHARE [CLAUSES]< <strong>Fortran</strong> structured block to be executed in parallel >[!$OMP END PARALLEL WORKSHARE]!$OMP PARALLEL DO [CLAUSES]< <strong>Fortran</strong> DO loop to be executed in parallel >[!$OMP END PARALLEL DO]ClausesPRIVATE(list)SHARED(list)DEFAULT(PRIVATE | SHARED | NONE)FIRSTPRIVATE(list)LASTPRIVATE(list)REDUCTION([{operator | intrinsic}:] list)COPYIN(list)IF(scalar_logical_expression)NUM_THREADS(scalar_integer_expression)SCHEDULE (type [, chunk])COLLAPSE (n)ORDEREDUsage<strong>The</strong> OpenMP PARALLEL WORKSHARE directive provides a short form method of includinga WORKSHARE directive inside a PARALLEL construct. <strong>The</strong> semantics of the PARALLEL<strong>PGI</strong> <strong>Fortran</strong> <strong>Reference</strong> Guide 174

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

Saved successfully!

Ooh no, something went wrong!