From 40df6ec7e2b8de4d9fd4ad01dc3d7e87ec3d6955 Mon Sep 17 00:00:00 2001 From: Peter Doak Date: Thu, 22 Jun 2023 19:15:16 -0400 Subject: [PATCH 1/7] don't allow batched version to except hamiltonian estimator input --- src/QMCApp/QMCMain.cpp | 13 ++++++++++++- src/QMCHamiltonians/HamiltonianFactory.cpp | 10 +++++++--- src/QMCHamiltonians/HamiltonianPool.cpp | 7 ++++--- src/QMCHamiltonians/HamiltonianPool.h | 2 +- 4 files changed, 24 insertions(+), 8 deletions(-) diff --git a/src/QMCApp/QMCMain.cpp b/src/QMCApp/QMCMain.cpp index 66cc4fdfcb..fbe68d1a58 100644 --- a/src/QMCApp/QMCMain.cpp +++ b/src/QMCApp/QMCMain.cpp @@ -446,7 +446,18 @@ bool QMCMain::validateXML() } else if (cname == "hamiltonian") { - ham_pool_->put(cur); + bool batched; + // since driver version is an enum this bool should be set explicitly for each version. + switch (my_project_.getDriverVersion()) + { + case ProjectData::DriverVersion::LEGACY: + batched = false; + break; + case ProjectData::DriverVersion::BATCH: + batched = true; + break; + } + ham_pool_->put(cur, batched); } else if (cname == "include") { diff --git a/src/QMCHamiltonians/HamiltonianFactory.cpp b/src/QMCHamiltonians/HamiltonianFactory.cpp index eb85d972b9..d299562c6d 100644 --- a/src/QMCHamiltonians/HamiltonianFactory.cpp +++ b/src/QMCHamiltonians/HamiltonianFactory.cpp @@ -84,7 +84,7 @@ HamiltonianFactory::HamiltonianFactory(const std::string& hName, * * \endxmlonly */ -bool HamiltonianFactory::build(xmlNodePtr cur) +bool HamiltonianFactory::build(xmlNodePtr cur, bool batched) { if (cur == NULL) return false; @@ -178,6 +178,10 @@ bool HamiltonianFactory::build(xmlNodePtr cur) } else if (cname == "estimator") { + if (batched) + throw std::runtime_error( + "estimator input nodes are not accepted in hamiltonian input in the batched version of the code!"); + if (potType == "flux") targetH->addOperator(std::make_unique(), potName, false); else if (potType == "specieskinetic") @@ -418,9 +422,9 @@ void HamiltonianFactory::renameProperty(std::string& aname) } } -bool HamiltonianFactory::put(xmlNodePtr cur) +bool HamiltonianFactory::put(xmlNodePtr cur, bool batched) { - bool success = build(cur); + bool success = build(cur, batched); return success; } diff --git a/src/QMCHamiltonians/HamiltonianPool.cpp b/src/QMCHamiltonians/HamiltonianPool.cpp index b9ffa81d6c..9fef0447dd 100644 --- a/src/QMCHamiltonians/HamiltonianPool.cpp +++ b/src/QMCHamiltonians/HamiltonianPool.cpp @@ -46,7 +46,7 @@ HamiltonianPool::~HamiltonianPool() } } -bool HamiltonianPool::put(xmlNodePtr cur) +bool HamiltonianPool::put(xmlNodePtr cur, bool batched) { ReportEngine PRE("HamiltonianPool", "put"); std::string id("h0"), target("e"), role("extra"); @@ -77,7 +77,8 @@ bool HamiltonianPool::put(xmlNodePtr cur) } else curH = (*hit).second; - bool success = curH->put(cur); + + bool success = curH->put(cur, batched); if (set2Primary) primaryH = curH->getH(); return success; @@ -85,7 +86,7 @@ bool HamiltonianPool::put(xmlNodePtr cur) bool HamiltonianPool::get(std::ostream& os) const { - for(auto& [name, factory] : myPool) + for (auto& [name, factory] : myPool) { os << " Hamiltonian " << name << std::endl; factory->getH()->get(os); diff --git a/src/QMCHamiltonians/HamiltonianPool.h b/src/QMCHamiltonians/HamiltonianPool.h index f3651b162e..1b2c08bc1c 100644 --- a/src/QMCHamiltonians/HamiltonianPool.h +++ b/src/QMCHamiltonians/HamiltonianPool.h @@ -52,7 +52,7 @@ class HamiltonianPool : public MPIObjectBase HamiltonianPool& operator=(HamiltonianPool&&) = delete; ~HamiltonianPool(); - bool put(xmlNodePtr cur); + bool put(xmlNodePtr cur, bool batched); bool get(std::ostream& os) const; void reset(); From 1c257584b5dca975903831c6bcc211f404741d1a Mon Sep 17 00:00:00 2001 From: Peter Doak Date: Thu, 22 Jun 2023 19:30:33 -0400 Subject: [PATCH 2/7] add test case --- src/QMCHamiltonians/HamiltonianFactory.cpp | 5 ++- .../tests/test_hamiltonian_factory.cpp | 39 +++++++++++++++++++ 2 files changed, 42 insertions(+), 2 deletions(-) diff --git a/src/QMCHamiltonians/HamiltonianFactory.cpp b/src/QMCHamiltonians/HamiltonianFactory.cpp index d299562c6d..428fd66c4d 100644 --- a/src/QMCHamiltonians/HamiltonianFactory.cpp +++ b/src/QMCHamiltonians/HamiltonianFactory.cpp @@ -2,7 +2,7 @@ // This file is distributed under the University of Illinois/NCSA Open Source License. // See LICENSE file in top directory for details. // -// Copyright (c) 2016 Jeongnim Kim and QMCPACK developers. +// Copyright (c) 2023 QMCPACK developers. // // File developed by: John R. Gergely, University of Illinois at Urbana-Champaign // Bryan Clark, bclark@Princeton.edu, Princeton University @@ -49,6 +49,7 @@ #endif #include "QMCHamiltonians/SkPot.h" #include "OhmmsData/AttributeSet.h" +#include "Message/UniformCommunicateError.h" namespace qmcplusplus { @@ -179,7 +180,7 @@ bool HamiltonianFactory::build(xmlNodePtr cur, bool batched) else if (cname == "estimator") { if (batched) - throw std::runtime_error( + throw UniformCommunicateError( "estimator input nodes are not accepted in hamiltonian input in the batched version of the code!"); if (potType == "flux") diff --git a/src/QMCHamiltonians/tests/test_hamiltonian_factory.cpp b/src/QMCHamiltonians/tests/test_hamiltonian_factory.cpp index de813d95d0..f22638a492 100644 --- a/src/QMCHamiltonians/tests/test_hamiltonian_factory.cpp +++ b/src/QMCHamiltonians/tests/test_hamiltonian_factory.cpp @@ -86,6 +86,45 @@ TEST_CASE("HamiltonianFactory", "[hamiltonian]") REQUIRE(hf.getH()->getOperatorType("ElecIon") == "coulomb"); } +TEST_CASE("HamiltonianFactory_prevent_legacy_estimator_input", "[hamiltonian]") +{ + Communicate* c = OHMMS::Controller; + + const SimulationCell simulation_cell; + auto elec_ptr = createElectronParticleSet(simulation_cell); + auto ions_ptr = std::make_unique(simulation_cell); + + auto &ions(*ions_ptr), elec(*elec_ptr); + + ions.setName("ion0"); + ions.create({1}); + + HamiltonianFactory::PSetMap particle_set_map; + particle_set_map.emplace(ions_ptr->getName(), std::move(ions_ptr)); + particle_set_map.emplace(elec_ptr->getName(), std::move(elec_ptr)); + + RuntimeOptions runtime_options; + HamiltonianFactory::PsiPoolType psi_map; + psi_map.emplace("psi0", WaveFunctionFactory::buildEmptyTWFForTesting(runtime_options, "psi0")); + + HamiltonianFactory hf("h0", elec, particle_set_map, psi_map, c); + + const char* hamiltonian_xml = R"( + + + + +)"; + + Libxml2Document doc; + bool okay = doc.parseFromString(hamiltonian_xml); + REQUIRE(okay); + + xmlNodePtr root = doc.getRoot(); + + CHECK_THROWS_AS(hf.put(root), UniformCommunicateError); +} + TEST_CASE("HamiltonianFactory pseudopotential", "[hamiltonian]") { Communicate* c = OHMMS::Controller; From 0016e57fc59eba11ba30000eb1c9602dc24c4444 Mon Sep 17 00:00:00 2001 From: Peter Doak Date: Thu, 22 Jun 2023 22:20:18 -0400 Subject: [PATCH 3/7] fixed a number of problems with the legacy Estimator input blocking --- src/QMCApp/QMCMain.cpp | 13 ++++++++++++- src/QMCHamiltonians/HamiltonianFactory.h | 9 ++++++--- src/QMCHamiltonians/HamiltonianPool.h | 5 +++++ src/QMCHamiltonians/tests/MinimalHamiltonianPool.h | 4 ++-- src/QMCHamiltonians/tests/test_RotatedSPOs_NLPP.cpp | 2 +- .../tests/test_hamiltonian_factory.cpp | 7 ++++--- src/QMCHamiltonians/tests/test_hamiltonian_pool.cpp | 2 +- src/QMCHamiltonians/tests/test_ion_derivs.cpp | 2 +- 8 files changed, 32 insertions(+), 12 deletions(-) diff --git a/src/QMCApp/QMCMain.cpp b/src/QMCApp/QMCMain.cpp index fbe68d1a58..78cf556334 100644 --- a/src/QMCApp/QMCMain.cpp +++ b/src/QMCApp/QMCMain.cpp @@ -557,7 +557,18 @@ bool QMCMain::processPWH(xmlNodePtr cur) else if (cname == "hamiltonian") { inputnode = true; - ham_pool_->put(cur); + bool batched; + // since driver version is an enum this bool should be set explicitly for each version. + switch (my_project_.getDriverVersion()) + { + case ProjectData::DriverVersion::LEGACY: + batched = false; + break; + case ProjectData::DriverVersion::BATCH: + batched = true; + break; + } + ham_pool_->put(cur,batched); } else if (cname == "estimators") { diff --git a/src/QMCHamiltonians/HamiltonianFactory.h b/src/QMCHamiltonians/HamiltonianFactory.h index d3e990ef67..a53227616c 100644 --- a/src/QMCHamiltonians/HamiltonianFactory.h +++ b/src/QMCHamiltonians/HamiltonianFactory.h @@ -39,7 +39,7 @@ class HamiltonianFactory : public MPIObjectBase Communicate* c); ///read from xmlNode - bool put(xmlNodePtr cur); + bool put(xmlNodePtr cur, bool batched); /** add a property whose name will be renamed by b * @param a target property whose name should be replaced by b @@ -58,9 +58,12 @@ class HamiltonianFactory : public MPIObjectBase QMCHamiltonian* getH() const { return targetH.get(); } private: - /** process xmlNode to populate targetPsi + /** process xmlNode to populate the targetH + * \param[in] cur xml that contains the actual arguments required to make a valid hamiltonians in the QMCHamiltonian + * \param[in] batched if true reject legacy input for estimators. + * returns true unless cur == NULL */ - bool build(xmlNodePtr cur); + bool build(xmlNodePtr cur, bool batched); void addCoulombPotential(xmlNodePtr cur); void addForceHam(xmlNodePtr cur); diff --git a/src/QMCHamiltonians/HamiltonianPool.h b/src/QMCHamiltonians/HamiltonianPool.h index 1b2c08bc1c..f62da3642e 100644 --- a/src/QMCHamiltonians/HamiltonianPool.h +++ b/src/QMCHamiltonians/HamiltonianPool.h @@ -52,6 +52,11 @@ class HamiltonianPool : public MPIObjectBase HamiltonianPool& operator=(HamiltonianPool&&) = delete; ~HamiltonianPool(); + /** put method that actually constructs the object. + * \param[in] cur xml that contains the actual arguments required to make a valid hamiltonians in the QMCHamiltonian + * \param[in] batched if true reject legacy input for estimators. + * returns if put was successful, ignored in QMCMain.cpp! + */ bool put(xmlNodePtr cur, bool batched); bool get(std::ostream& os) const; void reset(); diff --git a/src/QMCHamiltonians/tests/MinimalHamiltonianPool.h b/src/QMCHamiltonians/tests/MinimalHamiltonianPool.h index 1713921793..81f33d4e0a 100644 --- a/src/QMCHamiltonians/tests/MinimalHamiltonianPool.h +++ b/src/QMCHamiltonians/tests/MinimalHamiltonianPool.h @@ -45,7 +45,7 @@ class MinimalHamiltonianPool doc.parseFromString(hamiltonian_xml); xmlNodePtr root = doc.getRoot(); - hpool.put(root); + hpool.put(root,true); return hpool; } @@ -59,7 +59,7 @@ class MinimalHamiltonianPool doc.parseFromString(hamiltonian_eeei_xml); xmlNodePtr root = doc.getRoot(); - hpool.put(root); + hpool.put(root,true); return hpool; } diff --git a/src/QMCHamiltonians/tests/test_RotatedSPOs_NLPP.cpp b/src/QMCHamiltonians/tests/test_RotatedSPOs_NLPP.cpp index cfed3d9471..0c87b8ee74 100644 --- a/src/QMCHamiltonians/tests/test_RotatedSPOs_NLPP.cpp +++ b/src/QMCHamiltonians/tests/test_RotatedSPOs_NLPP.cpp @@ -180,7 +180,7 @@ void test_hcpBe_rotation(bool use_single_det, bool use_nlpp_batched) REQUIRE(okay2); xmlNodePtr root2 = doc2.getRoot(); - hf.put(root2); + hf.put(root2,true); opt_variables_type opt_vars; psi->checkInVariables(opt_vars); diff --git a/src/QMCHamiltonians/tests/test_hamiltonian_factory.cpp b/src/QMCHamiltonians/tests/test_hamiltonian_factory.cpp index f22638a492..94e5a2bf0c 100644 --- a/src/QMCHamiltonians/tests/test_hamiltonian_factory.cpp +++ b/src/QMCHamiltonians/tests/test_hamiltonian_factory.cpp @@ -18,6 +18,7 @@ #include "QMCWaveFunctions/WaveFunctionFactory.h" #include "QMCHamiltonians/HamiltonianFactory.h" #include "Utilities/RuntimeOptions.h" +#include "Message/UniformCommunicateError.h" namespace qmcplusplus { @@ -75,7 +76,7 @@ TEST_CASE("HamiltonianFactory", "[hamiltonian]") REQUIRE(okay); xmlNodePtr root = doc.getRoot(); - hf.put(root); + hf.put(root, true); REQUIRE(hf.getH()); @@ -122,7 +123,7 @@ TEST_CASE("HamiltonianFactory_prevent_legacy_estimator_input", "[hamiltonian]") xmlNodePtr root = doc.getRoot(); - CHECK_THROWS_AS(hf.put(root), UniformCommunicateError); + CHECK_THROWS_AS(hf.put(root, true), qmcplusplus::UniformCommunicateError); } TEST_CASE("HamiltonianFactory pseudopotential", "[hamiltonian]") @@ -167,7 +168,7 @@ TEST_CASE("HamiltonianFactory pseudopotential", "[hamiltonian]") REQUIRE(okay); xmlNodePtr root = doc.getRoot(); - hf.put(root); + hf.put(root,true); } } // namespace qmcplusplus diff --git a/src/QMCHamiltonians/tests/test_hamiltonian_pool.cpp b/src/QMCHamiltonians/tests/test_hamiltonian_pool.cpp index f10b86dfc9..02961ad5cb 100644 --- a/src/QMCHamiltonians/tests/test_hamiltonian_pool.cpp +++ b/src/QMCHamiltonians/tests/test_hamiltonian_pool.cpp @@ -58,7 +58,7 @@ TEST_CASE("HamiltonianPool", "[qmcapp]") REQUIRE(hpool.empty()); - hpool.put(root); + hpool.put(root,true); QMCHamiltonian* h = hpool.getHamiltonian("h0"); REQUIRE(h != nullptr); diff --git a/src/QMCHamiltonians/tests/test_ion_derivs.cpp b/src/QMCHamiltonians/tests/test_ion_derivs.cpp index af5e368d1a..b1da6f9f09 100644 --- a/src/QMCHamiltonians/tests/test_ion_derivs.cpp +++ b/src/QMCHamiltonians/tests/test_ion_derivs.cpp @@ -107,7 +107,7 @@ QMCHamiltonian& create_CN_Hamiltonian(HamiltonianFactory& hf) REQUIRE(okay); xmlNodePtr root = doc.getRoot(); - hf.put(root); + hf.put(root,true); return *hf.getH(); } From 4590f2066b5a2b5420f9e68472b8b0d8d8e53930 Mon Sep 17 00:00:00 2001 From: Peter Doak Date: Fri, 23 Jun 2023 14:16:25 -0400 Subject: [PATCH 4/7] fix many tests that still use flux scalar estimator --- src/QMCHamiltonians/HamiltonianFactory.cpp | 6 ++++++ tests/io/restart_batch/qmc_short_batch.in.xml | 2 +- tests/io/restart_batch/qmc_short_batch.restart.xml | 2 +- tests/io/restart_dmc/det_qmc_vmcbatch_dmcbatch_tm.in.xml | 2 +- .../io/restart_dmc/det_qmc_vmcbatch_dmcbatch_tm.restart.xml | 2 +- .../det_qmc_vmcbatch_dmcbatch_tm.in.xml | 2 +- .../det_qmc_vmcbatch_dmcbatch_tm.restart.xml | 2 +- tests/solids/diamondC_1x1x1_pp/det_qmc_param_grad.xml | 2 +- .../det_qmc_spindens_short_vmcbatched.in.xml | 2 +- .../diamondC_1x1x1_pp/det_qmc_vmcbatch_dmcbatch_tm.in.xml | 2 +- tests/solids/diamondC_1x1x1_pp/qmc_short_optbatch.in.xml | 2 +- .../diamondC_1x1x1_pp/qmc_spindens_vmcbatch_short.in.xml | 2 +- .../det_qmc_short_sdbatch_vmcbatch_dmcbatch_mwalkers.in.xml | 2 +- ..._sdbatch_vmcbatch_dmcbatch_mwalkers_inverter_host.in.xml | 2 +- ...rt_sdbatch_vmcbatch_dmcbatch_mwalkers_with_checks.in.xml | 2 +- .../det_qmc_short_sdbatch_vmcbatch_mwalkers.in.xml | 2 +- .../solids/diamondC_2x1x1_pp/det_qmc_short_vmcbatch.in.xml | 2 +- .../det_qmc_short_vmcbatch_dmcbatch_excited.in.xml | 2 +- .../det_qmc_short_vmcbatch_dmcbatch_mwalkers.in.xml | 2 +- ...mc_short_vmcbatch_dmcbatch_mwalkers_inverter_host.in.xml | 2 +- ...t_qmc_short_vmcbatch_dmcbatch_mwalkers_serialized.in.xml | 2 +- .../det_qmc_short_vmcbatch_mwalkers.in.xml | 2 +- tests/solids/diamondC_2x1x1_pp/qmc_short_hybridrep.in.xml | 2 +- .../diamondC_2x1x1_pp/qmc_short_sdbatch_vmcbatch_4b.in.xml | 2 +- .../qmc_short_sdbatch_vmcbatch_dmcbatch.in.xml | 2 +- tests/solids/diamondC_2x1x1_pp/qmc_short_vmcbatch.in.xml | 2 +- tests/solids/diamondC_2x1x1_pp/qmc_short_vmcbatch_4b.in.xml | 2 +- .../diamondC_2x1x1_pp/qmc_short_vmcbatch_4b_asynctwf.in.xml | 2 +- .../diamondC_2x1x1_pp/qmc_short_vmcbatch_dmcbatch.in.xml | 2 +- .../diamondC_2x1x1_pp/qmc_short_vmcbatch_dmcbatch_4r.in.xml | 2 +- 30 files changed, 35 insertions(+), 29 deletions(-) diff --git a/src/QMCHamiltonians/HamiltonianFactory.cpp b/src/QMCHamiltonians/HamiltonianFactory.cpp index 428fd66c4d..0f99673061 100644 --- a/src/QMCHamiltonians/HamiltonianFactory.cpp +++ b/src/QMCHamiltonians/HamiltonianFactory.cpp @@ -177,6 +177,12 @@ bool HamiltonianFactory::build(xmlNodePtr cur, bool batched) targetH->addOperator(std::move(hs), "Grid", true); } } + else if (cname == "flux") + { + if (potName.size() < 1) + potName = "flux"; + targetH->addOperator(std::make_unique(), potName, false); + } else if (cname == "estimator") { if (batched) diff --git a/tests/io/restart_batch/qmc_short_batch.in.xml b/tests/io/restart_batch/qmc_short_batch.in.xml index b0a27bea90..3a5418b9aa 100644 --- a/tests/io/restart_batch/qmc_short_batch.in.xml +++ b/tests/io/restart_batch/qmc_short_batch.in.xml @@ -78,7 +78,7 @@ - + diff --git a/tests/io/restart_batch/qmc_short_batch.restart.xml b/tests/io/restart_batch/qmc_short_batch.restart.xml index 602435259a..6b3e842219 100644 --- a/tests/io/restart_batch/qmc_short_batch.restart.xml +++ b/tests/io/restart_batch/qmc_short_batch.restart.xml @@ -78,7 +78,7 @@ - + diff --git a/tests/io/restart_dmc/det_qmc_vmcbatch_dmcbatch_tm.in.xml b/tests/io/restart_dmc/det_qmc_vmcbatch_dmcbatch_tm.in.xml index fcea6078b0..5c02e962d2 100644 --- a/tests/io/restart_dmc/det_qmc_vmcbatch_dmcbatch_tm.in.xml +++ b/tests/io/restart_dmc/det_qmc_vmcbatch_dmcbatch_tm.in.xml @@ -80,7 +80,7 @@ - + diff --git a/tests/io/restart_dmc/det_qmc_vmcbatch_dmcbatch_tm.restart.xml b/tests/io/restart_dmc/det_qmc_vmcbatch_dmcbatch_tm.restart.xml index 1c23108eb7..2be57c6067 100644 --- a/tests/io/restart_dmc/det_qmc_vmcbatch_dmcbatch_tm.restart.xml +++ b/tests/io/restart_dmc/det_qmc_vmcbatch_dmcbatch_tm.restart.xml @@ -80,7 +80,7 @@ - + diff --git a/tests/io/restart_dmc_disable_branching/det_qmc_vmcbatch_dmcbatch_tm.in.xml b/tests/io/restart_dmc_disable_branching/det_qmc_vmcbatch_dmcbatch_tm.in.xml index 343ce7f940..8e63ef75f7 100644 --- a/tests/io/restart_dmc_disable_branching/det_qmc_vmcbatch_dmcbatch_tm.in.xml +++ b/tests/io/restart_dmc_disable_branching/det_qmc_vmcbatch_dmcbatch_tm.in.xml @@ -80,7 +80,7 @@ - + diff --git a/tests/io/restart_dmc_disable_branching/det_qmc_vmcbatch_dmcbatch_tm.restart.xml b/tests/io/restart_dmc_disable_branching/det_qmc_vmcbatch_dmcbatch_tm.restart.xml index 7f07d32af9..1246909c14 100644 --- a/tests/io/restart_dmc_disable_branching/det_qmc_vmcbatch_dmcbatch_tm.restart.xml +++ b/tests/io/restart_dmc_disable_branching/det_qmc_vmcbatch_dmcbatch_tm.restart.xml @@ -80,7 +80,7 @@ - + diff --git a/tests/solids/diamondC_1x1x1_pp/det_qmc_param_grad.xml b/tests/solids/diamondC_1x1x1_pp/det_qmc_param_grad.xml index 6b7eb34365..1363cf3eaa 100644 --- a/tests/solids/diamondC_1x1x1_pp/det_qmc_param_grad.xml +++ b/tests/solids/diamondC_1x1x1_pp/det_qmc_param_grad.xml @@ -80,7 +80,7 @@ - + diff --git a/tests/solids/diamondC_1x1x1_pp/det_qmc_spindens_short_vmcbatched.in.xml b/tests/solids/diamondC_1x1x1_pp/det_qmc_spindens_short_vmcbatched.in.xml index ae5eb9f969..f42e6301b4 100644 --- a/tests/solids/diamondC_1x1x1_pp/det_qmc_spindens_short_vmcbatched.in.xml +++ b/tests/solids/diamondC_1x1x1_pp/det_qmc_spindens_short_vmcbatched.in.xml @@ -79,7 +79,7 @@ - + diff --git a/tests/solids/diamondC_1x1x1_pp/det_qmc_vmcbatch_dmcbatch_tm.in.xml b/tests/solids/diamondC_1x1x1_pp/det_qmc_vmcbatch_dmcbatch_tm.in.xml index ee91b8343e..3b51d78866 100644 --- a/tests/solids/diamondC_1x1x1_pp/det_qmc_vmcbatch_dmcbatch_tm.in.xml +++ b/tests/solids/diamondC_1x1x1_pp/det_qmc_vmcbatch_dmcbatch_tm.in.xml @@ -80,7 +80,7 @@ - + diff --git a/tests/solids/diamondC_1x1x1_pp/qmc_short_optbatch.in.xml b/tests/solids/diamondC_1x1x1_pp/qmc_short_optbatch.in.xml index 3dbc8b9477..8caaee5fc3 100644 --- a/tests/solids/diamondC_1x1x1_pp/qmc_short_optbatch.in.xml +++ b/tests/solids/diamondC_1x1x1_pp/qmc_short_optbatch.in.xml @@ -78,7 +78,7 @@ - + diff --git a/tests/solids/diamondC_1x1x1_pp/qmc_spindens_vmcbatch_short.in.xml b/tests/solids/diamondC_1x1x1_pp/qmc_spindens_vmcbatch_short.in.xml index 5b25ea9c15..28f9d5bb12 100644 --- a/tests/solids/diamondC_1x1x1_pp/qmc_spindens_vmcbatch_short.in.xml +++ b/tests/solids/diamondC_1x1x1_pp/qmc_spindens_vmcbatch_short.in.xml @@ -79,7 +79,7 @@ - + diff --git a/tests/solids/diamondC_2x1x1_pp/det_qmc_short_sdbatch_vmcbatch_dmcbatch_mwalkers.in.xml b/tests/solids/diamondC_2x1x1_pp/det_qmc_short_sdbatch_vmcbatch_dmcbatch_mwalkers.in.xml index 9a6727aa05..a4da5bc889 100644 --- a/tests/solids/diamondC_2x1x1_pp/det_qmc_short_sdbatch_vmcbatch_dmcbatch_mwalkers.in.xml +++ b/tests/solids/diamondC_2x1x1_pp/det_qmc_short_sdbatch_vmcbatch_dmcbatch_mwalkers.in.xml @@ -81,7 +81,7 @@ - + diff --git a/tests/solids/diamondC_2x1x1_pp/det_qmc_short_sdbatch_vmcbatch_dmcbatch_mwalkers_inverter_host.in.xml b/tests/solids/diamondC_2x1x1_pp/det_qmc_short_sdbatch_vmcbatch_dmcbatch_mwalkers_inverter_host.in.xml index 7b7178ca32..e3098609e9 100644 --- a/tests/solids/diamondC_2x1x1_pp/det_qmc_short_sdbatch_vmcbatch_dmcbatch_mwalkers_inverter_host.in.xml +++ b/tests/solids/diamondC_2x1x1_pp/det_qmc_short_sdbatch_vmcbatch_dmcbatch_mwalkers_inverter_host.in.xml @@ -81,7 +81,7 @@ - + diff --git a/tests/solids/diamondC_2x1x1_pp/det_qmc_short_sdbatch_vmcbatch_dmcbatch_mwalkers_with_checks.in.xml b/tests/solids/diamondC_2x1x1_pp/det_qmc_short_sdbatch_vmcbatch_dmcbatch_mwalkers_with_checks.in.xml index 6199d3784d..2c563d8f33 100644 --- a/tests/solids/diamondC_2x1x1_pp/det_qmc_short_sdbatch_vmcbatch_dmcbatch_mwalkers_with_checks.in.xml +++ b/tests/solids/diamondC_2x1x1_pp/det_qmc_short_sdbatch_vmcbatch_dmcbatch_mwalkers_with_checks.in.xml @@ -81,7 +81,7 @@ - + diff --git a/tests/solids/diamondC_2x1x1_pp/det_qmc_short_sdbatch_vmcbatch_mwalkers.in.xml b/tests/solids/diamondC_2x1x1_pp/det_qmc_short_sdbatch_vmcbatch_mwalkers.in.xml index 4b76b179e7..daafedb0a1 100644 --- a/tests/solids/diamondC_2x1x1_pp/det_qmc_short_sdbatch_vmcbatch_mwalkers.in.xml +++ b/tests/solids/diamondC_2x1x1_pp/det_qmc_short_sdbatch_vmcbatch_mwalkers.in.xml @@ -81,7 +81,7 @@ - + diff --git a/tests/solids/diamondC_2x1x1_pp/det_qmc_short_vmcbatch.in.xml b/tests/solids/diamondC_2x1x1_pp/det_qmc_short_vmcbatch.in.xml index ff018dff7e..e80cf33fd7 100644 --- a/tests/solids/diamondC_2x1x1_pp/det_qmc_short_vmcbatch.in.xml +++ b/tests/solids/diamondC_2x1x1_pp/det_qmc_short_vmcbatch.in.xml @@ -81,7 +81,7 @@ - + diff --git a/tests/solids/diamondC_2x1x1_pp/det_qmc_short_vmcbatch_dmcbatch_excited.in.xml b/tests/solids/diamondC_2x1x1_pp/det_qmc_short_vmcbatch_dmcbatch_excited.in.xml index ab27450de1..aace50f8b2 100644 --- a/tests/solids/diamondC_2x1x1_pp/det_qmc_short_vmcbatch_dmcbatch_excited.in.xml +++ b/tests/solids/diamondC_2x1x1_pp/det_qmc_short_vmcbatch_dmcbatch_excited.in.xml @@ -83,7 +83,7 @@ - + diff --git a/tests/solids/diamondC_2x1x1_pp/det_qmc_short_vmcbatch_dmcbatch_mwalkers.in.xml b/tests/solids/diamondC_2x1x1_pp/det_qmc_short_vmcbatch_dmcbatch_mwalkers.in.xml index e874713b09..67e2713cd8 100644 --- a/tests/solids/diamondC_2x1x1_pp/det_qmc_short_vmcbatch_dmcbatch_mwalkers.in.xml +++ b/tests/solids/diamondC_2x1x1_pp/det_qmc_short_vmcbatch_dmcbatch_mwalkers.in.xml @@ -81,7 +81,7 @@ - + diff --git a/tests/solids/diamondC_2x1x1_pp/det_qmc_short_vmcbatch_dmcbatch_mwalkers_inverter_host.in.xml b/tests/solids/diamondC_2x1x1_pp/det_qmc_short_vmcbatch_dmcbatch_mwalkers_inverter_host.in.xml index f4a2bbf3ae..78b0d0d161 100644 --- a/tests/solids/diamondC_2x1x1_pp/det_qmc_short_vmcbatch_dmcbatch_mwalkers_inverter_host.in.xml +++ b/tests/solids/diamondC_2x1x1_pp/det_qmc_short_vmcbatch_dmcbatch_mwalkers_inverter_host.in.xml @@ -81,7 +81,7 @@ - + diff --git a/tests/solids/diamondC_2x1x1_pp/det_qmc_short_vmcbatch_dmcbatch_mwalkers_serialized.in.xml b/tests/solids/diamondC_2x1x1_pp/det_qmc_short_vmcbatch_dmcbatch_mwalkers_serialized.in.xml index 5a1ce6da16..6e39f225b5 100644 --- a/tests/solids/diamondC_2x1x1_pp/det_qmc_short_vmcbatch_dmcbatch_mwalkers_serialized.in.xml +++ b/tests/solids/diamondC_2x1x1_pp/det_qmc_short_vmcbatch_dmcbatch_mwalkers_serialized.in.xml @@ -81,7 +81,7 @@ - + diff --git a/tests/solids/diamondC_2x1x1_pp/det_qmc_short_vmcbatch_mwalkers.in.xml b/tests/solids/diamondC_2x1x1_pp/det_qmc_short_vmcbatch_mwalkers.in.xml index 69d1b1e1ec..6761f03fb9 100644 --- a/tests/solids/diamondC_2x1x1_pp/det_qmc_short_vmcbatch_mwalkers.in.xml +++ b/tests/solids/diamondC_2x1x1_pp/det_qmc_short_vmcbatch_mwalkers.in.xml @@ -81,7 +81,7 @@ - + diff --git a/tests/solids/diamondC_2x1x1_pp/qmc_short_hybridrep.in.xml b/tests/solids/diamondC_2x1x1_pp/qmc_short_hybridrep.in.xml index cdb43252f1..40cde284b3 100644 --- a/tests/solids/diamondC_2x1x1_pp/qmc_short_hybridrep.in.xml +++ b/tests/solids/diamondC_2x1x1_pp/qmc_short_hybridrep.in.xml @@ -82,7 +82,7 @@ - + diff --git a/tests/solids/diamondC_2x1x1_pp/qmc_short_sdbatch_vmcbatch_4b.in.xml b/tests/solids/diamondC_2x1x1_pp/qmc_short_sdbatch_vmcbatch_4b.in.xml index 29157a6953..e1ffd532fb 100644 --- a/tests/solids/diamondC_2x1x1_pp/qmc_short_sdbatch_vmcbatch_4b.in.xml +++ b/tests/solids/diamondC_2x1x1_pp/qmc_short_sdbatch_vmcbatch_4b.in.xml @@ -80,7 +80,7 @@ - + diff --git a/tests/solids/diamondC_2x1x1_pp/qmc_short_sdbatch_vmcbatch_dmcbatch.in.xml b/tests/solids/diamondC_2x1x1_pp/qmc_short_sdbatch_vmcbatch_dmcbatch.in.xml index 9638f1c626..cb7d97cf40 100644 --- a/tests/solids/diamondC_2x1x1_pp/qmc_short_sdbatch_vmcbatch_dmcbatch.in.xml +++ b/tests/solids/diamondC_2x1x1_pp/qmc_short_sdbatch_vmcbatch_dmcbatch.in.xml @@ -80,7 +80,7 @@ - + diff --git a/tests/solids/diamondC_2x1x1_pp/qmc_short_vmcbatch.in.xml b/tests/solids/diamondC_2x1x1_pp/qmc_short_vmcbatch.in.xml index f1b51992de..f820b240a1 100644 --- a/tests/solids/diamondC_2x1x1_pp/qmc_short_vmcbatch.in.xml +++ b/tests/solids/diamondC_2x1x1_pp/qmc_short_vmcbatch.in.xml @@ -80,7 +80,7 @@ - + diff --git a/tests/solids/diamondC_2x1x1_pp/qmc_short_vmcbatch_4b.in.xml b/tests/solids/diamondC_2x1x1_pp/qmc_short_vmcbatch_4b.in.xml index 4673414947..d534ecbb86 100644 --- a/tests/solids/diamondC_2x1x1_pp/qmc_short_vmcbatch_4b.in.xml +++ b/tests/solids/diamondC_2x1x1_pp/qmc_short_vmcbatch_4b.in.xml @@ -80,7 +80,7 @@ - + diff --git a/tests/solids/diamondC_2x1x1_pp/qmc_short_vmcbatch_4b_asynctwf.in.xml b/tests/solids/diamondC_2x1x1_pp/qmc_short_vmcbatch_4b_asynctwf.in.xml index 921a9f631d..aea8b4f476 100644 --- a/tests/solids/diamondC_2x1x1_pp/qmc_short_vmcbatch_4b_asynctwf.in.xml +++ b/tests/solids/diamondC_2x1x1_pp/qmc_short_vmcbatch_4b_asynctwf.in.xml @@ -80,7 +80,7 @@ - + diff --git a/tests/solids/diamondC_2x1x1_pp/qmc_short_vmcbatch_dmcbatch.in.xml b/tests/solids/diamondC_2x1x1_pp/qmc_short_vmcbatch_dmcbatch.in.xml index f506b70a05..dc3874096e 100644 --- a/tests/solids/diamondC_2x1x1_pp/qmc_short_vmcbatch_dmcbatch.in.xml +++ b/tests/solids/diamondC_2x1x1_pp/qmc_short_vmcbatch_dmcbatch.in.xml @@ -80,7 +80,7 @@ - + diff --git a/tests/solids/diamondC_2x1x1_pp/qmc_short_vmcbatch_dmcbatch_4r.in.xml b/tests/solids/diamondC_2x1x1_pp/qmc_short_vmcbatch_dmcbatch_4r.in.xml index 6e4a268aa8..f740851b9c 100644 --- a/tests/solids/diamondC_2x1x1_pp/qmc_short_vmcbatch_dmcbatch_4r.in.xml +++ b/tests/solids/diamondC_2x1x1_pp/qmc_short_vmcbatch_dmcbatch_4r.in.xml @@ -80,7 +80,7 @@ - + From 72890e9e8988e10018830b65d51c5f609cfba9a7 Mon Sep 17 00:00:00 2001 From: Peter Doak Date: Fri, 30 Jun 2023 17:07:52 -0400 Subject: [PATCH 5/7] work around bad initialization analysis in GCC11 --- src/QMCApp/QMCMain.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/QMCApp/QMCMain.cpp b/src/QMCApp/QMCMain.cpp index 78cf556334..6d3f37308c 100644 --- a/src/QMCApp/QMCMain.cpp +++ b/src/QMCApp/QMCMain.cpp @@ -452,10 +452,10 @@ bool QMCMain::validateXML() { case ProjectData::DriverVersion::LEGACY: batched = false; - break; + break; case ProjectData::DriverVersion::BATCH: batched = true; - break; + break; } ham_pool_->put(cur, batched); } @@ -557,18 +557,20 @@ bool QMCMain::processPWH(xmlNodePtr cur) else if (cname == "hamiltonian") { inputnode = true; - bool batched; + // Satisfy GCC11's inability to analyze the following switch statement and stop its erroneous + // -Werror=maybe-uninitialized + bool batched{false}; // since driver version is an enum this bool should be set explicitly for each version. switch (my_project_.getDriverVersion()) { case ProjectData::DriverVersion::LEGACY: batched = false; - break; + break; case ProjectData::DriverVersion::BATCH: batched = true; - break; + break; } - ham_pool_->put(cur,batched); + ham_pool_->put(cur, batched); } else if (cname == "estimators") { From 2d1bf88a4a1c3e3ce20ee56a2a1a23be78191487 Mon Sep 17 00:00:00 2001 From: Peter Doak Date: Wed, 5 Jul 2023 14:24:35 -0400 Subject: [PATCH 6/7] address @ye-luo's review --- src/QMCApp/QMCMain.cpp | 30 +++---------------- .../tests/MinimalHamiltonianPool.h | 6 ++-- .../det_qmc_vmcbatch_dmcbatch_tm.in.xml | 1 - .../det_qmc_vmcbatch_dmcbatch_tm.restart.xml | 1 - .../det_qmc_vmcbatch_dmcbatch_tm.in.xml | 1 - .../det_qmc_vmcbatch_dmcbatch_tm.restart.xml | 1 - .../det_qmc_vmcbatch_dmcbatch_tm.in.xml | 1 - ...qmc_short_vmcbatch_dmcbatch_excited.in.xml | 1 - .../det_qmc_vmc_dmc_pw.in.xml | 1 - ...qmc_short_sdbatch_vmcbatch_dmcbatch.in.xml | 1 - .../qmc_short_vmc_dmc_excited.in.xml | 1 - .../qmc_short_vmcbatch_dmcbatch.in.xml | 1 - .../qmc_short_vmcbatch_dmcbatch_4r.in.xml | 1 - 13 files changed, 7 insertions(+), 40 deletions(-) diff --git a/src/QMCApp/QMCMain.cpp b/src/QMCApp/QMCMain.cpp index 6d3f37308c..d6a7e5d5e5 100644 --- a/src/QMCApp/QMCMain.cpp +++ b/src/QMCApp/QMCMain.cpp @@ -446,18 +446,9 @@ bool QMCMain::validateXML() } else if (cname == "hamiltonian") { - bool batched; - // since driver version is an enum this bool should be set explicitly for each version. - switch (my_project_.getDriverVersion()) - { - case ProjectData::DriverVersion::LEGACY: - batched = false; - break; - case ProjectData::DriverVersion::BATCH: - batched = true; - break; - } - ham_pool_->put(cur, batched); + // second param enables batched input error checking in HamiltonianFactory + ham_pool_->put(cur, my_project_.getDriverVersion() == ProjectData::DriverVersion::BATCH); +batched); } else if (cname == "include") { @@ -557,20 +548,7 @@ bool QMCMain::processPWH(xmlNodePtr cur) else if (cname == "hamiltonian") { inputnode = true; - // Satisfy GCC11's inability to analyze the following switch statement and stop its erroneous - // -Werror=maybe-uninitialized - bool batched{false}; - // since driver version is an enum this bool should be set explicitly for each version. - switch (my_project_.getDriverVersion()) - { - case ProjectData::DriverVersion::LEGACY: - batched = false; - break; - case ProjectData::DriverVersion::BATCH: - batched = true; - break; - } - ham_pool_->put(cur, batched); + ham_pool_->put(cur, my_project_.getDriverVersion() == ProjectData::DriverVersion::BATCH); } else if (cname == "estimators") { diff --git a/src/QMCHamiltonians/tests/MinimalHamiltonianPool.h b/src/QMCHamiltonians/tests/MinimalHamiltonianPool.h index 81f33d4e0a..cbd2a6b65d 100644 --- a/src/QMCHamiltonians/tests/MinimalHamiltonianPool.h +++ b/src/QMCHamiltonians/tests/MinimalHamiltonianPool.h @@ -2,7 +2,7 @@ // This file is distributed under the University of Illinois/NCSA Open Source License. // See LICENSE file in top directory for details. // -// Copyright (c) 2019 QMCPACK developers. +// Copyright (c) 2023 QMCPACK developers. // // File developed by: Peter Doak, doakpw@ornl.gov, Oak Ridge National Laboratory // @@ -45,7 +45,7 @@ class MinimalHamiltonianPool doc.parseFromString(hamiltonian_xml); xmlNodePtr root = doc.getRoot(); - hpool.put(root,true); + hpool.put(root, true); return hpool; } @@ -59,7 +59,7 @@ class MinimalHamiltonianPool doc.parseFromString(hamiltonian_eeei_xml); xmlNodePtr root = doc.getRoot(); - hpool.put(root,true); + hpool.put(root, true); return hpool; } diff --git a/tests/io/restart_dmc/det_qmc_vmcbatch_dmcbatch_tm.in.xml b/tests/io/restart_dmc/det_qmc_vmcbatch_dmcbatch_tm.in.xml index 5c02e962d2..2162907422 100644 --- a/tests/io/restart_dmc/det_qmc_vmcbatch_dmcbatch_tm.in.xml +++ b/tests/io/restart_dmc/det_qmc_vmcbatch_dmcbatch_tm.in.xml @@ -80,7 +80,6 @@ - diff --git a/tests/io/restart_dmc/det_qmc_vmcbatch_dmcbatch_tm.restart.xml b/tests/io/restart_dmc/det_qmc_vmcbatch_dmcbatch_tm.restart.xml index 2be57c6067..4fb53842d1 100644 --- a/tests/io/restart_dmc/det_qmc_vmcbatch_dmcbatch_tm.restart.xml +++ b/tests/io/restart_dmc/det_qmc_vmcbatch_dmcbatch_tm.restart.xml @@ -80,7 +80,6 @@ - diff --git a/tests/io/restart_dmc_disable_branching/det_qmc_vmcbatch_dmcbatch_tm.in.xml b/tests/io/restart_dmc_disable_branching/det_qmc_vmcbatch_dmcbatch_tm.in.xml index 8e63ef75f7..9525d40fb8 100644 --- a/tests/io/restart_dmc_disable_branching/det_qmc_vmcbatch_dmcbatch_tm.in.xml +++ b/tests/io/restart_dmc_disable_branching/det_qmc_vmcbatch_dmcbatch_tm.in.xml @@ -80,7 +80,6 @@ - diff --git a/tests/io/restart_dmc_disable_branching/det_qmc_vmcbatch_dmcbatch_tm.restart.xml b/tests/io/restart_dmc_disable_branching/det_qmc_vmcbatch_dmcbatch_tm.restart.xml index 1246909c14..c99a889d70 100644 --- a/tests/io/restart_dmc_disable_branching/det_qmc_vmcbatch_dmcbatch_tm.restart.xml +++ b/tests/io/restart_dmc_disable_branching/det_qmc_vmcbatch_dmcbatch_tm.restart.xml @@ -80,7 +80,6 @@ - diff --git a/tests/solids/diamondC_1x1x1_pp/det_qmc_vmcbatch_dmcbatch_tm.in.xml b/tests/solids/diamondC_1x1x1_pp/det_qmc_vmcbatch_dmcbatch_tm.in.xml index 3b51d78866..7a203eb36e 100644 --- a/tests/solids/diamondC_1x1x1_pp/det_qmc_vmcbatch_dmcbatch_tm.in.xml +++ b/tests/solids/diamondC_1x1x1_pp/det_qmc_vmcbatch_dmcbatch_tm.in.xml @@ -80,7 +80,6 @@ - diff --git a/tests/solids/diamondC_2x1x1_pp/det_qmc_short_vmcbatch_dmcbatch_excited.in.xml b/tests/solids/diamondC_2x1x1_pp/det_qmc_short_vmcbatch_dmcbatch_excited.in.xml index aace50f8b2..8d5a2bbfb8 100644 --- a/tests/solids/diamondC_2x1x1_pp/det_qmc_short_vmcbatch_dmcbatch_excited.in.xml +++ b/tests/solids/diamondC_2x1x1_pp/det_qmc_short_vmcbatch_dmcbatch_excited.in.xml @@ -83,7 +83,6 @@ - diff --git a/tests/solids/diamondC_2x1x1_pp/det_qmc_vmc_dmc_pw.in.xml b/tests/solids/diamondC_2x1x1_pp/det_qmc_vmc_dmc_pw.in.xml index 805de6fc6e..a745a96e11 100644 --- a/tests/solids/diamondC_2x1x1_pp/det_qmc_vmc_dmc_pw.in.xml +++ b/tests/solids/diamondC_2x1x1_pp/det_qmc_vmc_dmc_pw.in.xml @@ -80,7 +80,6 @@ - diff --git a/tests/solids/diamondC_2x1x1_pp/qmc_short_sdbatch_vmcbatch_dmcbatch.in.xml b/tests/solids/diamondC_2x1x1_pp/qmc_short_sdbatch_vmcbatch_dmcbatch.in.xml index cb7d97cf40..b5378f5627 100644 --- a/tests/solids/diamondC_2x1x1_pp/qmc_short_sdbatch_vmcbatch_dmcbatch.in.xml +++ b/tests/solids/diamondC_2x1x1_pp/qmc_short_sdbatch_vmcbatch_dmcbatch.in.xml @@ -80,7 +80,6 @@ - diff --git a/tests/solids/diamondC_2x1x1_pp/qmc_short_vmc_dmc_excited.in.xml b/tests/solids/diamondC_2x1x1_pp/qmc_short_vmc_dmc_excited.in.xml index f3fef5f414..ed2710583a 100644 --- a/tests/solids/diamondC_2x1x1_pp/qmc_short_vmc_dmc_excited.in.xml +++ b/tests/solids/diamondC_2x1x1_pp/qmc_short_vmc_dmc_excited.in.xml @@ -81,7 +81,6 @@ - diff --git a/tests/solids/diamondC_2x1x1_pp/qmc_short_vmcbatch_dmcbatch.in.xml b/tests/solids/diamondC_2x1x1_pp/qmc_short_vmcbatch_dmcbatch.in.xml index dc3874096e..6bdfb2ccfa 100644 --- a/tests/solids/diamondC_2x1x1_pp/qmc_short_vmcbatch_dmcbatch.in.xml +++ b/tests/solids/diamondC_2x1x1_pp/qmc_short_vmcbatch_dmcbatch.in.xml @@ -80,7 +80,6 @@ - diff --git a/tests/solids/diamondC_2x1x1_pp/qmc_short_vmcbatch_dmcbatch_4r.in.xml b/tests/solids/diamondC_2x1x1_pp/qmc_short_vmcbatch_dmcbatch_4r.in.xml index f740851b9c..3b99bf18e7 100644 --- a/tests/solids/diamondC_2x1x1_pp/qmc_short_vmcbatch_dmcbatch_4r.in.xml +++ b/tests/solids/diamondC_2x1x1_pp/qmc_short_vmcbatch_dmcbatch_4r.in.xml @@ -80,7 +80,6 @@ - From 3101da40013fdbaffd37b1786b475e9b56c29843 Mon Sep 17 00:00:00 2001 From: Peter Doak Date: Wed, 5 Jul 2023 15:47:43 -0400 Subject: [PATCH 7/7] fix typo --- src/QMCApp/QMCMain.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/QMCApp/QMCMain.cpp b/src/QMCApp/QMCMain.cpp index d6a7e5d5e5..d0f50f32eb 100644 --- a/src/QMCApp/QMCMain.cpp +++ b/src/QMCApp/QMCMain.cpp @@ -448,7 +448,6 @@ bool QMCMain::validateXML() { // second param enables batched input error checking in HamiltonianFactory ham_pool_->put(cur, my_project_.getDriverVersion() == ProjectData::DriverVersion::BATCH); -batched); } else if (cname == "include") {