The Elk Code
hmlxbse.f90
Go to the documentation of this file.
1 
2 ! Copyright (C) 2010 S. Sharma, J. K. Dewhurst 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 hmlxbse
7 use modmain
8 use modmpi
9 use modomp
10 implicit none
11 ! local variables
12 integer ik2,nthd
13 call holdthd(nkptnr/np_mpi,nthd)
14 !$OMP PARALLEL DO DEFAULT(SHARED) &
15 !$OMP SCHEDULE(DYNAMIC) &
16 !$OMP NUM_THREADS(nthd)
17 do ik2=1,nkptnr
18 ! distribute among MPI processes
19  if (mod(ik2-1,np_mpi) /= lp_mpi) cycle
20 !$OMP CRITICAL(hmlxbse_)
21  write(*,'("Info(hmlxbse): ",I6," of ",I6," k-points")') ik2,nkptnr
22 !$OMP END CRITICAL(hmlxbse_)
23  call hmlxbsek(ik2)
24 end do
25 !$OMP END PARALLEL DO
26 call freethd(nthd)
27 end subroutine
28 
Definition: modomp.f90:6
subroutine hmlxbse
Definition: hmlxbse.f90:7
integer nkptnr
Definition: modmain.f90:463
integer np_mpi
Definition: modmpi.f90:13
subroutine hmlxbsek(ik2)
Definition: hmlxbsek.f90:7
Definition: modmpi.f90:6
integer lp_mpi
Definition: modmpi.f90:15
subroutine freethd(nthd)
Definition: modomp.f90:106
subroutine holdthd(nloop, nthd)
Definition: modomp.f90:78