SST  14.0.0
StructuralSimulationToolkit
heartbeat.h
1 // Copyright 2009-2024 NTESS. Under the terms
2 // of Contract DE-NA0003525 with NTESS, the U.S.
3 // Government retains certain rights in this software.
4 //
5 // Copyright (c) 2009-2024, NTESS
6 // All rights reserved.
7 //
8 // This file is part of the SST software package. For license
9 // information, see the LICENSE file in the top level directory of the
10 // distribution.
11 
12 #ifndef SST_CORE_HEARTBEAT_H
13 #define SST_CORE_HEARTBEAT_H
14 
15 #include "sst/core/action.h"
16 #include "sst/core/config.h"
17 #include "sst/core/cputimer.h"
18 #include "sst/core/output.h"
19 #include "sst/core/sst_types.h"
20 
21 #include <set>
22 
23 namespace SST {
24 
25 class Simulation_impl;
26 class TimeConverter;
27 
28 /**
29  \class SimulatorHeartbeat
30  An optional heartbeat to show progress in a simulation
31 */
32 class SimulatorHeartbeat : public Action
33 {
34 public:
35  /**
36  Create a new heartbeat object for the simulation core to show progress
37  */
38  SimulatorHeartbeat(Config* cfg, int this_rank, Simulation_impl* sim, TimeConverter* period);
40 
41  void serialize_order(SST::Core::Serialization::serializer& ser) override;
42  ImplementSerializable(SST::SimulatorHeartbeat)
43 
44 private:
45  SimulatorHeartbeat() {};
47 
48  void operator=(SimulatorHeartbeat const&);
49  void execute(void) override;
50  int rank;
51  TimeConverter* m_period;
52  double lastTime;
53 };
54 
55 } // namespace SST
56 
57 #endif // SST_CORE_HEARTBEAT_H
An Action is a schedulable Activity which is not an Event.
Definition: action.h:26
This class is basically a wrapper for objects to declare the order in which their members should be s...
Definition: serializer.h:35
Class to contain SST Simulation Configuration variables.
Definition: config.h:38
SimulatorHeartbeat(Config *cfg, int this_rank, Simulation_impl *sim, TimeConverter *period)
Create a new heartbeat object for the simulation core to show progress
A class to convert between a component&#39;s view of time and the core&#39;s view of time.
Definition: timeConverter.h:27
Definition: action.cc:18
An optional heartbeat to show progress in a simulation.
Definition: heartbeat.h:32
void execute(void) override
Function which will be called when the time for this Activity comes to pass.
Definition: heartbeat.cc:48
Main control class for a SST Simulation.
Definition: simulation_impl.h:70