[Wien] Single precision corruption, cross platforms/compilers ?

Torsten Andersen thor at physik.uni-kl.de
Mon Mar 7 08:53:56 CET 2005


Dear John,

It is well known that rounding errors come into play when the 
optimization is increased, and I would not expect to get the exact same 
solution on different architectures before you have a "converged" 
calculation.

By converged I do not mean that the scf cycle converged :-) It is 
possible due to rounding errors to have a slightly different density in 
the first cycles, and this affects the mixing, the next cycle, etc.

Is your basis big enough? I believe that the standard settings for 
calculations with W are too small (RMT*kmax should be about 9). Is it 
converged with respect to the k-points? Also, "-ec anynumber" might be 
too soft a convergence criterion for the scf cycle - it just means that 
two consecutive cycles should be less than "anynumber" away from each 
other in the total energy. Is the charge converged?

BTW, default reals and complexes are 8-byte real and 16-byte complex 
already, so it shouldn't really give you any difference unless the -r8 
means something in addition in your compilers. I know for sure that both 
Compaq (Digital) Fortran and IBM xlf do some tradeoffs in speed versus 
accuracy at the higher optimization levels (loop unrolling, code 
reordering, etc.), and you might need to add a "-qstrict" (IBM) or 
something similar in order to keep the semantics of the program stable.

What is the difference with, say, RMT*kmax=9 and about 500 k-points? 
Needless to say, probably, but the Gamma-point should be included in 
your k-point sampling.

Best regards,
Torsten Andersen.

John Pask wrote:
> Dear Wien developers/users,
> 
> I have found different total energies for the same calculation, depending 
> on compilation options. Which raises (at least) the question, which is 
> right? The total energies are different on the order of 0.2 mRy per atom 
> depending on compilation options. 
> 
> I installed the latest version (WIEN2k_05.2) and compiled with all default
> parameters (in siteconfig), then added the -r8 option to extend precision
> of default reals/complexes (as is frequently done to rectify inadvertent
> single precision constants/declarations). I checked different compilers
> (intel and Compaq) and platforms (Linux PC and Compaq unix alpha) and
> found consistent differences in all cases between total energies produced
> by r8-compiled codes and default-compiled codes.
> 
> For example, I found the following total energies for W in various 
> structures on Linux PC with ifort 8, mkl 7:
> 
>       defaults      -r8           diff
> bcc  -32332.244753 -32332.244935  0.000182
> tri  -32332.126852 -32332.127035  0.000183
> tri2 -64664.490420 -64664.490756  0.000336
> 
> [bcc = bcc structure, tri = 1-atom triclinic, tri2 = 2-atom triclinic]
> 
> The above runs were executed using run_lapw -ec .000001 -in1new 3 -i 60 to
> achieve thorough SCF convergence in all cases (which was verified). For
> each structure, the default and -r8 calculations were executed starting
> from the same input files (==> same XC, RKmax, Gmax, k-points, etc.). The
> only difference was the compilation options used to create the
> executables.
> 
> Obviously, there are number of implications for an error/uncertainty of 
> this order. Any suggestions as to the cause(s) and remedies, and which (if 
> either) answer is correct would be most appreciated. (I have appended some 
> of the relevant bcc input files below, in case they are of interest.)
> 
> Thanks for your help,
> 
> John
> 
> --------------------------------------
> Dr. John E. Pask
> Lawrence Livermore National Laboratory
> University of California
> P.O. Box 808, L-045
> Livermore, CA 94551 USA
> 
> ========================== bcc files ======================
> .struct file:
> bcc
> B   LATTICE,NONEQUIV.ATOMS:  1
> MODE OF CALC=RELA unit=bohr
>   5.970000  5.970000  5.970000 90.000000 90.000000 90.000000
> ATOM   1: X=0.00000000 Y=0.00000000 Z=0.00000000
>           MULT= 1          ISPLIT= 2
> W          NPT=  781  R0=0.00000500 RMT=    2.5000   Z: 74.0
> LOCAL ROT MATRIX:    1.0000000 0.0000000 0.0000000
>                      0.0000000 1.0000000 0.0000000
>                      0.0000000 0.0000000 1.0000000
>   48      NUMBER OF SYMMETRY OPERATIONS
>  1 0 0 0.0000000
>  0-1 0 0.0000000
>  0 0-1 0.0000000
> [ rest of 48 ops omitted ....]
> 
> .in0 file:
> TOT   13     (5...CA-LDA, 13...PBE-GGA, 14...PW2-GGA)
> NR2V      (R2V)
> 
> .in1 file:
> WFFIL        (WFPRI, SUPWF)
>   7.00       10    4 (R-MT*K-MAX; MAX L IN WF, V-NMT
>  .66740   7   0      global e-param with N other choices, napw
>  0    0.565     0.000 CONT 1
>  0   -4.439     0.000 CONT 1
>  1    0.738     0.000 CONT 1
>  1   -1.815     0.000 CONT 1
>  2    0.775     0.000 CONT 1
>  3    0.825     0.000 CONT 1
>  3   -1.077     0.000 CONT 1
> K-VECTORS FROM UNIT:4   -7.0       1.5      emin/emax window
> 
> .in2 file:
> TOT             (TOT,FOR,QTL,EFG,FERMI)
>       -9.0      28.0 0.50 0.05                EMIN, NE, ESEPERMIN, ESEPER0
> TETRA    0.000          (GAUSS,ROOT,TEMP,TETRA,ALL      eval)
>   0 0  4 0  4 4  6 0  6 4
>  14.          GMAX
> NOFILE        FILE/NOFILE  write recprlist
> 
> .inm file:
> BROYD  0.0   YES  (BROYD/PRATT, extra charge (+1 for additional e), norm)
> 0.10            mixing FACTOR for BROYD/PRATT scheme
> 0.50  1.50      PW and CLM-scaling factors
> 
> _______________________________________________
> Wien mailing list
> Wien at zeus.theochem.tuwien.ac.at
> http://zeus.theochem.tuwien.ac.at/mailman/listinfo/wien
> 

-- 
Dr. Torsten Andersen        TA-web: http://deep.at/myspace/
AG Hübner, Department of Physics, Kaiserslautern University
http://cmt.physik.uni-kl.de    http://www.physik.uni-kl.de/

Symposium on Excited-state properties of solids, Mannheim 2005:
See: http://cmt.physik.uni-kl.de/XSM05/ Registration is open.




More information about the Wien mailing list