- bug fix, small memory leakage

git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@6105 c92efa57-630b-4861-b058-cf58834340f0
This commit is contained in:
ccavazzoni 2009-11-04 16:24:47 +00:00
parent 4666a4efea
commit f149ff1bcc
1 changed files with 5 additions and 2 deletions

View File

@ -708,7 +708,7 @@ SUBROUTINE PAW_gcxc_potential(i, rho_lm,rho_core, v_lm, energy)
!
! GGA case
!
!omp do
!$omp do
DO ix = ix_s, ix_e
!
! WARNING: the next 2 calls are duplicated for spin==2
@ -742,7 +742,7 @@ SUBROUTINE PAW_gcxc_potential(i, rho_lm,rho_core, v_lm, energy)
egcxc_of_tid(mytid) = egcxc_of_tid(mytid) + e * rad(i%t)%ww(ix)
ENDIF
ENDDO
!omp end do
!$omp end do
!XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
ELSEIF ( nspin == 2 ) THEN
ALLOCATE( rup_vec(i%m) )
@ -830,6 +830,9 @@ SUBROUTINE PAW_gcxc_potential(i, rho_lm,rho_core, v_lm, energy)
DEALLOCATE( rho_rad )
DEALLOCATE( grad )
DEALLOCATE( grad2 )
!$omp single
deallocate(egcxc_of_tid)
!$omp end single
!$omp end parallel
!
CALL mp_sum( gc_rad, paw_comm )