mirror of https://gitlab.com/QEF/q-e.git
divide now with argument comm. all calls
have been changed git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@8692 c92efa57-630b-4861-b058-cf58834340f0
This commit is contained in:
parent
df2ce8234d
commit
7ffce9cfd6
|
@ -785,7 +785,6 @@ potentials.o : ../../Modules/constants.o
|
|||
potentials.o : ../../Modules/control_flags.o
|
||||
potentials.o : ../../Modules/fft_base.o
|
||||
potentials.o : ../../Modules/fft_interfaces.o
|
||||
potentials.o : ../../Modules/io_files.o
|
||||
potentials.o : ../../Modules/io_global.o
|
||||
potentials.o : ../../Modules/ions_base.o
|
||||
potentials.o : ../../Modules/kind.o
|
||||
|
@ -795,7 +794,6 @@ potentials.o : ../../Modules/recvec.o
|
|||
potentials.o : ../../Modules/sic.o
|
||||
potentials.o : atoms_type.o
|
||||
potentials.o : gvecw.o
|
||||
potentials.o : mainvar.o
|
||||
pres_ai_mod.o : ../../Modules/constants.o
|
||||
pres_ai_mod.o : ../../Modules/kind.o
|
||||
pres_ai_mod.o : ../../Modules/parameters.o
|
||||
|
|
|
@ -22,6 +22,9 @@ subroutine addusdbec (ik, wgt, psi, dbecsum)
|
|||
USE phus, ONLY : becp1
|
||||
USE qpoint, ONLY : npwq, ikks
|
||||
USE control_ph, ONLY : nbnd_occ
|
||||
!
|
||||
USE mp_global, ONLY : intra_pool_comm
|
||||
!
|
||||
implicit none
|
||||
!
|
||||
! the dummy variables
|
||||
|
@ -68,7 +71,7 @@ subroutine addusdbec (ik, wgt, psi, dbecsum)
|
|||
!
|
||||
! Band parallelization: each processor takes care of its slice of bands
|
||||
!
|
||||
call divide (nbnd_occ (ikk), startb, lastb)
|
||||
call divide (nbnd_occ (ikk), startb, lastb, intra_pool_comm)
|
||||
!
|
||||
ijkb0 = 0
|
||||
do nt = 1, ntyp
|
||||
|
|
|
@ -25,7 +25,9 @@ subroutine addusdbec_nc (ik, wgt, psi, dbecsum_nc)
|
|||
USE qpoint, ONLY : npwq, ikks
|
||||
USE phus, ONLY : becp1
|
||||
USE control_ph, ONLY : nbnd_occ
|
||||
|
||||
!
|
||||
USE mp_global, ONLY : intra_pool_comm
|
||||
!
|
||||
implicit none
|
||||
!
|
||||
! the dummy variables
|
||||
|
@ -71,7 +73,7 @@ subroutine addusdbec_nc (ik, wgt, psi, dbecsum_nc)
|
|||
!
|
||||
! Band parallelization: each processor takes care of its slice of bands
|
||||
!
|
||||
call divide (nbnd_occ (ikk), startb, lastb)
|
||||
call divide (nbnd_occ (ikk), startb, lastb, intra_pool_comm)
|
||||
!
|
||||
ijkb0 = 0
|
||||
do nt = 1, ntyp
|
||||
|
|
|
@ -77,7 +77,7 @@ subroutine compute_nldyn (wdyn, wgg, becq, alpq)
|
|||
END IF
|
||||
|
||||
dynwrk (:,:) = (0.d0, 0.d0)
|
||||
call divide (nbnd, startb, lastb)
|
||||
call divide (nbnd, startb, lastb, intra_pool_comm)
|
||||
do ik = 1, nksq
|
||||
ikk = ikks(ik)
|
||||
ikq = ikqs(ik)
|
||||
|
|
|
@ -69,7 +69,7 @@ subroutine drhodvnl (ik, ikk, nper, nu_i0, wdyn, dbecq, dalpq)
|
|||
|
||||
dynwrk (:, :) = (0.d0, 0.d0)
|
||||
|
||||
call divide (nbnd, startb, lastb)
|
||||
call divide (nbnd, startb, lastb, intra_pool_comm)
|
||||
!
|
||||
! Here we prepare the two terms
|
||||
!
|
||||
|
|
|
@ -70,7 +70,7 @@ subroutine incdrhous (drhoscf, weight, ik, dbecsum, evcr, wgg, becq, &
|
|||
allocate (dpsir( dffts%nnr))
|
||||
allocate (ps1 ( nbnd , nbnd))
|
||||
|
||||
call divide (nbnd, startb, lastb)
|
||||
call divide (nbnd, startb, lastb, intra_pool_comm)
|
||||
ps1 (:,:) = (0.d0, 0.d0)
|
||||
ikk=ikks(ik)
|
||||
!
|
||||
|
|
|
@ -74,7 +74,7 @@ subroutine incdrhous_nc (drhoscf, weight, ik, dbecsum, evcr, wgg, becq, &
|
|||
allocate (dpsir(dffts%nnr,npol))
|
||||
allocate (ps1 (nbnd, nbnd))
|
||||
|
||||
call divide (nbnd, startb, lastb)
|
||||
call divide (nbnd, startb, lastb, intra_pool_comm)
|
||||
ps1 (:,:) = (0.d0, 0.d0)
|
||||
ikk = ikks(ik)
|
||||
!
|
||||
|
|
|
@ -80,12 +80,14 @@ addnlcc_zstar_eu_us.o : ../../PW/src/scf_mod.o
|
|||
addnlcc_zstar_eu_us.o : phcom.o
|
||||
addusdbec.o : ../../Modules/ions_base.o
|
||||
addusdbec.o : ../../Modules/kind.o
|
||||
addusdbec.o : ../../Modules/mp_global.o
|
||||
addusdbec.o : ../../Modules/uspp.o
|
||||
addusdbec.o : ../../PW/src/becmod.o
|
||||
addusdbec.o : ../../PW/src/pwcom.o
|
||||
addusdbec.o : phcom.o
|
||||
addusdbec_nc.o : ../../Modules/ions_base.o
|
||||
addusdbec_nc.o : ../../Modules/kind.o
|
||||
addusdbec_nc.o : ../../Modules/mp_global.o
|
||||
addusdbec_nc.o : ../../Modules/uspp.o
|
||||
addusdbec_nc.o : ../../PW/src/becmod.o
|
||||
addusdbec_nc.o : ../../PW/src/noncol.o
|
||||
|
@ -351,7 +353,7 @@ dfile_star.o : ../../Modules/ions_base.o
|
|||
dfile_star.o : ../../Modules/kind.o
|
||||
dfile_star.o : ../../Modules/mp.o
|
||||
dfile_star.o : ../../Modules/mp_global.o
|
||||
dfile_star.o : ../../Modules/xml_io_base.o
|
||||
dfile_star.o : ../../Modules/wrappers.o
|
||||
dfile_star.o : ../../PW/src/noncol.o
|
||||
dfile_star.o : ../../PW/src/pwcom.o
|
||||
dfile_star.o : ../../PW/src/symm_base.o
|
||||
|
@ -1055,15 +1057,6 @@ punch_plot_e.o : ../../Modules/run_info.o
|
|||
punch_plot_e.o : ../../PW/src/noncol.o
|
||||
punch_plot_e.o : ../../PW/src/pwcom.o
|
||||
punch_plot_e.o : phcom.o
|
||||
punch_plot_ph.o : ../../Modules/cell_base.o
|
||||
punch_plot_ph.o : ../../Modules/fft_base.o
|
||||
punch_plot_ph.o : ../../Modules/io_global.o
|
||||
punch_plot_ph.o : ../../Modules/ions_base.o
|
||||
punch_plot_ph.o : ../../Modules/kind.o
|
||||
punch_plot_ph.o : ../../Modules/recvec.o
|
||||
punch_plot_ph.o : ../../Modules/run_info.o
|
||||
punch_plot_ph.o : ../../PW/src/pwcom.o
|
||||
punch_plot_ph.o : phcom.o
|
||||
q2qstar_ph.o : ../../Modules/kind.o
|
||||
q2qstar_ph.o : io_dyn_mat.o
|
||||
q2qstar_ph.o : phcom.o
|
||||
|
|
|
@ -571,7 +571,7 @@ IMPLICIT NONE
|
|||
INTEGER :: in1, in2, flag, ndim, startb, lastb
|
||||
COMPLEX(DP) :: mix(in1+in2), dvscfout(in1), dbecsum(in2)
|
||||
|
||||
CALL divide (in2, startb, lastb)
|
||||
CALL divide (in2, startb, lastb, intra_pool_comm)
|
||||
ndim=lastb-startb+1
|
||||
|
||||
IF (flag==-1) THEN
|
||||
|
|
|
@ -7,38 +7,49 @@
|
|||
!
|
||||
!
|
||||
!-----------------------------------------------------------------------
|
||||
subroutine divide (ntodiv, startn, lastn)
|
||||
subroutine divide (ntodiv, startn, lastn, comm)
|
||||
!-----------------------------------------------------------------------
|
||||
! Divide the bands among processors in the phonon code
|
||||
!
|
||||
USE mp_global, ONLY : me_bgrp, nproc_bgrp
|
||||
USE mp, ONLY : mp_size, mp_rank
|
||||
!
|
||||
#ifdef __MPI
|
||||
!
|
||||
implicit none
|
||||
|
||||
!
|
||||
integer :: comm
|
||||
!
|
||||
integer :: ntodiv, startn, lastn
|
||||
! input: the number to divide
|
||||
! output: the first band of this processor
|
||||
! output: the last band of this processor
|
||||
|
||||
!
|
||||
integer :: me_comm, nproc_comm
|
||||
!
|
||||
integer :: nb, resto, idx, ip
|
||||
! number of bands per processor
|
||||
! one additional band if me_pool+1 <= resto
|
||||
! counter on bands
|
||||
! counter on processors
|
||||
nb = ntodiv / nproc_bgrp
|
||||
resto = ntodiv - nb * nproc_bgrp
|
||||
!
|
||||
nproc_comm = mp_size(comm)
|
||||
me_comm = mp_rank(comm)
|
||||
!
|
||||
write(0,*) "nproc_comm: ", nproc_comm
|
||||
write(0,*) "me_comm: ", me_comm
|
||||
!
|
||||
nb = ntodiv / nproc_comm
|
||||
resto = ntodiv - nb * nproc_comm
|
||||
idx = 0
|
||||
do ip = 1, nproc_bgrp
|
||||
do ip = 1, nproc_comm
|
||||
if (ip.le.resto) then
|
||||
if (me_bgrp+1.eq.ip) then
|
||||
if (me_comm+1.eq.ip) then
|
||||
startn = idx + 1
|
||||
lastn = startn + nb
|
||||
endif
|
||||
idx = idx + nb + 1
|
||||
else
|
||||
if (me_bgrp+1.eq.ip) then
|
||||
if (me_comm+1.eq.ip) then
|
||||
startn = idx + 1
|
||||
lastn = startn + nb - 1
|
||||
endif
|
||||
|
|
|
@ -41,7 +41,7 @@ subroutine init_at_1()
|
|||
pref = fpi/sqrt(omega)
|
||||
! needed to normalize atomic wfcs (not a bad idea in general and
|
||||
! necessary to compute correctly lda+U projections)
|
||||
call divide (nqx, startq, lastq)
|
||||
call divide (nqx, startq, lastq, intra_bgrp_comm)
|
||||
tab_at(:,:,:) = 0.d0
|
||||
do nt = 1, ntyp
|
||||
do nb = 1, upf(nt)%nwfc
|
||||
|
|
|
@ -238,7 +238,7 @@ subroutine init_us_1
|
|||
! here for the US types we compute the Fourier transform of the
|
||||
! Q functions.
|
||||
!
|
||||
call divide (nqxq, startq, lastq)
|
||||
call divide (nqxq, startq, lastq, intra_bgrp_comm)
|
||||
!
|
||||
do nt = 1, ntyp
|
||||
if ( upf(nt)%tvanp ) then
|
||||
|
@ -374,7 +374,7 @@ subroutine init_us_1
|
|||
! fill the interpolation table tab
|
||||
!
|
||||
pref = fpi / sqrt (omega)
|
||||
call divide (nqx, startq, lastq)
|
||||
call divide (nqx, startq, lastq, intra_bgrp_comm)
|
||||
tab (:,:,:) = 0.d0
|
||||
do nt = 1, ntyp
|
||||
do nb = 1, upf(nt)%nbeta
|
||||
|
|
|
@ -311,7 +311,7 @@ data_structure.o : ../../Modules/stick_set.o
|
|||
data_structure.o : pwcom.o
|
||||
deriv_drhoc.o : ../../Modules/constants.o
|
||||
deriv_drhoc.o : ../../Modules/kind.o
|
||||
divide.o : ../../Modules/mp_global.o
|
||||
divide.o : ../../Modules/mp.o
|
||||
divide_class.o : ../../Modules/kind.o
|
||||
divide_class_so.o : ../../Modules/constants.o
|
||||
divide_class_so.o : ../../Modules/io_global.o
|
||||
|
@ -506,7 +506,6 @@ forces.o : ../../Modules/io_global.o
|
|||
forces.o : ../../Modules/ions_base.o
|
||||
forces.o : ../../Modules/kind.o
|
||||
forces.o : ../../Modules/mm_dispersion.o
|
||||
forces.o : ../../Modules/mp_global.o
|
||||
forces.o : ../../Modules/recvec.o
|
||||
forces.o : ../../Modules/uspp.o
|
||||
forces.o : bp_mod.o
|
||||
|
@ -1304,6 +1303,8 @@ s_1psi.o : realus.o
|
|||
s_psi.o : ../../Modules/control_flags.o
|
||||
s_psi.o : ../../Modules/ions_base.o
|
||||
s_psi.o : ../../Modules/kind.o
|
||||
s_psi.o : ../../Modules/mp.o
|
||||
s_psi.o : ../../Modules/mp_global.o
|
||||
s_psi.o : ../../Modules/uspp.o
|
||||
s_psi.o : becmod.o
|
||||
s_psi.o : noncol.o
|
||||
|
|
|
@ -20,6 +20,9 @@ SUBROUTINE local
|
|||
USE noncollin_module, ONLY : npol
|
||||
USE io_files
|
||||
USE cond
|
||||
!
|
||||
USE mp_global, ONLY : intra_pool_comm
|
||||
!
|
||||
|
||||
IMPLICIT NONE
|
||||
|
||||
|
@ -86,14 +89,14 @@ SUBROUTINE local
|
|||
!
|
||||
nrzps = 0
|
||||
nrzpr = 0
|
||||
call divide(nrzl, kin, kfin)
|
||||
call divide(nrzl, kin, kfin, intra_pool_comm)
|
||||
nrzpl = kfin - kin + 1
|
||||
if(ikind.gt.0) then
|
||||
call divide(nrzs, kin, kfin)
|
||||
call divide(nrzs, kin, kfin, intra_pool_comm)
|
||||
nrzps = kfin - kin + 1
|
||||
endif
|
||||
if(ikind.gt.1) then
|
||||
call divide(nrzr, kin, kfin)
|
||||
call divide(nrzr, kin, kfin, intra_pool_comm)
|
||||
nrzpr = kfin - kin + 1
|
||||
endif
|
||||
|
||||
|
@ -163,7 +166,9 @@ subroutine local_1 (edummy, nrz, vppot, n2d, psibase)
|
|||
USE io_global, ONLY : ionode, ionode_id
|
||||
USE parallel_include
|
||||
use cond, only : nrx, nry, ngper, gper, ewind, epsproj
|
||||
|
||||
!
|
||||
USE mp_global, ONLY : intra_pool_comm
|
||||
!
|
||||
IMPLICIT NONE
|
||||
|
||||
INTEGER :: nrz, n2d
|
||||
|
@ -296,6 +301,9 @@ subroutine local_2(nrz, nrzp, vppot, psiper, zkr)
|
|||
USE mp, ONLY : mp_barrier
|
||||
USE noncollin_module, ONLY : npol
|
||||
use cond, only : nrx, nry, ngper, n2d, gper, newbg
|
||||
!
|
||||
USE mp_global, ONLY : intra_pool_comm
|
||||
!
|
||||
|
||||
IMPLICIT NONE
|
||||
|
||||
|
@ -330,7 +338,7 @@ subroutine local_2(nrz, nrzp, vppot, psiper, zkr)
|
|||
enddo
|
||||
enddo
|
||||
|
||||
call divide(nrz, kin, kfin)
|
||||
call divide(nrz, kin, kfin, intra_pool_comm)
|
||||
|
||||
! for reduced basis set H'_{ab}=e*^i_aH_{ij}e^j_b
|
||||
do k = kin, kfin
|
||||
|
|
|
@ -282,7 +282,7 @@ subroutine init_gipaw_1
|
|||
! fill the interpolation table tab
|
||||
!
|
||||
pref = fpi / sqrt ( omega )
|
||||
call divide ( nqx, startq, lastq )
|
||||
call divide ( nqx, startq, lastq, intra_pool_comm )
|
||||
do nt = 1, ntyp
|
||||
paw_recon(nt)%paw_tab (:,:) = 0.0_dp
|
||||
|
||||
|
|
Loading…
Reference in New Issue