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>‣ When SCHEDULE (DYNAMIC, chunk) is specified, iterations are allocated in contiguousblocks of size chunk. As each thread finishes a piece of the iteration space, it dynamicallyobtains the next set of iterations. <strong>The</strong> chunk must be a scalar integer expression. If no chunkis specified, a default chunk size is chosen equal to 1.‣ When SCHEDULE (GUIDED, chunk) is specified, the chunk size is reduced in anexponentially decreasing manner with each dispatched piece of the iteration space. Chunkspecifies the minimum number of iterations to dispatch each time, except when there are lessthan chunk iterations remaining to be processed, at which point all remaining iterations areassigned. If no chunk is specified, a default chunk size is chosen equal to 1.‣ When SCHEDULE (RUNTIME) is specified, the decision regarding iteration scheduling isdeferred until runtime. <strong>The</strong> schedule type and chunk size can be chosen at runtime by settingthe OMP_SCHEDULE environment variable. If this environment variable is not set, theresulting schedule is equivalent to SCHEDULE(STATIC).8.6.14. SHARED<strong>The</strong> SHARED clause specifies variables that must be available to all threads. If you specifya variable as SHARED, you are stating that all threads can safely share a single copy of thevariable. When one or more variables are shared among all threads, all threads access the samestorage area for the shared variables.8.6.15. UNTIED<strong>The</strong> UNTIED clause specifies that any thread in the team can resume the task region after asuspension.<strong>The</strong> thread number may change at any time during the execution of an untied task. <strong>The</strong>refore, the valuereturned by omp_get_thread_num is generally not useful during execution of such a task region.8.7. Directive Summary TableTable 34 provides a brief summary of the directives and pragmas that <strong>PGI</strong> supports.Table 34 Directive Summary TableDirectiveATOMIC [TYPE} ... END ATOMICDescriptionSemantically equivalent to enclosing a single statement in the CRITCIAL...ENDCRITICAL directive.TYPE may be empty or one of the following: UPDATE, READ, WRITE, or CAPTURE.<strong>The</strong> END ATOMIC directive is only allowed when ending ATOMIC CAPTURE regions.Only certain statements are allowed.<strong>PGI</strong> <strong>Fortran</strong> <strong>Reference</strong> Guide 163

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

Saved successfully!

Ooh no, something went wrong!