Compaq Fortran for Tru64 UNIX Alpha Systems V5.4

omp_set_dynamic (3f)


Syntax

  interface
     subroutine omp_set_dynamic ( enable )
     logical enable
     end subroutine omp_set_dynamic
  end interface
  logical scalar_logical_expression
  call omp_set_dynamic ( scalar_logical_expression )

Description

  To obtain the best use of system resources, certain run-time environments
  automatically adjust the number of threads that are used for executing
  subsequent parallel regions. This adjustment is enabled only if the value
  of the scalar logical expression to omp_set_dynamic is TRUE. Dynamic
  adjustment is disabled if the value of the scalar logical expression is
  FALSE.

  When dynamic adjustment is enabled, the number of threads specified by the
  user becomes the maximum thread count. The number of threads remains fixed
  throughout each parallel region and is reported by omp_get_num_threads.

  A call to omp_set_dynamic has precedence over the OMP_DYNAMIC environment
  variable.

  The default for dynamic thread adjustment is implementation dependent. A
  user code that depends on a specific number of threads for correct
  execution should explicitly disable dynamic threads.

  Implementations are not required to provide the ability to dynamically
  adjust the number of threads, but they are required to provide the
  interface in order to support portability across platforms.

See Also

  omp_get_dynamic(3f), omp_get_num_threads(3f)