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...

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

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

OpenMP Directives for <strong>Fortran</strong>8.6. Directive ClausesSome directives accept clauses that further allow a user to control the scope attributes of variablesfor the duration of the directive or pragma. Not all clauses are allowed on all directives, so theclauses that are valid are included with the description of the directive. Typically, if no data scopeclause is specified for variables, the default scope is share<strong>The</strong> following table provides a brief summary of the clauses associated with OpenMP directivesthat <strong>PGI</strong> supports. Following the table is more detailed information about these clauses. Forcomplete information on OpenMP and use of these clauses, refer to the User’s Guide and to theOpenMP documentation available on the WorldWide Web.Table 32 Directive Clauses Summary TableClause Applies to DescriptionCOLLAPSE (n)COPYIN (list)COPYPRIVATE(list)DEFAULTCOPYPRIVATE(list)DO...END DOPARALLEL DO ...END PARALLEL DOPARALLEL WORKSHAREPARALLELPARALLEL DO ...END PARALLEL DOPARALLEL SECTIONS ...END PARALLEL SECTIONSPARALLEL WORKSHAREEND SINGLEPARALLELPARALLEL DO ...END PARALLEL DOPARALLEL SECTIONS ...END PARALLEL SECTIONSPARALLEL WORKSHAREDOPARALLELPARALLEL DO ...END PARALLEL DOPARALLEL SECTIONS ...END PARALLEL SECTIONSPARALLEL WORKSHARESECTIONSSINGLESpecifies how many loops are associated with the loopconstruct.Allows threads to access the master thread's value, fora threadprivate variable. You assign the same valueto threadprivate variables for each thread in the teamexecuting the parallel region. <strong>The</strong>n, for each variablespecified, the value of the variable in the master threadof the team is copied to the threadprivate copies at thebeginning of the parallel region.Specifies that one or more variables should be sharedamong all threads. This clause provides a mechanismto use a private variable to broadcast a value from onemember of a team to the other members.Specifies the behavior of unscoped variables in a parallelregion, such as the data-sharing attributes of variables.Specifies that each thread should have its own instanceof a variable, and that each variable in the list should beinitialized with the value of the original variable, becauseit exists before the parallel construct.<strong>PGI</strong> <strong>Fortran</strong> <strong>Reference</strong> Guide 157

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

Saved successfully!

Ooh no, something went wrong!