From 0bddb0120a4f240f7cfbb33fa92c0c403b05ff52 Mon Sep 17 00:00:00 2001 From: Henri Casanova Date: Wed, 16 Oct 2024 00:48:26 -1000 Subject: [PATCH] example fixes --- examples/action_api/XRootD/Controller.cpp | 8 +- examples/action_api/XRootD/Controller.h | 4 +- .../TwoActionsAtATimeExecutionController.cpp | 6 +- .../TwoActionsAtATimeExecutionController.h | 4 +- .../GreedyExecutionController.cpp | 2 +- .../BatchMPIActionController.cpp | 2 +- .../GreedyExecutionController.cpp | 6 +- .../GreedyExecutionController.h | 4 +- .../CommunicatingActions.cpp | 2 +- .../CommunicatingActionsController.cpp | 4 +- .../JobActionFailureController.cpp | 4 +- .../MultiActionMultiJobController.cpp | 4 +- .../storage-service-proxy/Controller.cpp | 6 +- .../storage-service-proxy/Controller.h | 4 +- .../SuperCustomActionController.cpp | 4 +- .../TwoTasksAtATimeWMS.cpp | 4 +- .../TwoTasksAtATimeWMS.h | 4 +- .../WorkflowAsAsingleJobWMS.cpp | 4 +- .../WorkflowAsAsingleJobWMS.h | 4 +- .../bare-metal-chain/OneTaskAtATimeWMS.cpp | 4 +- .../bare-metal-chain/OneTaskAtATimeWMS.h | 4 +- .../bare-metal-complex-job/ComplexJobWMS.cpp | 4 +- .../bare-metal-complex-job/ComplexJobWMS.h | 4 +- .../DataMovementWMS.cpp | 4 +- .../DataMovementWMS.h | 4 +- .../OneTaskAtATimeWMS.cpp | 4 +- .../OneTaskAtATimeWMS.h | 4 +- .../batch-pilot-job/PilotJobWMS.cpp | 8 +- .../batch-pilot-job/PilotJobWMS.h | 8 +- .../TwoTasksAtATimeCloudWMS.cpp | 8 +- .../TwoTasksAtATimeCloudWMS.h | 4 +- .../TwoTasksAtATimeCloudWMS.cpp | 4 +- .../TwoTasksAtATimeCloudWMS.h | 4 +- .../TwoTasksAtATimeVirtualizedClusterWMS.cpp | 4 +- .../TwoTasksAtATimeVirtualizedClusterWMS.h | 4 +- .../condor-grid-example/CondorWMS.cpp | 2 +- .../condor-grid-example/CondorWMS.h | 2 +- .../real-workflow-example/SimpleWMS.cpp | 8 +- .../real-workflow-example/SimpleWMS.h | 8 +- src/wrench/util/UnitParser.cpp | 1 + .../EnergyConsumptionTest.cpp | 10 +- test/managers/DataMovementManagerTest.cpp | 2 +- ...areMetalComputeServiceMultiActionTests.cpp | 6 +- .../BareMetalComputeServiceMultiJobTests.cpp | 4 +- .../BareMetalComputeServiceOneActionTests.cpp | 8 +- .../BareMetalComputeServiceOneTaskTest.cpp | 4 +- .../BareMetalComputeServiceTestPilotJobs.cpp | 4 +- ...areMetalComputeServiceTestStandardJobs.cpp | 14 +-- .../ScratchSpaceTest.cpp | 14 +-- .../BatchComputeServiceOneActionTests.cpp | 4 +- ...iceBatschedQueueWaitTimePredictionTest.cpp | 22 ++-- .../BatchServiceTest.cpp | 100 +++++++++--------- .../htcondor/HTCondorServiceTest.cpp | 12 +-- .../VirtualizedClusterServiceTest.cpp | 14 +-- .../FileRegistryTest.cpp | 6 +- .../ActionExecutionServiceTest.cpp | 18 ++-- .../ComputeActionExecutorTest.cpp | 4 +- .../CustomActionExecutorTest.cpp | 2 +- .../FileCopyActionExecutorTest.cpp | 4 +- .../FileDeleteActionExecutorTest.cpp | 2 +- .../FileReadActionExecutorTest.cpp | 10 +- .../FileRegistryActionExecutorTest.cpp | 2 +- .../FileWriteActionExecutorTest.cpp | 2 +- .../KillFailureActionExecutorTest.cpp | 4 +- .../NetworkProximityTest.cpp | 4 +- .../CompoundStorageServiceFunctionalTest.cpp | 10 +- .../LogicalFileSystemTest.cpp | 2 +- .../SimpleStorageServiceFunctionalTest.cpp | 8 +- ...areMetalComputeServiceHostFailuresTest.cpp | 6 +- .../CloudComputeServiceHostFailuresTest.cpp | 4 +- .../FileRegistryLinkFailuresTest.cpp | 2 +- .../simulation/DynamicServiceCreationTest.cpp | 14 +-- test/simulation/SimpleSimulationTest.cpp | 14 +-- test/simulation/SimulationPlatformTest.cpp | 4 +- .../SimulationDumpJSONTest.cpp | 22 ++-- .../SimulationOutputTest.cpp | 10 +- .../SimulationTimestampDiskReadWriteTest.cpp | 2 +- .../SimulationTimestampFileCopyTest.cpp | 10 +- .../SimulationTimestampFileWriteTest.cpp | 8 +- test/wms/MultipleWMSTest.cpp | 6 +- test/wms/WMSTest.cpp | 2 +- 81 files changed, 289 insertions(+), 288 deletions(-) diff --git a/examples/action_api/XRootD/Controller.cpp b/examples/action_api/XRootD/Controller.cpp index be80c75c3a..c29859994d 100755 --- a/examples/action_api/XRootD/Controller.cpp +++ b/examples/action_api/XRootD/Controller.cpp @@ -14,8 +14,8 @@ **/ #define GFLOP (1000.0 * 1000.0 * 1000.0) -#define MBYTE (1000.0 * 1000.0) -#define GBYTE (1000.0 * 1000.0 * 1000.0) +#define MBYTE (1000000ULL) +#define GBYTE (1000000000ULL) #include #include @@ -169,7 +169,7 @@ namespace wrench { * * @param event: the event */ - void Controller::processEventCompoundJobCompletion(std::shared_ptr event) { + void Controller::processEventCompoundJobCompletion(const std::shared_ptr &event) { /* Retrieve the job that this event is for */ auto job = event->job; WRENCH_INFO("Notified that compound job %s has successfully completed", job->getName().c_str()); @@ -180,7 +180,7 @@ namespace wrench { * * @param event: the event */ - void Controller::processEventCompoundJobFailure(std::shared_ptr event) { + void Controller::processEventCompoundJobFailure(const std::shared_ptr &event) { /* Retrieve the job that this event is for */ auto job = event->job; auto action = *(job->getActions().begin()); diff --git a/examples/action_api/XRootD/Controller.h b/examples/action_api/XRootD/Controller.h index 81bd381c22..061909ae3e 100755 --- a/examples/action_api/XRootD/Controller.h +++ b/examples/action_api/XRootD/Controller.h @@ -31,8 +31,8 @@ namespace wrench { protected: // Overridden method - void processEventCompoundJobCompletion(std::shared_ptr) override; - void processEventCompoundJobFailure(std::shared_ptr event) override; + void processEventCompoundJobCompletion(const std::shared_ptr &event) override; + void processEventCompoundJobFailure(const std::shared_ptr &event) override; private: // main() method of the Controller diff --git a/examples/action_api/bare-metal-bag-of-actions/TwoActionsAtATimeExecutionController.cpp b/examples/action_api/bare-metal-bag-of-actions/TwoActionsAtATimeExecutionController.cpp index 24f1ec9bec..eee9d5c8ca 100755 --- a/examples/action_api/bare-metal-bag-of-actions/TwoActionsAtATimeExecutionController.cpp +++ b/examples/action_api/bare-metal-bag-of-actions/TwoActionsAtATimeExecutionController.cpp @@ -18,7 +18,7 @@ #include "TwoActionsAtATimeExecutionController.h" #define GFLOP (1000.0 * 1000.0 * 1000.0) -#define MB (1000.0 * 1000.0) +#define MB (1000000ULL) WRENCH_LOG_CATEGORY(custom_controller, "Log category for TwoActionsAtATimeExecutionController"); @@ -118,7 +118,7 @@ namespace wrench { * * @param event: the event */ - void TwoActionsAtATimeExecutionController::processEventCompoundJobCompletion(std::shared_ptr event) { + void TwoActionsAtATimeExecutionController::processEventCompoundJobCompletion(const std::shared_ptr &event) { WRENCH_INFO("Compound job %s has completed:", event->job->getName().c_str()); // sort actions by start time auto job_actions = event->job->getActions(); @@ -145,7 +145,7 @@ namespace wrench { * * @param event: the event */ - void TwoActionsAtATimeExecutionController::processEventCompoundJobFailure(std::shared_ptr event) { + void TwoActionsAtATimeExecutionController::processEventCompoundJobFailure(const std::shared_ptr &event) { WRENCH_INFO("Compound job %s has failed!", event->job->getName().c_str()); throw std::runtime_error("This should not happen in this example"); } diff --git a/examples/action_api/bare-metal-bag-of-actions/TwoActionsAtATimeExecutionController.h b/examples/action_api/bare-metal-bag-of-actions/TwoActionsAtATimeExecutionController.h index 15d0e1293c..250f9cf1c9 100755 --- a/examples/action_api/bare-metal-bag-of-actions/TwoActionsAtATimeExecutionController.h +++ b/examples/action_api/bare-metal-bag-of-actions/TwoActionsAtATimeExecutionController.h @@ -33,8 +33,8 @@ namespace wrench { protected: // Overridden method - void processEventCompoundJobCompletion(std::shared_ptr) override; - void processEventCompoundJobFailure(std::shared_ptr) override; + void processEventCompoundJobCompletion(const std::shared_ptr &event) override; + void processEventCompoundJobFailure(const std::shared_ptr &event) override; private: // main() method of the WMS diff --git a/examples/action_api/batch-bag-of-actions/GreedyExecutionController.cpp b/examples/action_api/batch-bag-of-actions/GreedyExecutionController.cpp index 5b1e4c8660..36ed0bacea 100755 --- a/examples/action_api/batch-bag-of-actions/GreedyExecutionController.cpp +++ b/examples/action_api/batch-bag-of-actions/GreedyExecutionController.cpp @@ -17,7 +17,7 @@ #include "GreedyExecutionController.h" #define GFLOP (1000.0 * 1000.0 * 1000.0) -#define MB (1000.0 * 1000.0) +#define MB (1000000ULL) WRENCH_LOG_CATEGORY(custom_controller, "Log category for GreedyExecutionController"); diff --git a/examples/action_api/batch-mpi-action/BatchMPIActionController.cpp b/examples/action_api/batch-mpi-action/BatchMPIActionController.cpp index 85aebb50a8..42c1e7816f 100755 --- a/examples/action_api/batch-mpi-action/BatchMPIActionController.cpp +++ b/examples/action_api/batch-mpi-action/BatchMPIActionController.cpp @@ -18,7 +18,7 @@ #include "smpi/smpi.h" #define GFLOP (1000.0 * 1000.0 * 1000.0) -#define MB (1000.0 * 1000.0) +#define MB (1000000ULL) #define COMMUNICATOR_SIZE 16UL diff --git a/examples/action_api/cloud-bag-of-actions/GreedyExecutionController.cpp b/examples/action_api/cloud-bag-of-actions/GreedyExecutionController.cpp index d25ea37d16..2e2ee8ec37 100755 --- a/examples/action_api/cloud-bag-of-actions/GreedyExecutionController.cpp +++ b/examples/action_api/cloud-bag-of-actions/GreedyExecutionController.cpp @@ -18,7 +18,7 @@ #include "GreedyExecutionController.h" #define GFLOP (1000.0 * 1000.0 * 1000.0) -#define MB (1000.0 * 1000.0) +#define MB (1000000ULL) WRENCH_LOG_CATEGORY(custom_controller, "Log category for GreedyExecutionController"); @@ -158,7 +158,7 @@ namespace wrench { * @brief Method to handle a compound job failure * @param event: the event */ - void GreedyExecutionController::processEventCompoundJobFailure(std::shared_ptr event) { + void GreedyExecutionController::processEventCompoundJobFailure(const std::shared_ptr &event) { WRENCH_INFO("Job %s failed!", event->job->getName().c_str()); } @@ -166,7 +166,7 @@ namespace wrench { * @brief Method to handle a compound job completion * @param event: the event */ - void GreedyExecutionController::processEventCompoundJobCompletion(std::shared_ptr event) { + void GreedyExecutionController::processEventCompoundJobCompletion(const std::shared_ptr &event) { WRENCH_INFO("Job %s completed successfully!", event->job->getName().c_str()); } diff --git a/examples/action_api/cloud-bag-of-actions/GreedyExecutionController.h b/examples/action_api/cloud-bag-of-actions/GreedyExecutionController.h index 0a50404d44..dd9e1162b7 100755 --- a/examples/action_api/cloud-bag-of-actions/GreedyExecutionController.h +++ b/examples/action_api/cloud-bag-of-actions/GreedyExecutionController.h @@ -42,8 +42,8 @@ namespace wrench { int num_actions; - void processEventCompoundJobFailure(std::shared_ptr) override; - void processEventCompoundJobCompletion(std::shared_ptr) override; + void processEventCompoundJobFailure(const std::shared_ptr &event) override; + void processEventCompoundJobCompletion(const std::shared_ptr &event) override; }; }// namespace wrench #endif//WRENCH_EXAMPLE_GREEDY_EXECUTION_CONTROLLER_H diff --git a/examples/action_api/communicating-custom-actions/CommunicatingActions.cpp b/examples/action_api/communicating-custom-actions/CommunicatingActions.cpp index 668e2c9b46..8b8185879b 100755 --- a/examples/action_api/communicating-custom-actions/CommunicatingActions.cpp +++ b/examples/action_api/communicating-custom-actions/CommunicatingActions.cpp @@ -26,7 +26,7 @@ #include "CommunicatingActionsController.h"// Controller implementation -#define KB 1000.0 +#define KB 1000ULL #define MB (1000 * KB) #define GB (1000 * MB) #define GB (1000 * MB) diff --git a/examples/action_api/communicating-custom-actions/CommunicatingActionsController.cpp b/examples/action_api/communicating-custom-actions/CommunicatingActionsController.cpp index 94a68c1714..6d1a3b9b47 100755 --- a/examples/action_api/communicating-custom-actions/CommunicatingActionsController.cpp +++ b/examples/action_api/communicating-custom-actions/CommunicatingActionsController.cpp @@ -17,7 +17,7 @@ #include "CommunicatingActionsController.h" #define GFLOP (1000.0 * 1000.0 * 1000.0) -#define MB (1000.0 * 1000.0) +#define MB (1000000ULL) #define COMMUNICATOR_SIZE 16UL @@ -103,7 +103,7 @@ namespace wrench { // Participate in an all to all communication unsigned long num_comm_bytes = 1 * MB; - std::map sends; + std::map sends; for (unsigned long i = 0; i < num_ranks; i++) { if (i != my_rank) { sends[i] = num_comm_bytes; diff --git a/examples/action_api/job-action-failure/JobActionFailureController.cpp b/examples/action_api/job-action-failure/JobActionFailureController.cpp index 3df34a4cb4..048d6d6738 100755 --- a/examples/action_api/job-action-failure/JobActionFailureController.cpp +++ b/examples/action_api/job-action-failure/JobActionFailureController.cpp @@ -17,8 +17,8 @@ #include "JobActionFailureController.h" #define GFLOP (1000.0 * 1000.0 * 1000.0) -#define MB (1000.0 * 1000.0) -#define GB (1000.0 * 1000.0 * 1000.0) +#define MB (1000000ULL) +#define GB (1000000000ULL) WRENCH_LOG_CATEGORY(custom_controller, "Log category for JobActionFailureController"); diff --git a/examples/action_api/multi-action-multi-job/MultiActionMultiJobController.cpp b/examples/action_api/multi-action-multi-job/MultiActionMultiJobController.cpp index e3cdbaee71..b2352f3b2a 100755 --- a/examples/action_api/multi-action-multi-job/MultiActionMultiJobController.cpp +++ b/examples/action_api/multi-action-multi-job/MultiActionMultiJobController.cpp @@ -17,7 +17,7 @@ #include "MultiActionMultiJobController.h" #define GFLOP (1000.0 * 1000.0 * 1000.0) -#define MB (1000.0 * 1000.0) +#define MB (1000000ULL) WRENCH_LOG_CATEGORY(custom_controller, "Log category for MultiActionMultiJobController"); @@ -144,7 +144,7 @@ namespace wrench { action->getName().c_str(), action->getExecutionHistory().top().execution_host.c_str(), action->getExecutionHistory().top().physical_execution_host.c_str()); - WRENCH_INFO(" - it used %lu cores for computation, and %.2lf bytes of RAM", + WRENCH_INFO(" - it used %lu cores for computation, and %llu bytes of RAM", action->getExecutionHistory().top().num_cores_allocated, action->getExecutionHistory().top().ram_allocated); WRENCH_INFO(" - it started at time %.2lf and finished at time %.2lf", diff --git a/examples/action_api/storage-service-proxy/Controller.cpp b/examples/action_api/storage-service-proxy/Controller.cpp index fc4c7580cd..45853fbd6c 100755 --- a/examples/action_api/storage-service-proxy/Controller.cpp +++ b/examples/action_api/storage-service-proxy/Controller.cpp @@ -15,7 +15,7 @@ #define GFLOP (1000.0 * 1000.0 * 1000.0) #define MBYTE (1000.0 * 1000.0) -#define GBYTE (1000.0 * 1000.0 * 1000.0) +#define GB (1000000000ULL) #include #include @@ -172,7 +172,7 @@ namespace wrench { * * @param event: the event */ - void Controller::processEventCompoundJobCompletion(std::shared_ptr event) { + void Controller::processEventCompoundJobCompletion(const std::shared_ptr &event) { /* Retrieve the job that this event is for */ auto job = event->job; WRENCH_INFO("Notified that compound job %s has successfully completed", job->getName().c_str()); @@ -183,7 +183,7 @@ namespace wrench { * * @param event: the event */ - void Controller::processEventCompoundJobFailure(std::shared_ptr event) { + void Controller::processEventCompoundJobFailure(const std::shared_ptr &event) { /* Retrieve the job that this event is for */ auto job = event->job; auto action = *(job->getActions().begin()); diff --git a/examples/action_api/storage-service-proxy/Controller.h b/examples/action_api/storage-service-proxy/Controller.h index 77ef1bcb27..9dc1380315 100755 --- a/examples/action_api/storage-service-proxy/Controller.h +++ b/examples/action_api/storage-service-proxy/Controller.h @@ -32,8 +32,8 @@ namespace wrench { protected: // Overridden method - void processEventCompoundJobCompletion(std::shared_ptr) override; - void processEventCompoundJobFailure(std::shared_ptr event) override; + void processEventCompoundJobCompletion(const std::shared_ptr &event) override; + void processEventCompoundJobFailure(const std::shared_ptr &event) override; private: // main() method of the Controller diff --git a/examples/action_api/super-custom-action/SuperCustomActionController.cpp b/examples/action_api/super-custom-action/SuperCustomActionController.cpp index 9a8c777668..e20bb564d9 100755 --- a/examples/action_api/super-custom-action/SuperCustomActionController.cpp +++ b/examples/action_api/super-custom-action/SuperCustomActionController.cpp @@ -17,7 +17,7 @@ #include "SuperCustomActionController.h" #define GFLOP (1000.0 * 1000.0 * 1000.0) -#define MB (1000.0 * 1000.0) +#define MB (1000000ULL) WRENCH_LOG_CATEGORY(custom_controller, "Log category for SuperCustomActionController"); @@ -138,7 +138,7 @@ namespace wrench { action->getName().c_str(), action->getExecutionHistory().top().execution_host.c_str(), action->getExecutionHistory().top().physical_execution_host.c_str()); - WRENCH_INFO(" - it used %lu cores for computation, and %.2lf bytes of RAM", + WRENCH_INFO(" - it used %lu cores for computation, and %luu bytes of RAM", action->getExecutionHistory().top().num_cores_allocated, action->getExecutionHistory().top().ram_allocated); WRENCH_INFO(" - it started at time %.2lf and finished at time %.2lf", diff --git a/examples/workflow_api/basic-examples/bare-metal-bag-of-tasks-programmatic-platform/TwoTasksAtATimeWMS.cpp b/examples/workflow_api/basic-examples/bare-metal-bag-of-tasks-programmatic-platform/TwoTasksAtATimeWMS.cpp index a884de2830..c8d32d03a7 100755 --- a/examples/workflow_api/basic-examples/bare-metal-bag-of-tasks-programmatic-platform/TwoTasksAtATimeWMS.cpp +++ b/examples/workflow_api/basic-examples/bare-metal-bag-of-tasks-programmatic-platform/TwoTasksAtATimeWMS.cpp @@ -137,7 +137,7 @@ namespace wrench { * * @param event: the event */ - void TwoTasksAtATimeWMS::processEventStandardJobCompletion(std::shared_ptr event) { + void TwoTasksAtATimeWMS::processEventStandardJobCompletion(const std::shared_ptr &event) { /* Retrieve the job that this event is for */ auto job = event->standard_job; /* Retrieve the job's tasks */ @@ -152,7 +152,7 @@ namespace wrench { * * @param event: the event */ - void TwoTasksAtATimeWMS::processEventStandardJobFailure(std::shared_ptr event) { + void TwoTasksAtATimeWMS::processEventStandardJobFailure(const std::shared_ptr &event) { /* Retrieve the job that this event is for */ auto job = event->standard_job; WRENCH_INFO("Notified that a standard job has failed (failure cause: %s)", diff --git a/examples/workflow_api/basic-examples/bare-metal-bag-of-tasks-programmatic-platform/TwoTasksAtATimeWMS.h b/examples/workflow_api/basic-examples/bare-metal-bag-of-tasks-programmatic-platform/TwoTasksAtATimeWMS.h index be7ddc1338..f64610fe23 100755 --- a/examples/workflow_api/basic-examples/bare-metal-bag-of-tasks-programmatic-platform/TwoTasksAtATimeWMS.h +++ b/examples/workflow_api/basic-examples/bare-metal-bag-of-tasks-programmatic-platform/TwoTasksAtATimeWMS.h @@ -31,8 +31,8 @@ namespace wrench { protected: // Overridden method - void processEventStandardJobCompletion(std::shared_ptr) override; - void processEventStandardJobFailure(std::shared_ptr) override; + void processEventStandardJobCompletion(const std::shared_ptr &event) override; + void processEventStandardJobFailure(const std::shared_ptr &event) override; private: // main() method of the WMS diff --git a/examples/workflow_api/basic-examples/bare-metal-chain-scratch/WorkflowAsAsingleJobWMS.cpp b/examples/workflow_api/basic-examples/bare-metal-chain-scratch/WorkflowAsAsingleJobWMS.cpp index 0f6afcc8b6..7daf6ed2d6 100755 --- a/examples/workflow_api/basic-examples/bare-metal-chain-scratch/WorkflowAsAsingleJobWMS.cpp +++ b/examples/workflow_api/basic-examples/bare-metal-chain-scratch/WorkflowAsAsingleJobWMS.cpp @@ -101,7 +101,7 @@ namespace wrench { * * @param event: the event */ - void WorkflowAsAsingleJobWMS::processEventStandardJobCompletion(std::shared_ptr event) { + void WorkflowAsAsingleJobWMS::processEventStandardJobCompletion(const std::shared_ptr &event) { /* Retrieve the job that this event is for */ auto job = event->standard_job; /* Retrieve the job's first (and in our case only) task */ @@ -115,7 +115,7 @@ namespace wrench { * * @param event: the event */ - void WorkflowAsAsingleJobWMS::processEventStandardJobFailure(std::shared_ptr event) { + void WorkflowAsAsingleJobWMS::processEventStandardJobFailure(const std::shared_ptr &event) { /* Retrieve the job that this event is for */ auto job = event->standard_job; /* Retrieve the job's first (and in our case only) task */ diff --git a/examples/workflow_api/basic-examples/bare-metal-chain-scratch/WorkflowAsAsingleJobWMS.h b/examples/workflow_api/basic-examples/bare-metal-chain-scratch/WorkflowAsAsingleJobWMS.h index c74e5adec5..1a4265e3bf 100755 --- a/examples/workflow_api/basic-examples/bare-metal-chain-scratch/WorkflowAsAsingleJobWMS.h +++ b/examples/workflow_api/basic-examples/bare-metal-chain-scratch/WorkflowAsAsingleJobWMS.h @@ -31,8 +31,8 @@ namespace wrench { protected: // Overridden methods - void processEventStandardJobCompletion(std::shared_ptr) override; - void processEventStandardJobFailure(std::shared_ptr) override; + void processEventStandardJobCompletion(const std::shared_ptr &event) override; + void processEventStandardJobFailure(const std::shared_ptr &event) override; private: // main() method of the WMS diff --git a/examples/workflow_api/basic-examples/bare-metal-chain/OneTaskAtATimeWMS.cpp b/examples/workflow_api/basic-examples/bare-metal-chain/OneTaskAtATimeWMS.cpp index 7573539f16..d75a655165 100755 --- a/examples/workflow_api/basic-examples/bare-metal-chain/OneTaskAtATimeWMS.cpp +++ b/examples/workflow_api/basic-examples/bare-metal-chain/OneTaskAtATimeWMS.cpp @@ -93,7 +93,7 @@ namespace wrench { * * @param event: the event */ - void OneTaskAtATimeWMS::processEventStandardJobCompletion(std::shared_ptr event) { + void OneTaskAtATimeWMS::processEventStandardJobCompletion(const std::shared_ptr &event) { /* Retrieve the job that this event is for */ auto job = event->standard_job; /* Retrieve the job's first (and in our case only) task */ @@ -106,7 +106,7 @@ namespace wrench { * * @param event: the event */ - void OneTaskAtATimeWMS::processEventStandardJobFailure(std::shared_ptr event) { + void OneTaskAtATimeWMS::processEventStandardJobFailure(const std::shared_ptr &event) { /* Retrieve the job that this event is for */ auto job = event->standard_job; /* Retrieve the job's first (and in our case only) task */ diff --git a/examples/workflow_api/basic-examples/bare-metal-chain/OneTaskAtATimeWMS.h b/examples/workflow_api/basic-examples/bare-metal-chain/OneTaskAtATimeWMS.h index ec35da75ba..df24fde30f 100755 --- a/examples/workflow_api/basic-examples/bare-metal-chain/OneTaskAtATimeWMS.h +++ b/examples/workflow_api/basic-examples/bare-metal-chain/OneTaskAtATimeWMS.h @@ -33,8 +33,8 @@ namespace wrench { protected: // Overridden method - void processEventStandardJobCompletion(std::shared_ptr) override; - void processEventStandardJobFailure(std::shared_ptr) override; + void processEventStandardJobCompletion(const std::shared_ptr &event) override; + void processEventStandardJobFailure(const std::shared_ptr &event) override; private: // main() method of the WMS diff --git a/examples/workflow_api/basic-examples/bare-metal-complex-job/ComplexJobWMS.cpp b/examples/workflow_api/basic-examples/bare-metal-complex-job/ComplexJobWMS.cpp index 914e96da74..047aadd354 100644 --- a/examples/workflow_api/basic-examples/bare-metal-complex-job/ComplexJobWMS.cpp +++ b/examples/workflow_api/basic-examples/bare-metal-complex-job/ComplexJobWMS.cpp @@ -112,7 +112,7 @@ namespace wrench { * * @param event: the event */ - void ComplexJobWMS::processEventStandardJobCompletion(std::shared_ptr event) { + void ComplexJobWMS::processEventStandardJobCompletion(const std::shared_ptr &event) { /* Retrieve the job that this event is for */ auto job = event->standard_job; /* Retrieve the job's first (and in our case only) task */ @@ -125,7 +125,7 @@ namespace wrench { * * @param event: the event */ - void ComplexJobWMS::processEventStandardJobFailure(std::shared_ptr event) { + void ComplexJobWMS::processEventStandardJobFailure(const std::shared_ptr &event) { /* Retrieve the job that this event is for */ auto job = event->standard_job; /* Retrieve the job's first (and in our case only) task */ diff --git a/examples/workflow_api/basic-examples/bare-metal-complex-job/ComplexJobWMS.h b/examples/workflow_api/basic-examples/bare-metal-complex-job/ComplexJobWMS.h index 160fe256fd..e4b9870cdd 100755 --- a/examples/workflow_api/basic-examples/bare-metal-complex-job/ComplexJobWMS.h +++ b/examples/workflow_api/basic-examples/bare-metal-complex-job/ComplexJobWMS.h @@ -32,8 +32,8 @@ namespace wrench { protected: // Overridden method - void processEventStandardJobCompletion(std::shared_ptr) override; - void processEventStandardJobFailure(std::shared_ptr) override; + void processEventStandardJobCompletion(const std::shared_ptr &event) override; + void processEventStandardJobFailure(const std::shared_ptr &event) override; private: // main() method of the WMS diff --git a/examples/workflow_api/basic-examples/bare-metal-data-movement/DataMovementWMS.cpp b/examples/workflow_api/basic-examples/bare-metal-data-movement/DataMovementWMS.cpp index 984428bde7..ec43fe0f36 100644 --- a/examples/workflow_api/basic-examples/bare-metal-data-movement/DataMovementWMS.cpp +++ b/examples/workflow_api/basic-examples/bare-metal-data-movement/DataMovementWMS.cpp @@ -136,7 +136,7 @@ namespace wrench { * * @param event: the event */ - void DataMovementWMS::processEventStandardJobCompletion(std::shared_ptr event) { + void DataMovementWMS::processEventStandardJobCompletion(const std::shared_ptr &event) { /* Retrieve the job that this event is for */ auto job = event->standard_job; /* Retrieve the job's first (and in our case only) task */ @@ -149,7 +149,7 @@ namespace wrench { * * @param event: the event */ - void DataMovementWMS::processEventStandardJobFailure(std::shared_ptr event) { + void DataMovementWMS::processEventStandardJobFailure(const std::shared_ptr &event) { /* Retrieve the job that this event is for */ auto job = event->standard_job; /* Retrieve the job's first (and in our case only) task */ diff --git a/examples/workflow_api/basic-examples/bare-metal-data-movement/DataMovementWMS.h b/examples/workflow_api/basic-examples/bare-metal-data-movement/DataMovementWMS.h index 889f521e79..6f57286b64 100755 --- a/examples/workflow_api/basic-examples/bare-metal-data-movement/DataMovementWMS.h +++ b/examples/workflow_api/basic-examples/bare-metal-data-movement/DataMovementWMS.h @@ -32,8 +32,8 @@ namespace wrench { protected: // Overridden method - void processEventStandardJobCompletion(std::shared_ptr) override; - void processEventStandardJobFailure(std::shared_ptr) override; + void processEventStandardJobCompletion(const std::shared_ptr &event) override; + void processEventStandardJobFailure(const std::shared_ptr &event) override; private: // main() method of the WMS diff --git a/examples/workflow_api/basic-examples/bare-metal-multicore-tasks/OneTaskAtATimeWMS.cpp b/examples/workflow_api/basic-examples/bare-metal-multicore-tasks/OneTaskAtATimeWMS.cpp index 1e5879de17..116163f4a9 100755 --- a/examples/workflow_api/basic-examples/bare-metal-multicore-tasks/OneTaskAtATimeWMS.cpp +++ b/examples/workflow_api/basic-examples/bare-metal-multicore-tasks/OneTaskAtATimeWMS.cpp @@ -87,7 +87,7 @@ namespace wrench { * * @param event: the event */ - void OneTaskAtATimeWMS::processEventStandardJobCompletion(std::shared_ptr event) { + void OneTaskAtATimeWMS::processEventStandardJobCompletion(const std::shared_ptr &event) { /* Retrieve the job that this event is for */ auto job = event->standard_job; /* Retrieve the job's tasks */ @@ -102,7 +102,7 @@ namespace wrench { * * @param event: the event */ - void OneTaskAtATimeWMS::processEventStandardJobFailure(std::shared_ptr event) { + void OneTaskAtATimeWMS::processEventStandardJobFailure(const std::shared_ptr &event) { /* Retrieve the job that this event is for */ auto job = event->standard_job; WRENCH_INFO("Notified that a standard job has failed (failure cause: %s)", diff --git a/examples/workflow_api/basic-examples/bare-metal-multicore-tasks/OneTaskAtATimeWMS.h b/examples/workflow_api/basic-examples/bare-metal-multicore-tasks/OneTaskAtATimeWMS.h index 1c7c2ad87c..a93552f58f 100755 --- a/examples/workflow_api/basic-examples/bare-metal-multicore-tasks/OneTaskAtATimeWMS.h +++ b/examples/workflow_api/basic-examples/bare-metal-multicore-tasks/OneTaskAtATimeWMS.h @@ -30,8 +30,8 @@ namespace wrench { protected: // Overridden method - void processEventStandardJobCompletion(std::shared_ptr) override; - void processEventStandardJobFailure(std::shared_ptr) override; + void processEventStandardJobCompletion(const std::shared_ptr &event) override; + void processEventStandardJobFailure(const std::shared_ptr &event) override; private: // main() method of the WMS diff --git a/examples/workflow_api/basic-examples/batch-pilot-job/PilotJobWMS.cpp b/examples/workflow_api/basic-examples/batch-pilot-job/PilotJobWMS.cpp index c94131f14f..8f27b65c4e 100644 --- a/examples/workflow_api/basic-examples/batch-pilot-job/PilotJobWMS.cpp +++ b/examples/workflow_api/basic-examples/batch-pilot-job/PilotJobWMS.cpp @@ -133,7 +133,7 @@ namespace wrench { * * @param event: the event */ - void PilotJobWMS::processEventStandardJobCompletion(std::shared_ptr event) { + void PilotJobWMS::processEventStandardJobCompletion(const std::shared_ptr &event) { WRENCH_INFO("Notified that a standard job has completed"); throw std::runtime_error("This shouldn't happen in this example"); } @@ -143,7 +143,7 @@ namespace wrench { * * @param event: the event */ - void PilotJobWMS::processEventStandardJobFailure(std::shared_ptr event) { + void PilotJobWMS::processEventStandardJobFailure(const std::shared_ptr &event) { /* Retrieve the job that this event is for */ auto job = event->standard_job; /* Retrieve the job's first (and in our case only) task */ @@ -156,7 +156,7 @@ namespace wrench { * * @param event: the event */ - void PilotJobWMS::processEventPilotJobExpiration(std::shared_ptr) { + void PilotJobWMS::processEventPilotJobExpiration(const std::shared_ptr &event) { WRENCH_INFO("Notified that a pilot job has expired"); } @@ -165,7 +165,7 @@ namespace wrench { * * @param event: the event */ - void PilotJobWMS::processEventPilotJobStart(std::shared_ptr) { + void PilotJobWMS::processEventPilotJobStart(const std::shared_ptr &event) { WRENCH_INFO("Notified that a pilot job has started!"); } diff --git a/examples/workflow_api/basic-examples/batch-pilot-job/PilotJobWMS.h b/examples/workflow_api/basic-examples/batch-pilot-job/PilotJobWMS.h index 395ee5ddbf..3162b4e405 100755 --- a/examples/workflow_api/basic-examples/batch-pilot-job/PilotJobWMS.h +++ b/examples/workflow_api/basic-examples/batch-pilot-job/PilotJobWMS.h @@ -31,10 +31,10 @@ namespace wrench { protected: // Overridden method - void processEventStandardJobCompletion(std::shared_ptr) override; - void processEventStandardJobFailure(std::shared_ptr) override; - void processEventPilotJobStart(std::shared_ptr) override; - void processEventPilotJobExpiration(std::shared_ptr) override; + void processEventStandardJobCompletion(const std::shared_ptr &event) override; + void processEventStandardJobFailure(const std::shared_ptr &event) override; + void processEventPilotJobStart(const std::shared_ptr &event) override; + void processEventPilotJobExpiration(const std::shared_ptr &event) override; private: // main() method of the WMS diff --git a/examples/workflow_api/basic-examples/cloud-bag-of-tasks-energy/TwoTasksAtATimeCloudWMS.cpp b/examples/workflow_api/basic-examples/cloud-bag-of-tasks-energy/TwoTasksAtATimeCloudWMS.cpp index e459f3e598..01f1073ac4 100755 --- a/examples/workflow_api/basic-examples/cloud-bag-of-tasks-energy/TwoTasksAtATimeCloudWMS.cpp +++ b/examples/workflow_api/basic-examples/cloud-bag-of-tasks-energy/TwoTasksAtATimeCloudWMS.cpp @@ -130,7 +130,7 @@ namespace wrench { /* Change the pstate of large VM */ WRENCH_INFO("Changing the pstate of the large VM to the lower pstate to save on energy temporarily"); - this->simulation->setPstate("CloudHost1", 1); + this->getSimulation()->setPstate("CloudHost1", 1); /* Sleep 10 seconds */ WRENCH_INFO("Sleeping for 10 seconds"); @@ -138,7 +138,7 @@ namespace wrench { /* Change the pstate of CloudHost1 */ WRENCH_INFO("Changing the pstate of the large VM back to the higher pstate"); - this->simulation->setPstate("CloudHost1", 0); + this->getSimulation()->setPstate("CloudHost1", 0); /* Wait for workflow execution event and process it. In this case we know that * the event will be a StandardJobCompletionEvent, which is processed by the method @@ -166,7 +166,7 @@ namespace wrench { * * @param event: the event */ - void TwoTasksAtATimeCloudWMS::processEventStandardJobCompletion(std::shared_ptr event) { + void TwoTasksAtATimeCloudWMS::processEventStandardJobCompletion(const std::shared_ptr &event) { /* Retrieve the job that this event is for */ auto job = event->standard_job; /* Retrieve the job's first (and in our case only) task */ @@ -179,7 +179,7 @@ namespace wrench { * * @param event: the event */ - void TwoTasksAtATimeCloudWMS::processEventStandardJobFailure(std::shared_ptr event) { + void TwoTasksAtATimeCloudWMS::processEventStandardJobFailure(const std::shared_ptr &event) { /* Retrieve the job that this event is for */ auto job = event->standard_job; /* Retrieve the job's first (and in our case only) task */ diff --git a/examples/workflow_api/basic-examples/cloud-bag-of-tasks-energy/TwoTasksAtATimeCloudWMS.h b/examples/workflow_api/basic-examples/cloud-bag-of-tasks-energy/TwoTasksAtATimeCloudWMS.h index 8a18630296..69b6dba6a9 100755 --- a/examples/workflow_api/basic-examples/cloud-bag-of-tasks-energy/TwoTasksAtATimeCloudWMS.h +++ b/examples/workflow_api/basic-examples/cloud-bag-of-tasks-energy/TwoTasksAtATimeCloudWMS.h @@ -31,8 +31,8 @@ namespace wrench { protected: // Overridden method - void processEventStandardJobCompletion(std::shared_ptr) override; - void processEventStandardJobFailure(std::shared_ptr) override; + void processEventStandardJobCompletion(const std::shared_ptr &event) override; + void processEventStandardJobFailure(const std::shared_ptr &event) override; private: // main() method of the WMS diff --git a/examples/workflow_api/basic-examples/cloud-bag-of-tasks/TwoTasksAtATimeCloudWMS.cpp b/examples/workflow_api/basic-examples/cloud-bag-of-tasks/TwoTasksAtATimeCloudWMS.cpp index a6bacf5edf..698606a8a9 100755 --- a/examples/workflow_api/basic-examples/cloud-bag-of-tasks/TwoTasksAtATimeCloudWMS.cpp +++ b/examples/workflow_api/basic-examples/cloud-bag-of-tasks/TwoTasksAtATimeCloudWMS.cpp @@ -150,7 +150,7 @@ namespace wrench { * * @param event: the event */ - void TwoTasksAtATimeCloudWMS::processEventStandardJobCompletion(std::shared_ptr event) { + void TwoTasksAtATimeCloudWMS::processEventStandardJobCompletion(const std::shared_ptr &event) { /* Retrieve the job that this event is for */ auto job = event->standard_job; /* Retrieve the job's first (and in our case only) task */ @@ -163,7 +163,7 @@ namespace wrench { * * @param event: the event */ - void TwoTasksAtATimeCloudWMS::processEventStandardJobFailure(std::shared_ptr event) { + void TwoTasksAtATimeCloudWMS::processEventStandardJobFailure(const std::shared_ptr &event) { /* Retrieve the job that this event is for */ auto job = event->standard_job; /* Retrieve the job's first (and in our case only) task */ diff --git a/examples/workflow_api/basic-examples/cloud-bag-of-tasks/TwoTasksAtATimeCloudWMS.h b/examples/workflow_api/basic-examples/cloud-bag-of-tasks/TwoTasksAtATimeCloudWMS.h index 0b1a33bc12..59b84a6976 100755 --- a/examples/workflow_api/basic-examples/cloud-bag-of-tasks/TwoTasksAtATimeCloudWMS.h +++ b/examples/workflow_api/basic-examples/cloud-bag-of-tasks/TwoTasksAtATimeCloudWMS.h @@ -31,8 +31,8 @@ namespace wrench { protected: // Overridden method - void processEventStandardJobCompletion(std::shared_ptr) override; - void processEventStandardJobFailure(std::shared_ptr) override; + void processEventStandardJobCompletion(const std::shared_ptr &event) override; + void processEventStandardJobFailure(const std::shared_ptr &event) override; private: // main() method of the WMS diff --git a/examples/workflow_api/basic-examples/virtualized-cluster-bag-of-tasks/TwoTasksAtATimeVirtualizedClusterWMS.cpp b/examples/workflow_api/basic-examples/virtualized-cluster-bag-of-tasks/TwoTasksAtATimeVirtualizedClusterWMS.cpp index a5cbd7d98b..5c5c989945 100755 --- a/examples/workflow_api/basic-examples/virtualized-cluster-bag-of-tasks/TwoTasksAtATimeVirtualizedClusterWMS.cpp +++ b/examples/workflow_api/basic-examples/virtualized-cluster-bag-of-tasks/TwoTasksAtATimeVirtualizedClusterWMS.cpp @@ -163,7 +163,7 @@ namespace wrench { * * @param event: the event */ - void TwoTasksAtATimeVirtualizedClusterWMS::processEventStandardJobCompletion(std::shared_ptr event) { + void TwoTasksAtATimeVirtualizedClusterWMS::processEventStandardJobCompletion(const std::shared_ptr &event) { /* Retrieve the job that this event is for */ auto job = event->standard_job; /* Retrieve the job's first (and in our case only) task */ @@ -176,7 +176,7 @@ namespace wrench { * * @param event: the event */ - void TwoTasksAtATimeVirtualizedClusterWMS::processEventStandardJobFailure(std::shared_ptr event) { + void TwoTasksAtATimeVirtualizedClusterWMS::processEventStandardJobFailure(const std::shared_ptr &event) { /* Retrieve the job that this event is for */ auto job = event->standard_job; /* Retrieve the job's first (and in our case only) task */ diff --git a/examples/workflow_api/basic-examples/virtualized-cluster-bag-of-tasks/TwoTasksAtATimeVirtualizedClusterWMS.h b/examples/workflow_api/basic-examples/virtualized-cluster-bag-of-tasks/TwoTasksAtATimeVirtualizedClusterWMS.h index 9a8e22b734..9e94aa69e8 100755 --- a/examples/workflow_api/basic-examples/virtualized-cluster-bag-of-tasks/TwoTasksAtATimeVirtualizedClusterWMS.h +++ b/examples/workflow_api/basic-examples/virtualized-cluster-bag-of-tasks/TwoTasksAtATimeVirtualizedClusterWMS.h @@ -31,8 +31,8 @@ namespace wrench { protected: // Overridden method - void processEventStandardJobCompletion(std::shared_ptr) override; - void processEventStandardJobFailure(std::shared_ptr) override; + void processEventStandardJobCompletion(const std::shared_ptr &event) override; + void processEventStandardJobFailure(const std::shared_ptr &event) override; private: // main() method of the WMS diff --git a/examples/workflow_api/condor-grid-example/CondorWMS.cpp b/examples/workflow_api/condor-grid-example/CondorWMS.cpp index ad4ae54d4c..f90841192e 100755 --- a/examples/workflow_api/condor-grid-example/CondorWMS.cpp +++ b/examples/workflow_api/condor-grid-example/CondorWMS.cpp @@ -122,7 +122,7 @@ namespace wrench { * * @param event: the event */ - void CondorWMS::processEventStandardJobCompletion(std::shared_ptr event) { + void CondorWMS::processEventStandardJobCompletion(const std::shared_ptr &event) { /* Retrieve the job that this event is for */ auto job = event->standard_job; WRENCH_INFO("Notified that a standard job has completed: "); diff --git a/examples/workflow_api/condor-grid-example/CondorWMS.h b/examples/workflow_api/condor-grid-example/CondorWMS.h index f072afaedf..24912c3b17 100755 --- a/examples/workflow_api/condor-grid-example/CondorWMS.h +++ b/examples/workflow_api/condor-grid-example/CondorWMS.h @@ -31,7 +31,7 @@ namespace wrench { protected: // Overridden method - void processEventStandardJobCompletion(std::shared_ptr) override; + void processEventStandardJobCompletion(const std::shared_ptr &event) override; /** void processEventStandardJobFailure(std::shared_ptr) override; **/ diff --git a/examples/workflow_api/real-workflow-example/SimpleWMS.cpp b/examples/workflow_api/real-workflow-example/SimpleWMS.cpp index fbf842bace..c4da8f8ef0 100755 --- a/examples/workflow_api/real-workflow-example/SimpleWMS.cpp +++ b/examples/workflow_api/real-workflow-example/SimpleWMS.cpp @@ -112,7 +112,7 @@ namespace wrench { * * @param event: a workflow execution event */ - void SimpleWMS::processEventStandardJobFailure(std::shared_ptr event) { + void SimpleWMS::processEventStandardJobFailure(const std::shared_ptr &event) { auto job = event->standard_job; TerminalOutput::setThisProcessLoggingColor(TerminalOutput::COLOR_RED); WRENCH_INFO("Task %s has failed", (*job->getTasks().begin())->getID().c_str()); @@ -125,7 +125,7 @@ namespace wrench { * * @param event: a workflow execution event */ - void SimpleWMS::processEventStandardJobCompletion(std::shared_ptr event) { + void SimpleWMS::processEventStandardJobCompletion(const std::shared_ptr &event) { auto job = event->standard_job; TerminalOutput::setThisProcessLoggingColor(TerminalOutput::COLOR_BLUE); WRENCH_INFO("Task %s has COMPLETED (on service %s)", @@ -141,7 +141,7 @@ namespace wrench { * * @param event: a workflow execution event */ - void SimpleWMS::processEventPilotJobStart(std::shared_ptr event) { + void SimpleWMS::processEventPilotJobStart(const std::shared_ptr &event) { TerminalOutput::setThisProcessLoggingColor(TerminalOutput::COLOR_BLUE); WRENCH_INFO("The pilot job has started (it exposes bare-metal compute service %s)", event->pilot_job->getComputeService()->getName().c_str()); @@ -155,7 +155,7 @@ namespace wrench { * * @param event: a workflow execution event */ - void SimpleWMS::processEventPilotJobExpiration(std::shared_ptr event) { + void SimpleWMS::processEventPilotJobExpiration(const std::shared_ptr &event) { TerminalOutput::setThisProcessLoggingColor(TerminalOutput::COLOR_RED); WRENCH_INFO("The pilot job has expired (it was exposing bare-metal compute service %s)", event->pilot_job->getComputeService()->getName().c_str()); diff --git a/examples/workflow_api/real-workflow-example/SimpleWMS.h b/examples/workflow_api/real-workflow-example/SimpleWMS.h index 05dc1aec3a..9edd1514d0 100755 --- a/examples/workflow_api/real-workflow-example/SimpleWMS.h +++ b/examples/workflow_api/real-workflow-example/SimpleWMS.h @@ -27,10 +27,10 @@ namespace wrench { const std::string &hostname); protected: - void processEventStandardJobCompletion(std::shared_ptr event) override; - void processEventStandardJobFailure(std::shared_ptr event) override; - void processEventPilotJobStart(std::shared_ptr event) override; - void processEventPilotJobExpiration(std::shared_ptr event) override; + void processEventStandardJobCompletion(const std::shared_ptr &event) override; + void processEventStandardJobFailure(const std::shared_ptr &event) override; + void processEventPilotJobStart(const std::shared_ptr &event) override; + void processEventPilotJobExpiration(const std::shared_ptr &event) override; private: int main() override; diff --git a/src/wrench/util/UnitParser.cpp b/src/wrench/util/UnitParser.cpp index 4f8eb50ca5..f50b6212b0 100755 --- a/src/wrench/util/UnitParser.cpp +++ b/src/wrench/util/UnitParser.cpp @@ -16,6 +16,7 @@ #include #include #include +#include namespace wrench { diff --git a/test/energy_consumption/EnergyConsumptionTest.cpp b/test/energy_consumption/EnergyConsumptionTest.cpp index d9b8e11087..2de779004d 100644 --- a/test/energy_consumption/EnergyConsumptionTest.cpp +++ b/test/energy_consumption/EnergyConsumptionTest.cpp @@ -289,7 +289,7 @@ void EnergyConsumptionTest::do_AccessEnergyApiExceptionTests_test() { this, hostname))); // Create two files - std::shared_ptr input_file = wrench::Simulation::addFile("input_file", 10000.0); + std::shared_ptr input_file = wrench::Simulation::addFile("input_file", 10000); // Staging the input_file on the storage service EXPECT_NO_THROW(storage_service1->createFile(input_file)); @@ -446,7 +446,7 @@ void EnergyConsumptionTest::do_AccessEnergyApiExceptionPluginNotActiveTests_test // Create two files - std::shared_ptr input_file = wrench::Simulation::addFile("input_file", 10000.0); + std::shared_ptr input_file = wrench::Simulation::addFile("input_file", 10000); // Staging the input_file on the storage service EXPECT_NO_THROW(storage_service1->createFile(input_file)); @@ -562,7 +562,7 @@ void EnergyConsumptionTest::do_EnergyConsumption_test() { this, hostname))); // Create two files - std::shared_ptr input_file = wrench::Simulation::addFile("input_file", 10000.0); + std::shared_ptr input_file = wrench::Simulation::addFile("input_file", 10000); // Staging the input_file on the storage service EXPECT_NO_THROW(storage_service1->createFile(input_file)); @@ -714,7 +714,7 @@ void EnergyConsumptionTest::do_SimpleApiChecksEnergy_test() { this, hostname))); // Create two files - std::shared_ptr input_file = wrench::Simulation::addFile("input_file", 10000.0); + std::shared_ptr input_file = wrench::Simulation::addFile("input_file", 10000); // Staging the input_file on the storage service EXPECT_NO_THROW(storage_service1->createFile(input_file)); @@ -882,7 +882,7 @@ void EnergyConsumptionTest::do_EnergyConsumptionPStateChange_test() { this, hostname))); // Create two files - std::shared_ptr input_file = wrench::Simulation::addFile("input_file", 10000.0); + std::shared_ptr input_file = wrench::Simulation::addFile("input_file", 10000); // Staging the input_file on the storage service EXPECT_NO_THROW(storage_service1->createFile(input_file)); diff --git a/test/managers/DataMovementManagerTest.cpp b/test/managers/DataMovementManagerTest.cpp index 0611fc93cf..cf5c19c624 100755 --- a/test/managers/DataMovementManagerTest.cpp +++ b/test/managers/DataMovementManagerTest.cpp @@ -491,7 +491,7 @@ class DataMovementManagerAsyncWriteTestWMS : public wrench::ExecutionController // try asynchronous write and register that should NOT work std::shared_ptr async_write_event; - auto too_big = wrench::Simulation::addFile("too_bit", 1000000000000000.0); + auto too_big = wrench::Simulation::addFile("too_bit", 1000000000000000ULL); auto write_location = wrench::FileLocation::LOCATION(this->test->dst_storage_service, too_big); try { diff --git a/test/services/compute_services/bare_metal_compound_jobs/BareMetalComputeServiceMultiActionTests.cpp b/test/services/compute_services/bare_metal_compound_jobs/BareMetalComputeServiceMultiActionTests.cpp index 0d8ce0761d..9fb9d46edc 100755 --- a/test/services/compute_services/bare_metal_compound_jobs/BareMetalComputeServiceMultiActionTests.cpp +++ b/test/services/compute_services/bare_metal_compound_jobs/BareMetalComputeServiceMultiActionTests.cpp @@ -46,8 +46,8 @@ class BareMetalComputeServiceMultiActionTest : public ::testing::Test { workflow = wrench::Workflow::createWorkflow(); // Create two files - input_file = wrench::Simulation::addFile("input_file", 10000.0); - output_file = wrench::Simulation::addFile("output_file", 20000.0); + input_file = wrench::Simulation::addFile("input_file", 10000); + output_file = wrench::Simulation::addFile("output_file", 20000); // Create a platform file std::string xml = "" @@ -226,7 +226,7 @@ class DAGOfSleepsTestWMS : public wrench::ExecutionController { // Coverage try { - job->addSleepAction("sleep", 1.0); + job->addSleepAction("sleep", 1); throw std::runtime_error("Shouldn't be able to add action to job that has been submitted"); } catch (std::runtime_error &ignore) {} diff --git a/test/services/compute_services/bare_metal_compound_jobs/BareMetalComputeServiceMultiJobTests.cpp b/test/services/compute_services/bare_metal_compound_jobs/BareMetalComputeServiceMultiJobTests.cpp index 7ae7a44108..52b7127682 100755 --- a/test/services/compute_services/bare_metal_compound_jobs/BareMetalComputeServiceMultiJobTests.cpp +++ b/test/services/compute_services/bare_metal_compound_jobs/BareMetalComputeServiceMultiJobTests.cpp @@ -40,8 +40,8 @@ class BareMetalComputeServiceActionMultiJobTest : public ::testing::Test { workflow = wrench::Workflow::createWorkflow(); // Create two files - input_file = wrench::Simulation::addFile("input_file", 10000.0); - output_file = wrench::Simulation::addFile("output_file", 20000.0); + input_file = wrench::Simulation::addFile("input_file", 10000); + output_file = wrench::Simulation::addFile("output_file", 20000); // Create a platform file std::string xml = "" diff --git a/test/services/compute_services/bare_metal_compound_jobs/BareMetalComputeServiceOneActionTests.cpp b/test/services/compute_services/bare_metal_compound_jobs/BareMetalComputeServiceOneActionTests.cpp index b6e3a039dc..db52f9124b 100644 --- a/test/services/compute_services/bare_metal_compound_jobs/BareMetalComputeServiceOneActionTests.cpp +++ b/test/services/compute_services/bare_metal_compound_jobs/BareMetalComputeServiceOneActionTests.cpp @@ -55,8 +55,8 @@ class BareMetalComputeServiceOneActionTest : public ::testing::Test { workflow = wrench::Workflow::createWorkflow(); // Create two files - input_file = wrench::Simulation::addFile("input_file", 10000.0); - output_file = wrench::Simulation::addFile("output_file", 20000.0); + input_file = wrench::Simulation::addFile("input_file", 10000); + output_file = wrench::Simulation::addFile("output_file", 20000); // Create a platform file std::string xml = "" @@ -242,7 +242,7 @@ void BareMetalComputeServiceOneActionTest::do_BadSetup_test() { new wrench::BareMetalComputeService(hostname, {std::make_pair("RAMHost", std::make_tuple(wrench::ComputeService::ALL_CORES, - 100000.0))}, + 100000))}, {})), std::invalid_argument); @@ -251,7 +251,7 @@ void BareMetalComputeServiceOneActionTest::do_BadSetup_test() { new wrench::BareMetalComputeService(hostname, {std::make_pair("RAMHost", std::make_tuple(wrench::ComputeService::ALL_CORES, - 100000.0))}, + 100000))}, "", {std::make_pair( wrench::BareMetalComputeServiceProperty::THREAD_STARTUP_OVERHEAD, diff --git a/test/services/compute_services/bare_metal_standard_jobs/BareMetalComputeServiceOneTaskTest.cpp b/test/services/compute_services/bare_metal_standard_jobs/BareMetalComputeServiceOneTaskTest.cpp index 20a642203b..745676b754 100644 --- a/test/services/compute_services/bare_metal_standard_jobs/BareMetalComputeServiceOneTaskTest.cpp +++ b/test/services/compute_services/bare_metal_standard_jobs/BareMetalComputeServiceOneTaskTest.cpp @@ -73,8 +73,8 @@ class BareMetalComputeServiceOneTaskTest : public ::testing::Test { workflow = wrench::Workflow::createWorkflow(); // Create two files - input_file = wrench::Simulation::addFile("input_file", 10000.0); - output_file = wrench::Simulation::addFile("output_file", 20000.0); + input_file = wrench::Simulation::addFile("input_file", 10000); + output_file = wrench::Simulation::addFile("output_file", 20000); // Create one task1 task = workflow->addTask("task1", 3600, 1, 1, 0); diff --git a/test/services/compute_services/bare_metal_standard_jobs/BareMetalComputeServiceTestPilotJobs.cpp b/test/services/compute_services/bare_metal_standard_jobs/BareMetalComputeServiceTestPilotJobs.cpp index f09f822fac..25e19900f8 100755 --- a/test/services/compute_services/bare_metal_standard_jobs/BareMetalComputeServiceTestPilotJobs.cpp +++ b/test/services/compute_services/bare_metal_standard_jobs/BareMetalComputeServiceTestPilotJobs.cpp @@ -47,8 +47,8 @@ class BareMetalComputeServiceTestPilotJobs : public ::testing::Test { workflow = wrench::Workflow::createWorkflow(); // Create the files - input_file = wrench::Simulation::addFile("input_file", 10.0); - output_file1 = wrench::Simulation::addFile("output_file1", 10.0); + input_file = wrench::Simulation::addFile("input_file", 10); + output_file1 = wrench::Simulation::addFile("output_file1", 10); // Create one task1 task1 = workflow->addTask("task_1_10s_1core", 10.0, 1, 1, 0); diff --git a/test/services/compute_services/bare_metal_standard_jobs/BareMetalComputeServiceTestStandardJobs.cpp b/test/services/compute_services/bare_metal_standard_jobs/BareMetalComputeServiceTestStandardJobs.cpp index de4568fc7a..7c7a0ac29e 100644 --- a/test/services/compute_services/bare_metal_standard_jobs/BareMetalComputeServiceTestStandardJobs.cpp +++ b/test/services/compute_services/bare_metal_standard_jobs/BareMetalComputeServiceTestStandardJobs.cpp @@ -82,13 +82,13 @@ class BareMetalComputeServiceTestStandardJobs : public ::testing::Test { workflow = wrench::Workflow::createWorkflow(); // Create the files - input_file = wrench::Simulation::addFile("input_file", 10.0); - output_file1 = wrench::Simulation::addFile("output_file1", 10.0); - output_file2 = wrench::Simulation::addFile("output_file2", 10.0); - output_file3 = wrench::Simulation::addFile("output_file3", 10.0); - output_file4 = wrench::Simulation::addFile("output_file4", 10.0); - output_file5 = wrench::Simulation::addFile("output_file5", 10.0); - output_file6 = wrench::Simulation::addFile("output_file6", 10.0); + input_file = wrench::Simulation::addFile("input_file", 10); + output_file1 = wrench::Simulation::addFile("output_file1", 10); + output_file2 = wrench::Simulation::addFile("output_file2", 10); + output_file3 = wrench::Simulation::addFile("output_file3", 10); + output_file4 = wrench::Simulation::addFile("output_file4", 10); + output_file5 = wrench::Simulation::addFile("output_file5", 10); + output_file6 = wrench::Simulation::addFile("output_file6", 10); // Create the tasks task1 = workflow->addTask("task_1_10s_1core", 10.0, 1, 1, 1); diff --git a/test/services/compute_services/bare_metal_standard_jobs/ScratchSpaceTest.cpp b/test/services/compute_services/bare_metal_standard_jobs/ScratchSpaceTest.cpp index cf34eb88c1..d85fec13f2 100755 --- a/test/services/compute_services/bare_metal_standard_jobs/ScratchSpaceTest.cpp +++ b/test/services/compute_services/bare_metal_standard_jobs/ScratchSpaceTest.cpp @@ -253,8 +253,8 @@ void ScratchSpaceTest::do_SimpleScratchSpace_test() { this, hostname))); // Create two files - std::shared_ptr input_file = wrench::Simulation::addFile("input_file", 1000.0); - std::shared_ptr output_file = wrench::Simulation::addFile("output_file", 2000.0); + std::shared_ptr input_file = wrench::Simulation::addFile("input_file", 1000); + std::shared_ptr output_file = wrench::Simulation::addFile("output_file", 2000); // Staging the input_file on the storage service ASSERT_NO_THROW(storage_service1->createFile(input_file)); @@ -474,8 +474,8 @@ void ScratchSpaceTest::do_ScratchSpaceFailure_test() { this, hostname))); // Create two files - std::shared_ptr input_file1 = wrench::Simulation::addFile("input_file1", 10000.0); - std::shared_ptr input_file2 = wrench::Simulation::addFile("input_file2", 10000.0); + std::shared_ptr input_file1 = wrench::Simulation::addFile("input_file1", 10000); + std::shared_ptr input_file2 = wrench::Simulation::addFile("input_file2", 10000); // Staging the input_file on the storage service ASSERT_NO_THROW(storage_service1->createFile(input_file1)); @@ -681,9 +681,9 @@ void ScratchSpaceTest::do_PilotJobScratchSpace_test() { this, hostname))); // Create two files - std::shared_ptr input_file1 = wrench::Simulation::addFile("input_file1", 1000.0); - std::shared_ptr input_file2 = wrench::Simulation::addFile("input_file2", 1000.0); - std::shared_ptr input_file3 = wrench::Simulation::addFile("input_file3", 1000.0); + std::shared_ptr input_file1 = wrench::Simulation::addFile("input_file1", 1000); + std::shared_ptr input_file2 = wrench::Simulation::addFile("input_file2", 1000); + std::shared_ptr input_file3 = wrench::Simulation::addFile("input_file3", 1000); // Staging the input_file on the storage service ASSERT_NO_THROW(storage_service1->createFile(input_file1)); diff --git a/test/services/compute_services/batch_compound_jobs/BatchComputeServiceOneActionTests.cpp b/test/services/compute_services/batch_compound_jobs/BatchComputeServiceOneActionTests.cpp index 0119cacb05..3e161d1674 100755 --- a/test/services/compute_services/batch_compound_jobs/BatchComputeServiceOneActionTests.cpp +++ b/test/services/compute_services/batch_compound_jobs/BatchComputeServiceOneActionTests.cpp @@ -59,8 +59,8 @@ class BatchComputeServiceOneActionTest : public ::testing::Test { workflow = wrench::Workflow::createWorkflow(); // Create two files - input_file = wrench::Simulation::addFile("input_file", 10000.0); - output_file = wrench::Simulation::addFile("output_file", 20000.0); + input_file = wrench::Simulation::addFile("input_file", 10000); + output_file = wrench::Simulation::addFile("output_file", 20000); // Create a platform file std::string xml = "" diff --git a/test/services/compute_services/batch_standard_and_pilot_jobs/BatchServiceBatschedQueueWaitTimePredictionTest.cpp b/test/services/compute_services/batch_standard_and_pilot_jobs/BatchServiceBatschedQueueWaitTimePredictionTest.cpp index 898ff3f77a..809fedfbee 100755 --- a/test/services/compute_services/batch_standard_and_pilot_jobs/BatchServiceBatschedQueueWaitTimePredictionTest.cpp +++ b/test/services/compute_services/batch_standard_and_pilot_jobs/BatchServiceBatschedQueueWaitTimePredictionTest.cpp @@ -278,8 +278,8 @@ void BatchServiceBatschedQueueWaitTimePredictionTest::do_BatchJobBrokenEstimateW simulation->add(new wrench::FileRegistryService(hostname)); // Create two files - std::shared_ptr input_file = wrench::Simulation::addFile("input_file", 10000.0); - std::shared_ptr output_file = wrench::Simulation::addFile("output_file", 20000.0); + std::shared_ptr input_file = wrench::Simulation::addFile("input_file", 10000); + std::shared_ptr output_file = wrench::Simulation::addFile("output_file", 20000); // Staging the input_file on the storage service ASSERT_NO_THROW(storage_service1->createFile(input_file)); @@ -437,8 +437,8 @@ void BatchServiceBatschedQueueWaitTimePredictionTest::do_BatchJobBasicEstimateWa simulation->add(new wrench::FileRegistryService(hostname)); // Create two files - std::shared_ptr input_file = wrench::Simulation::addFile("input_file", 10000.0); - std::shared_ptr output_file = wrench::Simulation::addFile("output_file", 20000.0); + std::shared_ptr input_file = wrench::Simulation::addFile("input_file", 10000); + std::shared_ptr output_file = wrench::Simulation::addFile("output_file", 20000); // Staging the input_file on the storage service ASSERT_NO_THROW(storage_service1->createFile(input_file)); @@ -648,8 +648,8 @@ void BatchServiceBatschedQueueWaitTimePredictionTest::do_BatchJobEstimateWaiting this, hostname))); // Create two files - std::shared_ptr input_file = wrench::Simulation::addFile("input_file", 10000.0); - std::shared_ptr output_file = wrench::Simulation::addFile("output_file", 20000.0); + std::shared_ptr input_file = wrench::Simulation::addFile("input_file", 10000); + std::shared_ptr output_file = wrench::Simulation::addFile("output_file", 20000); // Staging the input_file on the storage service ASSERT_NO_THROW(storage_service1->createFile(input_file)); @@ -898,11 +898,11 @@ void BatchServiceBatschedQueueWaitTimePredictionTest::do_BatchJobLittleComplexEs simulation->add(new wrench::FileRegistryService(hostname)); // Create two files - auto input_file = wrench::Simulation::addFile("input_file", 10000.0); - wrench::Simulation::addFile("output_file", 20000.0); - wrench::Simulation::addFile("output_file1", 20000.0); - wrench::Simulation::addFile("output_file2", 20000.0); - wrench::Simulation::addFile("output_file3", 20000.0); + auto input_file = wrench::Simulation::addFile("input_file", 10000); + wrench::Simulation::addFile("output_file", 20000); + wrench::Simulation::addFile("output_file1", 20000); + wrench::Simulation::addFile("output_file2", 20000); + wrench::Simulation::addFile("output_file3", 20000); // Staging the input_file on the storage service ASSERT_NO_THROW(storage_service1->createFile(input_file)); diff --git a/test/services/compute_services/batch_standard_and_pilot_jobs/BatchServiceTest.cpp b/test/services/compute_services/batch_standard_and_pilot_jobs/BatchServiceTest.cpp index 261e1edf77..958300d869 100644 --- a/test/services/compute_services/batch_standard_and_pilot_jobs/BatchServiceTest.cpp +++ b/test/services/compute_services/batch_standard_and_pilot_jobs/BatchServiceTest.cpp @@ -473,8 +473,8 @@ void BatchServiceTest::do_TerminateStandardJobsTest_test() { this, hostname))); // Create two files - std::shared_ptr input_file = wrench::Simulation::addFile("input_file", 10000.0); - std::shared_ptr output_file = wrench::Simulation::addFile("output_file", 20000.0); + std::shared_ptr input_file = wrench::Simulation::addFile("input_file", 10000); + std::shared_ptr output_file = wrench::Simulation::addFile("output_file", 20000); // Staging the input_file on the storage service ASSERT_NO_THROW(storage_service1->createFile(input_file)); @@ -596,8 +596,8 @@ void BatchServiceTest::do_TerminatePilotJobsTest_test() { this, hostname))); // Create two files - std::shared_ptr input_file = wrench::Simulation::addFile("input_file", 10000.0); - std::shared_ptr output_file = wrench::Simulation::addFile("output_file", 20000.0); + std::shared_ptr input_file = wrench::Simulation::addFile("input_file", 10000); + std::shared_ptr output_file = wrench::Simulation::addFile("output_file", 20000); // Staging the input_file on the storage service ASSERT_NO_THROW(storage_service1->createFile(input_file)); @@ -744,8 +744,8 @@ void BatchServiceTest::do_OneStandardJobTaskTest_test() { this, hostname))); // Create two files - auto input_file = wrench::Simulation::addFile("input_file", 10000.0); - auto output_file = wrench::Simulation::addFile("output_file", 20000.0); + auto input_file = wrench::Simulation::addFile("input_file", 10000); + auto output_file = wrench::Simulation::addFile("output_file", 20000); // Staging the input_file on the storage service ASSERT_NO_THROW(storage_service1->createFile(input_file)); @@ -876,8 +876,8 @@ void BatchServiceTest::do_StandardJobFailureTest_test() { this, hostname))); // Create two files - auto input_file = wrench::Simulation::addFile("input_file", 10000.0); - auto output_file = wrench::Simulation::addFile("output_file", 20000.0); + auto input_file = wrench::Simulation::addFile("input_file", 10000); + auto output_file = wrench::Simulation::addFile("output_file", 20000); // Staging the input_file on the storage service ASSERT_NO_THROW(storage_service1->createFile(input_file)); @@ -1037,8 +1037,8 @@ void BatchServiceTest::do_TwoStandardJobSubmissionTest_test() { new TwoStandardJobSubmissionTestWMS(this, hostname))); // Create two files - auto input_file = wrench::Simulation::addFile("input_file", 10000.0); - auto output_file = wrench::Simulation::addFile("output_file", 20000.0); + auto input_file = wrench::Simulation::addFile("input_file", 10000); + auto output_file = wrench::Simulation::addFile("output_file", 20000); // Staging the input_file on the storage service ASSERT_NO_THROW(storage_service1->createFile(input_file)); @@ -1198,8 +1198,8 @@ void BatchServiceTest::do_PilotJobTaskTest_test() { simulation->add(new wrench::FileRegistryService(hostname)); // Create two files - std::shared_ptr input_file = wrench::Simulation::addFile("input_file", 10000.0); - std::shared_ptr output_file = wrench::Simulation::addFile("output_file", 20000.0); + std::shared_ptr input_file = wrench::Simulation::addFile("input_file", 10000); + std::shared_ptr output_file = wrench::Simulation::addFile("output_file", 20000); // Staging the input_file on the storage service ASSERT_NO_THROW(storage_service1->createFile(input_file)); @@ -1365,8 +1365,8 @@ void BatchServiceTest::do_StandardPlusPilotJobTaskTest_test() { simulation->add(new wrench::FileRegistryService(hostname)); // Create two files - std::shared_ptr input_file = wrench::Simulation::addFile("input_file", 10000.0); - std::shared_ptr output_file = wrench::Simulation::addFile("output_file", 20000.0); + std::shared_ptr input_file = wrench::Simulation::addFile("input_file", 10000); + std::shared_ptr output_file = wrench::Simulation::addFile("output_file", 20000); // Staging the input_file on the storage service ASSERT_NO_THROW(storage_service1->createFile(input_file)); @@ -1497,8 +1497,8 @@ void BatchServiceTest::do_InsufficientCoresTaskTest_test() { simulation->add(new wrench::FileRegistryService(hostname)); // Create two files - std::shared_ptr input_file = wrench::Simulation::addFile("input_file", 10000.0); - std::shared_ptr output_file = wrench::Simulation::addFile("output_file", 20000.0); + std::shared_ptr input_file = wrench::Simulation::addFile("input_file", 10000); + std::shared_ptr output_file = wrench::Simulation::addFile("output_file", 20000); // Staging the input_file on the storage service ASSERT_NO_THROW(storage_service1->createFile(input_file)); @@ -1610,8 +1610,8 @@ void BatchServiceTest::do_noArgumentsJobSubmissionTest_test() { simulation->add(new wrench::FileRegistryService(hostname)); // Create two files - std::shared_ptr input_file = wrench::Simulation::addFile("input_file", 10000.0); - std::shared_ptr output_file = wrench::Simulation::addFile("output_file", 20000.0); + std::shared_ptr input_file = wrench::Simulation::addFile("input_file", 10000); + std::shared_ptr output_file = wrench::Simulation::addFile("output_file", 20000); // Staging the input_file on the storage service ASSERT_NO_THROW(storage_service1->createFile(input_file)); @@ -1753,8 +1753,8 @@ void BatchServiceTest::do_StandardJobTimeOutTaskTest_test() { simulation->add(new wrench::FileRegistryService(hostname)); // Create two files - std::shared_ptr input_file = wrench::Simulation::addFile("input_file", 10000.0); - std::shared_ptr output_file = wrench::Simulation::addFile("output_file", 20000.0); + std::shared_ptr input_file = wrench::Simulation::addFile("input_file", 10000); + std::shared_ptr output_file = wrench::Simulation::addFile("output_file", 20000); // Staging the input_file on the storage service ASSERT_NO_THROW(storage_service1->createFile(input_file)); @@ -1877,8 +1877,8 @@ void BatchServiceTest::do_PilotJobTimeOutTaskTest_test() { simulation->add(new wrench::FileRegistryService(hostname)); // Create two files - std::shared_ptr input_file = wrench::Simulation::addFile("input_file", 10000.0); - std::shared_ptr output_file = wrench::Simulation::addFile("output_file", 20000.0); + std::shared_ptr input_file = wrench::Simulation::addFile("input_file", 10000); + std::shared_ptr output_file = wrench::Simulation::addFile("output_file", 20000); // Staging the input_file on the storage service ASSERT_NO_THROW(storage_service1->createFile(input_file)); @@ -2078,12 +2078,12 @@ void BatchServiceTest::do_BestFitTaskTest_test() { simulation->add(new wrench::FileRegistryService(hostname)); // Create two files - std::shared_ptr input_file = wrench::Simulation::addFile("input_file", 10000.0); - std::shared_ptr output_file = wrench::Simulation::addFile("output_file", 20000.0); - std::shared_ptr input_file_1 = wrench::Simulation::addFile("input_file_1", 10000.0); - std::shared_ptr output_file_1 = wrench::Simulation::addFile("output_file_1", 20000.0); - std::shared_ptr input_file_2 = wrench::Simulation::addFile("input_file_2", 10000.0); - std::shared_ptr output_file_2 = wrench::Simulation::addFile("output_file_2", 20000.0); + std::shared_ptr input_file = wrench::Simulation::addFile("input_file", 10000); + std::shared_ptr output_file = wrench::Simulation::addFile("output_file", 20000); + std::shared_ptr input_file_1 = wrench::Simulation::addFile("input_file_1", 10000); + std::shared_ptr output_file_1 = wrench::Simulation::addFile("output_file_1", 20000); + std::shared_ptr input_file_2 = wrench::Simulation::addFile("input_file_2", 10000); + std::shared_ptr output_file_2 = wrench::Simulation::addFile("output_file_2", 20000); // Staging the input_file on the storage service ASSERT_NO_THROW(storage_service1->createFile(input_file)); @@ -2228,12 +2228,12 @@ void BatchServiceTest::do_FirstFitTaskTest_test() { simulation->add(new wrench::FileRegistryService(hostname)); // Create two files - std::shared_ptr input_file = wrench::Simulation::addFile("input_file", 10000.0); - std::shared_ptr output_file = wrench::Simulation::addFile("output_file", 20000.0); - std::shared_ptr input_file_1 = wrench::Simulation::addFile("input_file_1", 10000.0); - std::shared_ptr output_file_1 = wrench::Simulation::addFile("output_file_1", 20000.0); - std::shared_ptr input_file_2 = wrench::Simulation::addFile("input_file_2", 10000.0); - std::shared_ptr output_file_2 = wrench::Simulation::addFile("output_file_2", 20000.0); + std::shared_ptr input_file = wrench::Simulation::addFile("input_file", 10000); + std::shared_ptr output_file = wrench::Simulation::addFile("output_file", 20000); + std::shared_ptr input_file_1 = wrench::Simulation::addFile("input_file_1", 10000); + std::shared_ptr output_file_1 = wrench::Simulation::addFile("output_file_1", 20000); + std::shared_ptr input_file_2 = wrench::Simulation::addFile("input_file_2", 10000); + std::shared_ptr output_file_2 = wrench::Simulation::addFile("output_file_2", 20000); // Staging the input_file on the storage service ASSERT_NO_THROW(storage_service1->createFile(input_file)); @@ -2488,12 +2488,12 @@ void BatchServiceTest::do_RoundRobinTask_test() { simulation->add(new wrench::FileRegistryService(hostname)); // Create two files - std::shared_ptr input_file = wrench::Simulation::addFile("input_file", 10000.0); - std::shared_ptr output_file = wrench::Simulation::addFile("output_file", 20000.0); - std::shared_ptr input_file_1 = wrench::Simulation::addFile("input_file_1", 10000.0); - std::shared_ptr output_file_1 = wrench::Simulation::addFile("output_file_1", 20000.0); - std::shared_ptr input_file_2 = wrench::Simulation::addFile("input_file_2", 10000.0); - std::shared_ptr output_file_2 = wrench::Simulation::addFile("output_file_2", 20000.0); + std::shared_ptr input_file = wrench::Simulation::addFile("input_file", 10000); + std::shared_ptr output_file = wrench::Simulation::addFile("output_file", 20000); + std::shared_ptr input_file_1 = wrench::Simulation::addFile("input_file_1", 10000); + std::shared_ptr output_file_1 = wrench::Simulation::addFile("output_file_1", 20000); + std::shared_ptr input_file_2 = wrench::Simulation::addFile("input_file_2", 10000); + std::shared_ptr output_file_2 = wrench::Simulation::addFile("output_file_2", 20000); // Staging the input_file on the storage service ASSERT_NO_THROW(storage_service1->createFile(input_file)); @@ -2663,8 +2663,8 @@ void BatchServiceTest::do_StandardJobInsidePilotJobTimeOutTaskTest_test() { simulation->add(new wrench::FileRegistryService(hostname)); // Create two files - std::shared_ptr input_file = wrench::Simulation::addFile("input_file", 10000.0); - std::shared_ptr output_file = wrench::Simulation::addFile("output_file", 20000.0); + std::shared_ptr input_file = wrench::Simulation::addFile("input_file", 10000); + std::shared_ptr output_file = wrench::Simulation::addFile("output_file", 20000); // Staging the input_file on the storage service ASSERT_NO_THROW(storage_service1->createFile(input_file)); @@ -2815,8 +2815,8 @@ void BatchServiceTest::do_StandardJobInsidePilotJobSucessTaskTest_test() { simulation->add(new wrench::FileRegistryService(hostname)); // Create two files - std::shared_ptr input_file = wrench::Simulation::addFile("input_file", 10000.0); - std::shared_ptr output_file = wrench::Simulation::addFile("output_file", 20000.0); + std::shared_ptr input_file = wrench::Simulation::addFile("input_file", 10000); + std::shared_ptr output_file = wrench::Simulation::addFile("output_file", 20000); // Staging the input_file on the storage service ASSERT_NO_THROW(storage_service1->createFile(input_file)); @@ -2956,8 +2956,8 @@ void BatchServiceTest::do_InsufficientCoresInsidePilotJobTaskTest_test() { simulation->add(new wrench::FileRegistryService(hostname)); // Create two files - std::shared_ptr input_file = wrench::Simulation::addFile("input_file", 10000.0); - std::shared_ptr output_file = wrench::Simulation::addFile("output_file", 20000.0); + std::shared_ptr input_file = wrench::Simulation::addFile("input_file", 10000); + std::shared_ptr output_file = wrench::Simulation::addFile("output_file", 20000); // Staging the input_file on the storage service ASSERT_NO_THROW(storage_service1->createFile(input_file)); @@ -3083,8 +3083,8 @@ void BatchServiceTest::do_MultipleStandardTaskTest_test() { simulation->add(new wrench::FileRegistryService(hostname)); // Create two files - std::shared_ptr input_file = wrench::Simulation::addFile("input_file", 10000.0); - std::shared_ptr output_file = wrench::Simulation::addFile("output_file", 20000.0); + std::shared_ptr input_file = wrench::Simulation::addFile("input_file", 10000); + std::shared_ptr output_file = wrench::Simulation::addFile("output_file", 20000); // Staging the input_file on the storage service ASSERT_NO_THROW(storage_service1->createFile(input_file)); @@ -3215,8 +3215,8 @@ void BatchServiceTest::do_DifferentBatchAlgorithmsSubmissionTest_test() { simulation->add(new wrench::FileRegistryService(hostname)); // Create two files - std::shared_ptr input_file = wrench::Simulation::addFile("input_file", 10000.0); - std::shared_ptr output_file = wrench::Simulation::addFile("output_file", 20000.0); + std::shared_ptr input_file = wrench::Simulation::addFile("input_file", 10000); + std::shared_ptr output_file = wrench::Simulation::addFile("output_file", 20000); // Staging the input_file on the storage service ASSERT_NO_THROW(storage_service1->createFile(input_file)); diff --git a/test/services/compute_services/htcondor/HTCondorServiceTest.cpp b/test/services/compute_services/htcondor/HTCondorServiceTest.cpp index 91f23714a7..7501232eec 100755 --- a/test/services/compute_services/htcondor/HTCondorServiceTest.cpp +++ b/test/services/compute_services/htcondor/HTCondorServiceTest.cpp @@ -72,12 +72,12 @@ class HTCondorServiceTest : public ::testing::Test { // Create the files - input_file = wrench::Simulation::addFile("input_file", 10.0); - input_file2 = wrench::Simulation::addFile("input_file2", 6500000000.0); - input_file3 = wrench::Simulation::addFile("input_file3", 10.0); - output_file1 = wrench::Simulation::addFile("output_file1", 10.0); - output_file2 = wrench::Simulation::addFile("output_file2", 10.0); - output_file3 = wrench::Simulation::addFile("output_file3", 10.0); + input_file = wrench::Simulation::addFile("input_file", 10); + input_file2 = wrench::Simulation::addFile("input_file2", 6500000000ULL); + input_file3 = wrench::Simulation::addFile("input_file3", 10); + output_file1 = wrench::Simulation::addFile("output_file1", 10); + output_file2 = wrench::Simulation::addFile("output_file2", 10); + output_file3 = wrench::Simulation::addFile("output_file3", 10); // Create the tasks task1 = workflow->addTask("task_1_10s_1core", 10.0, 1, 1, 0); diff --git a/test/services/compute_services/virtualized_cluster/VirtualizedClusterServiceTest.cpp b/test/services/compute_services/virtualized_cluster/VirtualizedClusterServiceTest.cpp index 1a3211a7a2..07f1327cf6 100644 --- a/test/services/compute_services/virtualized_cluster/VirtualizedClusterServiceTest.cpp +++ b/test/services/compute_services/virtualized_cluster/VirtualizedClusterServiceTest.cpp @@ -78,13 +78,13 @@ class VirtualizedClusterServiceTest : public ::testing::Test { workflow = wrench::Workflow::createWorkflow(); // Create the files - input_file = wrench::Simulation::addFile("input_file", 10.0); - output_file1 = wrench::Simulation::addFile("output_file1", 10.0); - output_file2 = wrench::Simulation::addFile("output_file2", 10.0); - output_file3 = wrench::Simulation::addFile("output_file3", 10.0); - output_file4 = wrench::Simulation::addFile("output_file4", 10.0); - output_file5 = wrench::Simulation::addFile("output_file5", 10.0); - output_file6 = wrench::Simulation::addFile("output_file6", 10.0); + input_file = wrench::Simulation::addFile("input_file", 10); + output_file1 = wrench::Simulation::addFile("output_file1", 10); + output_file2 = wrench::Simulation::addFile("output_file2", 10); + output_file3 = wrench::Simulation::addFile("output_file3", 10); + output_file4 = wrench::Simulation::addFile("output_file4", 10); + output_file5 = wrench::Simulation::addFile("output_file5", 10); + output_file6 = wrench::Simulation::addFile("output_file6", 10); // Create the tasks task1 = workflow->addTask("task_1_10s_1core", 10.0, 1, 1, 0); diff --git a/test/services/file_registry_service/FileRegistryTest.cpp b/test/services/file_registry_service/FileRegistryTest.cpp index 8d34a8b68d..738cd02198 100755 --- a/test/services/file_registry_service/FileRegistryTest.cpp +++ b/test/services/file_registry_service/FileRegistryTest.cpp @@ -138,8 +138,8 @@ class FileRegistryTestWMS : public wrench::ExecutionController { int main() override { - auto file1 = wrench::Simulation::addFile("file1", 100.0); - auto file2 = wrench::Simulation::addFile("file2", 100.0); + auto file1 = wrench::Simulation::addFile("file1", 100); + auto file2 = wrench::Simulation::addFile("file2", 100); auto frs = this->test->file_registry_service; std::set> locations; @@ -329,7 +329,7 @@ class FileRegistryLookupEntryTestWMS : public wrench::ExecutionController { int main() override { - std::shared_ptr file1 = wrench::Simulation::addFile("file1", 100.0); + std::shared_ptr file1 = wrench::Simulation::addFile("file1", 100); std::shared_ptr nullptr_file = nullptr; auto frs = this->test->file_registry_service; auto nps = this->test->network_proximity_service; diff --git a/test/services/helper_services/action_execution_service/ActionExecutionServiceTest.cpp b/test/services/helper_services/action_execution_service/ActionExecutionServiceTest.cpp index 4f8e186f00..cff1260a73 100644 --- a/test/services/helper_services/action_execution_service/ActionExecutionServiceTest.cpp +++ b/test/services/helper_services/action_execution_service/ActionExecutionServiceTest.cpp @@ -216,7 +216,7 @@ void ActionExecutionServiceTest::do_ActionExecutionServiceOneActionSuccessTest_t {{wrench::SimpleStorageServiceProperty::BUFFER_SIZE, "10MB"}})); // Create a file - this->file = wrench::Simulation::addFile("some_file", 1000000.0); + this->file = wrench::Simulation::addFile("some_file", 1000000); ss->createFile(wrench::FileLocation::LOCATION(ss, file)); @@ -312,7 +312,7 @@ void ActionExecutionServiceTest::do_ActionExecutionServiceOneActionBogusSpecTest {{wrench::SimpleStorageServiceProperty::BUFFER_SIZE, "10MB"}})); // Create a file - this->file = wrench::Simulation::addFile("some_file", 1000000.0); + this->file = wrench::Simulation::addFile("some_file", 1000000); ss->createFile(wrench::FileLocation::LOCATION(ss, file)); @@ -420,7 +420,7 @@ void ActionExecutionServiceTest::do_ActionExecutionServiceNonReadyActionTest_tes {{wrench::SimpleStorageServiceProperty::BUFFER_SIZE, "10MB"}})); // Create a file - this->file = wrench::Simulation::addFile("some_file", 1000000.0); + this->file = wrench::Simulation::addFile("some_file", 1000000); ss->createFile(wrench::FileLocation::LOCATION(ss, file)); @@ -542,7 +542,7 @@ void ActionExecutionServiceTest::do_ActionExecutionServiceOneActionTerminateTest this->ss = simulation->add(wrench::SimpleStorageService::createSimpleStorageService("Host4", {"/"}, {{wrench::SimpleStorageServiceProperty::BUFFER_SIZE, "10MB"}})); // Create a file - this->file = wrench::Simulation::addFile("some_file", 1000000.0); + this->file = wrench::Simulation::addFile("some_file", 1000000); ss->createFile(wrench::FileLocation::LOCATION(ss, file)); @@ -715,7 +715,7 @@ void ActionExecutionServiceTest::do_ActionExecutionServiceOneActionCrashRestartT this->ss = simulation->add(wrench::SimpleStorageService::createSimpleStorageService("Host3", {"/"}, {{wrench::SimpleStorageServiceProperty::BUFFER_SIZE, "10MB"}})); // Create a file - this->file = wrench::Simulation::addFile("some_file", 1000000000.0); + this->file = wrench::Simulation::addFile("some_file", 1000000000); ss->createFile(wrench::FileLocation::LOCATION(ss, file)); @@ -845,7 +845,7 @@ void ActionExecutionServiceTest::do_ActionExecutionServiceOneActionCrashNoRestar this->ss = simulation->add(wrench::SimpleStorageService::createSimpleStorageService("Host3", {"/"}, {{wrench::SimpleStorageServiceProperty::BUFFER_SIZE, "10MB"}})); // Create a file - this->file = wrench::Simulation::addFile("some_file", 1000000000.0); + this->file = wrench::Simulation::addFile("some_file", 1000000000); ss->createFile(wrench::FileLocation::LOCATION(ss, file)); @@ -978,7 +978,7 @@ void ActionExecutionServiceTest::do_ActionExecutionServiceOneActionFailureTest_t {{wrench::SimpleStorageServiceProperty::BUFFER_SIZE, "10MB"}})); // Create a file - this->file = wrench::Simulation::addFile("some_file", 1000000.0); + this->file = wrench::Simulation::addFile("some_file", 1000000); ss->createFile(wrench::FileLocation::LOCATION(ss, file)); @@ -1084,7 +1084,7 @@ void ActionExecutionServiceTest::do_ActionExecutionServiceOneActionNotEnoughReso this->ss = simulation->add(wrench::SimpleStorageService::createSimpleStorageService("Host4", {"/"}, {{wrench::SimpleStorageServiceProperty::BUFFER_SIZE, "10MB"}})); // Create a file - this->file = wrench::Simulation::addFile("some_file", 1000000.0); + this->file = wrench::Simulation::addFile("some_file", 1000000); ss->createFile(wrench::FileLocation::LOCATION(ss, file)); @@ -1251,7 +1251,7 @@ void ActionExecutionServiceTest::do_ActionExecutionServiceThreeActionsInSequence this->ss = simulation->add(wrench::SimpleStorageService::createSimpleStorageService("Host4", {"/"}, {{wrench::SimpleStorageServiceProperty::BUFFER_SIZE, "10MB"}})); // Create a file - this->file = wrench::Simulation::addFile("some_file", 1000000.0); + this->file = wrench::Simulation::addFile("some_file", 1000000); ss->createFile(wrench::FileLocation::LOCATION(ss, file)); diff --git a/test/services/helper_services/action_executor/ComputeActionExecutorTest.cpp b/test/services/helper_services/action_executor/ComputeActionExecutorTest.cpp index 1c97b6136e..3596b49fca 100755 --- a/test/services/helper_services/action_executor/ComputeActionExecutorTest.cpp +++ b/test/services/helper_services/action_executor/ComputeActionExecutorTest.cpp @@ -225,7 +225,7 @@ void ComputeActionExecutorTest::do_ComputeActionExecutorSuccessTest_test(bool si this->ss = simulation->add(wrench::SimpleStorageService::createSimpleStorageService("Host3", {"/"}, {{wrench::SimpleStorageServiceProperty::BUFFER_SIZE, "10MB"}})); // Create a file - this->file = wrench::Simulation::addFile("some_file", 1000000.0); + this->file = wrench::Simulation::addFile("some_file", 1000000); ss->createFile(wrench::FileLocation::LOCATION(ss, file)); @@ -349,7 +349,7 @@ void ComputeActionExecutorTest::do_ComputeActionExecutorFailureTest_test() { this->ss = simulation->add(wrench::SimpleStorageService::createSimpleStorageService("Host3", {"/"}, {{wrench::SimpleStorageServiceProperty::BUFFER_SIZE, "10MB"}})); // Create a file - this->file = wrench::Simulation::addFile("some_file", 1000000.0); + this->file = wrench::Simulation::addFile("some_file", 1000000); ss->createFile(wrench::FileLocation::LOCATION(ss, file)); diff --git a/test/services/helper_services/action_executor/CustomActionExecutorTest.cpp b/test/services/helper_services/action_executor/CustomActionExecutorTest.cpp index 49342ef5dc..031c38a9bd 100644 --- a/test/services/helper_services/action_executor/CustomActionExecutorTest.cpp +++ b/test/services/helper_services/action_executor/CustomActionExecutorTest.cpp @@ -230,7 +230,7 @@ void CustomActionExecutorTest::do_CustomActionExecutorSuccessTest_test() { this->ss = simulation->add(wrench::SimpleStorageService::createSimpleStorageService("Host3", {"/"}, {{wrench::SimpleStorageServiceProperty::BUFFER_SIZE, "10MB"}})); // Create a file - this->file = wrench::Simulation::addFile("some_file", 1000000.0); + this->file = wrench::Simulation::addFile("some_file", 1000000); ss->createFile(wrench::FileLocation::LOCATION(ss, file)); diff --git a/test/services/helper_services/action_executor/FileCopyActionExecutorTest.cpp b/test/services/helper_services/action_executor/FileCopyActionExecutorTest.cpp index 7d01dc47c8..1aa2dc8f44 100644 --- a/test/services/helper_services/action_executor/FileCopyActionExecutorTest.cpp +++ b/test/services/helper_services/action_executor/FileCopyActionExecutorTest.cpp @@ -227,7 +227,7 @@ void FileCopyActionExecutorTest::do_FileCopyActionExecutorSuccessTest_test() { workflow = wrench::Workflow::createWorkflow(); // Create a file - this->file = wrench::Simulation::addFile("some_file", 1000000.0); + this->file = wrench::Simulation::addFile("some_file", 1000000); // Put it on ss1 this->ss1->createFile(wrench::FileLocation::LOCATION(this->ss1, this->file)); @@ -329,7 +329,7 @@ void FileCopyActionExecutorTest::do_FileCopyActionExecutorSuccessSameHostTest_te workflow = wrench::Workflow::createWorkflow(); // Create a file - this->file = wrench::Simulation::addFile("some_file", 1000000000.0); + this->file = wrench::Simulation::addFile("some_file", 1000000000ULL); // Put it on ss1 this->ss1->createFile(wrench::FileLocation::LOCATION(this->ss1, this->file)); diff --git a/test/services/helper_services/action_executor/FileDeleteActionExecutorTest.cpp b/test/services/helper_services/action_executor/FileDeleteActionExecutorTest.cpp index 7b7c0caa98..36793a1d76 100644 --- a/test/services/helper_services/action_executor/FileDeleteActionExecutorTest.cpp +++ b/test/services/helper_services/action_executor/FileDeleteActionExecutorTest.cpp @@ -197,7 +197,7 @@ void FileDeleteActionExecutorTest::do_FileDeleteActionExecutorSuccessTest_test() this->ss = simulation->add(wrench::SimpleStorageService::createSimpleStorageService("Host3", {"/"})); // Create a file - this->file = wrench::Simulation::addFile("some_file", 1000000.0); + this->file = wrench::Simulation::addFile("some_file", 1000000); ss->createFile(wrench::FileLocation::LOCATION(ss, file)); diff --git a/test/services/helper_services/action_executor/FileReadActionExecutorTest.cpp b/test/services/helper_services/action_executor/FileReadActionExecutorTest.cpp index 4c583e5d75..d37fe6510a 100644 --- a/test/services/helper_services/action_executor/FileReadActionExecutorTest.cpp +++ b/test/services/helper_services/action_executor/FileReadActionExecutorTest.cpp @@ -217,7 +217,7 @@ void FileReadActionExecutorTest::do_FileReadActionExecutorSuccessTest_test() { workflow = wrench::Workflow::createWorkflow(); // Create a file - this->file = wrench::Simulation::addFile("some_file", 1000000.0); + this->file = wrench::Simulation::addFile("some_file", 1000000); ss->createFile(wrench::FileLocation::LOCATION(ss, file)); @@ -262,7 +262,7 @@ class FileReadActionExecutorMultipleAttemptsSuccessTestWMS : public wrench::Exec // Add a file read action with bogus locations try { - auto other_file = this->getSimulation()->addFile("other_file", 1.0); + auto other_file = this->getSimulation()->addFile("other_file", 1); job->addFileReadAction("", {wrench::FileLocation::LOCATION(this->test->ss, "/bogus/", this->test->file), wrench::FileLocation::LOCATION(this->test->ss, other_file)}); @@ -331,7 +331,7 @@ void FileReadActionExecutorTest::do_FileReadActionExecutorMultipleAttemptsSucces workflow = wrench::Workflow::createWorkflow(); // Create a file - this->file = wrench::Simulation::addFile("some_file", 1000000.0); + this->file = wrench::Simulation::addFile("some_file", 1000000); ss->createFile(wrench::FileLocation::LOCATION(ss, file)); @@ -445,7 +445,7 @@ void FileReadActionExecutorTest::do_FileReadActionExecutorMissingFileTest_test() workflow = wrench::Workflow::createWorkflow(); // Create a file - this->file = wrench::Simulation::addFile("some_file", 1000000.0); + this->file = wrench::Simulation::addFile("some_file", 1000000); // Create a WMS std::shared_ptr wms = nullptr; @@ -567,7 +567,7 @@ void FileReadActionExecutorTest::do_FileReadActionExecutorKillingStorageServiceT workflow = wrench::Workflow::createWorkflow(); // Create a file - this->file = wrench::Simulation::addFile("some_file", 1000000.0); + this->file = wrench::Simulation::addFile("some_file", 1000000); ss->createFile(wrench::FileLocation::LOCATION(ss, file)); diff --git a/test/services/helper_services/action_executor/FileRegistryActionExecutorTest.cpp b/test/services/helper_services/action_executor/FileRegistryActionExecutorTest.cpp index 96366d50e9..c0bc28f29f 100755 --- a/test/services/helper_services/action_executor/FileRegistryActionExecutorTest.cpp +++ b/test/services/helper_services/action_executor/FileRegistryActionExecutorTest.cpp @@ -242,7 +242,7 @@ void FileRegistryActionExecutorTest::do_FileRegistryActionExecutorSuccessTest_te workflow = wrench::Workflow::createWorkflow(); // Create a file - this->file = wrench::Simulation::addFile("some_file", 1000000.0); + this->file = wrench::Simulation::addFile("some_file", 1000000); ss->createFile(wrench::FileLocation::LOCATION(ss, file)); diff --git a/test/services/helper_services/action_executor/FileWriteActionExecutorTest.cpp b/test/services/helper_services/action_executor/FileWriteActionExecutorTest.cpp index bcae136888..903193329f 100755 --- a/test/services/helper_services/action_executor/FileWriteActionExecutorTest.cpp +++ b/test/services/helper_services/action_executor/FileWriteActionExecutorTest.cpp @@ -206,7 +206,7 @@ void FileWriteActionExecutorTest::do_FileWriteActionExecutorSuccessTest_test() { workflow = wrench::Workflow::createWorkflow(); // Create a file - this->file = wrench::Simulation::addFile("some_file", 1000000.0); + this->file = wrench::Simulation::addFile("some_file", 1000000); // Create a WMS std::shared_ptr wms = nullptr; diff --git a/test/services/helper_services/action_executor/KillFailureActionExecutorTest.cpp b/test/services/helper_services/action_executor/KillFailureActionExecutorTest.cpp index 4a3b3d22df..9d247bf876 100644 --- a/test/services/helper_services/action_executor/KillFailureActionExecutorTest.cpp +++ b/test/services/helper_services/action_executor/KillFailureActionExecutorTest.cpp @@ -351,11 +351,11 @@ void KillFailActionExecutorTest::do_ActionExecutorKillFailTest_test(double sleep this->ss2 = simulation->add(wrench::SimpleStorageService::createSimpleStorageService("Host1", {"/"}, {{wrench::SimpleStorageServiceProperty::BUFFER_SIZE, "10MB"}})); // Create a file to read - this->file = wrench::Simulation::addFile("some_file", 1000000.0); + this->file = wrench::Simulation::addFile("some_file", 1000000); ss1->createFile(wrench::FileLocation::LOCATION(ss1, file)); // Create a file to write - this->file_to_write = wrench::Simulation::addFile("some_file_to_write", 1000000.0); + this->file_to_write = wrench::Simulation::addFile("some_file_to_write", 1000000); // Create a WMS std::shared_ptr wms = nullptr; diff --git a/test/services/network_proximity_service/NetworkProximityTest.cpp b/test/services/network_proximity_service/NetworkProximityTest.cpp index ee8b4acf24..285c2c5b60 100644 --- a/test/services/network_proximity_service/NetworkProximityTest.cpp +++ b/test/services/network_proximity_service/NetworkProximityTest.cpp @@ -48,8 +48,8 @@ class NetworkProximityTest : public ::testing::Test { workflow = wrench::Workflow::createWorkflow(); // Create two files - input_file = wrench::Simulation::addFile("input_file", 10000.0); - output_file = wrench::Simulation::addFile("output_file", 20000.0); + input_file = wrench::Simulation::addFile("input_file", 10000); + output_file = wrench::Simulation::addFile("output_file", 20000); // Create one task1 task = workflow->addTask("task1", 3600, 1, 1, 0); diff --git a/test/services/storage_services/CompoundStorageService/CompoundStorageServiceFunctionalTest.cpp b/test/services/storage_services/CompoundStorageService/CompoundStorageServiceFunctionalTest.cpp index 2e360a7313..722f0e855a 100644 --- a/test/services/storage_services/CompoundStorageService/CompoundStorageServiceFunctionalTest.cpp +++ b/test/services/storage_services/CompoundStorageService/CompoundStorageServiceFunctionalTest.cpp @@ -63,11 +63,11 @@ class CompoundStorageServiceFunctionalTest : public ::testing::Test { workflow = wrench::Workflow::createWorkflow(); // Create the files - file_1 = wrench::Simulation::addFile("file_1", 1.0); - file_10 = wrench::Simulation::addFile("file_10", 10.0); - file_100 = wrench::Simulation::addFile("file_100", 100.0); - file_500 = wrench::Simulation::addFile("file_500", 500.0); - file_1000 = wrench::Simulation::addFile("file_1000", 1000.0); + file_1 = wrench::Simulation::addFile("file_1", 1); + file_10 = wrench::Simulation::addFile("file_10", 10); + file_100 = wrench::Simulation::addFile("file_100", 100); + file_500 = wrench::Simulation::addFile("file_500", 500); + file_1000 = wrench::Simulation::addFile("file_1000", 1000); // Create a three-hosts platform file (2 for simple storage, one for Compound Storage) std::string xml = "" diff --git a/test/services/storage_services/LogicalFileSystem/LogicalFileSystemTest.cpp b/test/services/storage_services/LogicalFileSystem/LogicalFileSystemTest.cpp index 833670fb86..80fe3b1a25 100755 --- a/test/services/storage_services/LogicalFileSystem/LogicalFileSystemTest.cpp +++ b/test/services/storage_services/LogicalFileSystem/LogicalFileSystemTest.cpp @@ -148,7 +148,7 @@ // // Create a Logical File System // auto fs1 = wrench::LogicalFileSystem::createLogicalFileSystem("Host", storage_service.get(), "/dev/null"); // -// auto file = wrench::Simulation::addFile("file", 1.0); +// auto file = wrench::Simulation::addFile("file", 1); // // fs1->createDirectory(("/foo")); // fs1->createFile(file, "/foo"); diff --git a/test/services/storage_services/SimpleStorageService/SimpleStorageServiceFunctionalTest.cpp b/test/services/storage_services/SimpleStorageService/SimpleStorageServiceFunctionalTest.cpp index 73798d18e7..c838d6211b 100755 --- a/test/services/storage_services/SimpleStorageService/SimpleStorageServiceFunctionalTest.cpp +++ b/test/services/storage_services/SimpleStorageService/SimpleStorageServiceFunctionalTest.cpp @@ -62,10 +62,10 @@ class SimpleStorageServiceFunctionalTest : public ::testing::Test { workflow = wrench::Workflow::createWorkflow(); // Create the files - file_1 = wrench::Simulation::addFile("file_1", 1.0); - file_10 = wrench::Simulation::addFile("file_10", 10.0); - file_100 = wrench::Simulation::addFile("file_100", 100.0); - file_500 = wrench::Simulation::addFile("file_500", 500.0); + file_1 = wrench::Simulation::addFile("file_1", 1); + file_10 = wrench::Simulation::addFile("file_10", 10); + file_100 = wrench::Simulation::addFile("file_100", 100); + file_500 = wrench::Simulation::addFile("file_500", 500); // Create a one-host platform file std::string xml = "" diff --git a/test/simulated_failures/host_failures/BareMetalComputeServiceHostFailuresTest.cpp b/test/simulated_failures/host_failures/BareMetalComputeServiceHostFailuresTest.cpp index 013294e803..058f12f738 100755 --- a/test/simulated_failures/host_failures/BareMetalComputeServiceHostFailuresTest.cpp +++ b/test/simulated_failures/host_failures/BareMetalComputeServiceHostFailuresTest.cpp @@ -51,8 +51,8 @@ class BareMetalComputeServiceHostFailuresTest : public ::testing::Test { // Create two files - input_file = wrench::Simulation::addFile("input_file", 10000.0); - output_file = wrench::Simulation::addFile("output_file", 20000.0); + input_file = wrench::Simulation::addFile("input_file", 10000); + output_file = wrench::Simulation::addFile("output_file", 20000); // Create one task1 task = workflow->addTask("task1", 3600, 1, 1, 0); @@ -383,7 +383,7 @@ class BareMetalComputeServiceRandomFailuresTestWMS : public wrench::ExecutionCon // Add a task1 to the workflow auto task = this->test->workflow->addTask("task_" + std::to_string(trial), 80, 1, 1, 0); - auto output_file = wrench::Simulation::addFile("output_file_" + std::to_string(trial), 20000.0); + auto output_file = wrench::Simulation::addFile("output_file_" + std::to_string(trial), 20000); task->addInputFile(this->test->input_file); task->addOutputFile(output_file); diff --git a/test/simulated_failures/host_failures/CloudComputeServiceHostFailuresTest.cpp b/test/simulated_failures/host_failures/CloudComputeServiceHostFailuresTest.cpp index 9f26dd5688..ef478be09b 100644 --- a/test/simulated_failures/host_failures/CloudComputeServiceHostFailuresTest.cpp +++ b/test/simulated_failures/host_failures/CloudComputeServiceHostFailuresTest.cpp @@ -49,8 +49,8 @@ class CloudServiceHostFailuresTest : public ::testing::Test { // Create two files - input_file = wrench::Simulation::addFile("input_file", 10000.0); - output_file = wrench::Simulation::addFile("output_file", 20000.0); + input_file = wrench::Simulation::addFile("input_file", 10000); + output_file = wrench::Simulation::addFile("output_file", 20000); // Create one task1 task = workflow->addTask("task1", 3600, 1, 1, 0); diff --git a/test/simulated_failures/link_failures/FileRegistryLinkFailuresTest.cpp b/test/simulated_failures/link_failures/FileRegistryLinkFailuresTest.cpp index fd57a42252..58cb8033ea 100755 --- a/test/simulated_failures/link_failures/FileRegistryLinkFailuresTest.cpp +++ b/test/simulated_failures/link_failures/FileRegistryLinkFailuresTest.cpp @@ -107,7 +107,7 @@ class FileRegistryLinkFailuresTestWMS : public wrench::ExecutionController { // Create a bunch of files std::vector> files; for (unsigned int i = 0; i < NUM_FILES; i++) { - files.push_back(wrench::Simulation::addFile("file_" + std::to_string(i), 100.0)); + files.push_back(wrench::Simulation::addFile("file_" + std::to_string(i), 100)); } // Create a link switcher on/off er diff --git a/test/simulation/DynamicServiceCreationTest.cpp b/test/simulation/DynamicServiceCreationTest.cpp index 6e89101ba3..eed1fddacb 100644 --- a/test/simulation/DynamicServiceCreationTest.cpp +++ b/test/simulation/DynamicServiceCreationTest.cpp @@ -49,13 +49,13 @@ class DynamicServiceCreationTest : public ::testing::Test { // Create the files - input_file = wrench::Simulation::addFile("input_file", 10.0); - output_file1 = wrench::Simulation::addFile("output_file1", 10.0); - output_file2 = wrench::Simulation::addFile("output_file2", 10.0); - output_file3 = wrench::Simulation::addFile("output_file3", 10.0); - output_file4 = wrench::Simulation::addFile("output_file4", 10.0); - output_file5 = wrench::Simulation::addFile("output_file5", 10.0); - output_file6 = wrench::Simulation::addFile("output_file6", 10.0); + input_file = wrench::Simulation::addFile("input_file", 10); + output_file1 = wrench::Simulation::addFile("output_file1", 10); + output_file2 = wrench::Simulation::addFile("output_file2", 10); + output_file3 = wrench::Simulation::addFile("output_file3", 10); + output_file4 = wrench::Simulation::addFile("output_file4", 10); + output_file5 = wrench::Simulation::addFile("output_file5", 10); + output_file6 = wrench::Simulation::addFile("output_file6", 10); // Create the tasks task1 = workflow->addTask("task_1_10s_1core", 10.0, 1, 1, 0); diff --git a/test/simulation/SimpleSimulationTest.cpp b/test/simulation/SimpleSimulationTest.cpp index bc3597650c..a196a9b752 100755 --- a/test/simulation/SimpleSimulationTest.cpp +++ b/test/simulation/SimpleSimulationTest.cpp @@ -46,13 +46,13 @@ class SimpleSimulationTest : public ::testing::Test { workflow = wrench::Workflow::createWorkflow(); // Create the files - input_file = wrench::Simulation::addFile("input_file", 10.0); - output_file1 = wrench::Simulation::addFile("output_file1", 10.0); - output_file2 = wrench::Simulation::addFile("output_file2", 10.0); - output_file3 = wrench::Simulation::addFile("output_file3", 10.0); - output_file4 = wrench::Simulation::addFile("output_file4", 10.0); - output_file5 = wrench::Simulation::addFile("output_file5", 10.0); - output_file6 = wrench::Simulation::addFile("output_file6", 10.0); + input_file = wrench::Simulation::addFile("input_file", 10); + output_file1 = wrench::Simulation::addFile("output_file1", 10); + output_file2 = wrench::Simulation::addFile("output_file2", 10); + output_file3 = wrench::Simulation::addFile("output_file3", 10); + output_file4 = wrench::Simulation::addFile("output_file4", 10); + output_file5 = wrench::Simulation::addFile("output_file5", 10); + output_file6 = wrench::Simulation::addFile("output_file6", 10); // Create the tasks task1 = workflow->addTask("task_1_10s_1core", 10.0, 1, 1, 0); diff --git a/test/simulation/SimulationPlatformTest.cpp b/test/simulation/SimulationPlatformTest.cpp index 3465b7a47d..0685f768ad 100755 --- a/test/simulation/SimulationPlatformTest.cpp +++ b/test/simulation/SimulationPlatformTest.cpp @@ -215,12 +215,12 @@ class CreateNewDiskTestWMS : public wrench::ExecutionController { auto ss = this->getSimulation()->startNewService(wrench::SimpleStorageService::createSimpleStorageService("subzonehost", {"/foo"}, {}, {})); // Create a file on it - auto too_big = wrench::Simulation::addFile("too_big", 200.0); + auto too_big = wrench::Simulation::addFile("too_big", 200); try { wrench::StorageService::createFileAtLocation(wrench::FileLocation::LOCATION(ss, too_big)); throw std::runtime_error("Should not be able to create a file that big on the newly created storage service"); } catch (wrench::ExecutionException &ignore) {} - auto not_too_big = wrench::Simulation::addFile("not_too_big", 20.0); + auto not_too_big = wrench::Simulation::addFile("not_too_big", 20); wrench::StorageService::createFileAtLocation(wrench::FileLocation::LOCATION(ss, not_too_big)); wrench::StorageService::removeFileAtLocation(wrench::FileLocation::LOCATION(ss, not_too_big)); wrench::StorageService::createFileAtLocation(wrench::FileLocation::LOCATION(ss, not_too_big)); diff --git a/test/simulation/simulation_output/SimulationDumpJSONTest.cpp b/test/simulation/simulation_output/SimulationDumpJSONTest.cpp index 43b94e2f7b..953f9e85c8 100644 --- a/test/simulation/simulation_output/SimulationDumpJSONTest.cpp +++ b/test/simulation/simulation_output/SimulationDumpJSONTest.cpp @@ -656,12 +656,12 @@ void SimulationDumpJSONTest::do_SimulationDumpWorkflowGraphJSON_test() { auto independent_tasks_workflow = wrench::Workflow::createWorkflow(); t1 = independent_tasks_workflow->addTask("task1", 1.0, 1, 1, 0); - t1->addInputFile(wrench::Simulation::addFile("task1_input", 1.0)); - t1->addOutputFile(wrench::Simulation::addFile("task1_output", 1.0)); + t1->addInputFile(wrench::Simulation::addFile("task1_input", 1)); + t1->addOutputFile(wrench::Simulation::addFile("task1_output", 1)); t2 = independent_tasks_workflow->addTask("task2", 1.0, 1, 1, 0); - t2->addInputFile(wrench::Simulation::addFile("task2_input", 1.0)); - t2->addOutputFile(wrench::Simulation::addFile("task2_output", 1.0)); + t2->addInputFile(wrench::Simulation::addFile("task2_input", 1)); + t2->addOutputFile(wrench::Simulation::addFile("task2_output", 1)); EXPECT_NO_THROW(simulation->getOutput().dumpWorkflowGraphJSON(independent_tasks_workflow, workflow_graph_json_file_path)); @@ -734,25 +734,25 @@ void SimulationDumpJSONTest::do_SimulationDumpWorkflowGraphJSON_test() { auto fork_join_workflow = wrench::Workflow::createWorkflow(); t1 = fork_join_workflow->addTask("task1", 1.0, 1, 1, 0); - t1->addInputFile(wrench::Simulation::addFile("task1_input", 1.0)); - t1->addOutputFile(wrench::Simulation::addFile("task1_output1", 1.0)); - t1->addOutputFile(wrench::Simulation::addFile("task1_output2", 1.0)); + t1->addInputFile(wrench::Simulation::addFile("task1_input", 1)); + t1->addOutputFile(wrench::Simulation::addFile("task1_output1", 1)); + t1->addOutputFile(wrench::Simulation::addFile("task1_output2", 1)); t2 = fork_join_workflow->addTask("task2", 1.0, 1, 1, 0); t2->addInputFile(wrench::Simulation::getFileByID("task1_output1")); - t2->addOutputFile(wrench::Simulation::addFile("task2_output1", 1.0)); + t2->addOutputFile(wrench::Simulation::addFile("task2_output1", 1)); fork_join_workflow->addControlDependency(t1, t2); t3 = fork_join_workflow->addTask("task3", 1.0, 1, 1, 0); t3->addInputFile(wrench::Simulation::getFileByID("task1_output2")); - t3->addOutputFile(wrench::Simulation::addFile("task3_output1", 1.0)); + t3->addOutputFile(wrench::Simulation::addFile("task3_output1", 1)); fork_join_workflow->addControlDependency(t1, t3); t4 = fork_join_workflow->addTask("task4", 1.0, 1, 1, 0); t4->addInputFile(wrench::Simulation::getFileByID("task2_output1")); t4->addInputFile(wrench::Simulation:: getFileByID("task3_output1")); - t4->addOutputFile(wrench::Simulation::addFile("task4_output1", 1.0)); + t4->addOutputFile(wrench::Simulation::addFile("task4_output1", 1)); fork_join_workflow->addControlDependency(t2, t4); fork_join_workflow->addControlDependency(t3, t4); @@ -1226,7 +1226,7 @@ class SimulationDumpDiskOperationsTestWMS : public wrench::ExecutionController { int main() override { - auto file_1 = wrench::Simulation::addFile("file_1", 1.00 * 1000 * 1000); + auto file_1 = wrench::Simulation::addFile("file_1", 1000 * 1000); wrench::StorageService::writeFileAtLocation(wrench::FileLocation::LOCATION(this->test->ss1, file_1)); wrench::StorageService::writeFileAtLocation(wrench::FileLocation::LOCATION(this->test->ss2, file_1)); diff --git a/test/simulation/simulation_output/SimulationOutputTest.cpp b/test/simulation/simulation_output/SimulationOutputTest.cpp index b4020036a3..f3a33e29f8 100755 --- a/test/simulation/simulation_output/SimulationOutputTest.cpp +++ b/test/simulation/simulation_output/SimulationOutputTest.cpp @@ -44,11 +44,11 @@ class SimulationOutputTest : public ::testing::Test { workflow = wrench::Workflow::createWorkflow(); // // Create the files - // input_file = wrench::Simulation::addFile("input_file", 10.0); - // output_file1 = wrench::Simulation::addFile("output_file1", 10.0); - // output_file2 = wrench::Simulation::addFile("output_file2", 10.0); - // output_file3 = wrench::Simulation::addFile("output_file3", 10.0); - // output_file4 = wrench::Simulation::addFile("output_file4", 10.0); + // input_file = wrench::Simulation::addFile("input_file", 10); + // output_file1 = wrench::Simulation::addFile("output_file1", 10); + // output_file2 = wrench::Simulation::addFile("output_file2", 10); + // output_file3 = wrench::Simulation::addFile("output_file3", 10); + // output_file4 = wrench::Simulation::addFile("output_file4", 10); // // // Create the tasks // task1 = workflow->addTask("task_1_10s_1core", 10.0, 1, 1, 0.0); diff --git a/test/simulation/simulation_output/SimulationTimestampDiskReadWriteTest.cpp b/test/simulation/simulation_output/SimulationTimestampDiskReadWriteTest.cpp index d662fe6f54..b394db124c 100755 --- a/test/simulation/simulation_output/SimulationTimestampDiskReadWriteTest.cpp +++ b/test/simulation/simulation_output/SimulationTimestampDiskReadWriteTest.cpp @@ -64,7 +64,7 @@ class SimulationTimestampDiskReadWriteTest : public ::testing::Test { workflow = wrench::Workflow::createWorkflow(); - file_1 = wrench::Simulation::addFile("file_1", 100.0); + file_1 = wrench::Simulation::addFile("file_1", 100); } std::string platform_file_path = UNIQUE_TMP_PATH_PREFIX + "platform.xml"; diff --git a/test/simulation/simulation_output/SimulationTimestampFileCopyTest.cpp b/test/simulation/simulation_output/SimulationTimestampFileCopyTest.cpp index 04c0871d92..b6f3d9a923 100755 --- a/test/simulation/simulation_output/SimulationTimestampFileCopyTest.cpp +++ b/test/simulation/simulation_output/SimulationTimestampFileCopyTest.cpp @@ -67,12 +67,12 @@ class SimulationTimestampFileCopyTest : public ::testing::Test { workflow = wrench::Workflow::createWorkflow(); - file_1 = wrench::Simulation::addFile("file_1", 100.0); - file_2 = wrench::Simulation::addFile("file_2", 100.0); - file_3 = wrench::Simulation::addFile("file_3", 100.0); + file_1 = wrench::Simulation::addFile("file_1", 100); + file_2 = wrench::Simulation::addFile("file_2", 100); + file_3 = wrench::Simulation::addFile("file_3", 100); - xl_file = wrench::Simulation::addFile("xl_file", 1000000000.0); - too_large_file = wrench::Simulation::addFile("too_large_file", 10000000000000000000.0); + xl_file = wrench::Simulation::addFile("xl_file", 1000000000); + too_large_file = wrench::Simulation::addFile("too_large_file", 10000000000000000000ULL); } std::string platform_file_path = UNIQUE_TMP_PATH_PREFIX + "platform.xml"; diff --git a/test/simulation/simulation_output/SimulationTimestampFileWriteTest.cpp b/test/simulation/simulation_output/SimulationTimestampFileWriteTest.cpp index e297e6045c..0ac611a73f 100755 --- a/test/simulation/simulation_output/SimulationTimestampFileWriteTest.cpp +++ b/test/simulation/simulation_output/SimulationTimestampFileWriteTest.cpp @@ -73,11 +73,11 @@ class SimulationTimestampFileWriteTest : public ::testing::Test { workflow = wrench::Workflow::createWorkflow(); - file_1 = wrench::Simulation::addFile("file_1", 100.0); - file_2 = wrench::Simulation::addFile("file_2", 100.0); - file_3 = wrench::Simulation::addFile("file_3", 100.0); + file_1 = wrench::Simulation::addFile("file_1", 100); + file_2 = wrench::Simulation::addFile("file_2", 100); + file_3 = wrench::Simulation::addFile("file_3", 100); - xl_file = wrench::Simulation::addFile("xl_file", 1000000000.0); + xl_file = wrench::Simulation::addFile("xl_file", 1000000000ULL); } std::string platform_file_path = UNIQUE_TMP_PATH_PREFIX + "platform.xml"; diff --git a/test/wms/MultipleWMSTest.cpp b/test/wms/MultipleWMSTest.cpp index 62fd6e0cdd..17305494ff 100755 --- a/test/wms/MultipleWMSTest.cpp +++ b/test/wms/MultipleWMSTest.cpp @@ -73,9 +73,9 @@ class MultipleWMSTest : public ::testing::Test { // workflows.push_back(workflow); // Create the files - input_file = wrench::Simulation::addFile(prefix + "_input_file", 10.0); - output_file1 = wrench::Simulation::addFile(prefix + "output_file1", 10.0); - output_file2 = wrench::Simulation::addFile(prefix + "output_file2", 10.0); + input_file = wrench::Simulation::addFile(prefix + "_input_file", 10); + output_file1 = wrench::Simulation::addFile(prefix + "output_file1", 10); + output_file2 = wrench::Simulation::addFile(prefix + "output_file2", 10); // Create the tasks task1 = workflow->addTask("task_1_10s_1core", 10.0, 1, 1, 0); diff --git a/test/wms/WMSTest.cpp b/test/wms/WMSTest.cpp index efdca42738..a8bdc959d5 100755 --- a/test/wms/WMSTest.cpp +++ b/test/wms/WMSTest.cpp @@ -350,7 +350,7 @@ class TestCustomHandlerWMS : public wrench::ExecutionController { // Get a "COMPOUND JOB FAILED" event (default handler) auto fail_job = job_manager->createCompoundJob("fail_job"); - auto file = wrench::Simulation::addFile("somefile", 1.0); + auto file = wrench::Simulation::addFile("somefile", 1); fail_job->addFileReadAction("file_read_action", wrench::FileLocation::LOCATION(this->test->storage_service1, file)); job_manager->submitJob(fail_job, vm_cs);