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>Runtime Library Routines with ExamplesReturns the number of enclosing active parallel regions enclosing the task that contains the call. <strong>PGI</strong> currently supports only onelevel of active parallel regions, so the return value currently is 1.<strong>Fortran</strong>integer function omp_get_active_level()omp_get_levelReturns the number of parallel regions enclosing the task that contains the call.<strong>Fortran</strong>integer function omp_get_level()omp_get_max_threadsReturns the maximum value that can be returned by calls to omp_get_num_threads().If omp_set_num_threads() is used to change the number of processors, subsequent calls toomp_get_max_threads() return the new value. Further, this function returns the maximum value whether executing from aparallel or serial region of code.<strong>Fortran</strong>omp_get_num_procsinteger function omp_get_max_threads()Returns the number of processors that are available to the program<strong>Fortran</strong>integer function omp_get_num_procs()omp_get_stack_sizeReturns the value of the OpenMP internal control variable that specifies the size that is used to create a stack for a newly createdthread.This value may not be the size of the stack of the current thread.<strong>Fortran</strong>omp_set_stack_size!omp_get_stack_size interfacefunction omp_get_stack_size ()use omp_lib_kindsinteger ( kind=OMP_STACK_SIZE_KIND ):: omp_get_stack_sizeend function omp_get_stack_sizeend interfaceChanges the value of the OpenMP internal control variable that specifies the size to be used to create a stack for a newly createdthread.<strong>The</strong> integer argument specifies the stack size in kilobytes. <strong>The</strong> size of the stack of the current thread cannot be changed. In the<strong>PGI</strong> implementation, all OpenMP or auto-parallelization threads are created just prior to the first parallel region; therefore, onlycalls to omp_set_stack_size() that occur prior to the first region have an effect.<strong>Fortran</strong>omp_get_team_sizesubroutine omp_set_stack_size(integer(KIND=OMP_STACK_SIZE_KIND))Returns, for a given nested level of the current thread, the size of the thread team to which the ancestor belongs.<strong>Fortran</strong>integer function omp_get_team_size (level)integer levelomp_in_finalReturns whether or not the call is within a final task.<strong>PGI</strong> <strong>Fortran</strong> <strong>Reference</strong> Guide 181

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

Saved successfully!

Ooh no, something went wrong!