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
296 stars 138 forks source link

Slater matrices should be recomputed by default (blocks_between_recompute=1) #1368

Open prckent opened 5 years ago

prckent commented 5 years ago

Currently the full precision build does not recompute the Slater determinants (blocks_between_recompute=0). Eventually this must go wrong, making this a dangerous default. We should have a much safer default (blocks_between_recompute=1). Experts can change this at their leisure.

jtkrogel commented 5 years ago

Does this option affect SD and MSD equally?

ye-luo commented 5 years ago

This recompute option doesn't call the evaluateLog directly. It is implemented depending on the WFComponent. Currently only SD adds the extra operation of recomputing Orbitials and slaterdet inverse. No recomputing in MSD.

prckent commented 5 years ago

Ouch. We will need to implement recompute for MSD as well then. Some of the highest accuracy runs being done are MSD.

jtkrogel commented 5 years ago

I wonder if this could be related to the odd behavior @anbenali is seeing for long enough MC trajectories with MSD. Is it possible that larger MSD would accumulate errors faster in this way?

prckent commented 5 years ago

Good point. Maybe. With a long enough run you have a greater chance to be unlucky.

ye-luo commented 5 years ago

In the past, not recomputing helped me finding more bugs. The recomputing often hide bugs. I also didn't get a single solid data point that recomputing is necessary. If someone claims the recomputing helps the accuracy, I would go for the source of errors(bugs).

For the SD case, both CPU and GPU code do out of place inversion. We probably can do some check before going for the expensive inversion.

prckent commented 5 years ago

I have been burned in full production runs in other codes. We will recompute for now. Experts can change the default. Improved algorithms can come later.

ye-luo commented 5 years ago

Recomputing does add cost and fortunately it is not heavy. It should be clear that we do recomputing because this is the only way to stop the error accumulated in the SD inverse matrix. For example, in other parts of the WF, the algorithm of Jastrow is robust against error accumulation and thus no recomputing should be applied. MSD carries a piece of SD for the reference determimant. If its accuracy affects the result, we should secure it with recomputing. If other portions of MSD is sensitive to recomputing, it can potentially be a bug.