Closed ye-luo closed 2 years ago
There is no initialization of do_override_output in the constructor, and so it gets turned on/off randomly.
--- a/src/QMCDrivers/WFOpt/QMCCostFunctionBase.cpp
+++ b/src/QMCDrivers/WFOpt/QMCCostFunctionBase.cpp
@@ -57,7 +57,8 @@ QMCCostFunctionBase::QMCCostFunctionBase(ParticleSet& w,
m_wfPtr(NULL),
m_doc_out(NULL),
includeNonlocalH("no"),
- debug_stream(0)
+ debug_stream(0),
+ do_override_output(false)
{
Ouch.
Do you remember why the default is not true? Should the opt.xml not always point to its corresponding vp.h5?
I think it was off by default so it wouldn't change existing behavior that read the parameters from the opt.xml file.
I think I was confused by the variable name. override means if it exist, override happens. After reading the code, it seems mean write the vp.h5 xml line. The xml keyword was "override".
If users copy paste opt.xml, the intention is to used the optimized WF. So having overriding should not change any parameters. If users tend to modify opt.xml by hand, they are responsible to control overriding.
Found my earlier issue https://github.com/QMCPACK/qmcpack/issues/3653
Describe the bug I ran multiple blocks of optimization
I got
I'm wondering why vp.h5 is not written in every opt.xml
PS: also missing a new line before
</wavefunction>