Skip to content

Commit

Permalink
address @ye-luo's review
Browse files Browse the repository at this point in the history
  • Loading branch information
PDoakORNL committed Jul 5, 2023
1 parent 8f0bff3 commit 4bc87b1
Show file tree
Hide file tree
Showing 13 changed files with 7 additions and 40 deletions.
30 changes: 4 additions & 26 deletions src/QMCApp/QMCMain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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")
{
Expand Down Expand Up @@ -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")
{
Expand Down
6 changes: 3 additions & 3 deletions src/QMCHamiltonians/tests/MinimalHamiltonianPool.h
Original file line number Diff line number Diff line change
Expand Up @@ -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, [email protected], Oak Ridge National Laboratory
//
Expand Down Expand Up @@ -45,7 +45,7 @@ class MinimalHamiltonianPool
doc.parseFromString(hamiltonian_xml);

xmlNodePtr root = doc.getRoot();
hpool.put(root,true);
hpool.put(root, true);

return hpool;
}
Expand All @@ -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;
}
Expand Down
1 change: 0 additions & 1 deletion tests/io/restart_dmc/det_qmc_vmcbatch_dmcbatch_tm.in.xml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@
<pseudo elementType="C" href="C.BFD.xml"/>
</pairpot>
<pairpot name="MPC" type="MPC" source="e" target="e" ecut="60.0" physical="false"/>
<!-- <flux name="Flux"/> -->
</hamiltonian>
</qmcsystem>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@
<pseudo elementType="C" href="C.BFD.xml"/>
</pairpot>
<pairpot name="MPC" type="MPC" source="e" target="e" ecut="60.0" physical="false"/>
<!-- <flux name="Flux"/> -->
</hamiltonian>
</qmcsystem>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@
<pseudo elementType="C" href="C.BFD.xml"/>
</pairpot>
<pairpot name="MPC" type="MPC" source="e" target="e" ecut="60.0" physical="false"/>
<!-- <flux name="Flux"/> -->
</hamiltonian>
</qmcsystem>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@
<pseudo elementType="C" href="C.BFD.xml"/>
</pairpot>
<pairpot name="MPC" type="MPC" source="e" target="e" ecut="60.0" physical="false"/>
<!-- <flux name="Flux"/> -->
</hamiltonian>
</qmcsystem>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@
<pseudo elementType="C" href="C.BFD.xml"/>
</pairpot>
<pairpot name="MPC" type="MPC" source="e" target="e" ecut="60.0" physical="false"/>
<!-- <flux name="Flux"/> -->
</hamiltonian>
</qmcsystem>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@
<pairpot type="pseudo" name="PseudoPot" source="ion0" wavefunction="psi0" format="xml">
<pseudo elementType="C" href="C.BFD.xml"/>
</pairpot>
<!-- <flux name="Flux"/> -->
</hamiltonian>
</qmcsystem>

Expand Down
1 change: 0 additions & 1 deletion tests/solids/diamondC_2x1x1_pp/det_qmc_vmc_dmc_pw.in.xml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@
<pairpot type="pseudo" name="PseudoPot" source="ion0" wavefunction="psi0" format="xml">
<pseudo elementType="C" href="C.BFD.xml"/>
</pairpot>
<!-- <estimator type="flux" name="Flux"/> -->
</hamiltonian>
</qmcsystem>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@
<pairpot type="pseudo" name="PseudoPot" source="ion0" wavefunction="psi0" format="xml">
<pseudo elementType="C" href="C.BFD.xml"/>
</pairpot>
<!-- <flux name="Flux"/> -->
</hamiltonian>
</qmcsystem>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@
<pairpot type="pseudo" name="PseudoPot" source="ion0" wavefunction="psi0" format="xml">
<pseudo elementType="C" href="C.BFD.xml"/>
</pairpot>
<!-- <estimator type="flux" name="Flux"/> -->
</hamiltonian>
</qmcsystem>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@
<pairpot type="pseudo" name="PseudoPot" source="ion0" wavefunction="psi0" format="xml">
<pseudo elementType="C" href="C.BFD.xml"/>
</pairpot>
<!-- <flux name="Flux"/> -->
</hamiltonian>
</qmcsystem>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@
<pairpot type="pseudo" name="PseudoPot" source="ion0" wavefunction="psi0" format="xml">
<pseudo elementType="C" href="C.BFD.xml"/>
</pairpot>
<!-- <flux name="Flux"/> -->
</hamiltonian>
</qmcsystem>

Expand Down

0 comments on commit 4bc87b1

Please sign in to comment.