The Elk Code
Loading...
Searching...
No Matches
genpmat.f90
Go to the documentation of this file.
1
2
! Copyright (C) 2015 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
genpmat
7
use
modmain
8
use
modmpi
9
use
modomp
10
implicit none
11
! local variables
12
integer
ik,nthd
13
if
(
mp_mpi
)
write
(*,*)
14
! synchronise MPI processes
15
call
mpi_barrier(
mpicom
,
ierror
)
16
call
holdthd
(
nkpt
/
np_mpi
,nthd)
17
!$OMP PARALLEL DO DEFAULT(SHARED) &
18
!$OMP SCHEDULE(DYNAMIC) &
19
!$OMP NUM_THREADS(nthd)
20
do
ik=1,
nkpt
21
! distribute among MPI processes
22
if
(mod(ik-1,
np_mpi
) /=
lp_mpi
) cycle
23
!$OMP CRITICAL(genpmat_)
24
write
(*,
'("Info(genpmat): ",I6," of ",I6," k-points")'
) ik,
nkpt
25
!$OMP END CRITICAL(genpmat_)
26
call
putpmat
(ik)
27
end do
28
!$OMP END PARALLEL DO
29
call
freethd
(nthd)
30
! synchronise MPI processes
31
call
mpi_barrier(
mpicom
,
ierror
)
32
end subroutine
33
genpmat
subroutine genpmat
Definition
genpmat.f90:7
modmain
Definition
modmain.f90:6
modmain::nkpt
integer nkpt
Definition
modmain.f90:461
modmpi
Definition
modmpi.f90:6
modmpi::lp_mpi
integer lp_mpi
Definition
modmpi.f90:15
modmpi::ierror
integer ierror
Definition
modmpi.f90:19
modmpi::mpicom
integer mpicom
Definition
modmpi.f90:11
modmpi::np_mpi
integer np_mpi
Definition
modmpi.f90:13
modmpi::mp_mpi
logical mp_mpi
Definition
modmpi.f90:17
modomp
Definition
modomp.f90:6
modomp::holdthd
subroutine holdthd(nloop, nthd)
Definition
modomp.f90:78
modomp::freethd
subroutine freethd(nthd)
Definition
modomp.f90:106
putpmat
subroutine putpmat(ik)
Definition
putpmat.f90:7
genpmat.f90
Generated by
1.9.8