28 #include "mpi/collectives.h" 59 number_of_walkers_(0),
60 number_of_particles_(num_ptcls),
62 currentConfigNumber(0),
96 dump_file.
create(FileName);
100 dump_file.
write(nblock,
"block");
129 std::array<size_t, 1> gcounts{
static_cast<size_t>(
myComm->
size()) + 1};
130 std::array<size_t, 1> counts{0};
131 std::array<size_t, 1> offsets{
static_cast<size_t>(
myComm->
rank())};
132 std::vector<int> myWalkerOffset;
136 myWalkerOffset.push_back(walker_offsets[
myComm->
rank()]);
137 myWalkerOffset.push_back(walker_offsets[
myComm->
size()]);
142 myWalkerOffset.push_back(walker_offsets[
myComm->
rank()]);
145 hout.
write(slab,
"walker_partition");
150 std::array<size_t, 3> offsets{
static_cast<size_t>(walker_offsets[
myComm->
rank()]), 0, 0};
157 std::array<size_t, 1> offsets{
static_cast<size_t>(walker_offsets[
myComm->
rank()])};
164 hout.
write(walker_offsets,
"walker_partition");
170 counts[i] = wb * (walker_offsets[i + 1] - walker_offsets[i]);
171 displ[i] = wb * walker_offsets[i];
179 counts[i] = (walker_offsets[i + 1] - walker_offsets[i]);
180 displ[i] = walker_offsets[i];
bool dump(const WalkerConfigurations &w, int block)
dump configurations
std::array< BufferType, 2 > RemoteData
const size_t number_of_particles_
number of particles
void write(T &data, const std::string &aname)
write the data to the group aname and check status runtime error is issued on I/O error ...
std::array< std::vector< QMCTraits::FullPrecRealType >, 2 > RemoteDataW
helper functions for EinsplineSetBuilder
int rank() const
return the rank
size_t getActiveWalkers() const
return the number of active walkers
Communicate * myComm
communicator
class to use file space hyperslab with a serialized container
A set of light weight walkers that are carried between driver sections and restart.
void close()
close all the open groups and file
const char walker_weights[]
int size() const
return the number of tasks
bool is_parallel() const
return true if parallel i/o
~HDFWalkerOutput()
destructor
Wrapping information on parallelism.
const std::string & getName() const
const char config_ext[]
extension of a configuration file
void writeSlabReshaped(T &data, const std::array< IT, RANK > &shape, const std::string &aname)
write the container data with a specific shape and check status
HDFWalkerOutput(size_t num_ptcls, const std::string &fname, Communicate *c)
constructor
void push(const std::string &gname, bool createit=true)
push a group to the group stack
const std::vector< int > & getWalkerOffsets() const
bool create(const std::filesystem::path &fname, unsigned flags=H5F_ACC_TRUNC)
create a file
void putConfigurations(Walker_t::RealType *target, QMCTraits::FullPrecRealType *weights) const
save the particle positions of all the walkers into target
void gatherv(T *sb, T *rb, int n, IT &counts, IT &displ, int dest)
void write_configuration(const WalkerConfigurations &W, hdf_archive &hout, int block)
size_t number_of_walkers_
number of walkers when a state is dumped