19integer,
allocatable,
protected ::
nathd(:)
23integer function mkl_set_num_threads_local(num_threads)
24integer,
intent(in) :: num_threads
39 call omp_set_num_threads(
maxthd)
42 maxthd=omp_get_max_threads()
45 call omp_set_num_threads(
maxthd)
58call omp_set_dynamic(.false.)
60call omp_set_nested(.true.)
62call omp_set_max_active_levels(
maxlvl)
80integer,
intent(in) :: nloop
81integer,
intent(out) :: nthd
86if ((lvl < 0).or.(lvl >=
maxlvl))
then
95if (mod(
maxthd,na) > 0) nthd=nthd+1
96if (lvl == 0) nthd=min(nthd,
maxthd1)
97nthd=max(min(nthd,
maxthd,nloop),1)
108integer,
intent(in) :: nthd
113if ((lvl < 0).or.(lvl >=
maxlvl))
return
integer, dimension(:), allocatable, protected nathd
subroutine holdthd(nloop, nthd)