[Pw_forum] 'wf_collect' question

Paolo Giannozzi giannozz at democritos.it
Fri Nov 18 13:54:38 CET 2011

On Wed, 2011-11-16 at 14:43 -0500, Lai Jiang wrote:

> When setting startingwfc = 'file' the program is supposed to read
>  wfc files from a previous run. But if the previous run uses
> 'wf_collect' =  .true. the wfc are deleted after scf and converted to
> evc.dat files at each k point and can not be used as startingwfc. It
> is really confusing to me that wf_collect does the opposite of what it
> is supposed to do.

wf_collect does what it is supposed to do: collect the various pieces
of wavefunctions, scattered across processors, into a single file (per
k-point) whose format does not depend upon the number of processors.
This is the file to be used for further processing (e.g. PDOS, phonons).

startingwfc = 'file' was introduced to restart from a previous 
interrupted run.  It may be used for other purposes as well, but
apparently this case has never been updated to read the "collected" 
file format, because nobody has ever felt the need for it. 

As a quick and dirty solution, you may just edit the part of the
code that removes the wavefunction files at the end. In 
PW/close_files.f90 remove "twfcollect" from the IF:

  !  ... close buffer/file containing wavefunctions: discard if
  !  ... wavefunctions are written in xml format, save otherwise
  IF ( lflag .AND. (twfcollect .OR. io_level < 0 )) THEN
     CALL close_buffer ( iunwfc, 'DELETE' )
     CALL close_buffer ( iunwfc, 'KEEP' )

Paolo Giannozzi, IOM-Democritos and University of Udine, Italy

More information about the users mailing list