WRENCH  1.10
Cyberinfrastructure Simulation Workbench
Overview Installation Getting Started WRENCH 101 WRENCH 102
ComputeServiceMessage.h
1 
11 #ifndef WRENCH_COMPUTESERVICEMESSAGE_H
12 #define WRENCH_COMPUTESERVICEMESSAGE_H
13 
14 #include <memory>
15 #include <vector>
16 #include "wrench/workflow/failure_causes/FailureCause.h"
17 #include "wrench/services/ServiceMessage.h"
18 
19 namespace wrench {
20 
21  class StandardJob;
22 
23  class PilotJob;
24 
25  /***********************/
27  /***********************/
28 
33  protected:
34  ComputeServiceMessage(std::string name, double payload);
35  };
36 
41  public:
42  ComputeServiceSubmitStandardJobRequestMessage(const std::string answer_mailbox, std::shared_ptr<StandardJob> ,
43  const std::map<std::string, std::string> service_specific_args,
44  double payload);
45 
47  std::string answer_mailbox;
49  std::shared_ptr<StandardJob> job;
51  std::map<std::string, std::string> service_specific_args;
52  };
53 
58  public:
59  ComputeServiceSubmitStandardJobAnswerMessage(std::shared_ptr<StandardJob> , std::shared_ptr<ComputeService>, bool success,
60  std::shared_ptr<FailureCause> failure_cause, double payload);
61 
63  std::shared_ptr<StandardJob> job;
65  std::shared_ptr<ComputeService> compute_service;
67  bool success;
69  std::shared_ptr<FailureCause> failure_cause;
70  };
71 
76  public:
77  ComputeServiceStandardJobDoneMessage(std::shared_ptr<StandardJob> , std::shared_ptr<ComputeService>, double payload);
78 
80  std::shared_ptr<StandardJob> job;
82  std::shared_ptr<ComputeService> compute_service;
83  };
84 
89  public:
90  ComputeServiceStandardJobFailedMessage(std::shared_ptr<StandardJob> , std::shared_ptr<ComputeService>,
91  std::shared_ptr<FailureCause> cause,
92  double payload);
93 
95  std::shared_ptr<StandardJob> job;
97  std::shared_ptr<ComputeService> compute_service;
99  std::shared_ptr<FailureCause> cause;
100  };
101 
106  public:
107  ComputeServiceTerminateStandardJobRequestMessage(std::string answer_mailbox, std::shared_ptr<StandardJob> , double payload);
108 
110  std::string answer_mailbox;
112  std::shared_ptr<StandardJob> job;
113  };
114 
119  public:
120  ComputeServiceTerminateStandardJobAnswerMessage(std::shared_ptr<StandardJob> , std::shared_ptr<ComputeService>, bool success,
121  std::shared_ptr<FailureCause> failure_cause, double payload);
122 
124  std::shared_ptr<StandardJob> job;
126  std::shared_ptr<ComputeService> compute_service;
128  bool success;
130  std::shared_ptr<FailureCause> failure_cause;
131  };
132 
137  public:
138  ComputeServiceSubmitPilotJobRequestMessage(std::string answer_mailbox, std::shared_ptr<PilotJob> ,
139  const std::map<std::string, std::string> service_specific_args,
140  double payload);
141 
143  std::string answer_mailbox;
145  std::shared_ptr<PilotJob> job;
147  std::map<std::string, std::string> service_specific_args;
148  };
149 
154  public:
155  ComputeServiceSubmitPilotJobAnswerMessage(std::shared_ptr<PilotJob> , std::shared_ptr<ComputeService>, bool success,
156  std::shared_ptr<FailureCause> cause,
157  double payload);
158 
160  std::shared_ptr<PilotJob> job;
162  std::shared_ptr<ComputeService> compute_service;
164  bool success;
166  std::shared_ptr<FailureCause> failure_cause;
167  };
168 
169 
174  public:
175  ComputeServicePilotJobStartedMessage(std::shared_ptr<PilotJob> , std::shared_ptr<ComputeService>, double payload);
176 
178  std::shared_ptr<PilotJob> job;
180  std::shared_ptr<ComputeService> compute_service;
181  };
182 
187  public:
188  ComputeServicePilotJobExpiredMessage(std::shared_ptr<PilotJob> , std::shared_ptr<ComputeService>, double payload);
189 
191  std::shared_ptr<PilotJob> job;
193  std::shared_ptr<ComputeService> compute_service;
194  };
195 
200  public:
201  ComputeServicePilotJobFailedMessage(std::shared_ptr<PilotJob> , std::shared_ptr<ComputeService>, double payload);
202 
204  std::shared_ptr<PilotJob> job;
206  std::shared_ptr<ComputeService> compute_service;
207  };
208 
213  public:
214  ComputeServiceTerminatePilotJobRequestMessage(std::string answer_mailbox, std::shared_ptr<PilotJob> , double payload);
215 
217  std::string answer_mailbox;
219  std::shared_ptr<PilotJob> job;
220  };
221 
226  public:
227  ComputeServiceTerminatePilotJobAnswerMessage(std::shared_ptr<PilotJob> , std::shared_ptr<ComputeService> compute_service,
228  bool success,
229  std::shared_ptr<FailureCause> failure_cause, double payload);
230 
232  std::shared_ptr<PilotJob> job;
234  std::shared_ptr<ComputeService> compute_service;
236  bool success;
238  std::shared_ptr<FailureCause> failure_cause;
239  };
240 
241 
246  public:
248 
250  std::string answer_mailbox;
251  };
252 
257  public:
258  ComputeServiceResourceInformationAnswerMessage(std::map<std::string, std::map<std::string, double>> info,
259  double payload);
260 
262  std::map<std::string, std::map<std::string, double>> info;
263  };
264 
269  public:
271  unsigned long num_cores,
272  double ram, double payload);
273 
275  std::string answer_mailbox;
277  unsigned long num_cores;
279  double ram;
280  };
281 
286  public:
288 
290  bool answer;
291  };
292 
293  /***********************/
295  /***********************/
296 
297 };
298 
299 #endif //WRENCH_COMPUTESERVICEMESSAGE_H
wrench::ComputeServiceStandardJobDoneMessage
A message sent by a ComputeService when a StandardJob has completed execution.
Definition: ComputeServiceMessage.h:75
wrench::ComputeServiceIsThereAtLeastOneHostWithAvailableResourcesAnswerMessage::ComputeServiceIsThereAtLeastOneHostWithAvailableResourcesAnswerMessage
ComputeServiceIsThereAtLeastOneHostWithAvailableResourcesAnswerMessage(bool answer, double payload)
Constructor.
Definition: ComputeServiceMessage.cpp:397
wrench::ComputeServiceStandardJobFailedMessage
A message sent by a ComputeService when a StandardJob has failed to execute.
Definition: ComputeServiceMessage.h:88
wrench::ComputeServiceSubmitStandardJobAnswerMessage::success
bool success
Whether to job submission was successful.
Definition: ComputeServiceMessage.h:67
wrench::ComputeServiceResourceInformationAnswerMessage
A message sent by a ComputeService in answer to a resource information request.
Definition: ComputeServiceMessage.h:256
wrench::SimulationMessage::name
std::string name
The message name.
Definition: SimulationMessage.h:37
wrench::ComputeServiceTerminatePilotJobAnswerMessage::job
std::shared_ptr< PilotJob > job
The job to terminate.
Definition: ComputeServiceMessage.h:232
wrench::ComputeServiceTerminatePilotJobRequestMessage::ComputeServiceTerminatePilotJobRequestMessage
ComputeServiceTerminatePilotJobRequestMessage(std::string answer_mailbox, std::shared_ptr< PilotJob >, double payload)
Constructor.
Definition: ComputeServiceMessage.cpp:293
wrench::ComputeServiceMessage
Top-level class for messages received/sent by a ComputeService.
Definition: ComputeServiceMessage.h:32
wrench::ComputeServiceResourceInformationRequestMessage::ComputeServiceResourceInformationRequestMessage
ComputeServiceResourceInformationRequestMessage(std::string answer_mailbox, double payload)
Constructor.
Definition: ComputeServiceMessage.cpp:341
wrench::ComputeServiceSubmitStandardJobRequestMessage::job
std::shared_ptr< StandardJob > job
The submitted job.
Definition: ComputeServiceMessage.h:49
wrench::ComputeServiceStandardJobDoneMessage::compute_service
std::shared_ptr< ComputeService > compute_service
The compute service on which the job has completed.
Definition: ComputeServiceMessage.h:82
wrench::ComputeServiceIsThereAtLeastOneHostWithAvailableResourcesRequestMessage::ComputeServiceIsThereAtLeastOneHostWithAvailableResourcesRequestMessage
ComputeServiceIsThereAtLeastOneHostWithAvailableResourcesRequestMessage(const std::string &answer_mailbox, unsigned long num_cores, double ram, double payload)
Constructor.
Definition: ComputeServiceMessage.cpp:375
wrench::ComputeServiceStandardJobFailedMessage::cause
std::shared_ptr< FailureCause > cause
The cause of the failure.
Definition: ComputeServiceMessage.h:99
wrench::ComputeServiceIsThereAtLeastOneHostWithAvailableResourcesAnswerMessage
A message sent by a ComputeService in answer to a "does at least one host have these available resour...
Definition: ComputeServiceMessage.h:285
wrench::ComputeServiceTerminatePilotJobAnswerMessage::failure_cause
std::shared_ptr< FailureCause > failure_cause
The cause of the failure, or nullptr on success.
Definition: ComputeServiceMessage.h:238
wrench::ComputeServiceResourceInformationAnswerMessage::info
std::map< std::string, std::map< std::string, double > > info
The resource information map.
Definition: ComputeServiceMessage.h:262
wrench::ComputeServiceSubmitPilotJobAnswerMessage::job
std::shared_ptr< PilotJob > job
The submitted pilot job.
Definition: ComputeServiceMessage.h:160
wrench::ComputeServicePilotJobFailedMessage::job
std::shared_ptr< PilotJob > job
The pilot job that has failed.
Definition: ComputeServiceMessage.h:204
wrench::ComputeServiceIsThereAtLeastOneHostWithAvailableResourcesRequestMessage::num_cores
unsigned long num_cores
The number of cores desired.
Definition: ComputeServiceMessage.h:277
wrench::ComputeServiceSubmitStandardJobAnswerMessage::compute_service
std::shared_ptr< ComputeService > compute_service
The compute service to which the job was submitted.
Definition: ComputeServiceMessage.h:65
wrench::ComputeServiceSubmitStandardJobRequestMessage::answer_mailbox
std::string answer_mailbox
The mailbox to which the answer message should be sent.
Definition: ComputeServiceMessage.h:47
wrench::ComputeServiceSubmitPilotJobAnswerMessage::failure_cause
std::shared_ptr< FailureCause > failure_cause
The cause of the failure, or nullptr on success.
Definition: ComputeServiceMessage.h:166
wrench::ComputeServicePilotJobFailedMessage::compute_service
std::shared_ptr< ComputeService > compute_service
The compute service on which the pilot job failed.
Definition: ComputeServiceMessage.h:206
wrench::ComputeServiceSubmitStandardJobRequestMessage::service_specific_args
std::map< std::string, std::string > service_specific_args
Service specific arguments.
Definition: ComputeServiceMessage.h:51
wrench::ComputeServiceIsThereAtLeastOneHostWithAvailableResourcesRequestMessage::answer_mailbox
std::string answer_mailbox
The mailbox to which a reply should be sent.
Definition: ComputeServiceMessage.h:275
wrench::ComputeServicePilotJobStartedMessage
A message sent by a ComputeService when a PilotJob has started its execution.
Definition: ComputeServiceMessage.h:173
wrench::ComputeServicePilotJobStartedMessage::compute_service
std::shared_ptr< ComputeService > compute_service
The compute service on which the pilot job has started.
Definition: ComputeServiceMessage.h:180
wrench::ComputeServiceTerminatePilotJobAnswerMessage::success
bool success
Whether to job termination was successful.
Definition: ComputeServiceMessage.h:236
wrench::ComputeServiceStandardJobFailedMessage::job
std::shared_ptr< StandardJob > job
The job that has failed.
Definition: ComputeServiceMessage.h:95
wrench::ComputeServiceResourceInformationAnswerMessage::ComputeServiceResourceInformationAnswerMessage
ComputeServiceResourceInformationAnswerMessage(std::map< std::string, std::map< std::string, double >> info, double payload)
Constructor.
Definition: ComputeServiceMessage.cpp:360
wrench::ComputeServiceTerminateStandardJobRequestMessage::job
std::shared_ptr< StandardJob > job
The job to terminate.
Definition: ComputeServiceMessage.h:112
wrench::ServiceMessage
Top-level class for messages received/sent by a Service.
Definition: ServiceMessage.h:27
wrench::ComputeServiceTerminateStandardJobRequestMessage::ComputeServiceTerminateStandardJobRequestMessage
ComputeServiceTerminateStandardJobRequestMessage(std::string answer_mailbox, std::shared_ptr< StandardJob >, double payload)
Constructor.
Definition: ComputeServiceMessage.cpp:129
wrench::ComputeServicePilotJobFailedMessage::ComputeServicePilotJobFailedMessage
ComputeServicePilotJobFailedMessage(std::shared_ptr< PilotJob >, std::shared_ptr< ComputeService >, double payload)
Constructor.
Definition: ComputeServiceMessage.cpp:273
wrench::ComputeServiceTerminateStandardJobAnswerMessage::failure_cause
std::shared_ptr< FailureCause > failure_cause
The cause of the failure, or nullptr on success.
Definition: ComputeServiceMessage.h:130
wrench::ComputeServicePilotJobExpiredMessage
A message sent by a ComputeService when a PilotJob has expired.
Definition: ComputeServiceMessage.h:186
wrench::ComputeServiceTerminateStandardJobAnswerMessage::compute_service
std::shared_ptr< ComputeService > compute_service
The compute service to which the job had been submitted.
Definition: ComputeServiceMessage.h:126
wrench::ComputeServicePilotJobExpiredMessage::job
std::shared_ptr< PilotJob > job
The pilot job that has expired.
Definition: ComputeServiceMessage.h:191
wrench::ComputeServiceIsThereAtLeastOneHostWithAvailableResourcesRequestMessage::ram
double ram
The RAM desired.
Definition: ComputeServiceMessage.h:279
wrench::ComputeServiceSubmitStandardJobAnswerMessage::ComputeServiceSubmitStandardJobAnswerMessage
ComputeServiceSubmitStandardJobAnswerMessage(std::shared_ptr< StandardJob >, std::shared_ptr< ComputeService >, bool success, std::shared_ptr< FailureCause > failure_cause, double payload)
Constructor.
Definition: ComputeServiceMessage.cpp:60
wrench
Definition: Alarm.cpp:20
wrench::ComputeServiceMessage::ComputeServiceMessage
ComputeServiceMessage(std::string name, double payload)
Constructor.
Definition: ComputeServiceMessage.cpp:21
wrench::ComputeServiceSubmitStandardJobRequestMessage
A message sent to a ComputeService to submit a StandardJob for execution.
Definition: ComputeServiceMessage.h:40
wrench::ComputeServicePilotJobFailedMessage
A message sent by a ComputeService when a PilotJob has failed.
Definition: ComputeServiceMessage.h:199
wrench::ComputeServiceTerminatePilotJobRequestMessage::job
std::shared_ptr< PilotJob > job
The job to terminate.
Definition: ComputeServiceMessage.h:219
wrench::ComputeServiceSubmitPilotJobAnswerMessage::success
bool success
Whether the job submission was successful or not.
Definition: ComputeServiceMessage.h:164
wrench::ComputeServiceIsThereAtLeastOneHostWithAvailableResourcesAnswerMessage::answer
bool answer
The true/false answer.
Definition: ComputeServiceMessage.h:290
wrench::ComputeServiceTerminatePilotJobAnswerMessage::ComputeServiceTerminatePilotJobAnswerMessage
ComputeServiceTerminatePilotJobAnswerMessage(std::shared_ptr< PilotJob >, std::shared_ptr< ComputeService > compute_service, bool success, std::shared_ptr< FailureCause > failure_cause, double payload)
Constructor.
Definition: ComputeServiceMessage.cpp:316
wrench::ComputeServicePilotJobStartedMessage::job
std::shared_ptr< PilotJob > job
The pilot job that has started.
Definition: ComputeServiceMessage.h:178
wrench::SimulationMessage::payload
double payload
The message size in bytes.
Definition: SimulationMessage.h:39
wrench::ComputeServiceSubmitStandardJobAnswerMessage
A message sent by a ComputeService in answer to a StandardJob submission request.
Definition: ComputeServiceMessage.h:57
wrench::ComputeServiceSubmitStandardJobRequestMessage::ComputeServiceSubmitStandardJobRequestMessage
ComputeServiceSubmitStandardJobRequestMessage(const std::string answer_mailbox, std::shared_ptr< StandardJob >, const std::map< std::string, std::string > service_specific_args, double payload)
Constructor.
Definition: ComputeServiceMessage.cpp:35
wrench::ComputeServiceStandardJobFailedMessage::ComputeServiceStandardJobFailedMessage
ComputeServiceStandardJobFailedMessage(std::shared_ptr< StandardJob >, std::shared_ptr< ComputeService >, std::shared_ptr< FailureCause > cause, double payload)
Constructor.
Definition: ComputeServiceMessage.cpp:107
wrench::ComputeServiceTerminatePilotJobAnswerMessage::compute_service
std::shared_ptr< ComputeService > compute_service
The compute service to which the job had been submitted.
Definition: ComputeServiceMessage.h:234
wrench::ComputeServiceStandardJobDoneMessage::job
std::shared_ptr< StandardJob > job
The job that has completed.
Definition: ComputeServiceMessage.h:80
wrench::ComputeServiceTerminateStandardJobAnswerMessage::success
bool success
Whether to job termination was successful.
Definition: ComputeServiceMessage.h:128
wrench::ComputeServicePilotJobExpiredMessage::compute_service
std::shared_ptr< ComputeService > compute_service
The compute service on which the pilot job has expired.
Definition: ComputeServiceMessage.h:193
wrench::ComputeServicePilotJobExpiredMessage::ComputeServicePilotJobExpiredMessage
ComputeServicePilotJobExpiredMessage(std::shared_ptr< PilotJob >, std::shared_ptr< ComputeService >, double payload)
Constructor.
Definition: ComputeServiceMessage.cpp:253
wrench::ComputeServiceResourceInformationRequestMessage::answer_mailbox
std::string answer_mailbox
The mailbox to which the answer should be sent.
Definition: ComputeServiceMessage.h:250
wrench::ComputeServiceResourceInformationRequestMessage
A message sent to a ComputeService to request information on its compute resources.
Definition: ComputeServiceMessage.h:245
wrench::ComputeServiceTerminateStandardJobRequestMessage
A message sent to a ComputeService to terminate a StandardJob previously submitted for execution.
Definition: ComputeServiceMessage.h:105
wrench::ComputeServiceStandardJobDoneMessage::ComputeServiceStandardJobDoneMessage
ComputeServiceStandardJobDoneMessage(std::shared_ptr< StandardJob >, std::shared_ptr< ComputeService >, double payload)
Constructor.
Definition: ComputeServiceMessage.cpp:86
wrench::ComputeServiceTerminateStandardJobAnswerMessage
A message sent by a ComputeService in answer to a StandardJob termination request.
Definition: ComputeServiceMessage.h:118
wrench::ComputeServiceIsThereAtLeastOneHostWithAvailableResourcesRequestMessage
A message sent to a ComputeService to asks if at least one host has some available resources right no...
Definition: ComputeServiceMessage.h:268
wrench::ComputeServiceTerminateStandardJobAnswerMessage::ComputeServiceTerminateStandardJobAnswerMessage
ComputeServiceTerminateStandardJobAnswerMessage(std::shared_ptr< StandardJob >, std::shared_ptr< ComputeService >, bool success, std::shared_ptr< FailureCause > failure_cause, double payload)
Constructor.
Definition: ComputeServiceMessage.cpp:152
wrench::ComputeServiceTerminateStandardJobAnswerMessage::job
std::shared_ptr< StandardJob > job
The standard job to terminate.
Definition: ComputeServiceMessage.h:124
wrench::ComputeServiceSubmitPilotJobAnswerMessage
A message sent by a ComputeService in answer to a PilotJob submission request.
Definition: ComputeServiceMessage.h:153
wrench::ComputeServiceSubmitStandardJobAnswerMessage::failure_cause
std::shared_ptr< FailureCause > failure_cause
The cause of the failure, or nullptr on success.
Definition: ComputeServiceMessage.h:69
wrench::ComputeServiceTerminatePilotJobRequestMessage::answer_mailbox
std::string answer_mailbox
The mailbox to which the answer message should be sent.
Definition: ComputeServiceMessage.h:217
wrench::ComputeServiceSubmitPilotJobRequestMessage::service_specific_args
std::map< std::string, std::string > service_specific_args
Service specific arguments.
Definition: ComputeServiceMessage.h:147
wrench::ComputeServiceStandardJobFailedMessage::compute_service
std::shared_ptr< ComputeService > compute_service
The compute service on which the job has failed.
Definition: ComputeServiceMessage.h:97
wrench::ComputeServiceSubmitPilotJobAnswerMessage::compute_service
std::shared_ptr< ComputeService > compute_service
The compute service to which the job was submitted.
Definition: ComputeServiceMessage.h:162
wrench::ComputeServiceSubmitStandardJobAnswerMessage::job
std::shared_ptr< StandardJob > job
The standard job that was submitted.
Definition: ComputeServiceMessage.h:63
wrench::ComputeServiceTerminateStandardJobRequestMessage::answer_mailbox
std::string answer_mailbox
The mailbox to which the answer message should be sent.
Definition: ComputeServiceMessage.h:110
wrench::ComputeServiceSubmitPilotJobRequestMessage::ComputeServiceSubmitPilotJobRequestMessage
ComputeServiceSubmitPilotJobRequestMessage(std::string answer_mailbox, std::shared_ptr< PilotJob >, const std::map< std::string, std::string > service_specific_args, double payload)
Constructor.
Definition: ComputeServiceMessage.cpp:180
wrench::ComputeServicePilotJobStartedMessage::ComputeServicePilotJobStartedMessage
ComputeServicePilotJobStartedMessage(std::shared_ptr< PilotJob >, std::shared_ptr< ComputeService >, double payload)
Constructor.
Definition: ComputeServiceMessage.cpp:232
wrench::ComputeServiceSubmitPilotJobRequestMessage
A message sent to a ComputeService to submit a PilotJob for execution.
Definition: ComputeServiceMessage.h:136
wrench::ComputeServiceSubmitPilotJobRequestMessage::answer_mailbox
std::string answer_mailbox
The mailbox to which the answer message should be sent.
Definition: ComputeServiceMessage.h:143
wrench::ComputeServiceTerminatePilotJobAnswerMessage
A message sent by a ComputeService in answer to a PilotJob termination request.
Definition: ComputeServiceMessage.h:225
wrench::ComputeServiceSubmitPilotJobRequestMessage::job
std::shared_ptr< PilotJob > job
The submitted pilot job.
Definition: ComputeServiceMessage.h:145
wrench::ComputeServiceSubmitPilotJobAnswerMessage::ComputeServiceSubmitPilotJobAnswerMessage
ComputeServiceSubmitPilotJobAnswerMessage(std::shared_ptr< PilotJob >, std::shared_ptr< ComputeService >, bool success, std::shared_ptr< FailureCause > cause, double payload)
Constructor.
Definition: ComputeServiceMessage.cpp:205
wrench::ComputeServiceTerminatePilotJobRequestMessage
A message sent to a ComputeService to terminate a PilotJob previously submitted for execution.
Definition: ComputeServiceMessage.h:212