SST  7.1.0
StructuralSimulationToolkit
heartbeat.h
1 // Copyright 2009-2017 Sandia Corporation. Under the terms
2 // of Contract DE-NA0003525 with Sandia Corporation, the U.S.
3 // Government retains certain rights in this software.
4 //
5 // Copyright (c) 2009-2017, Sandia Corporation
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_CORE_HEARTBEAT_H
13 #define SST_CORE_CORE_HEARTBEAT_H
14 
15 #include <sst/core/sst_types.h>
16 #include <sst/core/output.h>
17 #include <sst/core/config.h>
18 #include <sst/core/cputimer.h>
19 
20 #include <set>
21 #include <sst/core/action.h>
22 
23 namespace SST {
24 
25 class Simulation;
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 public:
34  /**
35  Create a new heartbeat object for the simulation core to show progress
36  */
37  SimulatorHeartbeat( Config* cfg, int this_rank, Simulation* sim, TimeConverter* period);
39 
40 private:
41  SimulatorHeartbeat() { };
43  void operator=(SimulatorHeartbeat const&);
44  void execute(void) override;
45  int rank;
46  TimeConverter* m_period;
47  double lastTime;
48 
49 };
50 
51 } // namespace SST
52 
53 #endif // SST_CORE_HEARTBEAT_H
An Action is a schedulable Activity which is not an Event.
Definition: action.h:30
Main control class for a SST Simulation.
Definition: simulation.h:72
Class to contain SST Simulation Configuration variables.
Definition: config.h:31
A class to convert between a component&#39;s view of time and the core&#39;s view of time.
Definition: timeConverter.h:25
Definition: action.cc:17
An optional heartbeat to show progress in a simulation
Definition: heartbeat.h:32