SST  12.0.0
StructuralSimulationToolkit
SST::Simulation Class Referenceabstract

Main control class for a SST Simulation. More...

#include <simulation.h>

Inheritance diagram for SST::Simulation:
SST::Simulation_impl

Public Types

enum  Mode_t { UNKNOWN, INIT, RUN, BOTH }
 Type of Run Modes. More...
 

Public Member Functions

virtual Mode_t getSimulationMode () const =0
 Get the run mode of the simulation (e.g. More...
 
virtual SimTime_t getCurrentSimCycle () const =0
 Return the current simulation time as a cycle count.
 
virtual SimTime_t getEndSimCycle () const =0
 Return the end simulation time as a cycle count.
 
virtual int getCurrentPriority () const =0
 Return the current priority.
 
virtual UnitAlgebra getElapsedSimTime () const =0
 Return the elapsed simulation time as a time.
 
virtual UnitAlgebra getEndSimTime () const =0
 Return the end simulation time as a time.
 
virtual UnitAlgebra getFinalSimTime () const =0
 Return the end simulation time as a time.
 
virtual RankInfo getRank () const =0
 Get this instance's parallel rank.
 
virtual RankInfo getNumRanks () const =0
 Get the number of parallel ranks in the simulation.
 
virtual std::string & getOutputDirectory ()=0
 Returns the output directory of the simulation. More...
 
virtual void requireEvent (const std::string &name)=0
 Signifies that an event type is required for this simulation Causes the Factory to verify that the required event type can be found. More...
 
virtual void requireLibrary (const std::string &name)=0
 Signifies that a library is required for this simulation. More...
 
virtual void printStatus (bool fullStatus)=0
 Causes the current status of the simulation to be printed to stderr. More...
 
virtual double getRunPhaseElapsedRealTime () const =0
 Get the amount of real-time spent executing the run phase of the simulation. More...
 
virtual double getInitPhaseElapsedRealTime () const =0
 Get the amount of real-time spent executing the init phase of the simulation. More...
 
virtual double getCompletePhaseElapsedRealTime () const =0
 Get the amount of real-time spent executing the complete phase of the simulation. More...
 

Static Public Member Functions

static SimulationgetSimulation ()
 Return a pointer to the singleton instance of the Simulation. More...
 
static TimeLordgetTimeLord (void)
 Return the TimeLord associated with this Simulation.
 
static OutputgetSimulationOutput ()
 Return the base simulation Output class instance.
 

Protected Member Functions

 Simulation (Simulation const &)
 
void operator= (Simulation const &)
 

Detailed Description

Main control class for a SST Simulation.

Provides base features for managing the simulation

Member Enumeration Documentation

Type of Run Modes.

Enumerator
UNKNOWN 

Unknown mode - Invalid for running

INIT 

Initialize-only. Useful for debugging initialization and graph generation

RUN 

Run-only. Useful when restoring from a checkpoint (not currently supported)

BOTH 

Default. Both initialize and Run the simulation

Member Function Documentation

virtual double SST::Simulation::getCompletePhaseElapsedRealTime ( ) const
pure virtual

Get the amount of real-time spent executing the complete phase of the simulation.

Returns
real-time in seconds spent executing the complete phase

Implemented in SST::Simulation_impl.

virtual double SST::Simulation::getInitPhaseElapsedRealTime ( ) const
pure virtual

Get the amount of real-time spent executing the init phase of the simulation.

Returns
real-time in seconds spent executing the init phase

Implemented in SST::Simulation_impl.

virtual std::string& SST::Simulation::getOutputDirectory ( )
pure virtual

Returns the output directory of the simulation.

Returns
Directory in which simulation outputs are placed

Implemented in SST::Simulation_impl.

virtual double SST::Simulation::getRunPhaseElapsedRealTime ( ) const
pure virtual

Get the amount of real-time spent executing the run phase of the simulation.

Returns
real-time in seconds spent executing the run phase

Implemented in SST::Simulation_impl.

Simulation * SST::Simulation::getSimulation ( )
static

Return a pointer to the singleton instance of the Simulation.

Simulation functions.

Static functions

virtual Mode_t SST::Simulation::getSimulationMode ( ) const
pure virtual

Get the run mode of the simulation (e.g.

init, run, both etc)

Implemented in SST::Simulation_impl.

virtual void SST::Simulation::printStatus ( bool  fullStatus)
pure virtual

Causes the current status of the simulation to be printed to stderr.

Parameters
fullStatus- if true, call printStatus() on all components as well as print the base Simulation's status

Implemented in SST::Simulation_impl.

virtual void SST::Simulation::requireEvent ( const std::string &  name)
pure virtual

Signifies that an event type is required for this simulation Causes the Factory to verify that the required event type can be found.

Parameters
namefully qualified libraryName.EventName

Implemented in SST::Simulation_impl.

virtual void SST::Simulation::requireLibrary ( const std::string &  name)
pure virtual

Signifies that a library is required for this simulation.

Parameters
nameName of the library

Implemented in SST::Simulation_impl.


The documentation for this class was generated from the following files: