mirror of https://gitlab.com/QEF/q-e.git
In allocate_nlpot arrays ns and nsnew are allocated also when lda_plus_u = .FALSE.
(see comment at lines 98-100 ). In clean_pw deallocation of g has been added. C.S. git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@342 c92efa57-630b-4861-b058-cf58834340f0
This commit is contained in:
parent
c67ca51067
commit
0c81c4f2c3
|
@ -94,13 +94,18 @@ subroutine allocate_nlpot
|
|||
allocate (qgm( ngm))
|
||||
allocate (becsum( nhm * (nhm + 1)/2, nat, nspin))
|
||||
!
|
||||
! Allocate space for Hubbard potential
|
||||
! ... Allocate space for Hubbard potential
|
||||
! ... These arrays are allocated ALWAYS even if lda_plus_u = .FALSE.
|
||||
! ... This is needed since they are passed as arguments of mix_rho
|
||||
! ... no matter lda_plus_u is .TRUE. or .FALSE. ( 23/10/2003 C.S. )
|
||||
!
|
||||
if (lda_plus_u) then
|
||||
ldim = 2 * Hubbard_lmax + 1
|
||||
allocate( ns (ldim, ldim, nspin, nat) )
|
||||
allocate( nsnew (ldim, ldim, nspin, nat) )
|
||||
endif
|
||||
! if (lda_plus_u) then
|
||||
!
|
||||
ldim = 2 * Hubbard_lmax + 1
|
||||
ALLOCATE( ns( ldim, ldim, nspin, nat ) )
|
||||
ALLOCATE( nsnew( ldim, ldim, nspin, nat ) )
|
||||
!
|
||||
! endif
|
||||
!
|
||||
! Calculate dimensions for array tab (including a possible factor
|
||||
! coming from cell contraction during variable cell relaxation/MD)
|
||||
|
|
|
@ -56,8 +56,9 @@ SUBROUTINE clean_pw
|
|||
!
|
||||
! ... arrays allocated in allocate_fft.f90 ( and never deallocated )
|
||||
!
|
||||
IF ( ALLOCATED( g ) ) DEALLOCATE( g )
|
||||
IF ( ALLOCATED( gg ) ) DEALLOCATE( gg )
|
||||
IF ( ALLOCATED( nl ) ) DEALLOCATE( nl)
|
||||
IF ( ALLOCATED( nl ) ) DEALLOCATE( nl )
|
||||
IF ( gamma_only ) THEN
|
||||
IF ( ALLOCATED( nlm ) ) DEALLOCATE( nlm )
|
||||
END IF
|
||||
|
|
Loading…
Reference in New Issue