11 #ifndef WRENCH_COMPUTESERVICEMESSAGE_H
12 #define WRENCH_COMPUTESERVICEMESSAGE_H
16 #include "wrench/failure_causes/FailureCause.h"
17 #include "wrench/services/ServiceMessage.h"
32 class ComputeServiceMessage :
public ServiceMessage {
34 ComputeServiceMessage(
double payload);
137 class ComputeServiceSubmitCompoundJobRequestMessage :
public ComputeServiceMessage {
139 ComputeServiceSubmitCompoundJobRequestMessage(simgrid::s4u::Mailbox *answer_mailbox,
140 std::shared_ptr<CompoundJob> job,
141 const std::map<std::string, std::string> service_specific_args,
145 simgrid::s4u::Mailbox *answer_mailbox;
147 std::shared_ptr<CompoundJob> job;
149 std::map<std::string, std::string> service_specific_args;
155 class ComputeServiceSubmitCompoundJobAnswerMessage :
public ComputeServiceMessage {
157 ComputeServiceSubmitCompoundJobAnswerMessage(std::shared_ptr<CompoundJob> , std::shared_ptr<ComputeService>,
bool success,
158 std::shared_ptr<FailureCause> failure_cause,
double payload);
161 std::shared_ptr<CompoundJob> job;
163 std::shared_ptr<ComputeService> compute_service;
167 std::shared_ptr<FailureCause> failure_cause;
173 class ComputeServiceCompoundJobDoneMessage :
public ComputeServiceMessage {
175 ComputeServiceCompoundJobDoneMessage(std::shared_ptr<CompoundJob> , std::shared_ptr<ComputeService>,
double payload);
178 std::shared_ptr<CompoundJob> job;
180 std::shared_ptr<ComputeService> compute_service;
186 class ComputeServiceCompoundJobFailedMessage :
public ComputeServiceMessage {
188 ComputeServiceCompoundJobFailedMessage(std::shared_ptr<CompoundJob> , std::shared_ptr<ComputeService>,
192 std::shared_ptr<CompoundJob> job;
194 std::shared_ptr<ComputeService> compute_service;
200 class ComputeServiceTerminateCompoundJobRequestMessage :
public ComputeServiceMessage {
202 ComputeServiceTerminateCompoundJobRequestMessage(simgrid::s4u::Mailbox *answer_mailbox, std::shared_ptr<CompoundJob> ,
double payload);
205 simgrid::s4u::Mailbox *answer_mailbox;
207 std::shared_ptr<CompoundJob> job;
213 class ComputeServiceTerminateCompoundJobAnswerMessage :
public ComputeServiceMessage {
215 ComputeServiceTerminateCompoundJobAnswerMessage(std::shared_ptr<CompoundJob> , std::shared_ptr<ComputeService>,
bool success,
216 std::shared_ptr<FailureCause> failure_cause,
double payload);
219 std::shared_ptr<CompoundJob> job;
221 std::shared_ptr<ComputeService> compute_service;
225 std::shared_ptr<FailureCause> failure_cause;
268 class ComputeServicePilotJobStartedMessage :
public ComputeServiceMessage {
270 ComputeServicePilotJobStartedMessage(std::shared_ptr<PilotJob> , std::shared_ptr<ComputeService>,
double payload);
273 std::shared_ptr<PilotJob> job;
275 std::shared_ptr<ComputeService> compute_service;
281 class ComputeServicePilotJobExpiredMessage :
public ComputeServiceMessage {
283 ComputeServicePilotJobExpiredMessage(std::shared_ptr<PilotJob> , std::shared_ptr<ComputeService>,
double payload);
286 std::shared_ptr<PilotJob> job;
288 std::shared_ptr<ComputeService> compute_service;
294 class ComputeServicePilotJobFailedMessage :
public ComputeServiceMessage {
296 ComputeServicePilotJobFailedMessage(std::shared_ptr<PilotJob> ,
297 std::shared_ptr<ComputeService>,
298 std::shared_ptr<FailureCause> cause,
302 std::shared_ptr<PilotJob> job;
304 std::shared_ptr<ComputeService> compute_service;
306 std::shared_ptr<FailureCause> cause;
312 class ComputeServiceTerminatePilotJobRequestMessage :
public ComputeServiceMessage {
314 ComputeServiceTerminatePilotJobRequestMessage(simgrid::s4u::Mailbox *answer_mailbox, std::shared_ptr<PilotJob> ,
double payload);
317 simgrid::s4u::Mailbox *answer_mailbox;
319 std::shared_ptr<PilotJob> job;
325 class ComputeServiceTerminatePilotJobAnswerMessage :
public ComputeServiceMessage {
327 ComputeServiceTerminatePilotJobAnswerMessage(std::shared_ptr<PilotJob> , std::shared_ptr<ComputeService> compute_service,
329 std::shared_ptr<FailureCause> failure_cause,
double payload);
332 std::shared_ptr<PilotJob> job;
334 std::shared_ptr<ComputeService> compute_service;
338 std::shared_ptr<FailureCause> failure_cause;
345 class ComputeServiceResourceInformationRequestMessage :
public ComputeServiceMessage {
347 ComputeServiceResourceInformationRequestMessage(simgrid::s4u::Mailbox *answer_mailbox,
const std::string &key,
double payload);
350 simgrid::s4u::Mailbox *answer_mailbox;
352 const std::string &key;
358 class ComputeServiceResourceInformationAnswerMessage :
public ComputeServiceMessage {
360 ComputeServiceResourceInformationAnswerMessage(std::map<std::string, double> info,
364 std::map<std::string, double> info;
370 class ComputeServiceIsThereAtLeastOneHostWithAvailableResourcesRequestMessage :
public ComputeServiceMessage {
372 ComputeServiceIsThereAtLeastOneHostWithAvailableResourcesRequestMessage(simgrid::s4u::Mailbox *answer_mailbox,
373 unsigned long num_cores,
374 double ram,
double payload);
377 simgrid::s4u::Mailbox *answer_mailbox;
379 unsigned long num_cores;
387 class ComputeServiceIsThereAtLeastOneHostWithAvailableResourcesAnswerMessage :
public ComputeServiceMessage {
389 ComputeServiceIsThereAtLeastOneHostWithAvailableResourcesAnswerMessage(
bool answer,
double payload);
401 #endif //WRENCH_COMPUTESERVICEMESSAGE_H