OPAL (Object Oriented Parallel Accelerator Library) 2022.1
OPAL
|
#include <H5PartWrapper.h>
Public Member Functions | |
virtual | ~H5PartWrapper () |
void | close () |
double | getLastPosition () |
virtual void | readHeader ()=0 |
virtual void | readStep (PartBunchBase< double, 3 > *, h5_ssize_t firstParticle, h5_ssize_t lastParticle)=0 |
virtual void | writeHeader ()=0 |
virtual void | writeStep (PartBunchBase< double, 3 > *, const std::map< std::string, double > &)=0 |
virtual bool | predecessorIsSameFlavour () const =0 |
void | storeCavityInformation () |
size_t | getNumParticles () const |
Protected Member Functions | |
H5PartWrapper (const std::string &fileName, h5_int32_t flags=H5_O_WRONLY) | |
H5PartWrapper (const std::string &fileName, int restartStep, std::string sourceFile, h5_int32_t flags=H5_O_RDWR) | |
void | open (h5_int32_t flags) |
void | copyFile (const std::string &sourceFile, int lastStep=-1, h5_int32_t flags=H5_O_WRONLY) |
void | copyFileSystem (const std::string &sourceFile) |
void | copyHeader (h5_file_t source) |
void | copyStep (h5_file_t source, int step) |
void | copyStepHeader (h5_file_t source) |
void | copyStepData (h5_file_t source) |
void | sendFailureMessage (bool failed, const std::string &where, const std::string &what) |
void | receiveFailureMessage (int sourceNode, const std::string &where, const std::string &what) |
Static Protected Member Functions | |
static void | reportOnError (h5_int64_t rc, const char *file, int line) |
Protected Attributes | |
h5_file_t | file_m |
std::string | fileName_m |
std::string | predecessorOPALFlavour_m |
h5_int64_t | numSteps_m |
bool | startedFromExistingFile_m |
Static Protected Attributes | |
static std::string | copyFilePrefix_m = ".copy" |
Definition at line 34 of file H5PartWrapper.h.
|
virtual |
Definition at line 58 of file H5PartWrapper.cpp.
References close().
|
protected |
Definition at line 32 of file H5PartWrapper.cpp.
References open().
|
protected |
Definition at line 42 of file H5PartWrapper.cpp.
References copyFile(), fileName_m, and open().
void H5PartWrapper::close | ( | ) |
Definition at line 62 of file H5PartWrapper.cpp.
References Communicate::barrier(), IpplInfo::Comm, file_m, and REPORTONERROR.
Referenced by H5Writer::close(), copyFile(), H5Writer::H5Writer(), open(), MultiBunchHandler::readBunch(), MultiBunchHandler::saveBunch(), storeCavityInformation(), H5PartWrapperForPC::writeStep(), H5PartWrapperForPT::writeStep(), and ~H5PartWrapper().
|
protected |
Definition at line 129 of file H5PartWrapper.cpp.
References Communicate::barrier(), close(), IpplInfo::Comm, copyFilePrefix_m, copyFileSystem(), copyHeader(), copyStep(), fileName_m, Hypervolume::fs, IpplInfo::getComm(), IpplInfo::myNode(), numSteps_m, open(), PAssert, predecessorOPALFlavour_m, READSTEPATTRIB, and REPORTONERROR.
Referenced by H5PartWrapper().
|
protected |
Definition at line 254 of file H5PartWrapper.cpp.
References fileName_m, IpplInfo::myNode(), receiveFailureMessage(), and sendFailureMessage().
Referenced by copyFile().
|
protected |
Definition at line 291 of file H5PartWrapper.cpp.
References PyOpal::PyElementNS::attributeName, file_m, READFILEATTRIB, REPORTONERROR, WRITEFILEATTRIB, and WRITESTRINGFILEATTRIB.
Referenced by copyFile().
|
protected |
Definition at line 361 of file H5PartWrapper.cpp.
References copyStepData(), copyStepHeader(), file_m, numSteps_m, and REPORTONERROR.
Referenced by copyFile().
|
protected |
Definition at line 446 of file H5PartWrapper.cpp.
References Util::c_data(), file_m, IpplInfo::getNodes(), IpplInfo::myNode(), READDATA, REPORTONERROR, and WRITEDATA.
Referenced by copyStep().
|
protected |
Definition at line 372 of file H5PartWrapper.cpp.
References PyOpal::PyElementNS::attributeName, file_m, predecessorOPALFlavour_m, READSTEPATTRIB, REPORTONERROR, WRITESTEPATTRIB, and WRITESTRINGSTEPATTRIB.
Referenced by copyStep().
|
inline |
Definition at line 89 of file H5PartWrapper.h.
References file_m, open(), readStep(), READSTEPATTRIB, and REPORTONERROR.
Referenced by H5Writer::getLastPosition().
size_t H5PartWrapper::getNumParticles | ( | ) | const |
Definition at line 525 of file H5PartWrapper.cpp.
References file_m, numSteps_m, and REPORTONERROR.
Referenced by Distribution::doRestartOpalCycl(), Distribution::doRestartOpalT(), MultiBunchHandler::readBunch(), H5PartWrapperForPC::readStepData(), and H5PartWrapperForPT::readStepData().
|
protected |
Definition at line 72 of file H5PartWrapper.cpp.
References close(), file_m, fileName_m, IpplInfo::getComm(), and PAssert.
Referenced by copyFile(), getLastPosition(), H5PartWrapper(), storeCavityInformation(), H5PartWrapperForPC::writeStep(), and H5PartWrapperForPT::writeStep().
|
pure virtual |
Implemented in H5PartWrapperForPC, and H5PartWrapperForPT.
Referenced by Distribution::doRestartOpalCycl().
|
pure virtual |
Implemented in H5PartWrapperForPC, and H5PartWrapperForPT.
Referenced by Distribution::doRestartOpalCycl(), and Distribution::doRestartOpalT().
|
pure virtual |
Implemented in H5PartWrapperForPC, and H5PartWrapperForPT.
Referenced by Distribution::doRestartOpalCycl(), Distribution::doRestartOpalT(), and getLastPosition().
|
protected |
Definition at line 513 of file H5PartWrapper.cpp.
References IpplInfo::Comm, getMessage(), Communicate::receive_block(), and where().
Referenced by copyFileSystem().
|
inlinestaticprotected |
Definition at line 83 of file H5PartWrapper.h.
References endl(), and ERRORMSG.
Referenced by H5PartWrapperForPT::writeStepData().
|
protected |
Definition at line 501 of file H5PartWrapper.cpp.
References Communicate::broadcast_all(), IpplInfo::Comm, putMessage(), and where().
Referenced by copyFileSystem().
void H5PartWrapper::storeCavityInformation | ( | ) |
Write number of Cavities with autophase information
Definition at line 87 of file H5PartWrapper.cpp.
References close(), end(), endl(), file_m, OpalData::getFirstMaxPhases(), OpalData::getInstance(), OpalData::getLastMaxPhases(), OpalData::getNumberOfMaxPhases(), INFOMSG, open(), WRITEFILEATTRIB, and WRITESTRINGFILEATTRIB.
Referenced by H5Writer::storeCavityInformation().
|
pure virtual |
Implemented in H5PartWrapperForPC, and H5PartWrapperForPT.
Referenced by H5Writer::H5Writer().
|
pure virtual |
Implemented in H5PartWrapperForPC, and H5PartWrapperForPT.
Referenced by H5Writer::writePhaseSpace().
|
staticprotected |
Definition at line 79 of file H5PartWrapper.h.
Referenced by copyFile().
|
protected |
Definition at line 73 of file H5PartWrapper.h.
Referenced by close(), copyHeader(), copyStep(), copyStepData(), copyStepHeader(), getLastPosition(), getNumParticles(), H5PartWrapperForPT::H5PartWrapperForPT(), open(), H5PartWrapperForPC::readHeader(), H5PartWrapperForPT::readHeader(), H5PartWrapperForPC::readStep(), H5PartWrapperForPT::readStep(), H5PartWrapperForPC::readStepData(), H5PartWrapperForPT::readStepData(), H5PartWrapperForPC::readStepHeader(), H5PartWrapperForPT::readStepHeader(), storeCavityInformation(), H5PartWrapperForPC::writeHeader(), H5PartWrapperForPT::writeHeader(), H5PartWrapperForPC::writeStepData(), H5PartWrapperForPT::writeStepData(), H5PartWrapperForPC::writeStepHeader(), and H5PartWrapperForPT::writeStepHeader().
|
protected |
Definition at line 74 of file H5PartWrapper.h.
Referenced by copyFile(), copyFileSystem(), H5PartWrapper(), and open().
|
protected |
Definition at line 76 of file H5PartWrapper.h.
Referenced by copyFile(), copyStep(), getNumParticles(), H5PartWrapperForPC::writeStep(), H5PartWrapperForPC::writeStepHeader(), and H5PartWrapperForPT::writeStepHeader().
|
protected |
Definition at line 75 of file H5PartWrapper.h.
Referenced by copyFile(), copyStepHeader(), H5PartWrapperForPC::predecessorIsSameFlavour(), H5PartWrapperForPT::predecessorIsSameFlavour(), H5PartWrapperForPC::readStepData(), and H5PartWrapperForPC::readStepHeader().
|
protected |
Definition at line 77 of file H5PartWrapper.h.