37 throw std::runtime_error(
"Bad Rank Count, WalkerControlMPI tests can only be run with 3 MPI ranks.");
53 auto walker_elements =
pop_->get_walker_elements();
55 for (
auto we : walker_elements)
58 if (we.walker.DataSet.size() <= 0)
60 we.walker.registerData();
61 we.twf.registerData(we.pset, we.walker.DataSet);
62 we.walker.DataSet.allocate();
64 we.twf.copyFromBuffer(we.pset, we.walker.DataSet);
65 we.twf.evaluateLog(we.pset);
66 we.twf.updateBuffer(we.pset, we.walker.DataSet);
73 std::vector<int> rank_walker_count(c->
size(), 0);
77 const int current_population = std::accumulate(rank_walker_count.begin(), rank_walker_count.end(), 0);
81 std::cout <<
"Walkers Per Rank (Total: " << current_population <<
")\n";
82 for (
int i = 0; i < rank_walker_count.size(); ++i)
84 std::cout <<
" " << i <<
" " << rank_walker_count[i] <<
'\n';
92 std::vector<int> num_per_rank = {3, 1, 1};
93 std::vector<int> fair_offset;
99 TEST_CASE(
"WalkerControl::determineNewWalkerPopulation",
"[drivers][walker_control]")
101 std::vector<int> minus;
102 std::vector<int> plus;
105 CHECK(minus.size() == 2);
106 CHECK(plus.size() == 2);
UnifiedDriverWalkerControlMPITest()
helper functions for EinsplineSetBuilder
int rank() const
return the rank
Declaration of OutputManager class.
void reportWalkersPerRank(Communicate *c, MCPopulation &pop)
UPtr< ParticleSetPool > particle_pool
UPtr< MCPopulation > pop_
TEST_CASE("complex_helper", "[type_traits]")
UPtr< HamiltonianPool > hamiltonian_pool
int size() const
return the number of tasks
void makeValidWalkers()
Getting the "fat" walker valid enough to be MPI swapable.
Wrapping information on parallelism.
UPtr< WaveFunctionPool > wavefunction_pool
static void testNewDistribution(std::vector< int > &minus, std::vector< int > &plus)
Declaration of WaveFunctionPool.
WalkerConfigurations walker_confs
Declaration of HamiltonianPool.
CHECK(log_values[0]==ComplexApprox(std::complex< double >{ 5.603777579195571, -6.1586603331188225 }))
IndexType get_num_local_walkers() const
static void determineNewWalkerPopulation(const std::vector< int > &num_per_rank, std::vector< int > &fair_offset, std::vector< int > &minus, std::vector< int > &plus)
creates the distribution plan
Declaration of ParticleSetPool.