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

Peter Blaha pblaha at zeus.theochem.tuwien.ac.at
Mon Mar 7 11:07:11 CET 2005


Hi,

If your information in your mail is correct (struct and input files), I 
would not worry about a tenth of a mRy, but more about several mRy.

My total energy for bcc W is     -32332.2513
(For the parameter you specified in your mail)
I do not specify more digits, because these numbers depend on the k-mesh
(which you did not specify), but these 3-4 digits are correct for any mesh
>1000 k-points.

So first you should find out why your number is so different.

About numerical problems: I just crosschecked, that WIEN2k_05 with an
Intel P4 with ifc7.0, mkl 7.0, -FR -mp1 -w -prec_div -pc80 -pad -ip -DINTEL_VML
(I think these are the recommended options of siteconfig)

yields identical total energies (up to mycro Ry) than an old WIEN2k_03 on
an (old) IBM SP3, xlf90, essl,   -O3 -qarch=pwr3

WIEN2k (at least in the scf programs) is pretty consistent with double 
precission (and -r8 should not make much of a difference unless -r8
implies also something else, see below !!!) and also
optimization due to loop rearrangement,... usually is not critical.
I do not believe that it is a "single precission" issue.

However, many compiler have options (or defaults) which reduce the
accuracy of some floating point operations (or trig.fuctions) (to gain speed). 
I'm to lazy to look it up again, but as far as
I can remember, you can "speed-up" the programs when you omitt or modify
some of iforts  compiler options, and depending on your compiler installation,
these options might even be the default!

Please check the compiler documentation and apply first the IEEE standard
(or "strict" or -O0 or whatever applies to your compiler). Once you
have a benchmark number, you may increase "optimization" and gain lots
of speed, but always crosscheck and compare the results.

Regards

> 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
> 


                                      P.Blaha
--------------------------------------------------------------------------
Peter BLAHA, Inst.f. Materials Chemistry, TU Vienna, A-1060 Vienna
Phone: +43-1-58801-15671             FAX: +43-1-58801-15698
Email: blaha at theochem.tuwien.ac.at    WWW: http://info.tuwien.ac.at/theochem/
--------------------------------------------------------------------------




More information about the Wien mailing list