WRENCH  1.11
Cyberinfrastructure Simulation Workbench
Overview Installation Getting Started WRENCH 101 WRENCH 102
ActionExecutor.h
1 
10 #ifndef WRENCH_ACTION_EXECUTOR_H
11 #define WRENCH_ACTION_EXECUTOR_H
12 
13 #include <set>
14 
15 #include "wrench/execution_controller/ExecutionController.h"
16 #include "wrench/services/Service.h"
17 #include "wrench/action/Action.h"
18 
19 namespace wrench {
20 
21  class Simulation;
22  class Action;
23  class ActionExecutionService;
24 
25  /***********************/
27  /***********************/
28 
32  class ActionExecutor : public ExecutionController {
33 
34  public:
35 
36  ActionExecutor(
37  std::string hostname,
38  unsigned long num_cores,
39  double ram_footprint,
40  simgrid::s4u::Mailbox *callback_mailbox,
41  std::shared_ptr<Action> action,
42  std::shared_ptr<ActionExecutionService> action_execution_service);
43 
44  int main() override;
45  void kill(bool job_termination);
46  void cleanup(bool has_returned_from_main, int return_value) override;
47 
48  std::shared_ptr<Action> getAction();
49  unsigned long getNumCoresAllocated() const;
50  double getMemoryAllocated() const;
51 
52  std::shared_ptr<ActionExecutionService> getActionExecutionService() const;
53 
54  private:
55 
56  std::shared_ptr<Action> action;
57  std::shared_ptr<ActionExecutionService> action_execution_service;
58  simgrid::s4u::Mailbox *callback_mailbox;
59  bool killed_on_purpose;
60 
61  unsigned long num_cores;
62  double ram_footprint;
63 
64  };
65 
66  /***********************/
68  /***********************/
69 
70 };
71 
72 #endif //WRENCH_ACTION_EXECUTOR_H
wrench
Definition: Action.cpp:28