Some cleanup of I/O

For one k-point the wavefunction was saved to disk in distributed form
at each ionic step. This is unnecessary and wasteful.
This commit is contained in:
Paolo Giannozzi 2019-05-09 14:49:13 +02:00
parent d0a7647e45
commit e6823a253d
4 changed files with 13 additions and 12 deletions

View File

@ -119,7 +119,6 @@ SUBROUTINE readxmlfile_vasp(iexch,icorr,igcx,igcc,inlc,ierr)
USE io_files, ONLY : tmp_dir, prefix, iunpun, nwordwfc, iunwfc
USE io_global, ONLY : stdout
USE noncollin_module, ONLY : noncolin, npol, nspin_lsda, nspin_mag, nspin_gga
USE pw_restart_new, ONLY : pw_readschema_file, init_vars_from_schema
USE qes_types_module, ONLY : output_type, parallel_info_type, general_info_type, input_type
USE qes_libs_module, ONLY : qes_reset
USE io_rho_xml, ONLY : read_scf

View File

@ -17,7 +17,8 @@ SUBROUTINE punch( what )
! for nks=1, wavefunctions in plain binary format
! (see why in comments below)
! ... (for intermediate or incomplete results)
! ... what = 'init-config' write xml data file only excluding final results
! ... what = 'config-nowf' write xml data file iand charge density only
! ... what = 'config-init' write xml data file only excluding final results
! ... (for dry run, can be called at early stages)
!
USE io_global, ONLY : stdout, ionode
@ -43,7 +44,7 @@ SUBROUTINE punch( what )
!
CHARACTER(LEN=*), INTENT(IN) :: what
!
LOGICAL :: exst, wf_collect
LOGICAL :: exst, only_init, wf_collect
CHARACTER(LEN=320) :: cp_source, cp_dest
INTEGER :: cp_status, nt, inlc
!
@ -63,7 +64,8 @@ SUBROUTINE punch( what )
! ... wf_collect keeps track whether wfcs are written in portable format
!
wf_collect = ( TRIM(what) == 'all' )
CALL pw_write_schema( what, wf_collect )
only_init = ( TRIM(what) == 'config-init' )
CALL pw_write_schema( only_init, wf_collect )
!
! ... charge density - also writes rho%ns if lda+U and rho%bec if PAW
! ... do not overwrite the scf charge density with a non-scf one

View File

@ -43,11 +43,12 @@ MODULE pw_restart_new
!
CONTAINS
!------------------------------------------------------------------------
SUBROUTINE pw_write_schema( what, wf_collect )
SUBROUTINE pw_write_schema( only_init, wf_collect )
!------------------------------------------------------------------------
!
! what = 'init-config': write only variables that are known after the
! initial steps of initialization (e.g. structure)
! only_init = T write only variables that are known after the
! initial steps of initialization (e.g. structure)
! = F write the complete xml file
! wf_collect = T if final wavefunctions in portable format are written,
! F if wavefunctions are either not written or are written
! in binary non-portable form (for checkpointing)
@ -139,8 +140,7 @@ MODULE pw_restart_new
!
IMPLICIT NONE
!
CHARACTER(LEN=*), INTENT(IN) :: what
LOGICAL, INTENT(IN) :: wf_collect
LOGICAL, INTENT(IN) :: only_init, wf_collect
!
CHARACTER(LEN=20) :: dft_name
CHARACTER(LEN=256) :: dirname
@ -489,7 +489,7 @@ MODULE pw_restart_new
!
! skip if not yet computed
!
IF ( TRIM(what) == "init-config" ) GO TO 10
IF ( only_init ) GO TO 10
!
IF ( .NOT. ( lgauss .OR. ltetra )) THEN
occupations_are_fixed = .TRUE.

View File

@ -109,7 +109,7 @@ SUBROUTINE run_pwscf ( exit_status )
CALL summary()
CALL memory_report()
CALL qexsd_set_status(255)
CALL punch( 'init-config' )
CALL punch( 'config-init' )
exit_status = 255
RETURN
ENDIF
@ -186,7 +186,7 @@ SUBROUTINE run_pwscf ( exit_status )
!
IF ( idone <= nstep .AND. .NOT. conv_ions ) THEN
CALL qexsd_set_status(255)
CALL punch( 'config' )
CALL punch( 'config-nowf' )
END IF
!
IF (dft_is_hybrid() ) CALL stop_exx()