QMCPACK / qmcpack

Main repository for QMCPACK, an open-source production level many-body ab initio Quantum Monte Carlo code for computing the electronic structure of atoms, molecules, and solids with full performance portable GPU support
http://www.qmcpack.org
Other
295 stars 138 forks source link

Release 3.8.0 AoS build VMC energy evaluated incorrectly #1995

Closed aannabe closed 4 years ago

aannabe commented 4 years ago

Si primitive cell in the diamond structure was evaluated without Jastrow using VMC at k=(0,0,0). 3.8.0 AoS VMC energy (most likely due to LocalPotential part) shows dependence on time-step!

gs_noj  series 0 (time-step 2.0)
  LocalEnergy           =          -7.17459 +/-          0.00024    1.0 
  Variance              =            0.8321 +/-           0.0046    1.5 
  Kinetic               =           4.14627 +/-          0.00036    1.2 
  LocalPotential        =         -11.32086 +/-          0.00056    1.8 
  AcceptRatio           =          0.455069 +/-         0.000021    1.0 

gs_noj  series 1 (time-step 1.0)
  LocalEnergy           =          -7.18125 +/-          0.00029    1.0 
  Variance              =            0.8291 +/-           0.0050    1.0 
  Kinetic               =           4.14707 +/-          0.00033    1.0 
  LocalPotential        =         -11.32832 +/-          0.00045    1.0 
  AcceptRatio           =          0.693160 +/-         0.000022    1.0 

Note that kinetic energies are consistent, so this likely due to a bug in the evaluation of potential energy. Switching to SoA 3.8.0 gives:

gs_noj  series 6 (time-step 2.0)
  LocalEnergy           =          -7.18168 +/-          0.00037    1.2 
  Variance              =            0.8422 +/-           0.0093    1.0 
  Kinetic               =           4.14671 +/-          0.00048    1.5 
  LocalPotential        =         -11.32839 +/-          0.00064    1.8 
  AcceptRatio           =          0.330954 +/-         0.000031    1.1 

gs_noj  series 7 (time-step 1.0)
  LocalEnergy           =          -7.18184 +/-          0.00032    1.0 
  Variance              =             0.857 +/-            0.024    1.1 
  Kinetic               =           4.14675 +/-          0.00043    1.0 
  LocalPotential        =         -11.32859 +/-          0.00053    1.0 
  AcceptRatio           =          0.462017 +/-         0.000025    1.0 

AoS 3.6.0:

gs_noj  series 10 (time-step 2.0)
  LocalEnergy           =          -7.18133 +/-          0.00025    1.0 
  Variance              =            0.8270 +/-           0.0033    1.0 
  Kinetic               =           4.14643 +/-          0.00032    1.0 
  LocalPotential        =         -11.32776 +/-          0.00040    1.0 
  AcceptRatio           =          0.455099 +/-         0.000021    1.0 

gs_noj  series 11 (time-step 1.0)
  LocalEnergy           =          -7.18169 +/-          0.00026    1.0 
  Variance              =             0.878 +/-            0.030    1.0 
  Kinetic               =           4.14716 +/-          0.00028    1.0 
  LocalPotential        =         -11.32885 +/-          0.00037    1.1 
  AcceptRatio           =          0.693157 +/-         0.000019    1.2 
prckent commented 4 years ago

Ugh. Can you use the SoA version for your work or is there something in the AoS version that you need that has not been ported over? SoA is the default now and AoS will be deleted soon.

aannabe commented 4 years ago

I need some observables that are not implemented in SoA yet.

prckent commented 4 years ago

Please tell us which ones. We are serious about deleting the AoS code.

aannabe commented 4 years ago

S(k) and n(k) (momentum distribution). This issue could be closed if there are no further intentions developing AoS code.

prckent commented 4 years ago

@aannabe I noticed that your SoA VMC runs also show very different acceptance ratios than the reference. If you have time, please can you check independent runs with different time steps etc. and double check that no files have been mixed, that equilibration is long enough etc.

aannabe commented 4 years ago

@prckent Running independently using the same input except for time-step:

time-step=2.0
gs_noj  series 0 
  LocalEnergy           =          -7.17399 +/-          0.00022    1.1 
  Variance              =            0.8350 +/-           0.0035    1.0 
  Kinetic               =           4.14701 +/-          0.00029    1.0 
  LocalPotential        =         -11.32100 +/-          0.00034    1.0 
  AcceptRatio           =          0.455112 +/-         0.000020    1.0 

time-step=1.0
gs_noj  series 0 
  LocalEnergy           =          -7.18138 +/-          0.00020    1.0 
  Variance              =            0.8348 +/-           0.0036    1.0 
  Kinetic               =           4.14707 +/-          0.00025    1.0 
  LocalPotential        =         -11.32845 +/-          0.00032    1.0 
  AcceptRatio           =          0.693152 +/-         0.000017    1.0 
ye-luo commented 4 years ago

@aannabe could you add ElecElec term of all the above? My quick check shows this term contributes all the difference.

aannabe commented 4 years ago

Indeed that seems to be the source of difference

gs_noj  series 0 
  LocalEnergy           =          -7.17459 +/-          0.00024    1.0 
  Variance              =            0.8321 +/-           0.0046    1.5 
  Kinetic               =           4.14627 +/-          0.00036    1.2 
  LocalPotential        =         -11.32086 +/-          0.00056    1.8 
  ElecElec              =          -1.68875 +/-          0.00027    1.2 
  LocalECP              =          -2.59681 +/-          0.00062    1.0 
  NonLocalECP           =           1.37967 +/-          0.00064    1.2 
  IonIon                =             -8.41 +/-             0.00    1.0 
  LocalEnergy_sq        =           52.3068 +/-           0.0043    1.0 
  KEcorr                =              0.00 +/-             0.00    1.0 
  BlockWeight           =         102400.00 +/-             0.00    1.0 
  BlockCPU              =           2.13812 +/-          0.00014    6.6 
  AcceptRatio           =          0.455069 +/-         0.000021    1.0 
  Efficiency            =           1793.78 +/-             0.00    1.0 
  TotalTime             =            339.96 +/-             0.00    1.0 
  TotalSamples          =          16281600 +/-                0    1.0 

gs_noj  series 1 
  LocalEnergy           =          -7.18125 +/-          0.00029    1.0 
  Variance              =            0.8291 +/-           0.0050    1.0 
  Kinetic               =           4.14707 +/-          0.00033    1.0 
  LocalPotential        =         -11.32832 +/-          0.00045    1.0 
  ElecElec              =          -1.69526 +/-          0.00030    1.0 
  LocalECP              =          -2.59770 +/-          0.00099    1.9 
  NonLocalECP           =            1.3796 +/-           0.0010    2.2 
  IonIon                =             -8.41 +/-             0.00    1.0 
  LocalEnergy_sq        =           52.3994 +/-           0.0048    1.0 
  KEcorr                =              0.00 +/-             0.00    1.0 
  BlockWeight           =         102400.00 +/-             0.00    1.0 
  BlockCPU              =          2.375351 +/-         0.000078    1.1 
  AcceptRatio           =          0.693160 +/-         0.000022    1.0 
  Efficiency            =           1647.88 +/-             0.00    1.0 
  TotalTime             =            261.29 +/-             0.00    1.0 
  TotalSamples          =          11264000 +/-                0    1.0 

gs_noj  series 6 
  LocalEnergy           =          -7.18168 +/-          0.00037    1.2 
  Variance              =            0.8422 +/-           0.0093    1.0 
  Kinetic               =           4.14671 +/-          0.00048    1.5 
  LocalPotential        =         -11.32839 +/-          0.00064    1.8 
  ElecElec              =          -1.69560 +/-          0.00039    1.0 
  LocalECP              =          -2.59780 +/-          0.00099    1.3 
  NonLocalECP           =           1.37998 +/-          0.00068    1.1 
  IonIon                =             -8.41 +/-             0.00    1.0 
  LocalEnergy_sq        =           52.4187 +/-           0.0085    1.0 
  BlockWeight           =         102400.00 +/-             0.00    1.0 
  BlockCPU              =          1.827966 +/-         0.000078    1.4 
  AcceptRatio           =          0.330954 +/-         0.000031    1.1 
  Efficiency            =           1477.16 +/-             0.00    1.0 
  TotalTime             =            177.31 +/-             0.00    1.0 
  TotalSamples          =           9932800 +/-                0    1.0 

gs_noj  series 7 
  LocalEnergy           =          -7.18184 +/-          0.00032    1.0 
  Variance              =             0.857 +/-            0.024    1.1 
  Kinetic               =           4.14675 +/-          0.00043    1.0 
  LocalPotential        =         -11.32859 +/-          0.00053    1.0 
  ElecElec              =          -1.69609 +/-          0.00035    1.0 
  LocalECP              =          -2.59714 +/-          0.00077    1.3 
  NonLocalECP           =           1.37961 +/-          0.00074    1.1 
  IonIon                =             -8.41 +/-             0.00    1.0 
  LocalEnergy_sq        =            52.436 +/-            0.022    1.0 
  BlockWeight           =         102400.00 +/-             0.00    1.0 
  BlockCPU              =          1.936187 +/-         0.000059    1.0 
  AcceptRatio           =          0.462017 +/-         0.000025    1.0 
  Efficiency            =           1883.77 +/-             0.00    1.0 
  TotalTime             =            187.81 +/-             0.00    1.0 
  TotalSamples          =           9932800 +/-                0    1.0 

gs_noj  series 10 
  LocalEnergy           =          -7.18133 +/-          0.00025    1.0 
  Variance              =            0.8270 +/-           0.0033    1.0 
  Kinetic               =           4.14643 +/-          0.00032    1.0 
  LocalPotential        =         -11.32776 +/-          0.00040    1.0 
  ElecElec              =          -1.69540 +/-          0.00026    1.0 
  LocalECP              =          -2.59762 +/-          0.00065    1.2 
  NonLocalECP           =           1.38023 +/-          0.00061    1.2 
  IonIon                =             -8.41 +/-             0.00    1.0 
  LocalEnergy_sq        =           52.3985 +/-           0.0034    1.1 
  BlockWeight           =         102400.00 +/-             0.00    1.0 
  BlockCPU              =          2.212279 +/-         0.000058    1.2 
  AcceptRatio           =          0.455099 +/-         0.000021    1.0 
  Efficiency            =           1770.45 +/-             0.00    1.0 
  TotalTime             =            325.20 +/-             0.00    1.0 
  TotalSamples          =          15052800 +/-                0    1.0 

gs_noj  series 11 
  LocalEnergy           =          -7.18166 +/-          0.00025    1.0 
  Variance              =             0.886 +/-            0.030    1.0 
  Kinetic               =           4.14720 +/-          0.00027    1.0 
  LocalPotential        =         -11.32886 +/-          0.00036    1.1 
  ElecElec              =          -1.69567 +/-          0.00027    1.0 
  LocalECP              =          -2.59799 +/-          0.00053    1.0 
  NonLocalECP           =           1.37977 +/-          0.00047    1.0 
  IonIon                =             -8.41 +/-             0.00    1.0 
  LocalEnergy_sq        =            52.462 +/-            0.029    1.0 
  BlockWeight           =         102400.00 +/-             0.00    1.0 
  BlockCPU              =          2.428681 +/-         0.000062    1.3 
  AcceptRatio           =          0.693153 +/-         0.000019    1.2 
  Efficiency            =           1580.44 +/-             0.00    1.0 
  TotalTime             =            357.02 +/-             0.00    1.0 
  TotalSamples          =          15052800 +/-                0    1.0