Merge branch 'sum_band_again' into 'develop'

In some cases dynmat.x must be run with mpirun or similar

See merge request QEF/q-e!2390
This commit is contained in:
giannozz 2024-07-07 17:57:59 +00:00
commit 4417811b84
2 changed files with 5 additions and 9 deletions

View File

@ -195,8 +195,6 @@ SUBROUTINE sum_band()
CALL sum_band_k()
!
ENDIF
!$acc update host(rho%of_r)
!$acc exit data delete(rho%of_r, rho)
!
IF (noncolin) THEN
!$acc exit data delete(psic_nc)
@ -216,13 +214,15 @@ SUBROUTINE sum_band()
!
! ... sum charge density over pools (distributed k-points) and bands
!
!$acc update host(rho%of_r)
!$acc exit data delete(rho%of_r)
!$acc exit data delete(rho)
CALL mp_sum( rho%of_r, inter_pool_comm )
CALL mp_sum( rho%of_r, inter_bgrp_comm )
IF (sic) then
CALL mp_sum( rho%pol_r, inter_pool_comm )
CALL mp_sum( rho%pol_r, inter_bgrp_comm )
END IF
IF ( noncolin .AND. .NOT. domag ) rho%of_r(:,2:4)=0.D0
!
! ... bring the unsymmetrized rho(r) to G-space
!
@ -733,10 +733,6 @@ SUBROUTINE sum_band()
!
IF (domag) THEN
CALL get_rho_domag( rho%of_r(:,:), dffts%nnr, w1, psic_nc(1:,1:) )
ELSE
!$acc kernels
rho%of_r(:,2:4) = 0.0_DP
!$acc end kernels
ENDIF
!
ENDIF

View File

@ -1,6 +1,6 @@
#!/bin/bash
#
# Copyright (C) 2001 Quantum ESPRESSO
# Copyright (C) 2024 Quantum ESPRESSO
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@ -93,6 +93,6 @@ then
elif [[ "$1" == "9" ]]
then
echo "Running DYNMAT ... "
${ESPRESSO_ROOT}/bin/dynmat.x < $2 > $3 2> $4
${PARA_PREFIX} ${ESPRESSO_ROOT}/bin/dynmat.x < $2 > $3 2> $4
fi