QMCPACK
QMCDriverNew.h
Go to the documentation of this file.
1 //////////////////////////////////////////////////////////////////////////////////////
2 // This file is distributed under the University of Illinois/NCSA Open Source License.
3 // See LICENSE file in top directory for details.
4 //
5 // Copyright (c) 2020 QMCPACK developers.
6 //
7 // File developed by: Peter Doak, doakpw@ornl.gov, Oak Ridge National Laboratory
8 //
9 // File refactored from: QMCDriver.h
10 //////////////////////////////////////////////////////////////////////////////////////
11 
12 
13 /**
14  * @file
15  * Declaration of QMCDriverNew
16  *
17  * This will replace QMCDriver once unified drivers are finished
18  * the general documentation from QMCDriver.h must be moved before then
19  *
20  * This driver base class should be generic with respect to precision,
21  * value type, device execution, and ...
22  * It should contain no typdefs not related to compiler bugs or platform workarounds
23  *
24  */
25 
26 #ifndef QMCPLUSPLUS_QMCDRIVERNEW_H
27 #define QMCPLUSPLUS_QMCDRIVERNEW_H
28 
29 #include <type_traits>
30 
31 #include "Configuration.h"
32 #include "Particle/HDFWalkerIO.h"
33 #include "Pools/PooledData.h"
34 #include "Utilities/TimerManager.h"
41 #include "ProjectData.h"
42 #include "MultiWalkerDispatchers.h"
43 #include "DriverWalkerTypes.h"
44 #include "TauParams.hpp"
45 #include "Particle/MCCoords.hpp"
46 #include "WalkerLogInput.h"
47 #include <algorithm>
48 
49 class Communicate;
50 
51 namespace qmcplusplus
52 {
53 //forward declarations: Do not include headers if not needed
54 class TraceManager;
55 class EstimatorManagerNew;
56 class TrialWaveFunction;
57 class QMCHamiltonian;
58 
59 namespace testing
60 {
61 class DMCBatchedTest;
62 class VMCBatchedTest;
63 class QMCDriverNewTestWrapper;
64 } // namespace testing
65 
66 /** @ingroup QMCDrivers
67  * @{
68  * @brief QMCDriverNew Base class for Unified Drivers
69  *
70  * # General Principals
71  * * Parameters used unchanged from input object are not copied into class state
72  * * The driver state machine should be as minimal as possible.
73  * * In non performance critical areas favor clarity over clever optimizations.
74  */
76 {
77 public:
81  /** separate but similar to QMCModeEnum
82  *
83  * a code smell
84  */
85  enum
86  {
91  };
92 
95 
96  using SetNonLocalMoveHandler = std::function<void(QMCHamiltonian&)>;
97  /** bits to classify QMCDriver
98  *
99  * - qmc_driver_mode[QMC_UPDATE_MODE]? particle-by-particle: walker-by-walker
100  * - qmc_driver_mode[QMC_MULTIPLE]? multiple H/Psi : single H/Psi
101  * - qmc_driver_mode[QMC_OPTIMIZE]? optimization : vmc/dmc/rmc
102  */
103  std::bitset<QMC_MODE_MAX> qmc_driver_mode_;
104 
105  /// whether to allow walker logs
107  /// walker logs input
109  //xmlNodePtr walker_logs_xml;
110 
111 protected:
112  /** This is a data structure strictly for QMCDriver and its derived classes
113  *
114  * i.e. its nested in scope for a reason
115  */
117  {
119  std::vector<IndexType> walkers_per_rank;
120  std::vector<IndexType> walkers_per_crowd;
122  };
123  /** Do common section starting tasks for VMC and DMC
124  *
125  * set up population_, crowds_, rngs and step_contexts_
126  */
127  void initializeQMC(const AdjustedWalkerCounts& awc);
128 
129  /// inject additional barrier and measure load imbalance.
130  void measureImbalance(const std::string& tag) const;
131  /// end of a block operations. Aggregates statistics across all MPI ranks and write to disk.
132  void endBlock();
133 
134 public:
135  /// Constructor.
136  QMCDriverNew(const ProjectData& project_data,
138  const std::optional<EstimatorManagerInput>& global_emi,
140  MCPopulation&& population,
141  const std::string timer_prefix,
142  Communicate* comm,
143  const std::string& QMC_driver_type);
144 
145  ///Move Constructor
146  QMCDriverNew(QMCDriverNew&&) = default;
147  ///Copy Constructor (disabled).
148  QMCDriverNew(const QMCDriverNew&) = delete;
149  ///Copy operator (disabled).
150  QMCDriverNew& operator=(const QMCDriverNew&) = delete;
151 
152  ~QMCDriverNew() override;
153 
154  bool putQMCInfo(xmlNodePtr cur);
155 
156  /** Adjust populations local walkers to this number
157  * @param nwalkers number of walkers to add
158  *
159  */
160  void makeLocalWalkers(int nwalkers, RealType reserve);
161 
163 
164  /** record the state of the block
165  * @param block current block
166  *
167  * virtual function with a default implementation
168  */
169  void recordBlock(int block) override;
170 
171  /** finalize a qmc section
172  * @param block current block
173  * @param dumpwalkers if true, dump walkers
174  *
175  * Accumulate energy and weight is written to a hdf5 file.
176  * Finialize the estimators
177  */
178  bool finalize(int block, bool dumpwalkers = true);
179 
180  ///return current step
181  inline IndexType current() const { return current_step_; }
182 
183  /** Set the status of the QMCDriver
184  * @param aname the root file name, ignored
185  * @param h5name root name of the master hdf5 file containing previous qmcrun
186  * @param append if true, the run is a continuation of the previous qmc
187  *
188  * All output files will be of
189  * the form "aname.s00X.suffix", where "X" is number
190  * of previous QMC runs for the simulation and "suffix"
191  * is the suffix for the output file.
192  */
193  void setStatus(const std::string& aname, const std::string& h5name, bool append) override;
194 
195  void add_H_and_Psi(QMCHamiltonian* h, TrialWaveFunction* psi) override {};
196 
197  void createRngsStepContexts(int num_crowds);
198 
199  void putWalkers(std::vector<xmlNodePtr>& wset) override;
200 
202  {
204  for (int i = 0; i < Rng.size(); ++i)
205  RngRefs.push_back(*Rng[i]);
206  return RngRefs;
207  }
208 
209  ///return the i-th random generator
210  inline RandomBase<FullPrecRealType>& getRng(int i) override { return (*Rng[i]); }
211 
212  /** intended for logging output and debugging
213  * you should base behavior on type preferably at compile time or if
214  * necessary at runtime using and protected by dynamic cast.
215  * QMCType is primarily for use in the debugger.
216  */
217  std::string getEngineName() override { return QMCType; }
218  unsigned long getDriverMode() override { return qmc_driver_mode_.to_ulong(); }
219 
222 
224 
225  /** @ingroup Legacy interface to be dropped
226  * @{
227  */
228  bool put(xmlNodePtr cur) override { return false; };
229 
230  /** QMCDriverNew driver second (3rd, 4th...) stage of constructing a valid driver
231  *
232  * This is the shared entry point with legacy,
233  * from QMCMain so the API cannot be updated yet
234  *
235  * \todo remove cur, the driver and all its child nodes should be completely processed before
236  * this stage of driver initialization is hit.
237  */
238  void process(xmlNodePtr cur) override = 0;
239 
240  static void initialLogEvaluation(int crowd_id, UPtrVector<Crowd>& crowds, UPtrVector<ContextForSteps>& step_context);
241 
242 
243  /** should be set in input don't see a reason to set individually
244  * @param pbyp if true, use particle-by-particle update
245  */
246  inline void setUpdateMode(bool pbyp) override { qmc_driver_mode_[QMC_UPDATE_MODE] = pbyp; }
247 
248  void putTraces(xmlNodePtr txml) override {}
249  void requestTraces(bool allow_traces) override {}
250 
251  void putWalkerLogs(xmlNodePtr wlxml) override;
252 
253  void requestWalkerLogs(bool allow_walker_logs_) override { allow_walker_logs = allow_walker_logs_; }
254 
255  // scales a MCCoords by sqrtTau. Chooses appropriate taus by CT
256  template<typename RT, CoordsType CT>
257  static void scaleBySqrtTau(const TauParams<RT, CT>& taus, MCCoords<CT>& coords)
258  {
259  for (auto& pos : coords.positions)
260  pos *= taus.sqrttau;
261  if constexpr (CT == CoordsType::POS_SPIN)
262  for (auto& spin : coords.spins)
263  spin *= taus.spin_sqrttau;
264  }
265 
266  /** calculates Green Function from displacements stored in MCCoords
267  * [param, out] log_g
268  */
269  template<typename RT, CoordsType CT>
270  static void computeLogGreensFunction(const MCCoords<CT>& coords,
271  const TauParams<RT, CT>& taus,
272  std::vector<QMCTraits::RealType>& log_gb)
273  {
274  assert(coords.positions.size() == log_gb.size());
275  std::transform(coords.positions.begin(), coords.positions.end(), log_gb.begin(),
276  [halfovertau = taus.oneover2tau](const QMCTraits::PosType& pos) {
277  return -halfovertau * dot(pos, pos);
278  });
279  if constexpr (CT == CoordsType::POS_SPIN)
280  std::transform(coords.spins.begin(), coords.spins.end(), log_gb.begin(), log_gb.begin(),
281  [halfovertau = taus.spin_oneover2tau](const QMCTraits::FullPrecRealType& spin,
282  const QMCTraits::RealType& loggb) {
283  return loggb - halfovertau * spin * spin;
284  });
285  }
286 
287  /** }@ */
288 
289 protected:
290  /** pure function returning AdjustedWalkerCounts data structure
291  *
292  * The logic is now walker counts is fairly simple.
293  * TotalWalkers trumps all other walker parameters
294  * If TotalWalkers is absent walkers_per_rank is used.
295  * if they are both absent then the default is one walker per crowd,
296  * each rank has crowds walkers.
297  * if crowds aren't specified you get one per main level thread.
298  *
299  * You can have crowds or ranks with no walkers.
300  * You cannot have more crowds than threads.
301  *
302  * passing num_ranks instead of internally querying comm->size()
303  * makes unit testing much quicker.
304  *
305  */
307  const IndexType current_configs,
308  const IndexType requested_total_walkers,
309  const IndexType requested_walkers_per_rank,
310  const RealType reserve_walkers,
311  int num_crowds);
312 
313  /** pure function calculating the actual number of steps per block
314  *
315  * @param global_walkers the total number of walkers over all the MPI ranks
316  * @param requested_samples the number of samples from user input "samples". <=0 treated as no input
317  * @param requested_steps the number steps per block from user input "steps". <=0 treated as no input
318  * @param blocks the number of blocks. Must be positive.
319  * @return calculated optimal number of steps per block
320  */
321  static size_t determineStepsPerBlock(IndexType global_walkers,
322  IndexType requested_samples,
323  IndexType requested_steps,
324  IndexType blocks);
325 
326  static void checkNumCrowdsLTNumThreads(const int num_crowds);
327 
328  /// check logpsi and grad and lap against values computed from scratch
329  static void checkLogAndGL(Crowd& crowd, const std::string_view location);
330 
331  const std::string& get_root_name() const override { return project_data_.currentMainRoot(); }
332 
333  /** The timers for the driver.
334  *
335  * This cleans up the driver constructor, and a reference to this structure
336  * Takes the timers into thread scope. We assume the timers are threadsafe.
337  */
339  {
354  DriverTimers(const std::string& prefix)
355  : checkpoint_timer(createGlobalTimer(prefix + "CheckPoint", timer_level_medium)),
357  create_walkers_timer(createGlobalTimer(prefix + "CreateWalkers", timer_level_medium)),
358  init_walkers_timer(createGlobalTimer(prefix + "InitWalkers", timer_level_medium)),
360  movepbyp_timer(createGlobalTimer(prefix + "MovePbyP", timer_level_medium)),
361  hamiltonian_timer(createGlobalTimer(prefix + "Hamiltonian", timer_level_medium)),
362  collectables_timer(createGlobalTimer(prefix + "Collectables", timer_level_medium)),
363  estimators_timer(createGlobalTimer(prefix + "Estimators", timer_level_medium)),
364  imbalance_timer(createGlobalTimer(prefix + "Imbalance", timer_level_medium)),
365  endblock_timer(createGlobalTimer(prefix + "BlockEndDataAggregation", timer_level_medium)),
366  startup_timer(createGlobalTimer(prefix + "Startup", timer_level_medium)),
367  production_timer(createGlobalTimer(prefix + "Production", timer_level_medium)),
368  resource_timer(createGlobalTimer(prefix + "Resources", timer_level_medium))
369  {}
370  };
371 
373 
374  /** @ingroup Driver mutable input values
375  *
376  * they should be limited to values that can be changed from input
377  * or are live state.
378  * @{
379  */
381  ///the number of saved samples
383 
384  /// the number of blocks between recomptePsi
386 
387  /**}@*/
388 
390 
391  std::string h5_file_root_;
392 
393  ///drift modifer
394  std::unique_ptr<DriftModifierBase> drift_modifier_;
395 
396  ///the number to delay updates by
397  int k_delay;
398 
399  /** period of recording walker configurations
400  *
401  * Default is 0 indicating that only the last configuration will be saved.
402  */
404 
406  /// actual number of steps per block
407  size_t steps_per_block_ = 0;
408 
409  ///counter for number of moves accepted
411 
412  ///counter for number of moves /rejected
414 
415  ///Time-step factor \f$ 1/(2\tau)\f$
417  ///Time-step factor \f$ \sqrt{\tau}\f$
419 
420  ///type of qmc: assigned by subclasses
421  const std::string QMCType;
422 
423  /** the entire (on node) walker population
424  * it serves VMCBatch and DMCBatch right now but will be polymorphic
425  */
427 
428  /** the golden multi walker shared resource
429  * serves ParticleSet TrialWaveFunction right now but actually should be based on MCPopulation.
430  * per crowd resources are copied from this gold instance
431  * it should be activated when dispatchers don't serialize walkers
432  */
434 
435  /// multi walker dispatchers
437 
438  /** Observables manager
439  * Has very problematic owner ship and life cycle.
440  * Can be transferred via branch manager one driver to the next indefinitely
441  * TODO: Modify Branch manager and others to clear this up.
442  */
443  std::unique_ptr<EstimatorManagerNew> estimator_manager_;
444 
445  ///record engine for walkers
446  std::unique_ptr<HDFWalkerOutput> wOut;
447 
448  /** Per crowd move contexts, this is where the DistanceTables etc. reside
449  */
451 
452  ///Random number generators
454 
455  ///a list of mcwalkerset element
456  std::vector<xmlNodePtr> mcwalkerNodePtr;
457 
458  // ///alternate method of setting QMC run parameters
459  // IndexType nStepsBetweenSamples;
460  // ///samples per thread
461  // IndexType nSamplesPerThread;
462 
463  // TODO: restart
464  // /** period of dumping walker configurations and everything else for restart
465  // *
466  // * The unit is a block.
467  // */
468  // int check_point_period_;
469 
470  /** }@ */
471 
473 
474  ///profile the driver lifetime
476 
477  /// project info for accessing global fileroot and series id
479 
480  // reference to the captured WalkerConfigurations
482 
483  /// update the global offsets of walker configurations after active walkers being touched.
485 
486 private:
487  friend std::ostream& operator<<(std::ostream& o_stream, const QMCDriverNew& qmcd);
488 
492 };
493 } // namespace qmcplusplus
494 
495 #endif
IndexType target_samples_
the number of saved samples
Definition: QMCDriverNew.h:382
size_t steps_per_block_
actual number of steps per block
Definition: QMCDriverNew.h:407
QMCDriverNew(const ProjectData &project_data, QMCDriverInput &&input, const std::optional< EstimatorManagerInput > &global_emi, WalkerConfigurations &wc, MCPopulation &&population, const std::string timer_prefix, Communicate *comm, const std::string &QMC_driver_type)
Constructor.
Base class for any object which needs to know about a MPI communicator.
Definition: MPIObjectBase.h:26
MCPopulation population_
the entire (on node) walker population it serves VMCBatch and DMCBatch right now but will be polymorp...
Definition: QMCDriverNew.h:426
helper functions for EinsplineSetBuilder
Definition: Configuration.h:43
timer_manager class.
QTBase::RealType RealType
Definition: Configuration.h:58
This is a data structure strictly for QMCDriver and its derived classes.
Definition: QMCDriverNew.h:116
void recordBlock(int block) override
record the state of the block
UPtrVector< MCPWalker > & get_walkers()
Definition: MCPopulation.h:194
WalkerLogInput walker_logs_input
walker logs input
Definition: QMCDriverNew.h:108
RealType m_oneover2tau
Time-step factor .
Definition: QMCDriverNew.h:416
QMCDriverNew Base class for Unified Drivers.
Definition: QMCDriverNew.h:75
void makeLocalWalkers(int nwalkers, RealType reserve)
Adjust populations local walkers to this number.
void putWalkerLogs(xmlNodePtr wlxml) override
class ProjectData
Definition: ProjectData.h:36
A set of light weight walkers that are carried between driver sections and restart.
void process(xmlNodePtr cur) override=0
QMCDriverNew driver second (3rd, 4th...) stage of constructing a valid driver.
Collection of Local Energy Operators.
static void scaleBySqrtTau(const TauParams< RT, CT > &taus, MCCoords< CT > &coords)
Definition: QMCDriverNew.h:257
this class implements drift modification
Object to encapsulate appropriate tau derived parameters for a particular CoordsType specialization...
Definition: TauParams.hpp:25
std::function< void(QMCHamiltonian &)> SetNonLocalMoveHandler
Definition: QMCDriverNew.h:96
Timer accumulates time and call counts.
Definition: NewTimer.h:135
std::vector< std::unique_ptr< T > > UPtrVector
static void checkNumCrowdsLTNumThreads(const int num_crowds)
Driver synchronized step context.
Definition: Crowd.h:38
RandomBase< FullPrecRealType > & getRng(int i) override
return the i-th random generator
Definition: QMCDriverNew.h:210
void createRngsStepContexts(int num_crowds)
Creates Random Number generators for crowds and step contexts.
IndexType get_num_dead_walkers() const
Definition: QMCDriverNew.h:221
std::unique_ptr< EstimatorManagerNew > estimator_manager_
Observables manager Has very problematic owner ship and life cycle.
Definition: QMCDriverNew.h:443
IndexType nReject
counter for number of moves /rejected
Definition: QMCDriverNew.h:413
unsigned long getDriverMode() override
Definition: QMCDriverNew.h:218
The timers for the driver.
Definition: QMCDriverNew.h:338
QMCTraits::IndexType IndexType
Definition: FSUtilities.h:11
std::bitset< QMC_MODE_MAX > qmc_driver_mode_
bits to classify QMCDriver
Definition: QMCDriverNew.h:103
const MultiWalkerDispatchers dispatchers_
multi walker dispatchers
Definition: QMCDriverNew.h:436
Creates a common base class pointer for QMCDriver and QMCDriverNew to share.
Wrapping information on parallelism.
Definition: Communicate.h:68
static void setWalkerOffsets(WalkerConfigurations &, Communicate *comm)
update the global offsets of walker configurations after active walkers being touched.
std::unique_ptr< HDFWalkerOutput > wOut
record engine for walkers
Definition: QMCDriverNew.h:446
static size_t determineStepsPerBlock(IndexType global_walkers, IndexType requested_samples, IndexType requested_steps, IndexType blocks)
pure function calculating the actual number of steps per block
int walker_dump_period
period of recording walker configurations
Definition: QMCDriverNew.h:403
void setUpdateMode(bool pbyp) override
should be set in input don&#39;t see a reason to set individually
Definition: QMCDriverNew.h:246
bool finalize(int block, bool dumpwalkers=true)
finalize a qmc section
const std::string & get_root_name() const override
Definition: QMCDriverNew.h:331
const std::string QMCType
type of qmc: assigned by subclasses
Definition: QMCDriverNew.h:421
DriftModifierBase & get_drift_modifier() const
Definition: QMCDriverNew.h:162
MCPWalker::WFBuffer_t WFBuffer
Definition: MCPopulation.h:42
IndexType current() const
return current step
Definition: QMCDriverNew.h:181
static void initialLogEvaluation(int crowd_id, UPtrVector< Crowd > &crowds, UPtrVector< ContextForSteps > &step_context)
WalkerConfigurations & walker_configs_ref_
Definition: QMCDriverNew.h:481
void putTraces(xmlNodePtr txml) override
Definition: QMCDriverNew.h:248
bool putQMCInfo(xmlNodePtr cur)
NewTimer & createGlobalTimer(const std::string &myname, timer_levels mylevel)
struct DriverWalkerResourceCollection golden_resource_
the golden multi walker shared resource serves ParticleSet TrialWaveFunction right now but actually s...
Definition: QMCDriverNew.h:433
DriverWalker multi walker resource collections It currently supports VMC and DMC only.
QMCTraits::FullPrecRealType FullPrecRealType
Definition: QMCDriverNew.h:80
static void computeLogGreensFunction(const MCCoords< CT > &coords, const TauParams< RT, CT > &taus, std::vector< QMCTraits::RealType > &log_gb)
calculates Green Function from displacements stored in MCCoords [param, out] log_g ...
Definition: QMCDriverNew.h:270
friend std::ostream & operator<<(std::ostream &o_stream, const QMCDriverNew &qmcd)
void setStatus(const std::string &aname, const std::string &h5name, bool append) override
Set the status of the QMCDriver.
static QMCDriverNew::AdjustedWalkerCounts adjustGlobalWalkerCount(Communicate &comm, const IndexType current_configs, const IndexType requested_total_walkers, const IndexType requested_walkers_per_rank, const RealType reserve_walkers, int num_crowds)
}@
QMCTraits::IndexType IndexType
Definition: QMCDriverNew.h:79
UPtrVector< ContextForSteps > step_contexts_
Per crowd move contexts, this is where the DistanceTables etc.
Definition: QMCDriverNew.h:450
RefVector< RandomBase< FullPrecRealType > > getRngRefs() const
Definition: QMCDriverNew.h:201
IndexType get_num_living_walkers() const
Definition: QMCDriverNew.h:220
OHMMS_INDEXTYPE IndexType
define other types
Definition: Configuration.h:65
void requestTraces(bool allow_traces) override
Definition: QMCDriverNew.h:249
const UPtrVector< MCPWalker > & get_dead_walkers() const
Definition: MCPopulation.h:196
std::unique_ptr< DriftModifierBase > drift_modifier_
drift modifer
Definition: QMCDriverNew.h:394
bool allow_walker_logs
whether to allow walker logs
Definition: QMCDriverNew.h:106
static void checkLogAndGL(Crowd &crowd, const std::string_view location)
check logpsi and grad and lap against values computed from scratch
const std::string & currentMainRoot() const noexcept
returns the projectmain of the project, the series id is incremented at every QMC section <project id...
void add_H_and_Psi(QMCHamiltonian *h, TrialWaveFunction *psi) override
Definition: QMCDriverNew.h:195
const QMCDriverInput & getQMCDriverInput() const
Definition: QMCDriverNew.h:223
std::vector< std::reference_wrapper< T > > RefVector
DriverTimers(const std::string &prefix)
Definition: QMCDriverNew.h:354
std::string getEngineName() override
intended for logging output and debugging you should base behavior on type preferably at compile time...
Definition: QMCDriverNew.h:217
Class to represent a many-body trial wave function.
Driver level walker (DriverWalker) related data structures.
Walker< QMCTraits, PtclOnLatticeTraits > MCPWalker
Definition: MCPopulation.h:41
std::vector< xmlNodePtr > mcwalkerNodePtr
a list of mcwalkerset element
Definition: QMCDriverNew.h:456
IndexType nAccept
counter for number of moves accepted
Definition: QMCDriverNew.h:410
Tensor< typename BinaryReturn< T1, T2, OpMultiply >::Type_t, D > dot(const AntiSymTensor< T1, D > &lhs, const AntiSymTensor< T2, D > &rhs)
const ProjectData & project_data_
project info for accessing global fileroot and series id
Definition: QMCDriverNew.h:478
QMCDriverNew & operator=(const QMCDriverNew &)=delete
Copy operator (disabled).
ScopedProfiler driver_scope_profiler_
profile the driver lifetime
Definition: QMCDriverNew.h:475
QMCTraits::RealType RealType
Definition: QMCDriverNew.h:78
QTFull::RealType FullPrecRealType
Definition: Configuration.h:66
bool put(xmlNodePtr cur) override
Definition: QMCDriverNew.h:228
UPtrVector< Crowd > crowds_
}@
Definition: QMCDriverNew.h:389
RealType m_sqrttau
Time-step factor .
Definition: QMCDriverNew.h:418
UPtrVector< RandomBase< FullPrecRealType > > Rng
Random number generators.
Definition: QMCDriverNew.h:453
QMCDriverInput qmcdriver_input_
Definition: QMCDriverNew.h:372
IndexType nBlocksBetweenRecompute
the number of blocks between recomptePsi
Definition: QMCDriverNew.h:385
void measureImbalance(const std::string &tag) const
inject additional barrier and measure load imbalance.
DriverTimers timers_
period of dumping walker configurations and everything else for restart
Definition: QMCDriverNew.h:472
RealType max_disp_sq_
they should be limited to values that can be changed from input or are live state.
Definition: QMCDriverNew.h:380
void requestWalkerLogs(bool allow_walker_logs_) override
Definition: QMCDriverNew.h:253
A container class to represent a walker.
Definition: Walker.h:49
void putWalkers(std::vector< xmlNodePtr > &wset) override
Read walker configurations from *.config.h5 files.
Define a serialized buffer to store anonymous data.
void initializeQMC(const AdjustedWalkerCounts &awc)
Do common section starting tasks for VMC and DMC.
Input representation for Driver base class runtime parameters.
Native representation for walker logs input.
void endBlock()
end of a block operations. Aggregates statistics across all MPI ranks and write to disk...
int k_delay
the number to delay updates by
Definition: QMCDriverNew.h:397