mirror of https://gitlab.com/QEF/q-e.git
- celanup, poolreduce replaced by mp_sum(...,inter_pool_comm)
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@4643 c92efa57-630b-4861-b058-cf58834340f0
This commit is contained in:
parent
80feea2cd8
commit
259fe1b6e7
|
@ -30,6 +30,8 @@ SUBROUTINE c_bands( iter, ik_, dr2 )
|
|||
USE lsda_mod, ONLY : current_spin, lsda, isk
|
||||
USE wavefunctions_module, ONLY : evc
|
||||
USE bp, ONLY : lelfield
|
||||
USE mp_global, ONLY : inter_pool_comm
|
||||
USE mp, ONLY : mp_sum
|
||||
!
|
||||
IMPLICIT NONE
|
||||
!
|
||||
|
@ -136,7 +138,7 @@ SUBROUTINE c_bands( iter, ik_, dr2 )
|
|||
!
|
||||
ik_ = 0
|
||||
!
|
||||
CALL poolreduce( 1, avg_iter )
|
||||
CALL mp_sum( avg_iter, inter_pool_comm )
|
||||
!
|
||||
avg_iter = avg_iter / nkstot
|
||||
!
|
||||
|
@ -557,9 +559,8 @@ SUBROUTINE c_bands_nscf( ik_ )
|
|||
USE ldaU, ONLY : lda_plus_u, swfcatom
|
||||
USE lsda_mod, ONLY : current_spin, lsda, isk
|
||||
USE wavefunctions_module, ONLY : evc
|
||||
#ifdef __PARA
|
||||
USE mp_global, ONLY : npool, kunit
|
||||
#endif
|
||||
USE mp_global, ONLY : npool, kunit, inter_pool_comm
|
||||
USE mp, ONLY : mp_sum
|
||||
USE check_stop, ONLY : check_stop_now
|
||||
!
|
||||
IMPLICIT NONE
|
||||
|
@ -699,7 +700,7 @@ SUBROUTINE c_bands_nscf( ik_ )
|
|||
!
|
||||
END DO k_loop
|
||||
!
|
||||
CALL poolreduce( 1, avg_iter )
|
||||
CALL mp_sum( avg_iter, inter_pool_comm )
|
||||
avg_iter = avg_iter / nkstot
|
||||
!
|
||||
WRITE( stdout, '( /,5X,"ethr = ",1PE9.2,", avg # of iterations =",0PF5.1 )' ) &
|
||||
|
|
|
@ -29,6 +29,9 @@ SUBROUTINE dndepsilon ( dns,ldim,ipol,jpol )
|
|||
USE io_files, ONLY : iunigk, nwordwfc, iunwfc, &
|
||||
iunat, iunsat, nwordatwfc
|
||||
USE buffers, ONLY : get_buffer
|
||||
USE mp_global, ONLY : intra_pool_comm, inter_pool_comm
|
||||
USE mp, ONLY : mp_sum
|
||||
|
||||
IMPLICIT NONE
|
||||
!
|
||||
! I/O variables first
|
||||
|
@ -135,7 +138,7 @@ SUBROUTINE dndepsilon ( dns,ldim,ipol,jpol )
|
|||
END DO ! on k-points
|
||||
|
||||
#ifdef __PARA
|
||||
CALL poolreduce(ldim*ldim*nspin*nat,dns)
|
||||
CALL mp_sum( dns, inter_pool_comm )
|
||||
#endif
|
||||
!
|
||||
! In nspin.eq.1 k-point weight wg is normalized to 2 el/band
|
||||
|
|
12
PW/exx.f90
12
PW/exx.f90
|
@ -661,6 +661,8 @@ contains
|
|||
USE wavefunctions_module, ONLY : evc
|
||||
USE lsda_mod, ONLY : lsda, current_spin, isk
|
||||
USE klist, ONLY : ngk, nks
|
||||
USE mp_global, ONLY : inter_pool_comm, intra_pool_comm
|
||||
USE mp, ONLY : mp_sum
|
||||
|
||||
implicit none
|
||||
REAL (DP) :: exxenergy, energy
|
||||
|
@ -699,8 +701,8 @@ contains
|
|||
if (gamma_only) energy = 2.d0 * energy
|
||||
|
||||
|
||||
call reduce ( 1, energy)
|
||||
call poolreduce(1,energy)
|
||||
call mp_sum( energy, intra_pool_comm )
|
||||
call mp_sum( energy, inter_pool_comm )
|
||||
|
||||
exxenergy = energy
|
||||
|
||||
|
@ -725,6 +727,8 @@ contains
|
|||
USE klist, ONLY : xk, ngk, nks
|
||||
USE lsda_mod, ONLY : lsda, current_spin, isk
|
||||
USE gvect, ONLY : g, nl
|
||||
USE mp_global, ONLY : inter_pool_comm, intra_pool_comm
|
||||
USE mp, ONLY : mp_sum
|
||||
|
||||
implicit none
|
||||
REAL (DP) :: exxenergy2, energy
|
||||
|
@ -864,8 +868,8 @@ contains
|
|||
|
||||
deallocate (tempphic, temppsic, rhoc, fac )
|
||||
|
||||
call reduce ( 1, energy)
|
||||
call poolreduce(1,energy)
|
||||
call mp_sum( energy, intra_pool_comm )
|
||||
call mp_sum( energy, inter_pool_comm )
|
||||
|
||||
exxenergy2 = energy
|
||||
|
||||
|
|
|
@ -28,7 +28,8 @@ SUBROUTINE force_hub(forceh)
|
|||
USE control_flags, ONLY : gamma_only
|
||||
USE lsda_mod, ONLY : lsda, nspin, current_spin, isk
|
||||
USE scf, ONLY : v
|
||||
USE mp_global, ONLY : me_pool, my_pool_id
|
||||
USE mp_global, ONLY : me_pool, my_pool_id, inter_pool_comm
|
||||
USE mp, ONLY : mp_sum
|
||||
USE basis, ONLY : natomwfc
|
||||
USE becmod, ONLY : becp, calbec
|
||||
USE uspp, ONLY : nkb, vkb
|
||||
|
@ -138,7 +139,7 @@ SUBROUTINE force_hub(forceh)
|
|||
END DO
|
||||
|
||||
#ifdef __PARA
|
||||
CALL poolreduce(3*nat,forceh)
|
||||
CALL mp_sum( forceh, inter_pool_comm )
|
||||
#endif
|
||||
|
||||
|
||||
|
|
|
@ -31,6 +31,8 @@ SUBROUTINE force_us( forcenl )
|
|||
USE io_files, ONLY : iunwfc, nwordwfc, iunigk
|
||||
USE buffers, ONLY : get_buffer
|
||||
USE becmod, ONLY : allocate_bec, deallocate_bec
|
||||
USE mp_global, ONLY : inter_pool_comm, intra_pool_comm
|
||||
USE mp, ONLY : mp_sum
|
||||
!
|
||||
IMPLICIT NONE
|
||||
!
|
||||
|
@ -161,7 +163,7 @@ SUBROUTINE force_us( forcenl )
|
|||
!
|
||||
! ... collect contributions across pools
|
||||
!
|
||||
CALL poolreduce( 3 * nat, forcenl )
|
||||
CALL mp_sum( forcenl, inter_pool_comm )
|
||||
#endif
|
||||
!
|
||||
! ... Since our summation over k points was only on the irreducible
|
||||
|
@ -396,7 +398,7 @@ SUBROUTINE force_us( forcenl )
|
|||
!
|
||||
! ... collect contributions across pools
|
||||
!
|
||||
CALL poolreduce( 3 * nat, forcenl )
|
||||
CALL mp_sum( forcenl, inter_pool_comm )
|
||||
#endif
|
||||
!
|
||||
! ... Since our summation over k points was only on the irreducible
|
||||
|
|
|
@ -135,6 +135,7 @@ c_bands.o : ../Modules/control_flags.o
|
|||
c_bands.o : ../Modules/io_files.o
|
||||
c_bands.o : ../Modules/io_global.o
|
||||
c_bands.o : ../Modules/kind.o
|
||||
c_bands.o : ../Modules/mp.o
|
||||
c_bands.o : ../Modules/mp_global.o
|
||||
c_bands.o : ../Modules/uspp.o
|
||||
c_bands.o : ../Modules/wavefunctions.o
|
||||
|
@ -319,6 +320,8 @@ divide_et_impera.o : exx.o
|
|||
dndepsilon.o : ../Modules/io_files.o
|
||||
dndepsilon.o : ../Modules/ions_base.o
|
||||
dndepsilon.o : ../Modules/kind.o
|
||||
dndepsilon.o : ../Modules/mp.o
|
||||
dndepsilon.o : ../Modules/mp_global.o
|
||||
dndepsilon.o : ../Modules/uspp.o
|
||||
dndepsilon.o : ../Modules/wavefunctions.o
|
||||
dndepsilon.o : becmod.o
|
||||
|
@ -404,6 +407,7 @@ exx.o : ../Modules/functionals.o
|
|||
exx.o : ../Modules/io_files.o
|
||||
exx.o : ../Modules/io_global.o
|
||||
exx.o : ../Modules/kind.o
|
||||
exx.o : ../Modules/mp.o
|
||||
exx.o : ../Modules/mp_global.o
|
||||
exx.o : ../Modules/wavefunctions.o
|
||||
exx.o : buffers.o
|
||||
|
@ -437,6 +441,7 @@ force_hub.o : ../Modules/control_flags.o
|
|||
force_hub.o : ../Modules/io_files.o
|
||||
force_hub.o : ../Modules/ions_base.o
|
||||
force_hub.o : ../Modules/kind.o
|
||||
force_hub.o : ../Modules/mp.o
|
||||
force_hub.o : ../Modules/mp_global.o
|
||||
force_hub.o : ../Modules/uspp.o
|
||||
force_hub.o : ../Modules/wavefunctions.o
|
||||
|
@ -451,6 +456,8 @@ force_us.o : ../Modules/control_flags.o
|
|||
force_us.o : ../Modules/io_files.o
|
||||
force_us.o : ../Modules/ions_base.o
|
||||
force_us.o : ../Modules/kind.o
|
||||
force_us.o : ../Modules/mp.o
|
||||
force_us.o : ../Modules/mp_global.o
|
||||
force_us.o : ../Modules/uspp.o
|
||||
force_us.o : ../Modules/wavefunctions.o
|
||||
force_us.o : becmod.o
|
||||
|
@ -747,6 +754,8 @@ new_ns.o : ../Modules/io_files.o
|
|||
new_ns.o : ../Modules/io_global.o
|
||||
new_ns.o : ../Modules/ions_base.o
|
||||
new_ns.o : ../Modules/kind.o
|
||||
new_ns.o : ../Modules/mp.o
|
||||
new_ns.o : ../Modules/mp_global.o
|
||||
new_ns.o : ../Modules/uspp.o
|
||||
new_ns.o : ../Modules/wavefunctions.o
|
||||
new_ns.o : buffers.o
|
||||
|
@ -1190,6 +1199,8 @@ stres_knl.o : ../Modules/constants.o
|
|||
stres_knl.o : ../Modules/control_flags.o
|
||||
stres_knl.o : ../Modules/io_files.o
|
||||
stres_knl.o : ../Modules/kind.o
|
||||
stres_knl.o : ../Modules/mp.o
|
||||
stres_knl.o : ../Modules/mp_global.o
|
||||
stres_knl.o : ../Modules/wavefunctions.o
|
||||
stres_knl.o : buffers.o
|
||||
stres_knl.o : noncol.o
|
||||
|
@ -1245,6 +1256,8 @@ sum_band.o : paw_onecenter.o
|
|||
sum_band.o : pwcom.o
|
||||
sum_band.o : scf_mod.o
|
||||
sumkg.o : ../Modules/kind.o
|
||||
sumkg.o : ../Modules/mp.o
|
||||
sumkg.o : ../Modules/mp_global.o
|
||||
sumkt.o : ../Modules/kind.o
|
||||
summary.o : ../Modules/atom.o
|
||||
summary.o : ../Modules/cell_base.o
|
||||
|
|
|
@ -33,6 +33,9 @@ SUBROUTINE new_ns(ns)
|
|||
USE io_files, ONLY : iunigk, nwordwfc, iunwfc, nwordatwfc, iunsat
|
||||
USE buffers, ONLY : get_buffer
|
||||
USE uspp_param, ONLY : upf
|
||||
USE mp_global, ONLY : intra_pool_comm, inter_pool_comm
|
||||
USE mp, ONLY : mp_sum
|
||||
|
||||
|
||||
IMPLICIT NONE
|
||||
!
|
||||
|
@ -136,7 +139,7 @@ SUBROUTINE new_ns(ns)
|
|||
|
||||
ENDDO
|
||||
#ifdef __PARA
|
||||
CALL poolreduce (ldim * ldim * nspin * nat , nr)
|
||||
CALL mp_sum( nr, inter_pool_comm )
|
||||
#endif
|
||||
IF (nspin.EQ.1) nr = 0.5d0 * nr
|
||||
!
|
||||
|
|
|
@ -45,8 +45,8 @@ SUBROUTINE potinit()
|
|||
USE noncollin_module, ONLY : noncolin, report
|
||||
USE io_files, ONLY : tmp_dir, prefix, iunocc, input_drho
|
||||
USE spin_orb, ONLY : domag
|
||||
USE mp, ONLY : mp_bcast
|
||||
USE mp_global, ONLY : intra_image_comm
|
||||
USE mp, ONLY : mp_bcast, mp_sum
|
||||
USE mp_global, ONLY : intra_image_comm, inter_pool_comm, intra_pool_comm
|
||||
USE io_global, ONLY : ionode, ionode_id
|
||||
USE pw_restart, ONLY : pw_readfile
|
||||
USE io_rho_xml, ONLY : read_rho
|
||||
|
@ -119,8 +119,8 @@ SUBROUTINE potinit()
|
|||
ELSE
|
||||
rho%ns(:,:,:,:) = 0.D0
|
||||
END IF
|
||||
CALL reduce( ldim*ldim*nspin*nat, rho%ns )
|
||||
CALL poolreduce( ldim*ldim*nspin*nat, rho%ns )
|
||||
CALL mp_sum( rho%ns, intra_pool_comm )
|
||||
CALL mp_sum( rho%ns, inter_pool_comm )
|
||||
!
|
||||
END IF
|
||||
!
|
||||
|
|
|
@ -890,6 +890,8 @@ MODULE pw_restart
|
|||
USE lsda_mod, ONLY : nspin
|
||||
USE io_files, ONLY : iunocc
|
||||
USE ions_base, ONLY : nat
|
||||
USE mp_global, ONLY : inter_pool_comm, intra_pool_comm
|
||||
USE mp, ONLY : mp_sum
|
||||
!
|
||||
IMPLICIT NONE
|
||||
!
|
||||
|
@ -1104,8 +1106,8 @@ MODULE pw_restart
|
|||
ELSE
|
||||
rho%ns(:,:,:,:) = 0.D0
|
||||
END IF
|
||||
CALL reduce( ldim*ldim*nspin*nat, rho%ns )
|
||||
CALL poolreduce( ldim*ldim*nspin*nat, rho%ns )
|
||||
CALL mp_sum( rho%ns, intra_pool_comm )
|
||||
CALL mp_sum( rho%ns, inter_pool_comm )
|
||||
!
|
||||
END IF
|
||||
!
|
||||
|
|
|
@ -23,6 +23,8 @@ subroutine stres_knl (sigmanlc, sigmakin)
|
|||
USE control_flags, ONLY: gamma_only
|
||||
USE noncollin_module, ONLY: noncolin, npol
|
||||
USE wavefunctions_module, ONLY: evc
|
||||
USE mp_global, ONLY: inter_pool_comm, intra_pool_comm
|
||||
USE mp, ONLY: mp_sum
|
||||
implicit none
|
||||
real(DP) :: sigmanlc (3, 3), sigmakin (3, 3)
|
||||
real(DP), allocatable :: gk (:,:), kfac (:)
|
||||
|
@ -89,10 +91,10 @@ subroutine stres_knl (sigmanlc, sigmakin)
|
|||
|
||||
call addusstres (sigmanlc)
|
||||
#ifdef __PARA
|
||||
call reduce (9, sigmakin)
|
||||
call poolreduce (9, sigmakin)
|
||||
call reduce (9, sigmanlc)
|
||||
call poolreduce (9, sigmanlc)
|
||||
call mp_sum( sigmakin, intra_pool_comm )
|
||||
call mp_sum( sigmakin, inter_pool_comm )
|
||||
call mp_sum( sigmanlc, intra_pool_comm )
|
||||
call mp_sum( sigmanlc, inter_pool_comm )
|
||||
#endif
|
||||
!
|
||||
! symmetrize stress
|
||||
|
|
|
@ -38,8 +38,8 @@ SUBROUTINE sum_band()
|
|||
USE spin_orb, ONLY : lspinorb, domag, so, fcoef
|
||||
USE wvfct, ONLY : nbnd, npwx, npw, igk, wg, et, btype
|
||||
USE mp_global, ONLY : intra_image_comm, me_image, &
|
||||
root_image, npool, my_pool_id
|
||||
USE mp, ONLY : mp_bcast
|
||||
root_image, npool, my_pool_id, inter_pool_comm
|
||||
USE mp, ONLY : mp_bcast, mp_sum
|
||||
USE funct, ONLY : dft_is_meta
|
||||
USE paw_onecenter, ONLY : PAW_symmetrize
|
||||
USE paw_variables, ONLY : okpaw
|
||||
|
@ -138,7 +138,7 @@ SUBROUTINE sum_band()
|
|||
!
|
||||
IF ( noncolin .AND. .NOT. domag ) rho%of_r(:,2:4)=0.D0
|
||||
!
|
||||
CALL poolreduce( 1, eband )
|
||||
CALL mp_sum( eband, inter_pool_comm )
|
||||
!
|
||||
! ... symmetrization of the charge density (and local magnetization)
|
||||
!
|
||||
|
@ -146,8 +146,8 @@ SUBROUTINE sum_band()
|
|||
!
|
||||
! ... reduce charge density across pools
|
||||
!
|
||||
CALL poolreduce( nspin * nrxx, rho%of_r )
|
||||
if (dft_is_meta() ) CALL poolreduce( nspin * nrxx, rho%kin_r )
|
||||
CALL mp_sum( rho%of_r, inter_pool_comm )
|
||||
if (dft_is_meta() ) CALL mp_sum( rho%kin_r, inter_pool_comm )
|
||||
!
|
||||
IF ( noncolin ) THEN
|
||||
!
|
||||
|
|
|
@ -14,6 +14,8 @@ function sumkg (et, nbnd, nks, wk, degauss, ngauss, e, is, isk)
|
|||
!
|
||||
!
|
||||
USE kinds
|
||||
USE mp_global, ONLY : inter_pool_comm
|
||||
USE mp, ONLY : mp_sum
|
||||
implicit none
|
||||
! Output variable
|
||||
real(DP) :: sumkg
|
||||
|
@ -50,7 +52,7 @@ function sumkg (et, nbnd, nks, wk, degauss, ngauss, e, is, isk)
|
|||
sumkg = sumkg + wk (ik) * sum1
|
||||
enddo
|
||||
#ifdef __PARA
|
||||
call poolreduce (1, sumkg)
|
||||
call mp_sum ( sumkg, inter_pool_comm )
|
||||
#endif
|
||||
return
|
||||
end function sumkg
|
||||
|
|
|
@ -25,8 +25,8 @@ SUBROUTINE weights()
|
|||
USE noncollin_module, ONLY : bfield
|
||||
USE wvfct, ONLY : nbnd, wg, et
|
||||
USE mp_global, ONLY : intra_image_comm, me_image, &
|
||||
root_image, npool, my_pool_id
|
||||
USE mp, ONLY : mp_bcast
|
||||
root_image, npool, my_pool_id, inter_pool_comm
|
||||
USE mp, ONLY : mp_bcast, mp_sum
|
||||
!
|
||||
IMPLICIT NONE
|
||||
!
|
||||
|
@ -102,7 +102,7 @@ SUBROUTINE weights()
|
|||
ngauss, et, ef, demet, wg, 0, isk)
|
||||
END IF
|
||||
!
|
||||
CALL poolreduce( 1, demet )
|
||||
CALL mp_sum( demet, inter_pool_comm )
|
||||
!
|
||||
ELSE IF ( tfixed_occ ) THEN
|
||||
!
|
||||
|
|
Loading…
Reference in New Issue