With PAW it is not possible to mix the charge density on a single pool,

for reasons explained in the added comments


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@9433 c92efa57-630b-4861-b058-cf58834340f0
This commit is contained in:
giannozz 2012-09-19 07:43:25 +00:00
parent a9f18e493e
commit a3d1f55c21
3 changed files with 13 additions and 6 deletions

View File

@ -338,11 +338,14 @@ SUBROUTINE electrons()
!
! ... mix_rho mixes several quantities: rho in g-space, tauk (for
! ... meta-gga), ns and ns_nc (for lda+u) and becsum (for paw)
! ... Done on a single pool and results broadcast to prevent trouble
! ... Results are broadcast from pool 0 to others to prevent trouble
! ... on machines unable to yield the same results from the same
! ... calculation on same data, performed on different procs
!
IF ( my_pool_id == root_pool ) CALL mix_rho &
! ... The mixing should be done on pool 0 only as well, but inside
! ... mix_rho there is a call to rho_ddot that in the PAW case
! ... contains a hidden parallelization level on the entire image
! IF ( my_pool_id == root_pool )
CALL mix_rho &
( rho, rhoin, mixing_beta, dr2, tr2_min, iter, nmix, conv_elec )
CALL bcast_scf_type ( rhoin, root_pool, inter_pool_comm )
CALL mp_bcast ( dr2, root_pool, inter_pool_comm )

View File

@ -11,7 +11,9 @@
! The implementation assumes that divisions of atoms among the nodes is always
! done in the same way! By doing so we can avoid to allocate the potential for
! all the atoms on all the nodes, and (most important) we don't need to
! distribute the potential among the nodes after computing it.
! distribute the potential among the nodes after computing it.
! Beware: paw_ddot, paw_potential, paw_dpotential, must be called by all
! processors of an image, or else they will hang
!
MODULE paw_onecenter
!

View File

@ -596,6 +596,10 @@ CONTAINS
!
IF (dft_is_meta()) rho_ddot = rho_ddot + tauk_ddot( rho1, rho2, gf )
IF (lda_plus_u ) rho_ddot = rho_ddot + ns_ddot(rho1,rho2)
!
! Beware: paw_ddot has a hidden parallelization on all processors
! it must be called on all processors or else it will hang
!
IF (okpaw) rho_ddot = rho_ddot + paw_ddot(rho1%bec, rho2%bec)
IF (dipfield) rho_ddot = rho_ddot + (e2/2.0_DP)* &
(rho1%el_dipole * rho2%el_dipole)*omega/fpi
@ -817,8 +821,6 @@ END FUNCTION ns_ddot
END IF
IF ( okpaw ) &
CALL mp_bcast ( rho%bec, root, comm )
! why is this one not there?
! IF ( dipfield ) CALL mp_bcast ( rho%el_dipole, root, comm )
!
END SUBROUTINE
!