Commit 4a757b47 authored by sponce's avatar sponce

Support for USPP in EPW.



git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@13599 c92efa57-630b-4861-b058-cf58834340f0
parent 496d4f13
......@@ -18,7 +18,7 @@
!! the other processors
!!
#if defined(__MPI)
USE phcom, ONLY : zue, trans, tr2_ph, recover, nmix_ph, niter_ph, &
USE phcom, ONLY : zue, trans, tr2_ph, nmix_ph, niter_ph, &
lnscf, ldisp, fildvscf, fildrho, epsil, alpha_mix
USE epwcom, ONLY : epexst, epbwrite, ep_coupling, &
eliashberg, elecselfen, eig_read, &
......@@ -73,7 +73,6 @@
CALL mp_bcast (ephwrite, meta_ionode_id, world_comm)! RM
CALL mp_bcast (band_plot, meta_ionode_id, world_comm)! RM
CALL mp_bcast (vme, meta_ionode_id, world_comm)!
CALL mp_bcast (recover, meta_ionode_id, world_comm)!
CALL mp_bcast (epbread, meta_ionode_id, world_comm) !
CALL mp_bcast (epbwrite, meta_ionode_id, world_comm) !
! CALL mp_bcast (tphases, meta_ionode_id, world_comm) !
......
......@@ -14,16 +14,13 @@
SUBROUTINE close_epw
!------------------------------------------------------------------
!
USE phcom, ONLY : iuwfc, iudwf, iudrhous, iudvkb3, fildrho, iudrho
USE uspp, ONLY : okvan
USE phcom, ONLY : iuwfc, iudwf, fildrho, iudrho
USE mp_global, ONLY : me_pool,root_pool
!
implicit none
!
CLOSE (unit = iuwfc, status = 'keep')
CLOSE (unit = iudwf, status = 'keep')
IF(okvan) CLOSE(unit = iudrhous, status = 'delete')
IF(okvan) CLOSE (unit = iudvkb3, status = 'delete')
IF (me_pool == root_pool ) THEN
IF (fildrho.ne.' ') CLOSE (unit = iudrho, status = 'keep')
ENDIF
......
......@@ -25,20 +25,18 @@
!!
!
USE ions_base, ONLY : nat, ityp, ntyp => nsp
USE io_files, ONLY : prefix, tmp_dir
USE io_global, ONLY : stdout
USE io_epw, ONLY : iurecover
USE pwcom, ONLY : lspinorb, nspin, domag
USE cell_base, ONLY : tpiba2, omega, tpiba
USE gvect, ONLY : ngm, gg, nl, g, eigts1, eigts2, eigts3, mill
USE scf, ONLY : v, vltot
USE noncollin_module, ONLY : noncolin
USE kinds, ONLY : DP
USE phcom, ONLY : int1, int2, int4, int5, recover, &
USE phcom, ONLY : int1, int2, int4, int5, &
int5_so, vlocq, int4_nc
USE qpoint, ONLY : xq, eigqts
USE uspp_param, ONLY : upf, lmaxq, nh
USE mp_global, ONLY : my_pool_id, npool, intra_pool_comm
USE mp_global, ONLY : intra_pool_comm
USE mp, ONLY : mp_sum
USE uspp, ONLY : okvan
USE fft_base, ONLY : dfftp
......@@ -65,17 +63,13 @@
! the augmentation function at G
complex(kind=DP), POINTER :: qgmq (:)
! the augmentation function at q+G
character (len=256) :: tempfile
character (len=3) :: filelab
logical :: exst
!
IF (.not.okvan) RETURN
! if (recover.and..not.ldisp) return
!
nspin0=nspin
IF (nspin==4.and..not.domag) nspin0=1
!
CALL start_clock ('dvanqq2')
int1(:,:,:,:,:) = (0.d0, 0.d0)
int2(:,:,:,:,:) = (0.d0, 0.d0)
......@@ -126,24 +120,6 @@
!
fact1 = CMPLX (0.d0, - tpiba * omega, kind=DP)
!
tempfile = trim(tmp_dir) // trim(prefix) // '.recover'
#if defined(__MPI)
CALL set_ndnmbr (0,my_pool_id+1,1,npool,filelab)
tempfile = trim(tmp_dir) // trim(prefix) // '.recover' // filelab
#endif
!
IF (recover) THEN
WRITE (stdout,*) " Using recover mode for USPP"
inquire(file = tempfile, exist=exst)
IF (.not. exst ) CALL errore( 'dvanqq2', 'recover files not found ', 1)
OPEN (iurecover, file = tempfile, form = 'unformatted')
IF (noncolin) THEN
READ (iurecover) int1, int2, int4, int5
ELSE
READ (iurecover) int1, int2
ENDIF
CLOSE(iurecover)
ELSE
DO ntb = 1, ntyp
IF (upf(ntb)%tvanp ) THEN
ijh = 0
......@@ -254,14 +230,6 @@
CALL mp_sum( int2, intra_pool_comm )
call mp_sum( int4, intra_pool_comm )
call mp_sum( int5, intra_pool_comm )
OPEN (iurecover, file = tempfile, form = 'unformatted')
IF (noncolin) THEN
WRITE (iurecover) int1, int2, int4, int5
ELSE
WRITE (iurecover) int1, int2
ENDIF
CLOSE(iurecover)
ENDIF
IF (noncolin) THEN
CALL set_int12_nc(0)
int4_nc = (0.d0, 0.d0)
......
......@@ -26,7 +26,7 @@
iufilgap, iospectral_sup, iua2ftrfil, iufilgapFS, iufillambdaFS, &
iuwanep, iuwane, iunukk, iudvscf
PUBLIC :: epwdata, iundmedata, iunvmedata, iunksdata, iudyn, iukgmap, iuepb,&
iurecover, iufilfreq, iufilegnv, iufileph, iufilkqmap, &
iufilfreq, iufilegnv, iufileph, iufilkqmap, &
iufilikmap, iueig, iunepmatwp, iunepmatwe, iunkf, iunqf, &
iufileig, iukmap, crystal, iunifc, iunimem
PUBLIC :: iuwinfil, iun_plot, iuukk, iuprojfil !, iummn
......@@ -76,7 +76,6 @@
INTEGER :: iunksdata = 104 ! Hamiltonian in wannier basis
INTEGER :: iuepb = 105 ! Electron-phonon matrix in Bloch
! representation [.epb]
INTEGER :: iurecover = 107 ! Dvanqq2 recovery file
INTEGER :: iufilfreq = 108 ! Phonon frequency from a previous epw run
! [.freq]
INTEGER :: iufilegnv = 109 ! Eigenvalues from a previous epw run [.egnv]
......
......@@ -20,13 +20,12 @@
!-----------------------------------------------------------------------
use mp_global, ONLY : me_pool
use io_files, ONLY : prefix, diropn, seqopn
use units_ph, ONLY : iudrhous, lrdrhous, iudvkb3, iuwfc
USE uspp, ONLY : nkb, okvan
use units_ph, ONLY : iuwfc
! nwordwfc is the record length for the direct-access file containing
! wavefunctions
USE wvfct, ONLY : nbnd, npwx
USE noncollin_module, ONLY : npol,nspin_mag
use phcom, ONLY : lrwfc, lrdvkb3, lrdrho
use phcom, ONLY : lrwfc, lrdrho
USE fft_base, ONLY : dfftp
!
implicit none
......@@ -65,22 +64,6 @@
! END IF
!ENDIF
!
!
! In the USPP case we also need a file in order to store derivatives
! of kb projectors
!
IF (okvan) THEN
iudvkb3 = find_free_unit()
lrdvkb3 = 2 * npwx * nkb * 3
CALL diropn (iudvkb3, 'dvkb3', lrdvkb3, exst)
!
iudrhous = find_free_unit()
! RM - nspin corresponds to nspin_mag according to QE5.0.3
! - this will have to change when we move to QE5.0.3
lrdrhous = 2 * dfftp%nnr * nspin_mag
CALL diropn (iudrhous, 'prd', lrdrhous, exst)
ENDIF
!
RETURN
!
end subroutine openfilepw
......@@ -15,7 +15,7 @@
!-----------------------------------------------------------------------
!!
!! Close all files and synchronize processes before stopping.
!! Called at the end of the run (removes 'recover')
!! Called at the end of the run
!!
use mp, ONLY : mp_end, mp_barrier
USE mp_global, ONLY : inter_pool_comm, mp_global_end
......
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