|
SST
15.1.0
StructuralSimulationToolkit
|
An SST core component that handles timing and event processing informing all registered Statistics to generate their outputs at desired rates. More...
#include <statengine.h>
Public Types | |
| using | StatArray_t = std::vector< StatisticBase * > |
| using | StatMap_t = std::map< SimTime_t, StatArray_t * > |
Public Member Functions | |
| template<class T > | |
| Statistic< T > * | createStatistic (BaseComponent *comp, const std::string &stat_name, const std::string &stat_sub_id, Params ¶ms) |
| Called to create an enabled (non-null) statistic of the requested type This function also registers the statistic with the engine. More... | |
| template<class T > | |
| Statistic< T > * | createDisabledStatistic () |
| Called to create a disabled (null) statistic of the requested type. More... | |
| bool | reregisterStatisticWithEngine (StatisticBase *stat, SimTime_t start_at_time, SimTime_t stop_at_time, SimTime_t output_factor) |
| Re-registers a statistic with the engine during a restart run. More... | |
| void | performStatisticOutput (StatisticBase *stat, bool end_of_sim_flag=false) |
| Called by the Components and Subcomponent to perform a statistic Output. More... | |
| void | performGlobalStatisticOutput (bool end_of_sim_flag=false) |
| Called by the Components and Subcomponent to perform a global statistic Output. More... | |
| uint8_t | getStatLoadLevel () const |
| Return global statistic load level. | |
| SimTime_t | getStatisticStartTimeFactor (StatisticBase *stat) |
| Get the start time factor belonging to 'stat'. More... | |
| SimTime_t | getStatisticStopTimeFactor (StatisticBase *stat) |
| Get the stop time factor belonging to 'stat'. More... | |
| void | serialize_order (SST::Core::Serialization::serializer &ser) override |
| Serialization support for the engine. More... | |
| ImplementSerializable(SST::Statistics::StatisticProcessingEngine) private friend | int ::main (int argc, char **argv) |
| friend | void ::finalize_statEngineConfig () |
| StatisticProcessingEngine () | |
| Constructor. | |
| ~StatisticProcessingEngine () | |
| Destructor. | |
| void | setup (StatsConfig *stats_config) |
| void | restart () |
| bool | registerStatisticWithEngine (StatisticBase *stat, Params ¶ms) |
| Registers a newly-created statistic with the engine Statistics created during a restart run should use reregisterStatisticWithEngine instead. | |
| StatisticOutput * | getOutputForStatistic (const StatisticBase *stat) const |
| StatisticGroup & | getGroupForStatistic (const StatisticBase *stat) const |
| bool | addPeriodicBasedStatistic (SimTime_t factor, StatisticBase *stat) |
| void | addEventBasedStatistic (const UnitAlgebra &count, StatisticBase *stat) |
| void | setStatisticStartTime (StatisticBase *stat, SimTime_t factor) |
| void | setStatisticStopTime (StatisticBase *stat, SimTime_t factor) |
| void | finalizeInitialization () |
| void | startOfSimulation () |
| void | endOfSimulation () |
| void | performStatisticOutputImpl (StatisticBase *stat, bool end_of_sim_flag) |
| void | performStatisticGroupOutputImpl (StatisticGroup &group, bool end_of_sim_flag) |
| bool | handleStatisticEngineClockEvent (Cycle_t cycle_num, SimTime_t time_factor) |
| bool | handleGroupClockEvent (Cycle_t cycle_num, StatisticGroup *group) |
| void | handleStatisticEngineStartTimeEvent (SimTime_t time_factor) |
| void | handleStatisticEngineStopTimeEvent (SimTime_t time_factor) |
| void | castError (const std::string &type, const std::string &stat_name, const std::string &field_name) |
Public Member Functions inherited from SST::Core::Serialization::serializable_base | |
| virtual const char * | cls_name () const =0 |
| virtual uint32_t | cls_id () const =0 |
| virtual std::string | serialization_name () const =0 |
Static Public Member Functions | |
| static const std::vector< StatisticOutput * > & | getStatOutputs () |
| Return the statistic output objects - static as they are per-MPI rank. | |
| static void | static_setup (StatsConfig *stats_config) |
| Called to setup the StatOutputs, which are shared across all the StatEngines on the same MPI rank. | |
| static void | stat_outputs_simulation_start () |
| Called to notify StatOutputs that simulation has started. | |
| static void | stat_outputs_simulation_end () |
| Called to notify StatOutputs that simulation has ended. | |
| static StatisticOutput * | createStatisticOutput (const ConfigStatOutput &cfg) |
Data Fields | |
| StatMap_t | start_time_map_ |
| StatMap_t | stop_time_map_ |
| bool | simulation_started_ |
| Output & | output_ |
| uint8_t | stat_load_level_ |
| std::map< SimTime_t, StatisticGroup > | stat_default_groups_ |
| std::vector< StatisticGroup > | stat_groups_ |
Static Public Attributes | |
| static std::vector< StatisticOutput * > | stat_outputs_ |
Static Public Attributes inherited from SST::Core::Serialization::serializable | |
| static constexpr uint32_t | NullClsId = std::numeric_limits<uint32_t>::max() |
Static Public Attributes inherited from SST::Core::Serialization::serializable_base | |
| static constexpr uint32_t | NullClsId = std::numeric_limits<uint32_t>::max() |
Additional Inherited Members | |
Protected Types inherited from SST::Core::Serialization::serializable_base | |
| enum | cxn_flag_t { ConstructorFlag } |
Static Protected Member Functions inherited from SST::Core::Serialization::serializable_base | |
| static void | serializable_abort (uint32_t line, const char *file, const char *func, const char *obj) |
An SST core component that handles timing and event processing informing all registered Statistics to generate their outputs at desired rates.
| using SST::Statistics::StatisticProcessingEngine::StatArray_t = std::vector<StatisticBase*> |
Array of Statistics
| using SST::Statistics::StatisticProcessingEngine::StatMap_t = std::map<SimTime_t, StatArray_t*> |
Map of simtimes to Statistic Arrays
|
inline |
Called to create a disabled (null) statistic of the requested type.
| comp | The statistic owner |
|
inline |
Called to create an enabled (non-null) statistic of the requested type This function also registers the statistic with the engine.
| comp | The statistic owner |
| stat_name | The name of the statistic |
| stat_sub_id | An optional id to differentiate multiple instances of the same statistic, "" if none |
| params | The parameters that should be used to configure the statistic |
References SST::Params::find(), and registerStatisticWithEngine().
| SimTime_t SST::Statistics::StatisticProcessingEngine::getStatisticStartTimeFactor | ( | StatisticBase * | stat | ) |
Get the start time factor belonging to 'stat'.
Used during checkpoint. Linear search - could be slow.
| stat | The statistic to lookup |
References start_time_map_.
| SimTime_t SST::Statistics::StatisticProcessingEngine::getStatisticStopTimeFactor | ( | StatisticBase * | stat | ) |
Get the stop time factor belonging to 'stat'.
Used during checkpoint. Linear search - could be slow.
| stat | The statistic to lookup |
References stop_time_map_.
| void SST::Statistics::StatisticProcessingEngine::performGlobalStatisticOutput | ( | bool | end_of_sim_flag = false | ) |
Called by the Components and Subcomponent to perform a global statistic Output.
This routine will force ALL Components and Subcomponents to output their statistic information. This may lead to unexpected results if the statistic counts or data is reset on output.
| end_of_sim_flag | - Indicates that the output is occurring at the end of simulation. |
References stat_default_groups_, and stat_groups_.
Referenced by SST::BaseComponent::performGlobalStatisticOutput().
| void SST::Statistics::StatisticProcessingEngine::performStatisticOutput | ( | StatisticBase * | stat, |
| bool | end_of_sim_flag = false |
||
| ) |
Called by the Components and Subcomponent to perform a statistic Output.
| stat | - Pointer to the statistic. |
| end_of_sim_flag | - Indicates that the output is occurring at the end of simulation. |
Referenced by SST::BaseComponent::performStatisticOutput().
| bool SST::Statistics::StatisticProcessingEngine::reregisterStatisticWithEngine | ( | StatisticBase * | stat, |
| SimTime_t | start_at_time, | ||
| SimTime_t | stop_at_time, | ||
| SimTime_t | output_factor | ||
| ) |
Re-registers a statistic with the engine during a restart run.
Newly created statistics (not read from a checkpoint) use 'registerStatisticWithEngine' instead.
| stat | The statistic to re-register |
| start_at_time | If the statistic should be enabled after some time, the time (in core cycles) else 0 |
| stop_at_time | If the statistic should be disabled after some time, the time (in core cycles) else 0 |
| output_factor | If the statistic should be output at a regular time interval, the interval (in core cycles) else 0 |
References SST::Statistics::StatisticBase::getComponent(), SST::Statistics::StatisticBase::getFullStatName(), SST::Statistics::StatisticBase::isNullStatistic(), SST::Statistics::StatisticBase::isOutputPeriodic(), stat_default_groups_, and SST::Output::verbose().
|
overridevirtual |
Serialization support for the engine.
Implements SST::Core::Serialization::serializable_base.
References simulation_started_, stat_groups_, and stat_load_level_.
| bool SST::Statistics::StatisticProcessingEngine::simulation_started_ |
Flag showing if Simulation has started
Referenced by serialize_order().
| StatMap_t SST::Statistics::StatisticProcessingEngine::start_time_map_ |
Map of Array's of Statistics that are started at a sim time
Referenced by getStatisticStartTimeFactor().
| std::map<SimTime_t, StatisticGroup> SST::Statistics::StatisticProcessingEngine::stat_default_groups_ |
Statistic groups for statistics that are not explicitly assigned to one
Referenced by performGlobalStatisticOutput(), reregisterStatisticWithEngine(), StatisticProcessingEngine(), and ~StatisticProcessingEngine().
| std::vector<StatisticGroup> SST::Statistics::StatisticProcessingEngine::stat_groups_ |
A list of all statistic group objects
Referenced by performGlobalStatisticOutput(), serialize_order(), and ~StatisticProcessingEngine().
| uint8_t SST::Statistics::StatisticProcessingEngine::stat_load_level_ |
The global statistic load level
Referenced by getStatLoadLevel(), and serialize_order().
|
static |
The statistic output objects that exist on this engine's rank
Referenced by getStatOutputs(), stat_outputs_simulation_end(), stat_outputs_simulation_start(), and static_setup().
| StatMap_t SST::Statistics::StatisticProcessingEngine::stop_time_map_ |
Map of Array's of Statistics that are stopped at a sim time
Referenced by getStatisticStopTimeFactor().