Open prckent opened 5 years ago
Does this option affect SD and MSD equally?
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.
Ouch. We will need to implement recompute for MSD as well then. Some of the highest accuracy runs being done are MSD.
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?
Good point. Maybe. With a long enough run you have a greater chance to be unlucky.
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.
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.
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.
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.