Skip to content

Commit

Permalink
code cleanup
Browse files Browse the repository at this point in the history
more double removal
  • Loading branch information
henricasanova committed Oct 16, 2024
1 parent 426ae35 commit 0c3704d
Show file tree
Hide file tree
Showing 23 changed files with 179 additions and 179 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ namespace wrench {
wrench::Simulation::computeMultiThreaded(num_threads, thread_creation_overhead, sequential_work, parallel_per_thread_work);

// Launch an asynchronous IO read to the storage service
double num_io_bytes = 100 * MB;
sg_size_t num_io_bytes = 100 * MB;
data_manager->initiateAsynchronousFileRead(FileLocation::LOCATION(storage_service, file), num_io_bytes);

// Participate in an all-to-all communication
Expand Down
6 changes: 3 additions & 3 deletions include/wrench/services/ServiceMessage.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ namespace wrench {
*/
class ServiceMessage : public SimulationMessage {
protected:
explicit ServiceMessage(double payload);
explicit ServiceMessage(sg_size_t payload);
};

/**
Expand All @@ -36,7 +36,7 @@ namespace wrench {
public:
// ~ServiceStopDaemonMessage(){};

ServiceStopDaemonMessage(S4U_CommPort *ack_commport, bool send_failure_notifications, ComputeService::TerminationCause termination_cause, double payload);
ServiceStopDaemonMessage(S4U_CommPort *ack_commport, bool send_failure_notifications, ComputeService::TerminationCause termination_cause, sg_size_t payload);

/** @brief the commport_name to which the "I stopped" ack should be sent */
S4U_CommPort *ack_commport;
Expand All @@ -51,7 +51,7 @@ namespace wrench {
*/
class ServiceDaemonStoppedMessage : public ServiceMessage {
public:
explicit ServiceDaemonStoppedMessage(double payload);
explicit ServiceDaemonStoppedMessage(sg_size_t payload);
};

/***********************/
Expand Down
36 changes: 18 additions & 18 deletions include/wrench/services/compute/ComputeServiceMessage.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ namespace wrench {
*/
class ComputeServiceMessage : public ServiceMessage {
protected:
ComputeServiceMessage(double payload);
ComputeServiceMessage(sg_size_t payload);
};


Expand All @@ -42,7 +42,7 @@ namespace wrench {
// public:
// ComputeServiceSubmitStandardJobRequestMessage(const std::string answer_commport, std::shared_ptr<StandardJob> ,
// const std::map<std::string, std::string> service_specific_args,
// double payload);
// sg_size_t payload);
//
// /** @brief The commport_name to which the answer message should be sent */
// std::string answer_commport;
Expand All @@ -58,7 +58,7 @@ namespace wrench {
// class ComputeServiceSubmitStandardJobAnswerMessage : public ComputeServiceMessage {
// public:
// ComputeServiceSubmitStandardJobAnswerMessage(std::shared_ptr<StandardJob> , std::shared_ptr<ComputeService>, bool success,
// std::shared_ptr<FailureCause> failure_cause, double payload);
// std::shared_ptr<FailureCause> failure_cause, sg_size_t payload);
//
// /** @brief The standard job that was submitted */
// std::shared_ptr<StandardJob> job;
Expand All @@ -75,7 +75,7 @@ namespace wrench {
// */
// class ComputeServiceStandardJobDoneMessage : public ComputeServiceMessage {
// public:
// ComputeServiceStandardJobDoneMessage(std::shared_ptr<StandardJob> , std::shared_ptr<ComputeService>, double payload);
// ComputeServiceStandardJobDoneMessage(std::shared_ptr<StandardJob> , std::shared_ptr<ComputeService>, sg_size_t payload);
//
// /** @brief The job that has completed */
// std::shared_ptr<StandardJob> job;
Expand All @@ -90,7 +90,7 @@ namespace wrench {
// public:
// ComputeServiceStandardJobFailedMessage(std::shared_ptr<StandardJob> , std::shared_ptr<ComputeService>,
// std::shared_ptr<FailureCause> cause,
// double payload);
// sg_size_t payload);
//
// /** @brief The job that has failed */
// std::shared_ptr<StandardJob> job;
Expand All @@ -105,7 +105,7 @@ namespace wrench {
// */
// class ComputeServiceTerminateStandardJobRequestMessage : public ComputeServiceMessage {
// public:
// ComputeServiceTerminateStandardJobRequestMessage(std::string answer_commport, std::shared_ptr<StandardJob> , double payload);
// ComputeServiceTerminateStandardJobRequestMessage(std::string answer_commport, std::shared_ptr<StandardJob> , sg_size_t payload);
//
// /** @brief The commport_name to which the answer message should be sent */
// std::string answer_commport;
Expand All @@ -119,7 +119,7 @@ namespace wrench {
// class ComputeServiceTerminateStandardJobAnswerMessage : public ComputeServiceMessage {
// public:
// ComputeServiceTerminateStandardJobAnswerMessage(std::shared_ptr<StandardJob> , std::shared_ptr<ComputeService>, bool success,
// std::shared_ptr<FailureCause> failure_cause, double payload);
// std::shared_ptr<FailureCause> failure_cause, sg_size_t payload);
//
// /** @brief The standard job to terminate */
// std::shared_ptr<StandardJob> job;
Expand All @@ -139,7 +139,7 @@ namespace wrench {
ComputeServiceSubmitCompoundJobRequestMessage(S4U_CommPort *answer_commport,
std::shared_ptr<CompoundJob> job,
std::map<std::string, std::string> service_specific_args,
double payload);
sg_size_t payload);

/** @brief The commport_name to which the answer message should be sent */
S4U_CommPort *answer_commport;
Expand All @@ -155,7 +155,7 @@ namespace wrench {
class ComputeServiceSubmitCompoundJobAnswerMessage : public ComputeServiceMessage {
public:
ComputeServiceSubmitCompoundJobAnswerMessage(std::shared_ptr<CompoundJob>, std::shared_ptr<ComputeService>, bool success,
std::shared_ptr<FailureCause> failure_cause, double payload);
std::shared_ptr<FailureCause> failure_cause, sg_size_t payload);

/** @brief The standard job that was submitted */
std::shared_ptr<CompoundJob> job;
Expand All @@ -172,7 +172,7 @@ namespace wrench {
*/
class ComputeServiceCompoundJobDoneMessage : public ComputeServiceMessage {
public:
ComputeServiceCompoundJobDoneMessage(std::shared_ptr<CompoundJob>, std::shared_ptr<ComputeService>, double payload);
ComputeServiceCompoundJobDoneMessage(std::shared_ptr<CompoundJob>, std::shared_ptr<ComputeService>, sg_size_t payload);

/** @brief The job that has completed */
std::shared_ptr<CompoundJob> job;
Expand All @@ -186,7 +186,7 @@ namespace wrench {
class ComputeServiceCompoundJobFailedMessage : public ComputeServiceMessage {
public:
ComputeServiceCompoundJobFailedMessage(std::shared_ptr<CompoundJob>, std::shared_ptr<ComputeService>,
double payload);
sg_size_t payload);

/** @brief The job that has failed */
std::shared_ptr<CompoundJob> job;
Expand All @@ -199,7 +199,7 @@ namespace wrench {
*/
class ComputeServiceTerminateCompoundJobRequestMessage : public ComputeServiceMessage {
public:
ComputeServiceTerminateCompoundJobRequestMessage(S4U_CommPort *answer_commport, std::shared_ptr<CompoundJob>, double payload);
ComputeServiceTerminateCompoundJobRequestMessage(S4U_CommPort *answer_commport, std::shared_ptr<CompoundJob>, sg_size_t payload);

/** @brief The commport_name to which the answer message should be sent */
S4U_CommPort *answer_commport;
Expand All @@ -213,7 +213,7 @@ namespace wrench {
class ComputeServiceTerminateCompoundJobAnswerMessage : public ComputeServiceMessage {
public:
ComputeServiceTerminateCompoundJobAnswerMessage(std::shared_ptr<CompoundJob>, std::shared_ptr<ComputeService>, bool success,
std::shared_ptr<FailureCause> failure_cause, double payload);
std::shared_ptr<FailureCause> failure_cause, sg_size_t payload);

/** @brief The standard job to terminate */
std::shared_ptr<CompoundJob> job;
Expand All @@ -231,7 +231,7 @@ namespace wrench {
*/
class ComputeServicePilotJobStartedMessage : public ComputeServiceMessage {
public:
ComputeServicePilotJobStartedMessage(std::shared_ptr<PilotJob>, std::shared_ptr<ComputeService>, double payload);
ComputeServicePilotJobStartedMessage(std::shared_ptr<PilotJob>, std::shared_ptr<ComputeService>, sg_size_t payload);

/** @brief The pilot job that has started */
std::shared_ptr<PilotJob> job;
Expand All @@ -244,7 +244,7 @@ namespace wrench {
*/
class ComputeServicePilotJobExpiredMessage : public ComputeServiceMessage {
public:
ComputeServicePilotJobExpiredMessage(std::shared_ptr<PilotJob>, std::shared_ptr<ComputeService>, double payload);
ComputeServicePilotJobExpiredMessage(std::shared_ptr<PilotJob>, std::shared_ptr<ComputeService>, sg_size_t payload);

/** @brief The pilot job that has expired */
std::shared_ptr<PilotJob> job;
Expand All @@ -258,7 +258,7 @@ namespace wrench {
*/
class ComputeServiceResourceInformationRequestMessage : public ComputeServiceMessage {
public:
ComputeServiceResourceInformationRequestMessage(S4U_CommPort *answer_commport, const std::string &key, double payload);
ComputeServiceResourceInformationRequestMessage(S4U_CommPort *answer_commport, const std::string &key, sg_size_t payload);

/** @brief The commport_name to which the answer should be sent */
S4U_CommPort *answer_commport;
Expand All @@ -272,7 +272,7 @@ namespace wrench {
class ComputeServiceResourceInformationAnswerMessage : public ComputeServiceMessage {
public:
ComputeServiceResourceInformationAnswerMessage(std::map<std::string, double> info,
double payload);
sg_size_t payload);

/** @brief The resource information map */
std::map<std::string, double> info;
Expand Down Expand Up @@ -300,7 +300,7 @@ namespace wrench {
*/
class ComputeServiceIsThereAtLeastOneHostWithAvailableResourcesAnswerMessage : public ComputeServiceMessage {
public:
ComputeServiceIsThereAtLeastOneHostWithAvailableResourcesAnswerMessage(bool answer, double payload);
ComputeServiceIsThereAtLeastOneHostWithAvailableResourcesAnswerMessage(bool answer, sg_size_t payload);

/** @brief The true/false answer */
bool answer;
Expand Down
20 changes: 10 additions & 10 deletions include/wrench/services/compute/batch/BatchComputeServiceMessage.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ namespace wrench {
*/
class BatchComputeServiceMessage : public ComputeServiceMessage {
protected:
BatchComputeServiceMessage(double payload);
BatchComputeServiceMessage(sg_size_t payload);
};

/**
* @brief A message sent to a BatchComputeService to submit a batch job for execution
*/
class BatchComputeServiceJobRequestMessage : public BatchComputeServiceMessage {
public:
BatchComputeServiceJobRequestMessage(S4U_CommPort *answer_commport, std::shared_ptr<BatchJob> job, double payload);
BatchComputeServiceJobRequestMessage(S4U_CommPort *answer_commport, std::shared_ptr<BatchJob> job, sg_size_t payload);

/** @brief The commport_name to answer to */
S4U_CommPort *answer_commport;
Expand All @@ -46,7 +46,7 @@ namespace wrench {
*/
class AlarmJobTimeOutMessage : public ServiceMessage {
public:
AlarmJobTimeOutMessage(std::shared_ptr<BatchJob> job, double payload);
AlarmJobTimeOutMessage(std::shared_ptr<BatchJob> job, sg_size_t payload);
/** @brief The batch job */
std::shared_ptr<BatchJob> job;
};
Expand All @@ -57,7 +57,7 @@ namespace wrench {
*/
class AlarmNotifyBatschedMessage : public ServiceMessage {
public:
AlarmNotifyBatschedMessage(std::string job_id, double payload);
AlarmNotifyBatschedMessage(std::string job_id, sg_size_t payload);
/** @brief the batch job's id */
std::string job_id;
};
Expand All @@ -69,7 +69,7 @@ namespace wrench {
*/
class BatchSimulationBeginsToSchedulerMessage : public BatchComputeServiceMessage {
public:
BatchSimulationBeginsToSchedulerMessage(std::string answer_commport, std::string job_args_to_scheduler, double payload);
BatchSimulationBeginsToSchedulerMessage(std::string answer_commport, std::string job_args_to_scheduler, sg_size_t payload);

/** @brief The commport_name to answer to */
std::string answer_commport;
Expand All @@ -84,7 +84,7 @@ namespace wrench {
*/
class BatchSchedReadyMessage : public BatchComputeServiceMessage {
public:
BatchSchedReadyMessage(std::string answer_commport, double payload);
BatchSchedReadyMessage(std::string answer_commport, sg_size_t payload);

/** @brief The commport_name to answer to */
std::string answer_commport;
Expand All @@ -99,7 +99,7 @@ namespace wrench {
*/
class BatchExecuteJobFromBatSchedMessage : public BatchComputeServiceMessage {
public:
BatchExecuteJobFromBatSchedMessage(S4U_CommPort *answer_commport, std::string batsched_decision_reply, double payload);
BatchExecuteJobFromBatSchedMessage(S4U_CommPort *answer_commport, std::string batsched_decision_reply, sg_size_t payload);

/** @brief The commport_name to answer to */
S4U_CommPort *answer_commport;
Expand All @@ -114,7 +114,7 @@ namespace wrench {
*/
class BatchQueryAnswerMessage : public BatchComputeServiceMessage {
public:
BatchQueryAnswerMessage(double estimated_job_start_time, double payload);
BatchQueryAnswerMessage(double estimated_job_start_time, sg_size_t payload);

/** @brief The estimated job start time */
double estimated_start_time;
Expand All @@ -126,7 +126,7 @@ namespace wrench {
// */
// class BatchFakeJobSubmissionReplyMessage : public BatchComputeServiceMessage {
// public:
// BatchFakeJobSubmissionReplyMessage(std::string json_data_string, double payload);
// BatchFakeJobSubmissionReplyMessage(std::string json_data_string, sg_size_t payload);
//
// /** @brief The resources info in json data string */
// std::string json_data_string;
Expand All @@ -140,7 +140,7 @@ namespace wrench {
*/
class BatchJobSubmissionToSchedulerMessage : public BatchComputeServiceMessage {
public:
BatchJobSubmissionToSchedulerMessage(S4U_CommPort *answer_commport, Job* job, std::string job_args_to_scheduler, double payload);
BatchJobSubmissionToSchedulerMessage(S4U_CommPort *answer_commport, Job* job, std::string job_args_to_scheduler, sg_size_t payload);

/** @brief The commport_name to answer to */
S4U_CommPort *answer_commport;
Expand Down
Loading

0 comments on commit 0c3704d

Please sign in to comment.