From 7ee661b2ac144e7f1cf52fb4f9bd221bcdc430b6 Mon Sep 17 00:00:00 2001 From: sponce Date: Thu, 1 Sep 2016 11:04:14 +0000 Subject: [PATCH] Correctly allocate the ph freq w2 in case of a restart. git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@12901 c92efa57-630b-4861-b058-cf58834340f0 --- EPW/src/allocate_epwq.f90 | 3 +-- EPW/src/deallocate_epw.f90 | 3 +-- EPW/src/dynwan2bloch.f90 | 2 +- EPW/src/ephwann_shuffle.f90 | 7 ++++++- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/EPW/src/allocate_epwq.f90 b/EPW/src/allocate_epwq.f90 index ec8ca4d41..7ec81fa18 100644 --- a/EPW/src/allocate_epwq.f90 +++ b/EPW/src/allocate_epwq.f90 @@ -26,7 +26,7 @@ USE spin_orb, ONLY : lspinorb USE control_lr, ONLY : lgamma, nbnd_occ USE phcom, ONLY : evq, dvpsi, dpsi, vlocq,& - dmuxc, w2, npertx + dmuxc, npertx USE phus, ONLY : int1, int1_nc, int2, int2_so, & int4, int4_nc, int5, int5_so, becsum_nc, & alphasum, alphasum_nc, alphap @@ -79,7 +79,6 @@ ALLOCATE (eigqts ( nat)) ALLOCATE (rtau ( 3, 48, nat)) ALLOCATE (u ( 3 * nat, 3 * nat)) - ALLOCATE (w2 ( 3 * nat)) ! ALLOCATE (t (npertx, npertx, 48,3 * nat)) allocate (name_rap_mode( 3 * nat)) allocate (num_rap_mode( 3 * nat )) diff --git a/EPW/src/deallocate_epw.f90 b/EPW/src/deallocate_epw.f90 index ca806e6a7..741e0e1e1 100644 --- a/EPW/src/deallocate_epw.f90 +++ b/EPW/src/deallocate_epw.f90 @@ -23,7 +23,7 @@ !---------------------------------------------------------------------- USE phcom, ONLY : alphap, alphasum, alphasum_nc, & becsum_nc, dmuxc, dpsi,& - drc, dpsi, dyn, evq, w2, dvpsi,& + drc, dpsi, dyn, evq, dvpsi,& int5, vlocq, int2_so, int5_so USE lrus, ONLY : becp1, int3, int3_nc USE phus, ONLY : int1, int1_nc, int2, int4, int4_nc @@ -82,7 +82,6 @@ if(allocated(name_rap_mode)) deallocate (name_rap_mode) if(allocated(num_rap_mode)) deallocate (num_rap_mode) IF(ALLOCATED(dyn)) DEALLOCATE (dyn) - IF(ALLOCATED(w2)) DEALLOCATE (w2) !IF(ASSOCIATED(t)) DEALLOCATE (t) IF(ALLOCATED(epsi)) DEALLOCATE (epsi) IF(ALLOCATED(zstar)) DEALLOCATE (zstar) diff --git a/EPW/src/dynwan2bloch.f90 b/EPW/src/dynwan2bloch.f90 index 997816e8a..e6916c32b 100644 --- a/EPW/src/dynwan2bloch.f90 +++ b/EPW/src/dynwan2bloch.f90 @@ -119,7 +119,7 @@ ! after hermitian-ization ! DO jmode = 1, nmodes - DO imode = 1, jbnd + DO imode = 1, jmode champ (imode + (jmode - 1) * jmode/2 ) = & ( chf ( imode, jmode) + conjg ( chf ( jmode, imode) ) ) / 2.d0 ENDDO diff --git a/EPW/src/ephwann_shuffle.f90 b/EPW/src/ephwann_shuffle.f90 index bea9987ff..c6e1bb1f0 100644 --- a/EPW/src/ephwann_shuffle.f90 +++ b/EPW/src/ephwann_shuffle.f90 @@ -30,7 +30,7 @@ USE cell_base, ONLY : at, bg USE start_k, ONLY : nk1, nk2, nk3 USE ions_base, ONLY : nat, amass, ityp - USE phcom, ONLY : nq1, nq2, nq3, nmodes, w2 + USE phcom, ONLY : nq1, nq2, nq3, nmodes USE epwcom, ONLY : nbndsub, lrepmatf, fsthick, epwread, longrange, & epwwrite, ngaussw, degaussw, lpolar, & nbndskip, parallel_k, parallel_q, etf_mem, & @@ -126,6 +126,8 @@ !! Same but in sequential REAL(kind=DP), PARAMETER :: eps = 0.01/ryd2mev !! Tolerence + REAL(kind=DP), ALLOCATABLE :: w2 (:) + !! Interpolated phonon frequency ! COMPLEX(kind=DP), ALLOCATABLE :: epmatwe (:,:,:,:,:) !! e-p matrix in wannier basis - electrons @@ -200,6 +202,8 @@ continue ENDIF ! + ALLOCATE( w2( 3*nat) ) + ! ! determine Wigner-Seitz points ! CALL wigner_seitz2 & @@ -958,6 +962,7 @@ IF ( ALLOCATED(gamma_all) ) DEALLOCATE( gamma_all ) IF ( ALLOCATED(sigmai_all) ) DEALLOCATE( sigmai_all ) IF ( ALLOCATED(sigmai_mode) ) DEALLOCATE( sigmai_mode ) + IF ( ALLOCATED(w2) ) DEALLOCATE( w2 ) ! CALL stop_clock ( 'ephwann' ) !