![]() |
QMCPACK
|
Writes a set of walker configurations to an HDF5 file. More...
Public Member Functions | |
HDFWalkerOutput (size_t num_ptcls, const std::string &fname, Communicate *c) | |
constructor More... | |
~HDFWalkerOutput () | |
destructor More... | |
bool | dump (const WalkerConfigurations &w, int block) |
dump configurations More... | |
Private Types | |
using | BufferType = PooledData< OHMMS_PRECISION > |
PooledData<T> is used to define the shape of multi-dimensional array. More... | |
Private Member Functions | |
void | write_configuration (const WalkerConfigurations &W, hdf_archive &hout, int block) |
Private Attributes | |
bool | DoNotAppend |
if true, keep it in memory More... | |
int | appended_blocks |
number of blocks for append More... | |
size_t | number_of_walkers_ |
number of walkers when a state is dumped More... | |
const size_t | number_of_particles_ |
number of particles More... | |
Communicate * | myComm |
communicator More... | |
int | currentConfigNumber |
std::string | RootName |
rootname More... | |
std::string | prevFile |
std::vector< Communicate::request > | myRequest |
std::array< BufferType, 2 > | RemoteData |
std::array< std::vector< QMCTraits::FullPrecRealType >, 2 > | RemoteDataW |
int | block |
Writes a set of walker configurations to an HDF5 file.
Definition at line 26 of file HDFWalkerOutput.h.
|
private |
PooledData<T> is used to define the shape of multi-dimensional array.
Definition at line 60 of file HDFWalkerOutput.h.
HDFWalkerOutput | ( | size_t | num_ptcls, |
const std::string & | fname, | ||
Communicate * | c | ||
) |
constructor
Definition at line 57 of file HDFWalkerOutput.cpp.
References HDFWalkerOutput::block.
|
default |
destructor
Destructor writes the state of random numbers and close the file.
bool dump | ( | const WalkerConfigurations & | W, |
int | nblock | ||
) |
dump configurations
Write the set of walker configurations to the HDF5 file.
w | walkers |
W | set of walker configurations |
Dump is for restart and do not preserve the file
Definition at line 82 of file HDFWalkerOutput.cpp.
References hdf_archive::close(), qmcplusplus::hdf::config_ext, hdf_archive::create(), HDFWalkerOutput::currentConfigNumber, Communicate::getName(), qmcplusplus::hdf::main_state, HDFWalkerOutput::myComm, HDFWalkerOutput::prevFile, hdf_archive::push(), qmcplusplus::hdf::version, HDFVersion::version, hdf_archive::write(), and HDFWalkerOutput::write_configuration().
Referenced by MCWalkerConfiguration::dumpEnsemble(), and qmcplusplus::TEST_CASE().
|
private |
Definition at line 110 of file HDFWalkerOutput.cpp.
References HDFWalkerOutput::block, gatherv(), WalkerConfigurations::getActiveWalkers(), WalkerConfigurations::getWalkerOffsets(), hdf_archive::is_parallel(), HDFWalkerOutput::myComm, qmcplusplus::hdf::num_walkers, HDFWalkerOutput::number_of_particles_, HDFWalkerOutput::number_of_walkers_, OHMMS_DIM, WalkerConfigurations::putConfigurations(), Communicate::rank(), HDFWalkerOutput::RemoteData, HDFWalkerOutput::RemoteDataW, Communicate::size(), qmcplusplus::hdf::walker_weights, qmcplusplus::hdf::walkers, hdf_archive::write(), and hdf_archive::writeSlabReshaped().
Referenced by HDFWalkerOutput::dump().
|
private |
number of blocks for append
Definition at line 31 of file HDFWalkerOutput.h.
|
private |
Definition at line 64 of file HDFWalkerOutput.h.
Referenced by HDFWalkerOutput::HDFWalkerOutput(), and HDFWalkerOutput::write_configuration().
|
private |
Definition at line 42 of file HDFWalkerOutput.h.
Referenced by HDFWalkerOutput::dump().
|
private |
if true, keep it in memory
Definition at line 29 of file HDFWalkerOutput.h.
|
private |
communicator
Definition at line 41 of file HDFWalkerOutput.h.
Referenced by HDFWalkerOutput::dump(), and HDFWalkerOutput::write_configuration().
|
private |
Definition at line 61 of file HDFWalkerOutput.h.
|
private |
number of particles
Definition at line 39 of file HDFWalkerOutput.h.
Referenced by HDFWalkerOutput::write_configuration().
|
private |
number of walkers when a state is dumped
When the number of walkers per state has changed, NumOfWalkers is used to reallocate the hdf5 group.
Definition at line 37 of file HDFWalkerOutput.h.
Referenced by HDFWalkerOutput::write_configuration().
|
private |
Definition at line 45 of file HDFWalkerOutput.h.
Referenced by HDFWalkerOutput::dump().
|
private |
Definition at line 62 of file HDFWalkerOutput.h.
Referenced by HDFWalkerOutput::write_configuration().
|
private |
Definition at line 63 of file HDFWalkerOutput.h.
Referenced by HDFWalkerOutput::write_configuration().
|
private |
rootname
Definition at line 44 of file HDFWalkerOutput.h.