Compaq Fortran for Tru64 UNIX Alpha Systems V5.4
omp_set_num_threads (3f)
sets the number of threads to use for the next
parallel region
Syntax
interface
subroutine omp_set_num_threads ( number_of_threads )
integer number_of_threads
end subroutine omp_set_num_threads
end interface
integer scalar_integer_expression
call omp_set_num_threads ( scalar_integer_expression )
Description
The compiler evaluates the scalar integer expression and interprets its
value as the number of threads to use. This routine takes effect only when
called from serial portions of the program. The behavior of the routine is
undefined if the routine is called from a portion of the program where
omp_in_parallel returns TRUE.
A call to omp_set_num_threads sets the maximum number of threads to use for
the next parallel region when dynamic adjustment of the number of threads
is enabled. A call to the omp_set_num_threads routine has precedence over
the OMP_NUM_THREADS environment variable.
See Also
omp_get_dynamic(3f), omp_get_num_threads(3f) omp_in_parallel(3f),
omp_set_dynamic(3f)