12.07.2015 Views

PGI Fortran - Servidor WWW del Cluster Ladon-Hidra

PGI Fortran - Servidor WWW del Cluster Ladon-Hidra

PGI Fortran - Servidor WWW del Cluster Ladon-Hidra

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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

appear within a parallel region. It is a shorthand notation that tells the compiler to parallelize theloop to which it applies, even though that loop is not contained within a parallel region. While thissyntax is more convenient, it should be noted that if multiple successive DO loops are to beparallelized it is more efficient to define a single enclosing parallel region and parallelize eachloop using the OpenMP DO directive.A variable declared PRIVATE or LOCAL to a C$DOACROSS loop is treated the same as a privatevariable in a parallel region or DO (see above). A variable declared SHARED or SHARE to aC$DOACROSS loop is shared among the threads, meaning that only 1 copy of the variable exists tobe used and/or modified by all of the threads. This is equivalent to the default status of a variablethat is not listed as PRIVATE in a parallel region or DO (this same default status is used inC$DOACROSS loops as well).8.9 PARALLEL DOThe OpenMP PARALLEL DO directive uses the following syntax.Syntax:Clauses:!$OMP PARALLEL DO [CLAUSES]< Fortran DO loop to be executed in parallel >[!$OMP END PARALLEL DO]PRIVATE(list)SHARED(list)DEFAULT(PRIVATE | SHARED | NONE)FIRSTPRIVATE(list)LASTPRIVATE(list)REDUCTION({operator | intrinsic} : list)COPYIN (list)IF (scalar_logical_expression)SCHEDULE (type [, chunk])ORDEREDThe semantics of the PARALLEL DO directive are identical to those of a parallel regioncontaining only a single parallel DO loop and directive. Note that the END PARALLEL DOdirective is optional. The available clauses are as defined in the DO...END DO andPARALLEL...END PARALLEL sections.OpenMP Directives for Fortran 297

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

Saved successfully!

Ooh no, something went wrong!