mirror of https://gitlab.com/QEF/q-e.git
Stupid bug with startingwfc='file' and wf_collect=.true. - yet another case in
which a useless check may become harmful. Thanks to Jia Chen. git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@12913 c92efa57-630b-4861-b058-cf58834340f0
This commit is contained in:
parent
2a420c8192
commit
05e60f162c
|
@ -38,6 +38,8 @@ Fixed in 6.0 version:
|
|||
* turboTDDFPT: Problem if empty states were also computed.
|
||||
* NEB did not recognize its own input if white spaces were present at the
|
||||
right of NEB cards (commit 12816)
|
||||
* startingwfc='file' with wavefunctions in collected format could yield a
|
||||
bogus "unit not open" error (commit 12908)
|
||||
* EPW: Correct Wannier localization with spinors
|
||||
* EPW: Electronic velocities in the local approximation now works correctly
|
||||
with skipped bands and spin-orbit coupling
|
||||
|
|
|
@ -26,7 +26,7 @@ SUBROUTINE divide_et_impera( nkstot, xk, wk, isk, nks )
|
|||
INTEGER, INTENT(IN) :: nkstot
|
||||
! total number of k-points
|
||||
INTEGER, INTENT(INOUT) :: isk(nkstot)
|
||||
! spin index of each kpoint (used in LSDA claculations)
|
||||
! spin index of each kpoint (used in LSDA calculations only)
|
||||
REAL (DP), INTENT(INOUT) :: xk(3,nkstot), wk(nkstot)
|
||||
! k-points (on all processors)
|
||||
! k-point weights
|
||||
|
|
|
@ -2334,14 +2334,6 @@ MODULE pw_restart
|
|||
!
|
||||
ierr = 0
|
||||
!
|
||||
IF ( iunwfc > 0 ) THEN
|
||||
!
|
||||
INQUIRE( UNIT = iunwfc, OPENED = opnd )
|
||||
!
|
||||
IF ( .NOT. opnd ) CALL errore( 'read_wavefunctions', &
|
||||
& 'wavefunctions unit (iunwfc) is not opened', 1 )
|
||||
END IF
|
||||
!
|
||||
iks = global_kpoint_index (nkstot, 1)
|
||||
ike = iks + nks - 1
|
||||
!
|
||||
|
|
|
@ -136,7 +136,7 @@ MODULE pw_restart_new
|
|||
CHARACTER(LEN=20) :: dft_name
|
||||
CHARACTER(LEN=256) :: dirname
|
||||
CHARACTER(LEN=80) :: vdw_corr_
|
||||
INTEGER :: i, ig, ngg, ierr, ipol
|
||||
INTEGER :: i, ig, ngg, ipol
|
||||
INTEGER :: npwx_g, ispin, inlc
|
||||
INTEGER, ALLOCATABLE :: ngk_g(:)
|
||||
LOGICAL :: lwfc, lrho, lxsd, occupations_are_fixed
|
||||
|
@ -440,7 +440,7 @@ MODULE pw_restart_new
|
|||
!
|
||||
IMPLICIT NONE
|
||||
!
|
||||
INTEGER :: i, ig, ngg, ierr, ipol, ispin
|
||||
INTEGER :: i, ig, ngg, ipol, ispin
|
||||
INTEGER :: ik, ik_g, ike, iks, npw_g, npwx_g
|
||||
INTEGER, EXTERNAL :: global_kpoint_index
|
||||
INTEGER, ALLOCATABLE :: ngk_g(:)
|
||||
|
@ -1067,7 +1067,7 @@ MODULE pw_restart_new
|
|||
!
|
||||
IF (input_obj%control_variables%wf_collect) THEN
|
||||
twfcollect = input_obj%control_variables%wf_collect
|
||||
CALL read_collected_to_evc(dirname, ierr )
|
||||
CALL read_collected_to_evc(dirname )
|
||||
END IF
|
||||
END IF
|
||||
IF ( lsymm ) THEN
|
||||
|
@ -2067,13 +2067,13 @@ MODULE pw_restart_new
|
|||
END SUBROUTINE readschema_band_structure
|
||||
!
|
||||
!------------------------------------------------------------------------
|
||||
SUBROUTINE read_collected_to_evc( dirname, ierr )
|
||||
SUBROUTINE read_collected_to_evc( dirname )
|
||||
!------------------------------------------------------------------------
|
||||
!
|
||||
! ... This routines reads wavefunctions from the new file format and
|
||||
! ... writes them into the old format
|
||||
!
|
||||
USE control_flags, ONLY : twfcollect, lkpoint_dir
|
||||
USE control_flags, ONLY : twfcollect
|
||||
USE lsda_mod, ONLY : nspin, isk
|
||||
USE klist, ONLY : nkstot, wk, nks, xk, ngk, igk_k
|
||||
USE wvfct, ONLY : npw, npwx, g2kin, et, wg, nbnd
|
||||
|
@ -2092,7 +2092,6 @@ MODULE pw_restart_new
|
|||
IMPLICIT NONE
|
||||
!
|
||||
CHARACTER(LEN=*), INTENT(IN) :: dirname
|
||||
INTEGER, INTENT(OUT) :: ierr
|
||||
!
|
||||
CHARACTER(LEN=2), DIMENSION(2) :: updw = (/ 'up', 'dw' /)
|
||||
CHARACTER(LEN=320) :: filename
|
||||
|
@ -2108,18 +2107,6 @@ MODULE pw_restart_new
|
|||
!
|
||||
IF ( .NOT. twfcollect ) RETURN
|
||||
!
|
||||
! The ierr output var is actually not given any value
|
||||
! except this initialization
|
||||
!
|
||||
ierr = 0
|
||||
IF ( iunwfc > 0 ) THEN
|
||||
!
|
||||
INQUIRE( UNIT = iunwfc, OPENED = opnd )
|
||||
!
|
||||
IF ( .NOT. opnd ) CALL errore( 'read_wavefunctions', &
|
||||
& 'wavefunctions unit (iunwfc) is not opened', 1 )
|
||||
END IF
|
||||
!
|
||||
iks = global_kpoint_index (nkstot, 1)
|
||||
ike = iks + nks - 1
|
||||
!
|
||||
|
|
|
@ -78,9 +78,7 @@ SUBROUTINE read_file()
|
|||
!
|
||||
#ifdef __XSD
|
||||
dirname = TRIM( tmp_dir ) // TRIM( prefix ) // '.save'
|
||||
IF ( twfcollect ) CALL read_collected_to_evc ( TRIM ( dirname ) , ierr )
|
||||
IF ( ierr /= 0 ) CALL errore ( 'read_collected_to_evc', 'failed to read and redistribute '// &
|
||||
'wave functions', ierr )
|
||||
IF ( twfcollect ) CALL read_collected_to_evc ( TRIM ( dirname ))
|
||||
#else
|
||||
CALL pw_readfile( 'wave', ierr )
|
||||
#endif
|
||||
|
|
|
@ -77,7 +77,7 @@ SUBROUTINE wfcinit()
|
|||
IF ( ierr == 0 ) THEN
|
||||
twfcollect_file = input_obj%control_variables%wf_collect
|
||||
dirname = TRIM( tmp_dir ) // TRIM( prefix ) // '.save'
|
||||
IF ( twfcollect_file ) CALL read_collected_to_evc(dirname, ierr )
|
||||
IF ( twfcollect_file ) CALL read_collected_to_evc(dirname )
|
||||
END IF
|
||||
CALL qes_reset_input ( input_obj )
|
||||
DEALLOCATE ( input_obj )
|
||||
|
|
Loading…
Reference in New Issue