ComputeThread.h
1 
11 #ifndef WRENCH_COMPUTETHREAD_H
12 #define WRENCH_COMPUTETHREAD_H
13 
14 #include <wrench/simgrid_S4U_util/S4U_Mailbox.h>
15 #include "wrench/simgrid_S4U_util/S4U_Simulation.h"
16 #include "services/compute/standard_job_executor/StandardJobExecutorMessage.h"
17 
18 
19 
20 namespace wrench {
21 
22  /***********************/
24  /***********************/
25 
26  class Simulation;
27 
33  class ComputeThread : public Service {
34 
35  public:
36 
37  ComputeThread(Simulation *simulation, std::string hostname, double flops, std::string reply_mailbox);
38 
39  int main() override;
40  void kill();
41 
42  private:
43  double flops;
44  std::string reply_mailbox;
45 
46  };
47 
48  /***********************/
50  /***********************/
51 };
52 
53 #endif //WRENCH_COMPUTETHREAD_H
ComputeThread(Simulation *simulation, std::string hostname, double flops, std::string reply_mailbox)
Constructor.
Definition: ComputeThread.cpp:29
A service that can be added to the simulation and that can be used by a WMS when executing a workflow...
Definition: Service.h:26
std::string hostname
The name of the host on which the daemon is running.
Definition: S4U_Daemon.h:47
int main() override
The main method of the compute thread.
Definition: ComputeThread.cpp:40
A class that provides basic simulation methods.
Definition: Simulation.h:34
void kill()
Terminate (brutally) the compute thread.
Definition: ComputeThread.cpp:67
A one-shot service that simulates a CPU-bound thread that performs a given number of flops and then r...
Definition: ComputeThread.h:33
Simulation * simulation
a pointer to the simulation object
Definition: S4U_Daemon.h:84
Definition: TerminalOutput.cpp:15