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