Skip to content

Listener Linecount analysis

Peter Doak edited this page Jun 30, 2022 · 5 revisions

Comparison on line count used in QMCHamiltonian files to supply operator per particle values to Estimators

as of

QMCPACK/qmcpack 4e14d0bc327034cc3ac0c1bbed8978f320e8be2d

PDOAKOrnl/qmcpack 987633c27b50cdbdb6928f6e513c7fa675061b69

The Listener implementation seeks to deliver the just the per particle Hamiltonian Operator values to estimators dependent on them.

The TraceManager implementation looks to be able to do much more but only in the per walker driver and documentation seems limited to one three line mention in the EnergyDensityEstimator documentation.

File Listener TraceManager TM ifdefs
QMCHamiltonian.h 15 17 3
QMCHamiltonian.cpp 52 204 11
OperatorBase.h 13 33 8
OperatorBase.cpp 18 50 5
BareKineticEnergy.h 16 10 3
BareKineticEnergy.cpp 167 90 3
CoulombPBCAA.h 24 8 2
CoulombPBCAA.cpp 134 103 7
CoulombPBCAB.h 24 10 2
CoulombPBCAB.cpp 156 147 6
NonLocalECPotential.h 20 7 3
NonLocalECPotential.cpp 113 29 2

The Listener implementations are dependent on Listener.hpp which has 26 non comment non blank lines The TraceManager implementations are dependent on TraceManager.hpp with 1855.

The discrepancy for NonLocalECPotential.cpp is due to the single walker per particle implementation being the default code path (not true in other Operators) so the new multi-walker per particle implementation added is not offset by the single walker per particle implementation being attributed to the TraceManager implementation.

Listener Tests:

File new test lines
test_QMCHamiltonian.cpp 197
test_bare_kinetic.cpp 112
test_coulomb_pbcAA.cpp 116
test_coulomb_pbcAB.cpp 149
test_Listener.cpp 50

TM Tests:

File new test lines
test_trace_manager.cpp 116

If there are tests trace implementation in the operators of of the large init_traces method in QMCHamiltonian I'm not sure where they are. Code is pre unit testing I assume.

It will be interesting to see what the values in the ported Estimators look like does bulk end up there?

Clone this wiki locally