QMCPACK
SetupDMCTest.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) 2019 QMCPACK developers.
6 //
7 // File developed by: Peter Doak, doakpw@ornl.gov, Oak Ridge National Laboratory
8 //
9 // File created by: Peter Doak, doakpw@ornl.gov, Oak Ridge National Laboratory
10 //////////////////////////////////////////////////////////////////////////////////////
11 
12 #ifndef QMCPLUSPLUS_SETUP_DMCTEST_H
13 #define QMCPLUSPLUS_SETUP_DMCTEST_H
14 
18 #include "Concurrency/Info.hpp"
22 #include "ProjectData.h"
23 
24 namespace qmcplusplus
25 {
26 namespace testing
27 {
28 class SetupDMCTest : public SetupPools
29 {
30 public:
31  SetupDMCTest(int nranks = 4) : num_ranks(nranks), qmcdrv_input()
32  {
33  if (Concurrency::maxCapacity<>() < 8)
34  num_crowds = Concurrency::maxCapacity<>();
35  }
36 
38  {
41  node = doc.getRoot();
42 
45 
46  QMCDriverInput qmc_input_copy(qmcdrv_input);
47  DMCDriverInput dmc_input_copy(dmcdrv_input);
48  return {test_project,
49  std::move(qmc_input_copy),
50  std::nullopt,
51  std::move(dmc_input_copy),
53  MCPopulation(comm->size(), comm->rank(), particle_pool->getParticleSet("e"),
54  wavefunction_pool->getPrimary(), hamiltonian_pool->getPrimary()),
55  comm};
56  }
57 
58 private:
60 
61 public:
63 
65  xmlNodePtr node;
66 
67  int num_ranks;
68  int num_crowds = 8;
69 
72 };
73 } // namespace testing
74 } // namespace qmcplusplus
75 
76 #endif
class that handles xmlDoc
Definition: Libxml2Doc.h:76
Abstraction of information on executor environments.
helper functions for EinsplineSetBuilder
Definition: Configuration.h:43
int rank() const
return the rank
Definition: Communicate.h:116
UPtr< ParticleSetPool > particle_pool
Definition: SetupPools.h:33
class ProjectData
Definition: ProjectData.h:36
Implements a DMC using particle-by-particle threaded and batched moves.
Definition: DMCBatched.h:35
A set of light weight walkers that are carried between driver sections and restart.
xmlNodePtr getRoot()
Definition: Libxml2Doc.h:88
UPtr< HamiltonianPool > hamiltonian_pool
Definition: SetupPools.h:35
int size() const
return the number of tasks
Definition: Communicate.h:118
Input representation for DMC driver class runtime parameters.
WalkerConfigurations walker_confs
Definition: SetupDMCTest.h:62
UPtr< WaveFunctionPool > wavefunction_pool
Definition: SetupPools.h:34
constexpr int valid_dmc_input_dmc_batch_index
void readXML(xmlNodePtr cur)
Reads qmc section xml node parameters.
bool parseFromString(const std::string_view data)
Definition: Libxml2Doc.cpp:204
constexpr std::array< const char *, 3 > valid_dmc_input_sections
utility functions for executors
Input representation for Driver base class runtime parameters.
void readXML(xmlNodePtr xml_input)