SST 12.1.0
Structural Simulation Toolkit
simulation_impl.h
1// -*- c++ -*-
2
3// Copyright 2009-2022 NTESS. Under the terms
4// of Contract DE-NA0003525 with NTESS, the U.S.
5// Government retains certain rights in this software.
6//
7// Copyright (c) 2009-2022, NTESS
8// All rights reserved.
9//
10// This file is part of the SST software package. For license
11// information, see the LICENSE file in the top level directory of the
12// distribution.
13
14#ifndef SST_CORE_SIMULATION_IMPL_H
15#define SST_CORE_SIMULATION_IMPL_H
16
17#include "sst/core/clock.h"
18#include "sst/core/componentInfo.h"
19#include "sst/core/oneshot.h"
20#include "sst/core/output.h"
21#include "sst/core/profile/profiletool.h"
22#include "sst/core/rankInfo.h"
23#include "sst/core/simulation.h"
24#include "sst/core/sst_types.h"
25#include "sst/core/unitAlgebra.h"
26
27#include <atomic>
28#include <cstdio>
29#include <iostream>
30#include <signal.h>
31#include <thread>
32#include <unordered_map>
33
34/* Forward declare for Friendship */
35extern int main(int argc, char** argv);
36
37namespace SST {
38
39#define _SIM_DBG(fmt, args...) __DBG(DBG_SIM, Sim, fmt, ##args)
40#define STATALLFLAG "--ALLSTATS--"
41
42class Activity;
43class Component;
44class Config;
45class ConfigGraph;
46class Exit;
47class Factory;
48class SimulatorHeartbeat;
49class Link;
50class LinkMap;
51class Params;
52class SharedRegionManager;
53class SimulatorHeartbeat;
54class SyncBase;
55class SyncManager;
56class ThreadSync;
57class TimeConverter;
58class TimeLord;
59class TimeVortex;
60class UnitAlgebra;
61class SharedRegionManager;
62namespace Statistics {
63class StatisticOutput;
64class StatisticProcessingEngine;
65} // namespace Statistics
66
67namespace Statistics {
68class StatisticOutput;
69class StatisticProcessingEngine;
70} // namespace Statistics
71
72/**
73 * Main control class for a SST Simulation.
74 * Provides base features for managing the simulation
75 */
77{
78
79public:
80 /******** Public API inherited from Simulation ********/
81 /** Get the run mode of the simulation (e.g. init, run, both etc) */
82 Mode_t getSimulationMode() const override { return runMode; };
83
84 /** Return the current simulation time as a cycle count*/
85 SimTime_t getCurrentSimCycle() const override;
86
87 /** Return the end simulation time as a cycle count*/
88 SimTime_t getEndSimCycle() const override;
89
90 /** Return the current priority */
91 int getCurrentPriority() const override;
92
93 /** Return the elapsed simulation time as a time */
94 UnitAlgebra getElapsedSimTime() const override;
95
96 /** Return the end simulation time as a time */
97 UnitAlgebra getEndSimTime() const override;
98
99 /** Return the end simulation time as a time */
100 UnitAlgebra getFinalSimTime() const override;
101
102 /** Get this instance's parallel rank */
103 RankInfo getRank() const override { return my_rank; }
104
105 /** Get the number of parallel ranks in the simulation */
106 RankInfo getNumRanks() const override { return num_ranks; }
107
108 /**
109 Returns the output directory of the simulation
110 @return Directory in which simulation outputs are placed
111 */
112 std::string& getOutputDirectory() override { return output_directory; }
113
114 /** Signifies that an event type is required for this simulation
115 * Causes the Factory to verify that the required event type can be found.
116 * @param name fully qualified libraryName.EventName
117 */
118 virtual void requireEvent(const std::string& name) override;
119
120 /** Signifies that a library is required for this simulation.
121 * @param name Name of the library
122 */
123 virtual void requireLibrary(const std::string& name) override;
124
125 /** Causes the current status of the simulation to be printed to stderr.
126 * @param fullStatus - if true, call printStatus() on all components as well
127 * as print the base Simulation's status
128 */
129 virtual void printStatus(bool fullStatus) override;
130
131 virtual double getRunPhaseElapsedRealTime() const override;
132 virtual double getInitPhaseElapsedRealTime() const override;
133 virtual double getCompletePhaseElapsedRealTime() const override;
134
135 /******** End Public API from Simulation ********/
136
137 typedef std::map<std::pair<SimTime_t, int>, Clock*> clockMap_t; /*!< Map of times to clocks */
138 typedef std::map<std::pair<SimTime_t, int>, OneShot*> oneShotMap_t; /*!< Map of times to OneShots */
139
141
142 /********* Static Core-only Functions *********/
143
144 /** Return a pointer to the singleton instance of the Simulation */
145 static Simulation_impl* getSimulation() { return instanceMap.at(std::this_thread::get_id()); }
146
147 /** Return the TimeLord associated with this Simulation */
148 static TimeLord* getTimeLord(void) { return &timeLord; }
149
150 /** Return the base simulation Output class instance */
152
153 /** Create new simulation
154 * @param config - Configuration of the simulation
155 * @param my_rank - Parallel Rank of this simulation object
156 * @param num_ranks - How many Ranks are in the simulation
157 */
158 static Simulation_impl* createSimulation(Config* config, RankInfo my_rank, RankInfo num_ranks);
159
160 /**
161 * Used to signify the end of simulation. Cleans up any existing Simulation Objects
162 */
163 static void shutdown();
164
165 /** Sets an internal flag for signaling the simulation. Used internally */
166 static void setSignal(int signal);
167
168 /** Insert an activity to fire at a specified time */
169 void insertActivity(SimTime_t time, Activity* ev);
170
171 /** Return the exit event */
172 Exit* getExit() const { return m_exit; }
173
174 /******** Core only API *************/
175
176 /** Processes the ConfigGraph to pull out any need information
177 * about relationships among the threads
178 */
179 void processGraphInfo(ConfigGraph& graph, const RankInfo& myRank, SimTime_t min_part);
180
181 int prepareLinks(ConfigGraph& graph, const RankInfo& myRank, SimTime_t min_part);
182 int performWireUp(ConfigGraph& graph, const RankInfo& myRank, SimTime_t min_part);
183 void exchangeLinkInfo();
184
185 /** Set cycle count, which, if reached, will cause the simulation to halt. */
186 void setStopAtCycle(Config* cfg);
187
188 /** Perform the init() phase of simulation */
189 void initialize();
190
191 /** Perform the complete() phase of simulation */
192 void complete();
193
194 /** Perform the setup() and run phases of the simulation. */
195 void setup();
196
197 void run();
198
199 void finish();
200
201 bool isIndependentThread() { return independent; }
202
203 void printProfilingInfo(FILE* fp);
204
205 void printPerformanceInfo();
206
207 /** Register a OneShot event to be called after a time delay
208 Note: OneShot cannot be canceled, and will always callback after
209 the timedelay.
210 */
211 TimeConverter* registerOneShot(const std::string& timeDelay, OneShot::HandlerBase* handler, int priority);
212
213 TimeConverter* registerOneShot(const UnitAlgebra& timeDelay, OneShot::HandlerBase* handler, int priority);
214
215 const std::vector<SimTime_t>& getInterThreadLatencies() const { return interThreadLatencies; }
216
217 SimTime_t getInterThreadMinLatency() const { return interThreadMinLatency; }
218
219 static TimeConverter* getMinPartTC() { return minPartTC; }
220
221 LinkMap* getComponentLinkMap(ComponentId_t id) const
222 {
223 ComponentInfo* info = compInfoMap.getByID(id);
224 if ( nullptr == info ) { return nullptr; }
225 else {
226 return info->getLinkMap();
227 }
228 }
229
230 /** Returns reference to the Component Info Map */
231 const ComponentInfoMap& getComponentInfoMap(void) { return compInfoMap; }
232
233 /** returns the component with the given ID */
234 BaseComponent* getComponent(const ComponentId_t& id) const
235 {
236 ComponentInfo* i = compInfoMap.getByID(id);
237 // CompInfoMap_t::const_iterator i = compInfoMap.find(id);
238 if ( nullptr != i ) { return i->getComponent(); }
239 else {
240 printf("Simulation::getComponent() couldn't find component with id = %" PRIu64 "\n", id);
241 exit(1);
242 }
243 }
244
245 /** returns the ComponentInfo object for the given ID */
246 ComponentInfo* getComponentInfo(const ComponentId_t& id) const
247 {
248 ComponentInfo* i = compInfoMap.getByID(id);
249 // CompInfoMap_t::const_iterator i = compInfoMap.find(id);
250 if ( nullptr != i ) { return i; }
251 else {
252 printf("Simulation::getComponentInfo() couldn't find component with id = %" PRIu64 "\n", id);
253 exit(1);
254 }
255 }
256
257 /**
258 Set the output directory for this simulation
259 @param outDir Path of directory to place simulation outputs in
260 */
261 void setOutputDirectory(const std::string& outDir) { output_directory = outDir; }
262
263 /**
264 * Gets the minimum next activity time across all TimeVortices in
265 * the Rank
266 */
267 static SimTime_t getLocalMinimumNextActivityTime();
268
269 /**
270 * Returns true when the Wireup is finished.
271 */
272 bool isWireUpFinished() { return wireUpFinished; }
273
274 uint64_t getTimeVortexMaxDepth() const;
275
276 uint64_t getTimeVortexCurrentDepth() const;
277
278 uint64_t getSyncQueueDataSize() const;
279
280 /******** API provided through BaseComponent only ***********/
281
282 /** Register a handler to be called on a set frequency */
283 TimeConverter* registerClock(const std::string& freq, Clock::HandlerBase* handler, int priority);
284
285 TimeConverter* registerClock(const UnitAlgebra& freq, Clock::HandlerBase* handler, int priority);
286
287 TimeConverter* registerClock(TimeConverter* tcFreq, Clock::HandlerBase* handler, int priority);
288
289 /** Remove a clock handler from the list of active clock handlers */
290 void unregisterClock(TimeConverter* tc, Clock::HandlerBase* handler, int priority);
291
292 /** Reactivate an existing clock and handler.
293 * @return time when handler will next fire
294 */
295 Cycle_t reregisterClock(TimeConverter* tc, Clock::HandlerBase* handler, int priority);
296
297 /** Returns the next Cycle that the TImeConverter would fire. */
298 Cycle_t getNextClockCycle(TimeConverter* tc, int priority = CLOCKPRIORITY);
299
300 /** Return the Statistic Processing Engine associated with this Simulation */
302
303
304 friend class Link;
305 friend class Action;
306 friend class Output;
307 // To enable main to set up globals
308 friend int ::main(int argc, char** argv);
309
310 // Simulation_impl() {}
311 Simulation_impl(Config* config, RankInfo my_rank, RankInfo num_ranks);
312 Simulation_impl(Simulation_impl const&); // Don't Implement
313 void operator=(Simulation_impl const&); // Don't implement
314
315 /** Get a handle to a TimeConverter
316 * @param cycles Frequency which is the base of the TimeConverter
317 */
318 TimeConverter* minPartToTC(SimTime_t cycles) const;
319
320 /** Factory used to generate the simulation components */
322
323 static void resizeBarriers(uint32_t nthr);
324 static Core::ThreadSafe::Barrier initBarrier;
325 static Core::ThreadSafe::Barrier completeBarrier;
326 static Core::ThreadSafe::Barrier setupBarrier;
327 static Core::ThreadSafe::Barrier runBarrier;
328 static Core::ThreadSafe::Barrier exitBarrier;
329 static Core::ThreadSafe::Barrier finishBarrier;
330 static std::mutex simulationMutex;
331
332 static std::map<LinkId_t, Link*> cross_thread_links;
333 bool direct_interthread;
334
335 Component* createComponent(ComponentId_t id, const std::string& name, Params& params);
336
337 TimeVortex* getTimeVortex() const { return timeVortex; }
338
339 /** Emergency Shutdown
340 * Called when a SIGINT or SIGTERM has been seen
341 */
342 static void emergencyShutdown();
343 /** Normal Shutdown
344 */
345 void endSimulation(void);
346 void endSimulation(SimTime_t end);
347
348 typedef enum {
349 SHUTDOWN_CLEAN, /* Normal shutdown */
350 SHUTDOWN_SIGNAL, /* SIGINT or SIGTERM received */
351 SHUTDOWN_EMERGENCY, /* emergencyShutdown() called */
352 } ShutdownMode_t;
353
354 friend class SyncManager;
355
356 TimeVortex* timeVortex;
357 TimeConverter* threadMinPartTC;
358 Activity* current_activity;
359 static SimTime_t minPart;
360 static TimeConverter* minPartTC;
361 std::vector<SimTime_t> interThreadLatencies;
362 SimTime_t interThreadMinLatency;
363 SyncManager* syncManager;
364 // ThreadSync* threadSync;
365 ComponentInfoMap compInfoMap;
366 clockMap_t clockMap;
367 oneShotMap_t oneShotMap;
368 static Exit* m_exit;
369 SimulatorHeartbeat* m_heartbeat;
370 bool endSim;
371 bool independent; // true if no links leave thread (i.e. no syncs required)
372 static std::atomic<int> untimed_msg_count;
373 unsigned int untimed_phase;
374 volatile sig_atomic_t lastRecvdSignal;
375 ShutdownMode_t shutdown_mode;
376 bool wireUpFinished;
377
378 /** TimeLord of the simulation */
380 /** Output */
382
383 /** Performance Tracking Information **/
384
385 void intializeProfileTools(const std::string& config);
386
387 std::map<std::string, SST::Profile::ProfileTool*> profile_tools;
388 // Maps the component profile points to profiler names
389 std::map<std::string, std::vector<std::string>> profiler_map;
390
391 template <typename T>
392 std::vector<T*> getProfileTool(std::string point)
393 {
394 std::vector<T*> ret;
395 try {
396 std::vector<std::string>& profilers = profiler_map.at(point);
397
398 for ( auto& x : profilers ) {
399 try {
400 SST::Profile::ProfileTool* val = profile_tools.at(x);
401
402 T* tool = dynamic_cast<T*>(val);
403 if ( !tool ) {
404 // Not the right type, fatal
405 Output::getDefaultObject().fatal(
406 CALL_INFO_LONG, 1,
407 "ERROR: wrong type of profiling tool found (name = %s). Check to make sure the profiling "
408 "points enabled for this tool accept the type specified\n",
409 x.c_str());
410 }
411 ret.push_back(tool);
412 }
413 catch ( std::out_of_range& e ) {
414 // This shouldn't happen. If it does, then something
415 // didn't get initialized correctly.
416 Output::getDefaultObject().fatal(
417 CALL_INFO_LONG, 1,
418 "INTERNAL ERROR: ProfileTool refered to in profiler_map not found in profile_tools map\n");
419 return ret;
420 }
421 }
422 }
423 catch ( std::out_of_range& e ) {
424 // point not turned on, return nullptr
425 return ret;
426 }
427
428
429 return ret;
430 }
431
432
433#if SST_PERFORMANCE_INSTRUMENTING
434 FILE* fp;
435#endif
436
437#if SST_PERIODIC_PRINT
438 uint64_t periodicCounter = 0;
439#endif
440
441#if SST_RUNTIME_PROFILING
442 uint64_t sumtime = 0;
443 uint64_t runtime = 0;
444 struct timeval start, end, diff;
445 struct timeval sumstart, sumend, sumdiff;
446#endif
447
448
449#if SST_EVENT_PROFILING
450 uint64_t rankLatency = 0; // Serialization time
451 uint64_t messageXferSize = 0;
452
453 uint64_t rankExchangeBytes = 0; // Serialization size
454 uint64_t rankExchangeEvents = 0; // Serialized events
455 uint64_t rankExchangeCounter = 0; // Num rank peer exchanges
456
457
458 // Profiling functions
459 void incrementSerialCounters(uint64_t count);
460 void incrementExchangeCounters(uint64_t events, uint64_t bytes);
461
462#endif
463
464#if SST_SYNC_PROFILING
465 uint64_t rankSyncCounter = 0; // Num. of rank syncs
466 uint64_t rankSyncTime = 0; // Total time rank syncing, in ns
467 uint64_t threadSyncCounter = 0; // Num. of thread syncs
468 uint64_t threadSyncTime = 0; // Total time thread syncing, in ns
469 // Does not include thread syncs as part of rank syncs
470 void incrementSyncTime(bool rankSync, uint64_t count);
471#endif
472
473#if SST_HIGH_RESOLUTION_CLOCK
474 uint64_t clockDivisor = 1e9;
475 std::string clockResolution = "ns";
476#else
477 uint64_t clockDivisor = 1e6;
478 std::string clockResolution = "us";
479#endif
480
481 Mode_t runMode;
482 SimTime_t currentSimCycle;
483 SimTime_t endSimCycle;
484 int currentPriority;
485 RankInfo my_rank;
486 RankInfo num_ranks;
487
488 std::string output_directory;
489 static SharedRegionManager* sharedRegionManager;
490
491 double run_phase_start_time;
492 double run_phase_total_time;
493 double init_phase_start_time;
494 double init_phase_total_time;
495 double complete_phase_start_time;
496 double complete_phase_total_time;
497
498 static std::unordered_map<std::thread::id, Simulation_impl*> instanceMap;
499 static std::vector<Simulation_impl*> instanceVec;
500
501 friend void wait_my_turn_start();
502 friend void wait_my_turn_end();
503
504private:
505 /**
506 * Returns the time of the next item to be executed
507 * that is in the TImeVortex of the Simulation
508 */
509 SimTime_t getNextActivityTime() const;
510};
511
512// Function to allow for easy serialization of threads while debugging
513// code. Can only be used when you can guarantee all threads will be
514// taking the same code path. If you can't guarantee that, then use a
515// spinlock to make sure only one person is in a given region at a
516// time. ONLY FOR DEBUG USE.
517void wait_my_turn_start(Core::ThreadSafe::Barrier& barrier, int thread, int total_threads);
518
519void wait_my_turn_end(Core::ThreadSafe::Barrier& barrier, int thread, int total_threads);
520
521} // namespace SST
522
523#endif // SST_CORE_SIMULATION_IMPL_H
An Action is a schedulable Activity which is not an Event.
Definition: action.h:27
Base class for all Activities in the SST Event Queue.
Definition: activity.h:46
Main component object for the simulation.
Definition: baseComponent.h:51
A Clock class.
Definition: clock.h:33
Definition: componentInfo.h:250
Definition: componentInfo.h:40
Main component object for the simulation.
Definition: component.h:31
A Configuration Graph A graph representing Components and Links.
Definition: configGraph.h:390
Class to contain SST Simulation Configuration variables.
Definition: config.h:30
Definition: threadsafe.h:48
Exit Event Action.
Definition: exit.h:35
Class for instantiating Components, Links and the like out of element libraries.
Definition: factory.h:43
A OneShot Event class.
Definition: oneshot.h:33
SSTHandlerBaseNoArgs< void > HandlerBase
Base handler for OneShot callbacks.
Definition: oneshot.h:38
Output object provides consistent method for outputting data to stdout, stderr and/or sst debug file.
Definition: output.h:52
Parameter store.
Definition: params.h:56
ProfileTool is a class loadable through the factory which allows dynamic addition of profiling capabi...
Definition: profiletool.h:30
Definition: rankInfo.h:22
Handlers with 1 handler defined argument to callback from caller.
Definition: ssthandler.h:171
Main control class for a SST Simulation.
Definition: simulation_impl.h:77
void setOutputDirectory(const std::string &outDir)
Set the output directory for this simulation.
Definition: simulation_impl.h:261
Mode_t getSimulationMode() const override
Get the run mode of the simulation (e.g.
Definition: simulation_impl.h:82
TimeConverter * minPartToTC(SimTime_t cycles) const
Get a handle to a TimeConverter.
Definition: simulation.cc:114
SimTime_t getCurrentSimCycle() const override
Return the current simulation time as a cycle count.
Definition: simulation.cc:74
void setup()
Perform the setup() and run phases of the simulation.
Definition: simulation.cc:614
std::map< std::pair< SimTime_t, int >, Clock * > clockMap_t
Definition: simulation_impl.h:137
static Output sim_output
Output.
Definition: simulation_impl.h:381
int getCurrentPriority() const override
Return the current priority.
Definition: simulation.cc:86
Exit * getExit() const
Return the exit event.
Definition: simulation_impl.h:172
virtual double getRunPhaseElapsedRealTime() const override
Get the amount of real-time spent executing the run phase of the simulation.
Definition: simulation.cc:852
const ComponentInfoMap & getComponentInfoMap(void)
Returns reference to the Component Info Map.
Definition: simulation_impl.h:231
UnitAlgebra getElapsedSimTime() const override
Return the elapsed simulation time as a time.
Definition: simulation.cc:92
void insertActivity(SimTime_t time, Activity *ev)
Insert an activity to fire at a specified time.
Definition: simulation.cc:970
static Factory * factory
Factory used to generate the simulation components.
Definition: simulation_impl.h:321
void initialize()
Perform the init() phase of simulation.
Definition: simulation.cc:533
Cycle_t getNextClockCycle(TimeConverter *tc, int priority=CLOCKPRIORITY)
Returns the next Cycle that the TImeConverter would fire.
Definition: simulation.cc:922
ComponentInfo * getComponentInfo(const ComponentId_t &id) const
returns the ComponentInfo object for the given ID
Definition: simulation_impl.h:246
void processGraphInfo(ConfigGraph &graph, const RankInfo &myRank, SimTime_t min_part)
Processes the ConfigGraph to pull out any need information about relationships among the threads.
Definition: simulation.cc:274
BaseComponent * getComponent(const ComponentId_t &id) const
returns the component with the given ID
Definition: simulation_impl.h:234
static Simulation_impl * getSimulation()
Return a pointer to the singleton instance of the Simulation.
Definition: simulation_impl.h:145
Cycle_t reregisterClock(TimeConverter *tc, Clock::HandlerBase *handler, int priority)
Reactivate an existing clock and handler.
Definition: simulation.cc:910
virtual double getCompletePhaseElapsedRealTime() const override
Get the amount of real-time spent executing the complete phase of the simulation.
Definition: simulation.cc:872
bool isWireUpFinished()
Returns true when the Wireup is finished.
Definition: simulation_impl.h:272
static TimeLord * getTimeLord(void)
Return the TimeLord associated with this Simulation.
Definition: simulation_impl.h:148
RankInfo getNumRanks() const override
Get the number of parallel ranks in the simulation.
Definition: simulation_impl.h:106
static Output & getSimulationOutput()
Return the base simulation Output class instance.
Definition: simulation_impl.h:151
virtual void printStatus(bool fullStatus) override
Causes the current status of the simulation to be printed to stderr.
Definition: simulation.cc:837
void complete()
Perform the complete() phase of simulation.
Definition: simulation.cc:578
void intializeProfileTools(const std::string &config)
Performance Tracking Information.
Definition: simulation.cc:1070
virtual void requireEvent(const std::string &name) override
Signifies that an event type is required for this simulation Causes the Factory to verify that the re...
Definition: simulation.cc:245
virtual void requireLibrary(const std::string &name) override
Signifies that a library is required for this simulation.
Definition: simulation.cc:251
TimeConverter * registerClock(const std::string &freq, Clock::HandlerBase *handler, int priority)
Register a handler to be called on a set frequency.
Definition: simulation.cc:882
UnitAlgebra getFinalSimTime() const override
Return the end simulation time as a time.
Definition: simulation.cc:104
static TimeLord timeLord
TimeLord of the simulation.
Definition: simulation_impl.h:379
static SimTime_t getLocalMinimumNextActivityTime()
Gets the minimum next activity time across all TimeVortices in the Rank.
Definition: simulation.cc:263
RankInfo getRank() const override
Get this instance's parallel rank.
Definition: simulation_impl.h:103
static void shutdown()
Used to signify the end of simulation.
Definition: simulation.cc:180
void endSimulation(void)
Normal Shutdown.
Definition: simulation.cc:779
static Simulation_impl * createSimulation(Config *config, RankInfo my_rank, RankInfo num_ranks)
Create new simulation.
Definition: simulation.cc:166
TimeConverter * registerOneShot(const std::string &timeDelay, OneShot::HandlerBase *handler, int priority)
Register a OneShot event to be called after a time delay Note: OneShot cannot be canceled,...
Definition: simulation.cc:944
SimTime_t getEndSimCycle() const override
Return the end simulation time as a cycle count.
Definition: simulation.cc:80
Statistics::StatisticProcessingEngine * getStatisticsProcessingEngine(void) const
Return the Statistic Processing Engine associated with this Simulation.
Definition: simulation.cc:995
void unregisterClock(TimeConverter *tc, Clock::HandlerBase *handler, int priority)
Remove a clock handler from the list of active clock handlers.
Definition: simulation.cc:934
static void setSignal(int signal)
Sets an internal flag for signaling the simulation.
Definition: simulation.cc:830
void setStopAtCycle(Config *cfg)
Set cycle count, which, if reached, will cause the simulation to halt.
Definition: simulation.cc:228
UnitAlgebra getEndSimTime() const override
Return the end simulation time as a time.
Definition: simulation.cc:98
static void emergencyShutdown()
Emergency Shutdown Called when a SIGINT or SIGTERM has been seen.
Definition: simulation.cc:761
virtual double getInitPhaseElapsedRealTime() const override
Get the amount of real-time spent executing the init phase of the simulation.
Definition: simulation.cc:862
std::map< std::pair< SimTime_t, int >, OneShot * > oneShotMap_t
Definition: simulation_impl.h:138
std::string & getOutputDirectory() override
Returns the output directory of the simulation.
Definition: simulation_impl.h:112
Main control class for a SST Simulation.
Definition: simulation.h:35
Mode_t
Type of Run Modes.
Definition: simulation.h:38
An SST core component that handles timing and event processing informing all registered Statistics to...
Definition: statengine.h:52
A class to convert between a component's view of time and the core's view of time.
Definition: timeConverter.h:27
Class for creating and managing TimeConverter objects.
Definition: timeLord.h:38
Primary Event Queue.
Definition: timeVortex.h:26
Performs Unit math in full precision.
Definition: unitAlgebra.h:109