Commit 85d48a2f authored by sponce's avatar sponce

Modification to cope with the new UtilXlib.

Also some small cosmetic changes to EPW.


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@13632 c92efa57-630b-4861-b058-cf58834340f0
parent 322baa01
......@@ -7,9 +7,11 @@ include make.libs
# use recursive definitions in Makefile to modify the PATH for modules
#
IFLAGS = -I../../include
MODFLAGS = -I../../iotk/src -I../../Modules -I../../LAXlib -I../../iotk/src \
-I../../FFTXlib -I../../PW/src -I../../LR_Modules -I../../PHonon/PH -I../../PP/src/ -I. -I../../wannier90-2.1.0/src/obj/
IFLAGS = -I../../include -I../../UtilXlib/
MODFLAGS = -I../../iotk/src -I../../UtilXlib/ -I../../Modules -I../../LAXlib -I../../iotk/src \
-I../../FFTXlib -I../../PW/src -I../../LR_Modules -I../../PHonon/PH \
-I../../PP/src/ -I. -I../../wannier90-2.1.0/src/obj/
#
# The above is in alphabetical order except when order matter during compilation
......@@ -123,12 +125,11 @@ system_mem_usage.o
PHOBJS = ../../PHonon/PH/libph.a
PWOBJS = ../../PW/src/libpw.a
###W90LIB = ../../wannier90-2.0.1/libwannier.a
W90LIB = ../../wannier90-2.1.0/libwannier.a
LRMODS = ../../LR_Modules/liblrmod.a
PWOBJS = ../../PW/src/libpw.a
QEMODS = ../../Modules/libqemod.a ../../FFTXlib/libqefft.a ../../LAXlib/libqela.a
LIBOBJS = ../../clib/clib.a ../../iotk/src/libiotk.a
LIBOBJS = ../../clib/clib.a ../../iotk/src/libiotk.a ../../UtilXlib/libutil.a
TLDEPS= bindir mods libs pw-lib pw ph
......
......@@ -16,9 +16,15 @@
!
USE phcom, ONLY : iuwfc, iudwf, fildrho, iudrho
USE mp_global, ONLY : me_pool,root_pool
USE io_epw, ONLY : iunepmatwe
USE epwcom, ONLY : etf_mem
!
implicit none
!
IF (etf_mem == 1 .OR. etf_mem == 2) THEN
CLOSE (unit = iunepmatwe, status = 'delete')
ENDIF
!
CLOSE (unit = iuwfc, status = 'keep')
CLOSE (unit = iudwf, status = 'keep')
IF (me_pool == root_pool ) THEN
......
......@@ -671,6 +671,15 @@
!
ENDIF
!
! Check Memory usage
CALL system_mem_usage(valueRSS)
!
WRITE(stdout, '(a)' ) ' ==================================================================='
WRITE(stdout, '(a,i10,a)' ) ' Memory usage: VmHWM =',valueRSS(2)/1024,'Mb'
WRITE(stdout, '(a,i10,a)' ) ' VmPeak =',valueRSS(1)/1024,'Mb'
WRITE(stdout, '(a)' ) ' ==================================================================='
WRITE(stdout, '(a)' ) ' '
!
DO iq = iq_restart, nqf
!
CALL start_clock ( 'ep-interp' )
......@@ -972,7 +981,8 @@
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 )
IF ( ALLOCATED(w2) ) DEALLOCATE( w2 )
IF ( ALLOCATED(epf17) ) DEALLOCATE( epf17 )
DEALLOCATE(cfac)
DEALLOCATE(cfacq)
DEALLOCATE(rdotk)
......
......@@ -258,6 +258,8 @@
! only be used with lpolar = .true. )
! prtgkk : Print the vertex |g| [meV]. This generates huge outputs.
! etf_mem : if 0 no optimization, if 1 less memory is used for the fine grid interpolation
! When etf_mem == 2, an additional loop is done on mode for the fine grid interpolation
! part. This reduces the memory further by a factor "nmodes".
!
CHARACTER (LEN=80) :: input_file
INTEGER :: nargs, iiarg, ierr
......
......@@ -368,7 +368,7 @@
!
ww = wmin_specfun + dble (iw-1) * dw
fermi(iw) = wgauss(-ww/eptemp, -99)
WRITE(stdout,'(2x,i7,2x,f12.4,2x,e12.5)') ik, ryd2ev * ww, a_all(iw,ik) / ryd2mev
!WRITE(stdout,'(2x,i7,2x,f12.4,2x,e12.5)') ik, ryd2ev * ww, a_all(iw,ik) / ryd2mev
!
specfun_sum = specfun_sum + a_all(iw,ik)* fermi(iw) * dw !/ ryd2mev
!
......
......@@ -21,10 +21,6 @@
! the selfenergy for one phonon at a time. Much smaller footprint on
! the disk
!
! RM 24/02/2014
! redefined the size of coskkq, vkk, vkq within the fermi windwow
! cleaned up the subroutine
!
!-----------------------------------------------------------------------
USE kinds, ONLY : DP
USE io_global, ONLY : stdout
......@@ -108,14 +104,6 @@
!! Electron-phonon matrix elements squared in Ry^2
REAL(kind=DP) :: g2_tmp
!! Electron-phonon matrix elements squared in Ry^2
REAL(kind=DP) :: coskkq(ibndmax-ibndmin+1, ibndmax-ibndmin+1)
!! $$(v_k \cdot v_{k+q}) / |v_k|^2$$
REAL(kind=DP) :: DDOT
!! Dot product function
REAL(kind=DP) :: vkk(3,ibndmax-ibndmin+1)
!! Electronic velocity $v_{nk}$
REAL(kind=DP) :: vkq(3,ibndmax-ibndmin+1)
!! Electronic velocity $v_{nk+q}$
REAL(kind=DP) :: gamma0(nmodes)
!! Phonon self-energy
REAL(kind=DP) :: ww
......@@ -217,27 +205,6 @@
ikk = 2 * ik - 1
ikq = ikk + 1
!
coskkq = 0.d0
DO ibnd = 1, ibndmax-ibndmin+1
DO jbnd = 1, ibndmax-ibndmin+1
! coskkq = (vk dot vkq) / |vk|^2 appears in Grimvall 8.20
! this is different from : coskkq = (vk dot vkq) / |vk||vkq|
! In principle the only coskkq contributing to lambda_tr are both near the
! Fermi surface and the magnitudes will not differ greatly between vk and vkq
! we may implement the approximation to the angle between k and k+q vectors also
! listed in Grimvall
!
! v_(k,i) = 1/m <ki|p|ki> = 2 * dmef (:, i,i,k)
! 1/m = 2 in Rydberg atomic units
!
vkk(:, ibnd ) = 2.0 * REAL (dmef (:, ibndmin-1+ibnd, ibndmin-1+ibnd, ikk ) )
vkq(:, jbnd ) = 2.0 * REAL (dmef (:, ibndmin-1+jbnd, ibndmin-1+jbnd, ikq ) )
IF ( abs ( vkk(1,ibnd)**2 + vkk(2,ibnd)**2 + vkk(3,ibnd)**2) .gt. 1.d-4) &
coskkq(ibnd, jbnd ) = DDOT(3, vkk(:,ibnd ), 1, vkq(:,jbnd),1) / &
DDOT(3, vkk(:,ibnd), 1, vkk(:,ibnd),1)
ENDDO
ENDDO
!
! Here we must have ef, not ef0, to be consistent with ephwann_shuffle
IF ( ( minval ( abs(etf (:, ikk) - ef) ) .lt. fsthick ) .AND. &
( minval ( abs(etf (:, ikq) - ef) ) .lt. fsthick ) ) THEN
......@@ -312,7 +279,8 @@
!weight = wkf (ikk) * (wgkk - wgkq) * &
! aimag ( cone / ( ekq - ekk - ww + ci * degaussw0 ) )
!
! More stable
! More stable:
! Analytical im. part
weight = pi * wkf (ikk) * (wgkk - wgkq) * &
w0gauss ( (ekq - ekk - ww) / degaussw0, 0) / degaussw0
!
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment