Stride Reference Manual
1.0
|
Helper for parsing the config, and starting the simulators. More...
#include <Runner.h>
Public Member Functions | |
Runner (const std::vector< std::string > &overrides_list, const std::string &config_file, const RunMode &mode, int timestep) | |
void | printInfo () |
void | initSimulators () |
void | run () |
boost::property_tree::ptree | getConfig () |
boost::property_tree::ptree | getRegionsConfig (const std::vector< string > &names) |
void | write (std::ostream &out, const boost::property_tree::ptree &) |
Static Public Member Functions | |
static void | setup () |
Private Member Functions | |
void | parseConfig () |
void | initOutputs (Simulator &sim) |
std::shared_ptr< Simulator > | addLocalSimulator (const string &name, const boost::property_tree::ptree &config) |
std::shared_ptr< AsyncSimulator > | addRemoteSimulator (const string &name, const boost::property_tree::ptree &config) |
void | initMpi () |
void | makeSetupStruct () |
boost::filesystem::path | hdf5Path (const string &name) |
Private Attributes | |
std::map< std::string, std::string > | m_overrides |
std::string | m_config_file |
RunMode | m_mode |
bool | m_uses_mpi = false |
bool | m_is_master = true |
int | m_timestep |
int | m_world_rank |
int | m_world_size |
shared_ptr< RemoteSimulatorReceiver > | m_local_receiver |
thread | m_listen_thread |
string | m_processor_name |
boost::bimap< string, int > | m_worldranks |
boost::property_tree::ptree | m_config |
std::map< std::string, boost::property_tree::ptree > | m_region_configs |
std::vector< std::string > | m_region_order |
std::map< std::string, shared_ptr< Simulator > > | m_local_simulators |
std::map< std::string, shared_ptr< AsyncSimulator > > | m_async_simulators |
std::shared_ptr< Coordinator > | m_coord |
std::string | m_name |
boost::filesystem::path | m_output_dir |
std::string | m_travel_schedule |
std::map< std::string, std::shared_ptr< Hdf5Saver > > | m_hdf5_savers |
std::map< std::string, std::shared_ptr< ClusterSaver > > | m_vis_savers |
Runner::Runner | ( | const std::vector< std::string > & | overrides_list, |
const std::string & | config_file, | ||
const RunMode & | mode, | ||
int | timestep | ||
) |
Definition at line 31 of file Runner.cpp.
References stride::util::InstallDirs::getOutputDir(), m_name, m_output_dir, m_overrides, parseConfig(), stride::util::StringUtils::replace(), stride::util::StringUtils::split(), and stride::util::StringUtils::trim().
|
static |
Definition at line 27 of file Runner.cpp.
Referenced by initMpi().
void Runner::printInfo | ( | ) |
Definition at line 79 of file Runner.cpp.
References m_name, and m_region_configs.
Referenced by main().
void Runner::initSimulators | ( | ) |
Definition at line 94 of file Runner.cpp.
References addLocalSimulator(), addRemoteSimulator(), stride::util::InstallDirs::getOutputDir(), getRegionsConfig(), initMpi(), m_async_simulators, m_config, m_coord, m_is_master, m_local_simulators, m_name, m_region_configs, m_travel_schedule, m_uses_mpi, and m_world_rank.
void Runner::run | ( | ) |
Definition at line 325 of file Runner.cpp.
References m_async_simulators, m_config, m_coord, m_is_master, m_listen_thread, m_local_simulators, m_mode, m_output_dir, m_processor_name, m_region_configs, m_timestep, m_uses_mpi, m_world_rank, m_world_size, and stride::Replay.
pt::ptree Runner::getConfig | ( | ) |
Definition at line 407 of file Runner.cpp.
References getRegionsConfig(), and m_region_order.
pt::ptree Runner::getRegionsConfig | ( | const std::vector< string > & | names | ) |
Definition at line 411 of file Runner.cpp.
References m_config, and m_region_configs.
Referenced by getConfig(), and initSimulators().
void stride::run::Runner::write | ( | std::ostream & | out, |
const boost::property_tree::ptree & | |||
) |
|
private |
Definition at line 49 of file Runner.cpp.
References m_config, m_config_file, m_name, m_overrides, m_region_configs, m_region_order, and m_travel_schedule.
Referenced by Runner().
|
private |
Definition at line 281 of file Runner.cpp.
References stride::Extend, stride::Simulator::getName(), hdf5Path(), m_config, stride::Simulator::m_config_pt, m_hdf5_savers, stride::Simulator::m_logger, m_mode, m_output_dir, m_timestep, m_vis_savers, stride::util::Subject< E >::registerObserver(), stride::ClusterSaver::update(), and stride::Hdf5Saver::update().
Referenced by addLocalSimulator().
|
private |
Definition at line 168 of file Runner.cpp.
References stride::SimulatorBuilder::build(), stride::Extend, stride::Hdf5Loader::getLastSavedTimestep(), hdf5Path(), initOutputs(), stride::Hdf5Loader::loadFromTimestep(), m_async_simulators, m_local_simulators, m_mode, m_timestep, and stride::Replay.
Referenced by initSimulators().
|
private |
Definition at line 275 of file Runner.cpp.
References m_async_simulators.
Referenced by initSimulators().
|
private |
Definition at line 189 of file Runner.cpp.
References m_is_master, m_processor_name, m_region_configs, m_uses_mpi, m_world_rank, m_world_size, m_worldranks, makeSetupStruct(), and setup().
Referenced by initSimulators().
|
private |
Definition at line 260 of file Runner.cpp.
Referenced by initMpi().
|
private |
Definition at line 421 of file Runner.cpp.
References m_output_dir.
Referenced by addLocalSimulator(), and initOutputs().
|
private |
Definition at line 73 of file Runner.h.
Referenced by parseConfig(), and Runner().
|
private |
Definition at line 74 of file Runner.h.
Referenced by parseConfig().
|
private |
Definition at line 75 of file Runner.h.
Referenced by addLocalSimulator(), initOutputs(), and run().
|
private |
Definition at line 76 of file Runner.h.
Referenced by initMpi(), initSimulators(), and run().
|
private |
Definition at line 77 of file Runner.h.
Referenced by initMpi(), initSimulators(), and run().
|
private |
Definition at line 78 of file Runner.h.
Referenced by addLocalSimulator(), initOutputs(), and run().
|
private |
Definition at line 81 of file Runner.h.
Referenced by initMpi(), initSimulators(), and run().
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
Definition at line 91 of file Runner.h.
Referenced by getRegionsConfig(), initOutputs(), initSimulators(), parseConfig(), and run().
|
private |
Definition at line 92 of file Runner.h.
Referenced by getRegionsConfig(), initMpi(), initSimulators(), parseConfig(), printInfo(), and run().
|
private |
Definition at line 93 of file Runner.h.
Referenced by getConfig(), and parseConfig().
|
private |
Definition at line 95 of file Runner.h.
Referenced by addLocalSimulator(), initSimulators(), and run().
|
private |
Definition at line 97 of file Runner.h.
Referenced by addLocalSimulator(), addRemoteSimulator(), initSimulators(), and run().
|
private |
Definition at line 98 of file Runner.h.
Referenced by initSimulators(), and run().
|
private |
Definition at line 101 of file Runner.h.
Referenced by initSimulators(), parseConfig(), printInfo(), and Runner().
|
private |
Definition at line 102 of file Runner.h.
Referenced by hdf5Path(), initOutputs(), run(), and Runner().
|
private |
Definition at line 103 of file Runner.h.
Referenced by initSimulators(), and parseConfig().
|
private |
Definition at line 105 of file Runner.h.
Referenced by initOutputs().
|
private |
Definition at line 106 of file Runner.h.
Referenced by initOutputs().