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.9.3. OMP_NESTEDOMP_NESTED currently has no effect. Typically this variable enables (TRUE) or disables(FALSE) nested parallelism.8.9.4. OMP_NUM_THREADSOMP_NUM_THREADS specifies the number of threads to use during execution of parallel regions.<strong>The</strong> default value for this variable is 1. For historical reasons, the environment variable NCPUS issupported with the same functionality. In the event that both OMP_NUM_THREADS and NCPUSare defined, the value of OMP_NUM_THREADS takes precedence.OMP_NUM_THREADS defines the threads that are used to execute the program, regardless of thenumber of physical processors available in the system. As a result, you can run programs using morethreads than physical processors and they execute correctly. However, performance of programs executedin this manner can be unpredictable, and oftentimes will be inefficient.8.9.5. OMP_PROC_BINDOMP_PROC_BIND specifies whether executing threads should be bound to a core duringexecution. Allowable values are "true" and "false".8.9.6. OMP_SCHEDULEOMP_SCHEDULE specifies the type of iteration scheduling to use for DO and PARALLEL DOloop directives that include the SCHEDULE(RUNTIME) clause, described in SCHEDULE. <strong>The</strong>default value for this variable is STATIC.If the optional chunk size is not set, a chunk size of 1 is assumed except in the case of a staticschedule. For a static schedule, the default is as defined in DO...END DO.Examples of the use of OMP_SCHEDULE are as follows:% setenv OMP_SCHEDULE "STATIC, 5"% setenv OMP_SCHEDULE "GUIDED, 8"% setenv OMP_SCHEDULE "DYNAMIC"8.9.7. OMP_STACKSIZEOMP_STACKSIZE is an OpenMP 3.0 feature that controls the size of the stack for newly-createdthreads. This variable overrides the default stack size for a newly created thread. <strong>The</strong> valueis a decimal integer followed by an optional letter B, K, M, or G, to specify bytes, kilobytes,megabytes, and gigabytes, respectively. If no letter is used, the default is kilobytes. <strong>The</strong>re is nospace between the value and the letter; for example, one megabyte is specified 1M. <strong>The</strong> followingexample specifies a stack size of 8 megabytes.% setenv OMP_STACKSIZE 8M<strong>PGI</strong> <strong>Fortran</strong> <strong>Reference</strong> Guide 185

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

Saved successfully!

Ooh no, something went wrong!