SST  11.1.0
StructuralSimulationToolkit
heartbeat.h
1 // Copyright 2009-2021 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-2021, 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 private:
42  SimulatorHeartbeat() {};
44 
45  void operator=(SimulatorHeartbeat const&);
46  void execute(void) override;
47  int rank;
48  TimeConverter* m_period;
49  double lastTime;
50 };
51 
52 } // namespace SST
53 
54 #endif // SST_CORE_HEARTBEAT_H
An Action is a schedulable Activity which is not an Event.
Definition: action.h:26
Class to contain SST Simulation Configuration variables.
Definition: config.h:29
A class to convert between a component&#39;s view of time and the core&#39;s view of time.
Definition: timeConverter.h:26
An optional heartbeat to show progress in a simulation.
Definition: heartbeat.h:32
Main control class for a SST Simulation.
Definition: simulation_impl.h:74