The Elk Code
mkl_init.f90
Go to the documentation of this file.
1 
2 ! Copyright (C) 2018 J. K. Dewhurst, S. Sharma and E. K. U. Gross.
3 ! This file is distributed under the terms of the GNU General Public License.
4 ! See the file COPYING for license details.
5 
6 subroutine mkl_init
7 use modomp
8 implicit none
9 ! set the initial global number of MKL threads equal to one
10 call mkl_set_num_threads(1)
11 ! set the maximum number of threads available to MKL
12 select case(maxthdmkl)
13 case(:-1)
15  maxthdmkl=max(maxthdmkl,1)
16 case(0)
18 case default
20 end select
21 ! enable dynamic thread allocation
22 call mkl_set_dynamic(.true.)
23 end subroutine
24 
integer maxthd
Definition: modomp.f90:11
Definition: modomp.f90:6
integer maxthdmkl
Definition: modomp.f90:15
subroutine mkl_init
Definition: mkl_init.f90:7