[Pw_forum] Modification of sort.f90 in v-3.0

Paolo Giannozzi giannozz at nest.sns.it
Mon Apr 3 22:27:00 CEST 2006


On Thursday 30 March 2006 11:37, David Prendergast wrote:

> Please note that there is a significant change to the subroutine
> hpsort_eps in the espresso-3.0 distribution with respect to previous
> versions. (look in $ESPRESSO/flib/sort.f90)
>
> This routine is used in ordering the list of G-vectors by magnitude
> ($ESPRESSO/PW/ggen.f90) and is important for those who wish to know the
> mapping between G-vectors and wave function coefficients, as stored in
> the .save file. 
> [...] 
> Fixing this bug is a definite improvement, however, it would be good to 
> list such a major change in the log files provided in the directory
> $ESPRESSO/Doc/.  This would allow users to more effectively update their
> own tools between new releases of espresso.

the change of ordering you mention was not especially advertised 
because it was not expected to affect anybody. The safe way to 
read data produced by espresso is (or rather, was) to use the 
postprocessing codes, modifying them if necessary to perform 
the desired calculations. If you write your own tools, you are always 
exposed to the risk of unexpected changes of the file format.

[ A true story; years ago, during a period spent at IBM Zurich, I
  tried to read data that had been produced during a preceding stay.
  The executable that was reading the data was the same that had
  produced them, but I got meaningless results. Finally I found that
  the ordering of G-vectors in the data file was not the same of what
  I was obtaining. Apparently the essl library, used by that code 
  version for sorting, had been updated and didn't produce any 
  longer the same ordering of G-shells ]

You won't be pleased to learn that in the new version of espresso
the format of the output data file is completely different, but the 
new format will be much easier to parse and to read, especially 
for those who know nothing about the internals of espresso. The
goal is to make data exchange easier than it is now. 

Paolo
-- 
Paolo Giannozzi             e-mail:  giannozz at nest.sns.it
Scuola Normale Superiore    Phone:   +39/050-509876, Fax:-563513 
Piazza dei Cavalieri 7      I-56126 Pisa, Italy



More information about the users mailing list