SST 12.1.0
Structural Simulation Toolkit
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. More...
 
virtual SimTime_t getEndSimCycle () const =0
 Return the end simulation time as a cycle count. More...
 
virtual int getCurrentPriority () const =0
 Return the current priority. More...
 
virtual UnitAlgebra getElapsedSimTime () const =0
 Return the elapsed simulation time as a time. More...
 
virtual UnitAlgebra getEndSimTime () const =0
 Return the end simulation time as a time. More...
 
virtual UnitAlgebra getFinalSimTime () const =0
 Return the end simulation time as a time. More...
 
virtual RankInfo getRank () const =0
 Get this instance's parallel rank. More...
 
virtual RankInfo getNumRanks () const =0
 Get the number of parallel ranks in the simulation. More...
 
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

◆ Mode_t

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

◆ getCompletePhaseElapsedRealTime()

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.

◆ getCurrentPriority()

virtual int SST::Simulation::getCurrentPriority ( ) const
pure virtual

Return the current priority.

Implemented in SST::Simulation_impl.

◆ getCurrentSimCycle()

virtual SimTime_t SST::Simulation::getCurrentSimCycle ( ) const
pure virtual

Return the current simulation time as a cycle count.

Implemented in SST::Simulation_impl.

Referenced by SST::Link::recv().

◆ getElapsedSimTime()

virtual UnitAlgebra SST::Simulation::getElapsedSimTime ( ) const
pure virtual

Return the elapsed simulation time as a time.

Implemented in SST::Simulation_impl.

◆ getEndSimCycle()

virtual SimTime_t SST::Simulation::getEndSimCycle ( ) const
pure virtual

Return the end simulation time as a cycle count.

Implemented in SST::Simulation_impl.

◆ getEndSimTime()

virtual UnitAlgebra SST::Simulation::getEndSimTime ( ) const
pure virtual

Return the end simulation time as a time.

Implemented in SST::Simulation_impl.

◆ getFinalSimTime()

virtual UnitAlgebra SST::Simulation::getFinalSimTime ( ) const
pure virtual

Return the end simulation time as a time.

Implemented in SST::Simulation_impl.

◆ getInitPhaseElapsedRealTime()

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.

◆ getNumRanks()

virtual RankInfo SST::Simulation::getNumRanks ( ) const
pure virtual

Get the number of parallel ranks in the simulation.

Implemented in SST::Simulation_impl.

◆ getOutputDirectory()

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.

◆ getRank()

virtual RankInfo SST::Simulation::getRank ( ) const
pure virtual

Get this instance's parallel rank.

Implemented in SST::Simulation_impl.

Referenced by SST::Component::primaryComponentDoNotEndSim(), and SST::Component::primaryComponentOKToEndSim().

◆ getRunPhaseElapsedRealTime()

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.

◆ getSimulation()

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

Return a pointer to the singleton instance of the Simulation.

Simulation functions.

Static functions

◆ getSimulationMode()

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.

◆ printStatus()

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.

◆ requireEvent()

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.

◆ requireLibrary()

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: