![]() |
QMCPACK
|
class ProjectData More...
Public Types | |
enum | DriverVersion { LEGACY, BATCH } |
Enum for global scope switch of design from legacy driver based to batch driver based. More... | |
Public Member Functions | |
ProjectData (const std::string &atitle="", DriverVersion de=DriverVersion::LEGACY) | |
constructor More... | |
bool | get (std::ostream &os) const |
bool | put (std::istream &is) |
bool | put (xmlNodePtr cur) |
void | reset () |
Construct the root name with title_ and m_series. More... | |
void | advance () |
increment a series number and reset project_root_ More... | |
void | rewind () |
roll-back a series number and reset project_root_ by one More... | |
void | setCommunicator (Communicate *c) |
const std::string & | getTitle () const noexcept |
returns the title of the project <project id="det_qmc_short_sdbatch_vmcbatch_mwalkers" series="0"> translate to title_ = "det_qmc_short_sdbatch_vmcbatch_mwalkers" More... | |
const std::string & | currentMainRoot () const noexcept |
returns the projectmain of the project, the series id is incremented at every QMC section <project id="det_qmc_short_sdbatch_vmcbatch_mwalkers" series="0"> translate to project_main_ = "det_qmc_short_sdbatch_vmcbatch_mwalkers.s000" More... | |
const std::string & | nextRoot () const noexcept |
returns the nextroot of the project, the series id is incremented at every QMC section <project id="det_qmc_short_sdbatch_vmcbatch_mwalkers" series="0"> translate to project_main_ = "det_qmc_short_sdbatch_vmcbatch_mwalkers.s001" More... | |
bool | previousRoot (std::string &oldroot) const |
return the root of the previous sequence More... | |
int | getSeriesIndex () const noexcept |
int | getMaxCPUSeconds () const noexcept |
DriverVersion | getDriverVersion () const noexcept |
bool | isComplex () const noexcept |
const RuntimeOptions & | getRuntimeOptions () const noexcept |
Static Private Member Functions | |
static DriverVersion | lookupDriverVersion (const std::string &enum_value) |
Private Attributes | |
std::string | title_ |
title of the project More... | |
std::string | host_ |
name of the host where the job is running More... | |
std::string | date_ |
date when the job is executed More... | |
std::string | project_main_ |
main root for all the output engines More... | |
std::string | project_root_ |
processor-dependent root for all the output engines More... | |
std::string | next_root_ |
root for the next run More... | |
int | series_ |
series index More... | |
Communicate * | my_comm_ |
communicator More... | |
xmlNodePtr | cur_ |
the xml node for <Project> More... | |
int | max_cpu_secs_ |
max cpu seconds More... | |
DriverVersion | driver_version_ |
RuntimeOptions | runtime_options_ |
Static Private Attributes | |
static const std::unordered_map< std::string, DriverVersion > | lookup_input_enum_value |
class ProjectData
Encapsulate data for a project
Default: title_ = getDateAndTime("%Y%m%dT%H%M")
This reduce the internal state.
Definition at line 36 of file ProjectData.h.
|
strong |
Enum for global scope switch of design from legacy driver based to batch driver based.
This effects more than just which drivers are used. Currently it just effects the meaning of qmc section vmc, dmc, linear name attributes.
Enumerator | |
---|---|
LEGACY | |
BATCH |
Definition at line 43 of file ProjectData.h.
ProjectData | ( | const std::string & | atitle = "" , |
ProjectData::DriverVersion | driver_version = DriverVersion::LEGACY |
||
) |
constructor
Definition at line 35 of file ProjectData.cpp.
References OHMMS::Controller, getDateAndTime(), ProjectData::my_comm_, and ProjectData::title_.
void advance | ( | ) |
increment a series number and reset project_root_
Definition at line 81 of file ProjectData.cpp.
References ProjectData::reset(), and ProjectData::series_.
Referenced by QMCMain::runQMC().
|
noexcept |
returns the projectmain of the project, the series id is incremented at every QMC section <project id="det_qmc_short_sdbatch_vmcbatch_mwalkers" series="0"> translate to project_main_ = "det_qmc_short_sdbatch_vmcbatch_mwalkers.s000"
Definition at line 253 of file ProjectData.cpp.
References ProjectData::project_main_.
Referenced by QMCMain::execute(), QMCDriverNew::get_root_name(), QMCMain::runQMC(), and QMCAppBase::saveXml().
bool get | ( | std::ostream & | os | ) | const |
Definition at line 52 of file ProjectData.cpp.
References getDateAndTime(), ProjectData::host_, and ProjectData::title_.
Referenced by QMCMain::validateXML().
|
noexcept |
Definition at line 261 of file ProjectData.cpp.
References ProjectData::driver_version_.
Referenced by QMCDriverFactory::readSection(), and qmcplusplus::TEST_CASE().
|
noexcept |
Definition at line 259 of file ProjectData.cpp.
References ProjectData::max_cpu_secs_.
Referenced by VMCBatched::run(), and DMCBatched::run().
|
noexcept |
Definition at line 265 of file ProjectData.cpp.
References ProjectData::runtime_options_.
Referenced by SetupPools::SetupPools(), qmcplusplus::TEST_CASE(), qmcplusplus::test_hcpBe_rotation(), and VMCBatchedTest::testCalcDefaultLocalWalkers().
|
noexcept |
Definition at line 257 of file ProjectData.cpp.
References ProjectData::series_.
Referenced by VMCBatched::run(), and qmcplusplus::TEST_CASE().
|
noexcept |
returns the title of the project <project id="det_qmc_short_sdbatch_vmcbatch_mwalkers" series="0"> translate to title_ = "det_qmc_short_sdbatch_vmcbatch_mwalkers"
Definition at line 251 of file ProjectData.cpp.
References ProjectData::title_.
Referenced by QMCAppBase::getTitle(), VMCBatched::run(), DMCBatched::run(), and qmcplusplus::TEST_CASE().
|
noexcept |
Definition at line 263 of file ProjectData.cpp.
References RuntimeOptions::is_complex, and ProjectData::runtime_options_.
Referenced by QMCMain::QMCMain(), and qmcplusplus::TEST_CASE().
|
staticprivate |
Definition at line 268 of file ProjectData.cpp.
References ProjectData::lookup_input_enum_value, and qmcplusplus::lowerCase().
Referenced by ProjectData::put().
|
noexcept |
returns the nextroot of the project, the series id is incremented at every QMC section <project id="det_qmc_short_sdbatch_vmcbatch_mwalkers" series="0"> translate to project_main_ = "det_qmc_short_sdbatch_vmcbatch_mwalkers.s001"
Definition at line 255 of file ProjectData.cpp.
References ProjectData::next_root_.
bool previousRoot | ( | std::string & | oldroot | ) | const |
return the root of the previous sequence
oldroot | is composed by the title_ and series_ |
Definition at line 158 of file ProjectData.cpp.
References Communicate::getGroupID(), QMCState::mpi_groups, ProjectData::my_comm_, qmcplusplus::qmc_common, Communicate::rank(), ProjectData::series_, Communicate::size(), and ProjectData::title_.
bool put | ( | std::istream & | is | ) |
Definition at line 60 of file ProjectData.cpp.
References ProjectData::date_, ProjectData::host_, ProjectData::reset(), ProjectData::series_, and ProjectData::title_.
Referenced by qmcplusplus::TEST_CASE(), and QMCMain::validateXML().
bool put | ( | xmlNodePtr | cur | ) |
first, overwrite the existing xml nodes
second, add xml nodes, if missing
Definition at line 196 of file ProjectData.cpp.
References ParameterSet::add(), ProjectData::cur_, ProjectData::date_, ProjectData::driver_version_, getDateAndTime(), getHostName(), getXMLAttributeValue(), ProjectData::host_, ProjectData::lookupDriverVersion(), ProjectData::max_cpu_secs_, ParameterSet::put(), ProjectData::reset(), ProjectData::series_, XMLNodeString::setXMLNodeContent(), and ProjectData::title_.
void reset | ( | ) |
Construct the root name with title_ and m_series.
Definition at line 97 of file ProjectData.cpp.
References ProjectData::cur_, Communicate::getGroupID(), QMCState::mpi_groups, ProjectData::my_comm_, ProjectData::next_root_, ProjectData::project_main_, ProjectData::project_root_, qmcplusplus::qmc_common, Communicate::rank(), qmcplusplus::Units::time::s, ProjectData::series_, Communicate::setName(), Communicate::size(), and ProjectData::title_.
Referenced by ProjectData::advance(), ProjectData::put(), ProjectData::rewind(), and QMCMain::validateXML().
void rewind | ( | ) |
roll-back a series number and reset project_root_ by one
Definition at line 87 of file ProjectData.cpp.
References ProjectData::reset(), and ProjectData::series_.
void setCommunicator | ( | Communicate * | c | ) |
Definition at line 50 of file ProjectData.cpp.
References ProjectData::my_comm_.
Referenced by QMCMain::validateXML().
|
private |
the xml node for <Project>
Definition at line 141 of file ProjectData.h.
Referenced by ProjectData::put(), and ProjectData::reset().
|
private |
date when the job is executed
Definition at line 123 of file ProjectData.h.
Referenced by ProjectData::put().
|
private |
Definition at line 147 of file ProjectData.h.
Referenced by ProjectData::getDriverVersion(), and ProjectData::put().
|
private |
name of the host where the job is running
Definition at line 120 of file ProjectData.h.
Referenced by ProjectData::get(), and ProjectData::put().
|
inlinestaticprivate |
Definition at line 50 of file ProjectData.h.
Referenced by ProjectData::lookupDriverVersion().
|
private |
max cpu seconds
Definition at line 144 of file ProjectData.h.
Referenced by ProjectData::getMaxCPUSeconds(), and ProjectData::put().
|
private |
communicator
Definition at line 138 of file ProjectData.h.
Referenced by ProjectData::previousRoot(), ProjectData::ProjectData(), ProjectData::reset(), and ProjectData::setCommunicator().
|
private |
root for the next run
Definition at line 132 of file ProjectData.h.
Referenced by ProjectData::nextRoot(), and ProjectData::reset().
|
private |
main root for all the output engines
Definition at line 126 of file ProjectData.h.
Referenced by ProjectData::currentMainRoot(), and ProjectData::reset().
|
private |
processor-dependent root for all the output engines
Definition at line 129 of file ProjectData.h.
Referenced by ProjectData::reset().
|
private |
Definition at line 150 of file ProjectData.h.
Referenced by ProjectData::getRuntimeOptions(), and ProjectData::isComplex().
|
private |
series index
Definition at line 135 of file ProjectData.h.
Referenced by ProjectData::advance(), ProjectData::getSeriesIndex(), ProjectData::previousRoot(), ProjectData::put(), ProjectData::reset(), and ProjectData::rewind().
|
private |
title of the project
Definition at line 117 of file ProjectData.h.
Referenced by ProjectData::get(), ProjectData::getTitle(), ProjectData::previousRoot(), ProjectData::ProjectData(), ProjectData::put(), and ProjectData::reset().