diff --git a/CMakeLists.txt b/CMakeLists.txt index 8ff6aecd0c..bed5d1cdbf 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -266,7 +266,6 @@ set(SOURCE_FILES include/wrench/services/compute/batch/batch_schedulers/BatchScheduler.h include/wrench/services/compute/batch/batch_schedulers/homegrown/HomegrownBatchScheduler.h include/wrench/services/storage/storage_helpers/FileTransferThread.h - include/wrench/services/storage/storage_helpers/LogicalFileSystem.h include/wrench/services/storage/storage_helpers/LogicalFileSystemNoCaching.h include/wrench/services/storage/storage_helpers/LogicalFileSystemLRUCaching.h src/wrench/logging/TerminalOutput.cpp @@ -372,9 +371,6 @@ set(SOURCE_FILES src/wrench/services/storage/storage_helper_classes/FileLocation.cpp src/wrench/services/storage/storage_helper_classes/FileTransferThread.cpp include/wrench/services/storage/storage_helpers/FileTransferThreadMessage.h - src/wrench/services/storage/storage_helper_classes/LogicalFileSystem.cpp - src/wrench/services/storage/storage_helper_classes/LogicalFileSystemNoCaching.cpp - src/wrench/services/storage/storage_helper_classes/LogicalFileSystemLRUCaching.cpp src/wrench/simgrid_S4U_util/S4U_Daemon.cpp src/wrench/simgrid_S4U_util/S4U_DaemonActor.cpp include/wrench/simgrid_S4U_util/S4U_DaemonActor.h diff --git a/examples/action_api/XRootD/Controller.cpp b/examples/action_api/XRootD/Controller.cpp index fcf4d5503c..be80c75c3a 100755 --- a/examples/action_api/XRootD/Controller.cpp +++ b/examples/action_api/XRootD/Controller.cpp @@ -73,7 +73,6 @@ namespace wrench { * * @return 0 on completion * - * @throw std::runtime_error */ int Controller::main() { 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 130b5fc086..24f1ec9bec 100755 --- a/examples/action_api/bare-metal-bag-of-actions/TwoActionsAtATimeExecutionController.cpp +++ b/examples/action_api/bare-metal-bag-of-actions/TwoActionsAtATimeExecutionController.cpp @@ -44,7 +44,6 @@ namespace wrench { * * @return 0 on completion * - * @throw std::runtime_error */ int TwoActionsAtATimeExecutionController::main() { /* Initialize and seed a RNG */ diff --git a/examples/action_api/batch-bag-of-actions/GreedyExecutionController.cpp b/examples/action_api/batch-bag-of-actions/GreedyExecutionController.cpp index d7abc5517d..5b1e4c8660 100755 --- a/examples/action_api/batch-bag-of-actions/GreedyExecutionController.cpp +++ b/examples/action_api/batch-bag-of-actions/GreedyExecutionController.cpp @@ -43,7 +43,6 @@ namespace wrench { * * @return 0 on completion * - * @throw std::runtime_error */ int GreedyExecutionController::main() { /* Initialize and seed a RNG */ diff --git a/examples/action_api/batch-mpi-action/BatchMPIActionController.cpp b/examples/action_api/batch-mpi-action/BatchMPIActionController.cpp index 56b177197b..85aebb50a8 100755 --- a/examples/action_api/batch-mpi-action/BatchMPIActionController.cpp +++ b/examples/action_api/batch-mpi-action/BatchMPIActionController.cpp @@ -45,7 +45,6 @@ namespace wrench { * * @return 0 on completion * - * @throw std::runtime_error */ int BatchMPIActionController::main() { /* Set the logging output to GREEN */ diff --git a/examples/action_api/cloud-bag-of-actions/GreedyExecutionController.cpp b/examples/action_api/cloud-bag-of-actions/GreedyExecutionController.cpp index a402e5b852..d25ea37d16 100755 --- a/examples/action_api/cloud-bag-of-actions/GreedyExecutionController.cpp +++ b/examples/action_api/cloud-bag-of-actions/GreedyExecutionController.cpp @@ -45,7 +45,6 @@ namespace wrench { * * @return 0 on completion * - * @throw std::runtime_error */ int GreedyExecutionController::main() { /* Initialize and seed a RNG */ diff --git a/examples/action_api/communicating-custom-actions/CommunicatingActionsController.cpp b/examples/action_api/communicating-custom-actions/CommunicatingActionsController.cpp index 82c0ea6868..94a68c1714 100755 --- a/examples/action_api/communicating-custom-actions/CommunicatingActionsController.cpp +++ b/examples/action_api/communicating-custom-actions/CommunicatingActionsController.cpp @@ -44,7 +44,6 @@ namespace wrench { * * @return 0 on completion * - * @throw std::runtime_error */ int CommunicatingActionsController::main() { /* Set the logging output to GREEN */ diff --git a/examples/action_api/job-action-failure/JobActionFailureController.cpp b/examples/action_api/job-action-failure/JobActionFailureController.cpp index 0c97c05657..3df34a4cb4 100755 --- a/examples/action_api/job-action-failure/JobActionFailureController.cpp +++ b/examples/action_api/job-action-failure/JobActionFailureController.cpp @@ -43,7 +43,6 @@ namespace wrench { * * @return 0 on completion * - * @throw std::runtime_error */ int JobActionFailureController::main() { /* Set the logging output to GREEN */ diff --git a/examples/action_api/multi-action-multi-job/MultiActionMultiJobController.cpp b/examples/action_api/multi-action-multi-job/MultiActionMultiJobController.cpp index 873f2f93ba..e3cdbaee71 100755 --- a/examples/action_api/multi-action-multi-job/MultiActionMultiJobController.cpp +++ b/examples/action_api/multi-action-multi-job/MultiActionMultiJobController.cpp @@ -45,7 +45,6 @@ namespace wrench { * * @return 0 on completion * - * @throw std::runtime_error */ int MultiActionMultiJobController::main() { /* Set the logging output to GREEN */ diff --git a/examples/action_api/storage-service-proxy/Controller.cpp b/examples/action_api/storage-service-proxy/Controller.cpp index df854b09a9..fc4c7580cd 100755 --- a/examples/action_api/storage-service-proxy/Controller.cpp +++ b/examples/action_api/storage-service-proxy/Controller.cpp @@ -76,7 +76,6 @@ namespace wrench { * * @return 0 on completion * - * @throw std::runtime_error */ int Controller::main() { diff --git a/examples/action_api/super-custom-action/SuperCustomActionController.cpp b/examples/action_api/super-custom-action/SuperCustomActionController.cpp index 1ecc3d1ebd..9a8c777668 100755 --- a/examples/action_api/super-custom-action/SuperCustomActionController.cpp +++ b/examples/action_api/super-custom-action/SuperCustomActionController.cpp @@ -64,7 +64,6 @@ namespace wrench { * * @return 0 on completion * - * @throw std::runtime_error */ int SuperCustomActionController::main() { /* Set the logging output to GREEN */ 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 44944fb6ba..a884de2830 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 @@ -46,7 +46,6 @@ namespace wrench { * * @return 0 on completion * - * @throw std::runtime_error */ int TwoTasksAtATimeWMS::main() { /* Set the logging output to GREEN */ 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 f72bda7deb..0f6afcc8b6 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 @@ -44,7 +44,6 @@ namespace wrench { * * @return 0 on completion * - * @throw std::runtime_error */ int WorkflowAsAsingleJobWMS::main() { /* Set the logging output to GREEN */ 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 eef7492659..7573539f16 100755 --- a/examples/workflow_api/basic-examples/bare-metal-chain/OneTaskAtATimeWMS.cpp +++ b/examples/workflow_api/basic-examples/bare-metal-chain/OneTaskAtATimeWMS.cpp @@ -44,7 +44,6 @@ namespace wrench { * * @return 0 on completion * - * @throw std::runtime_error */ int OneTaskAtATimeWMS::main() { /* Set the logging output to GREEN */ 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 93db54f964..914e96da74 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 @@ -47,7 +47,6 @@ namespace wrench { * * @return 0 on completion * - * @throw std::runtime_error */ int ComplexJobWMS::main() { /* Set the logging output to GREEN */ 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 e0b3b11651..984428bde7 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 @@ -47,7 +47,6 @@ namespace wrench { * * @return 0 on completion * - * @throw std::runtime_error */ int DataMovementWMS::main() { /* Set the logging output to GREEN */ 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 99b1cdab08..1e5879de17 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 @@ -41,7 +41,6 @@ namespace wrench { * * @return 0 on completion * - * @throw std::runtime_error */ int OneTaskAtATimeWMS::main() { /* Set the logging output to GREEN */ diff --git a/examples/workflow_api/basic-examples/batch-bag-of-tasks/TwoTasksAtATimeBatchWMS.cpp b/examples/workflow_api/basic-examples/batch-bag-of-tasks/TwoTasksAtATimeBatchWMS.cpp index e763e11d63..b70255c3f8 100755 --- a/examples/workflow_api/basic-examples/batch-bag-of-tasks/TwoTasksAtATimeBatchWMS.cpp +++ b/examples/workflow_api/basic-examples/batch-bag-of-tasks/TwoTasksAtATimeBatchWMS.cpp @@ -46,7 +46,6 @@ namespace wrench { * * @return 0 on completion * - * @throw std::runtime_error */ int TwoTasksAtATimeBatchWMS::main() { /* Set the logging output to GREEN */ 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 9f19673344..c94131f14f 100644 --- a/examples/workflow_api/basic-examples/batch-pilot-job/PilotJobWMS.cpp +++ b/examples/workflow_api/basic-examples/batch-pilot-job/PilotJobWMS.cpp @@ -45,7 +45,6 @@ namespace wrench { * * @return 0 on completion * - * @throw std::runtime_error */ int PilotJobWMS::main() { /* Set the logging output to GREEN */ 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 17e12157c3..e459f3e598 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 @@ -46,7 +46,6 @@ namespace wrench { * * @return 0 on completion * - * @throw std::runtime_error */ int TwoTasksAtATimeCloudWMS::main() { /* Set the logging output to GREEN */ 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 dbc4d39c09..a6bacf5edf 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 @@ -46,7 +46,6 @@ namespace wrench { * * @return 0 on completion * - * @throw std::runtime_error */ int TwoTasksAtATimeCloudWMS::main() { /* Set the logging output to GREEN */ diff --git a/examples/workflow_api/basic-examples/io-pagecache/ConcurrentPipelineWMS.cpp b/examples/workflow_api/basic-examples/io-pagecache/ConcurrentPipelineWMS.cpp index 8ada299a92..ab36760373 100755 --- a/examples/workflow_api/basic-examples/io-pagecache/ConcurrentPipelineWMS.cpp +++ b/examples/workflow_api/basic-examples/io-pagecache/ConcurrentPipelineWMS.cpp @@ -44,7 +44,6 @@ namespace wrench { * * @return 0 on completion * - * @throw std::runtime_error */ int ConcurrentPipelineWMS::main() { /* Set the logging output to GREEN */ diff --git a/examples/workflow_api/basic-examples/io-pagecache/NFSPipelineWMS.cpp b/examples/workflow_api/basic-examples/io-pagecache/NFSPipelineWMS.cpp index 327335b409..0b3f913e1d 100755 --- a/examples/workflow_api/basic-examples/io-pagecache/NFSPipelineWMS.cpp +++ b/examples/workflow_api/basic-examples/io-pagecache/NFSPipelineWMS.cpp @@ -48,7 +48,6 @@ namespace wrench { * * @return 0 on completion * - * @throw std::runtime_error */ int NFSPipelineWMS::main() { /* Set the logging output to GREEN */ 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 3929d1bb94..a5cbd7d98b 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 @@ -50,7 +50,6 @@ namespace wrench { * * @return 0 on completion * - * @throw std::runtime_error */ int TwoTasksAtATimeVirtualizedClusterWMS::main() { /* Set the logging output to GREEN */ diff --git a/examples/workflow_api/real-workflow-example/SimpleWMS.cpp b/examples/workflow_api/real-workflow-example/SimpleWMS.cpp index 3763de713d..fbf842bace 100755 --- a/examples/workflow_api/real-workflow-example/SimpleWMS.cpp +++ b/examples/workflow_api/real-workflow-example/SimpleWMS.cpp @@ -40,7 +40,6 @@ namespace wrench { * * @return 0 on completion * - * @throw std::runtime_error */ int SimpleWMS::main() { TerminalOutput::setThisProcessLoggingColor(TerminalOutput::COLOR_GREEN); diff --git a/include/wrench/services/compute/cloud/CloudComputeService.h b/include/wrench/services/compute/cloud/CloudComputeService.h index 680631ea1c..55e2137e0b 100644 --- a/include/wrench/services/compute/cloud/CloudComputeService.h +++ b/include/wrench/services/compute/cloud/CloudComputeService.h @@ -153,7 +153,6 @@ namespace wrench { * @param tosend: message to be sent * @return a simulation message * - * @throw std::runtime_error */ std::shared_ptr sendRequestAndWaitForAnswer(S4U_CommPort *answer_commport, ComputeServiceMessage *tosend) { serviceSanityCheck(); diff --git a/include/wrench/services/storage/storage_helpers/LogicalFileSystem.h b/include/wrench/services/storage/storage_helpers/LogicalFileSystem.h deleted file mode 100755 index 60700ea056..0000000000 --- a/include/wrench/services/storage/storage_helpers/LogicalFileSystem.h +++ /dev/null @@ -1,245 +0,0 @@ -///** -// * Copyright (c) 2017. The WRENCH Team. -// * -// * This program is free software: you can redistribute it and/or modify -// * it under the terms of the GNU General Public License as published by -// * the Free Software Foundation, either version 3 of the License, or -// * (at your option) any later version. -// */ -// -//#ifndef WRENCH_LOGICALFILESYSTEM_H -//#define WRENCH_LOGICALFILESYSTEM_H -// -//#include -//#include -//#include -//#include -//#include -//#include -//#include -// -//#include -// -// -//#include -// -//namespace wrench { -// -// /***********************/ -// /** \cond INTERNAL */ -// /***********************/ -// -// -// class StorageService; -// -// /** -// * @brief A class that implements a weak file system abstraction -// */ -// class LogicalFileSystem { -// -// public: -// virtual ~LogicalFileSystem() = default; -// -// /** -// * @brief A helper class to describe a file instance on the file system -// */ -// class FileOnDisk { -// public: -// /** -// * @brief Constructor -// * @param last_write_date: the file's last write date -// */ -// explicit FileOnDisk(double last_write_date) : last_write_date(last_write_date) {} -// -// /** -// * @brief the file's last write date -// */ -// double last_write_date; -// }; -// -// /** -// * @brief A constant that signifies /dev/null, when the actual location/path/mountpoint/etc. is unknown -// */ -// const static std::string DEV_NULL; -// -// static std::unique_ptr createLogicalFileSystem(const std::string &hostname, -// StorageService *storage_service, -// const std::string &mount_point = DEV_NULL, -// const std::string &eviction_policy = "NONE"); -// -// double getTotalCapacity() const; -// double getFreeSpace() const; -// double getTotalNumFiles() const; -// // bool hasEnoughFreeSpace(double bytes); -// -// void stageFile(const std::shared_ptr &file, std::string absolute_path); -// -// bool reserveSpace(const std::shared_ptr &file, -// const std::string &absolute_path); -// void unreserveSpace(const std::shared_ptr &file, const std::string &absolute_path); -// -// void createDirectory(const std::string &absolute_path); -// bool doesDirectoryExist(const std::string &absolute_path); -// bool isDirectoryEmpty(const std::string &absolute_path); -// void removeEmptyDirectory(const std::string &absolute_path); -// -// bool isFileInDirectory(const std::shared_ptr &file, const std::string &absolute_path); -// std::set> listFilesInDirectory(const std::string &absolute_path); -// simgrid::s4u::Disk *getDisk(); -// -// double getFileLastWriteDate(const std::shared_ptr &file, const std::string &absolute_path); -// -// /** -// * @brief Store file in directory -// * -// * @param file: the file to store -// * @param absolute_path: the directory's absolute path (at the mount point) -// * -// * @throw std::invalid_argument -// */ -// virtual void storeFileInDirectory(const std::shared_ptr &file, const std::string &absolute_path) = 0; -// /** -// * @brief Remove a file in a directory -// * @param file: the file to remove -// * @param absolute_path: the directory's absolute path -// * -// * @throw std::invalid_argument -// */ -// virtual void removeFileFromDirectory(const std::shared_ptr &file, const std::string &absolute_path) = 0; -// /** -// * @brief Remove all files in a directory -// * @param absolute_path: the directory's absolute path -// * -// * @throw std::invalid_argument -// */ -// virtual void removeAllFilesInDirectory(const std::string &absolute_path) = 0; -// /** -// * @brief Update a file's read date -// * @param file: the file -// * @param absolute_path: the path -// */ -// virtual void updateReadDate(const std::shared_ptr &file, const std::string &absolute_path) = 0; -// /** -// * @brief Increment the number of running transactions that have to do with a file -// * @param file: the file -// * @param absolute_path: the file path -// */ -// virtual void incrementNumRunningTransactionsForFileInDirectory(const std::shared_ptr &file, const std::string &absolute_path) = 0; -// /** -// * @brief Decrement the number of running transactions that have to do with a file -// * @param file: the file -// * @param absolute_path: the file path -// */ -// virtual void decrementNumRunningTransactionsForFileInDirectory(const std::shared_ptr &file, const std::string &absolute_path) = 0; -// -// protected: -// friend class StorageService; -// friend class Simulation; -// -// LogicalFileSystem(const std::string &hostname, StorageService *storage_service, -// const std::string &mount_point); -// -// /** -// * @brief Static "list" of mountpoints in the simulation -// */ -// static std::set mount_points; -// -// /** -// * @brief Whether this file system is /dev/null -// */ -// bool devnull = false; -// /** -// * @brief Method to evict files (based on caching policy) -// * @param needed_free_space the amount of free space needed -// * @return true on success, false on failure -// */ -// virtual bool evictFiles(double needed_free_space) = 0; -// -// /** -// * @brief The disk -// */ -// simgrid::s4u::Disk *disk; -// /** -// * @brief The hostname -// */ -// std::string hostname; -// /** -// * @brief The storage service -// */ -// StorageService *storage_service; -// /** -// * @brief The mount point -// */ -// std::string mount_point; -// /** -// * @brief The total capacity -// */ -// double total_capacity; -// /** -// * @brief current amount of free space -// */ -// double free_space = 0; -// /** -// * @brief list of space reservations -// */ -// std::map reserved_space; -// -// /** -// * @brief file system content -// */ -// std::unordered_map, std::shared_ptr>> content; -// -// /** -// * @brief Assert that a directory exists -// * @param absolute_path: the path -// */ -// void assertDirectoryExist(const std::string &absolute_path) { -// if (not this->doesDirectoryExist(absolute_path)) { -// throw std::invalid_argument("LogicalFileSystem::assertDirectoryExists(): directory " + absolute_path + " does not exist"); -// } -// } -// -// /** -// * @brief Assert that a directory does not exist -// * @param absolute_path: the path -// */ -// void assertDirectoryDoesNotExist(const std::string &absolute_path) { -// if (this->doesDirectoryExist(absolute_path)) { -// throw std::invalid_argument("LogicalFileSystem::assertDirectoryExists(): directory " + absolute_path + " already exists"); -// } -// } -// -// /** -// * @brief Assert that a directory is empty -// * @param absolute_path: the path -// */ -// void assertDirectoryIsEmpty(const std::string &absolute_path) { -// assertDirectoryExist(absolute_path); -// if (not this->isDirectoryEmpty(absolute_path)) { -// throw std::invalid_argument("LogicalFileSystem::assertDirectoryIsEmpty(): directory " + absolute_path + "is not empty"); -// } -// } -// -// /** -// * @brief Assert that a file is in a directory -// * @param file: the file -// * @param absolute_path: the path -// */ -// void assertFileIsInDirectory(const std::shared_ptr &file, const std::string &absolute_path) { -// assertDirectoryExist(absolute_path); -// if (this->content[absolute_path].find(file) == this->content[absolute_path].end()) { -// throw std::invalid_argument("LogicalFileSystem::assertFileIsInDirectory(): File " + file->getID() + -// " is not in directory " + absolute_path); -// } -// } -// }; -// -// -// /***********************/ -// /** \endcond */ -// /***********************/ -// -//}// namespace wrench -// -// -//#endif//WRENCH_LOGICALFILESYSTEM_H diff --git a/include/wrench/simgrid_S4U_util/S4U_CommPort.h b/include/wrench/simgrid_S4U_util/S4U_CommPort.h index c3f59c7021..c1ccb1d935 100644 --- a/include/wrench/simgrid_S4U_util/S4U_CommPort.h +++ b/include/wrench/simgrid_S4U_util/S4U_CommPort.h @@ -54,7 +54,6 @@ namespace wrench { * @param error_prefix: any string you wish to prefix the error message with * @return the message, in a unique_ptr of the type specified. Otherwise throws a runtime_error * - * @throw std::shared_ptr */ template std::unique_ptr getMessage(const std::string &error_prefix = "") { @@ -86,7 +85,6 @@ namespace wrench { * * @return the message, in a unique_ptr of the type specified. Otherwise throws a runtime_error * - * @throw std::shared_ptr */ template std::unique_ptr getMessage(double timeout, const std::string &error_prefix = "") { @@ -116,7 +114,6 @@ namespace wrench { * * @return the message, or nullptr (in which case it's likely a brutal termination) * - * @throw std::shared_ptr */ std::unique_ptr getMessage() { return getMessage(true); @@ -128,7 +125,6 @@ namespace wrench { * @param timeout: a timeout value in seconds (<0 means never timeout) * @return the message, or nullptr (in which case it's likely a brutal termination) * - * @throw std::shared_ptr */ std::unique_ptr getMessage(double timeout) { return this->getMessage(timeout, true); diff --git a/src/wrench/execution_controller/ExecutionController.cpp b/src/wrench/execution_controller/ExecutionController.cpp index cdf1d7144e..09fa67f604 100755 --- a/src/wrench/execution_controller/ExecutionController.cpp +++ b/src/wrench/execution_controller/ExecutionController.cpp @@ -27,7 +27,6 @@ namespace wrench { * @param hostname: the name of the host on which to run the controller * @param suffix: a string to append to the controller process name (which will show up in logs) * - * @throw std::invalid_argument */ ExecutionController::ExecutionController( const std::string &hostname, @@ -162,7 +161,6 @@ namespace wrench { * @param timeout: a timeout value in seconds * * @return false if a timeout occurred (in which case no event was received/processed) - * @throw wrench::ExecutionException */ bool ExecutionController::waitForAndProcessNextEvent(double timeout) { std::shared_ptr event = this->waitForNextEvent(timeout); diff --git a/src/wrench/execution_controller/ExecutionControllerMessage.cpp b/src/wrench/execution_controller/ExecutionControllerMessage.cpp index 286a666bfd..ae441eb571 100755 --- a/src/wrench/execution_controller/ExecutionControllerMessage.cpp +++ b/src/wrench/execution_controller/ExecutionControllerMessage.cpp @@ -25,7 +25,6 @@ namespace wrench { * @param message: the (string) message to be sent * @param payload: message size in bytes * - * @throw std::invalid_argument */ ExecutionControllerAlarmTimerMessage::ExecutionControllerAlarmTimerMessage(std::string message, double payload) : ExecutionControllerMessage(payload), message(std::move(message)) {} diff --git a/src/wrench/execution_events/ExecutionEvent.cpp b/src/wrench/execution_events/ExecutionEvent.cpp index 411691fe63..fcde3322ab 100755 --- a/src/wrench/execution_events/ExecutionEvent.cpp +++ b/src/wrench/execution_events/ExecutionEvent.cpp @@ -32,8 +32,6 @@ namespace wrench { * @param timeout: a timeout value in seconds (-1 means: no timeout) * @return a workflow execution event (or nullptr in case of a timeout) * - * @throw ExecutionException - * @throw std::runtime_error */ std::shared_ptr ExecutionEvent::waitForNextExecutionEvent(S4U_CommPort *commport, double timeout) { diff --git a/src/wrench/job/CompoundJob.cpp b/src/wrench/job/CompoundJob.cpp index c0b3822bea..48c8411b38 100644 --- a/src/wrench/job/CompoundJob.cpp +++ b/src/wrench/job/CompoundJob.cpp @@ -33,7 +33,6 @@ namespace wrench { * @param name: the job's name (if empty, a unique name will be chosen for you) * @param job_manager: the Job Manager in charge of this job * - * @throw std::invalid_argument */ CompoundJob::CompoundJob(std::string name, std::shared_ptr job_manager) : Job(std::move(name), std::move(job_manager)), diff --git a/src/wrench/job/StandardJob.cpp b/src/wrench/job/StandardJob.cpp index 24b4c1b999..5e437403b7 100755 --- a/src/wrench/job/StandardJob.cpp +++ b/src/wrench/job/StandardJob.cpp @@ -32,7 +32,6 @@ namespace wrench { * @param cleanup_file_deletions: a vector of tuples that specify which file copies should be removed from which * locations. This will happen regardless of whether the job succeeds or fails * - * @throw std::invalid_argument */ StandardJob::StandardJob(std::shared_ptr job_manager, std::vector> tasks, diff --git a/src/wrench/managers/data_movement_manager/DataMovementManager.cpp b/src/wrench/managers/data_movement_manager/DataMovementManager.cpp index 993f772374..523c509322 100644 --- a/src/wrench/managers/data_movement_manager/DataMovementManager.cpp +++ b/src/wrench/managers/data_movement_manager/DataMovementManager.cpp @@ -50,8 +50,6 @@ namespace wrench { /** * @brief Stop the manager * - * @throw ExecutionException - * @throw std::runtime_error */ void DataMovementManager::stop() { this->commport->putMessage(new ServiceStopDaemonMessage(nullptr, false, ComputeService::TerminationCause::TERMINATION_NONE, 0.0)); @@ -63,8 +61,6 @@ namespace wrench { * @param dst: the destination location * @param file_registry_service: a file registry service to update once the file copy has (successfully) completed (none if nullptr) * - * @throw std::invalid_argument - * @throw ExecutionException */ void DataMovementManager::initiateAsynchronousFileCopy(const std::shared_ptr &src, const std::shared_ptr &dst, @@ -94,8 +90,6 @@ namespace wrench { * @brief Ask the data manager to initiate an asynchronous file read * @param location: the location to read from * - * @throw std::invalid_argument - * @throw ExecutionException */ void DataMovementManager::initiateAsynchronousFileRead(const std::shared_ptr &location) { this->initiateAsynchronousFileRead(location, location->getFile()->getSize()); @@ -106,8 +100,6 @@ namespace wrench { * @param location: the location to read from * @param num_bytes: the number of bytes to read * - * @throw std::invalid_argument - * @throw ExecutionException */ void DataMovementManager::initiateAsynchronousFileRead(const std::shared_ptr &location, const double num_bytes) { @@ -136,8 +128,6 @@ namespace wrench { * @param location: the location to read from * @param file_registry_service: a file registry service to update once the file write has (successfully) completed * - * @throw std::invalid_argument - * @throw ExecutionException */ void DataMovementManager::initiateAsynchronousFileWrite(const std::shared_ptr &location, const std::shared_ptr &file_registry_service) { @@ -169,8 +159,6 @@ namespace wrench { * @param dst: the destination location * @param file_registry_service: a file registry service to update once the file copy has (successfully) completed (none if nullptr) * - * @throw std::invalid_argument - * @throw ExecutionException */ void DataMovementManager::doSynchronousFileCopy(const std::shared_ptr &src, const std::shared_ptr &dst, @@ -219,7 +207,6 @@ namespace wrench { * @brief Process the next message * @return true if the daemon should continue, false otherwise * - * @throw std::runtime_error */ bool DataMovementManager::processNextMessage() { std::shared_ptr message = nullptr; diff --git a/src/wrench/managers/job_manager/JobManager.cpp b/src/wrench/managers/job_manager/JobManager.cpp index 88ce378202..13a0ba5203 100644 --- a/src/wrench/managers/job_manager/JobManager.cpp +++ b/src/wrench/managers/job_manager/JobManager.cpp @@ -58,8 +58,6 @@ namespace wrench { /** * @brief Stop the job manager * - * @throw ExecutionException - * @throw std::runtime_error */ void JobManager::stop() { this->commport->putMessage( @@ -81,7 +79,6 @@ namespace wrench { * at the end of the job. * @return the standard job * - * @throw std::invalid_argument */ std::shared_ptr JobManager::createStandardJob( const std::vector> &tasks, @@ -121,7 +118,6 @@ namespace wrench { * completed at the end of the job. * @return the standard job * - * @throw std::invalid_argument */ std::shared_ptr JobManager::createStandardJob( const std::vector> &tasks, @@ -209,7 +205,6 @@ namespace wrench { * * @return the standard job * - * @throw std::invalid_argument */ std::shared_ptr JobManager::createStandardJob( const std::vector> &tasks, @@ -231,7 +226,6 @@ namespace wrench { * * @return the standard job * - * @throw std::invalid_argument */ std::shared_ptr JobManager::createStandardJob( const std::vector> &tasks, @@ -250,7 +244,6 @@ namespace wrench { * of tasks also included in the list) * @return the standard job * - * @throw std::invalid_argument */ std::shared_ptr JobManager::createStandardJob( const std::vector> &tasks) { @@ -271,7 +264,6 @@ namespace wrench { * * @return the standard job * - * @throw std::invalid_argument */ std::shared_ptr JobManager::createStandardJob( const std::shared_ptr &task, @@ -295,7 +287,6 @@ namespace wrench { * * @return the standard job * - * @throw std::invalid_argument */ std::shared_ptr JobManager::createStandardJob( const std::shared_ptr &task, @@ -316,7 +307,6 @@ namespace wrench { * * @return the standard job * - * @throw std::invalid_argument */ std::shared_ptr JobManager::createStandardJob( const std::shared_ptr &task) { @@ -334,7 +324,6 @@ namespace wrench { * * @return the pilot job * - * @throw std::invalid_argument */ std::shared_ptr JobManager::createPilotJob() { auto job = std::shared_ptr(new PilotJob(this->getSharedPtr())); @@ -364,8 +353,6 @@ namespace wrench { * - For a "non-grid universe" job that will be submitted to a child BareMetalComputeService: {} * * - * @throw std::invalid_argument - * @throw ExecutionException */ void JobManager::submitJob(const std::shared_ptr &job, const std::shared_ptr &compute_service, @@ -492,8 +479,6 @@ namespace wrench { * - For a "non-grid universe" job that will be submitted to a child BareMetalComputeService: {} * * - * @throw std::invalid_argument - * @throw ExecutionException */ void JobManager::submitJob(const std::shared_ptr &job, const std::shared_ptr &compute_service, @@ -568,8 +553,6 @@ namespace wrench { * - to a CloudComputeService: {} (pilot jobs should not be submitted directly to the service)} * - to a HTCondorComputeService: {} (pilot jobs should be be submitted directly to the service) * - * @throw std::invalid_argument - * @throw ExecutionException */ void JobManager::submitJob(const std::shared_ptr &job, const std::shared_ptr &compute_service, @@ -684,9 +667,6 @@ namespace wrench { * @brief Terminate a standard job that hasn't completed/expired/failed yet * @param job: the job to be terminated * - * @throw ExecutionException - * @throw std::invalid_argument - * @throw std::runtime_error */ void JobManager::terminateJob(const std::shared_ptr &job) { if (job == nullptr) { @@ -744,9 +724,6 @@ namespace wrench { * @brief Terminate a compound job that hasn't completed/expired/failed yet * @param job: the job to be terminated * - * @throw ExecutionException - * @throw std::invalid_argument - * @throw std::runtime_error */ void JobManager::terminateJob(const std::shared_ptr &job) { if (job == nullptr) { @@ -767,9 +744,6 @@ namespace wrench { * @brief Terminate a pilot job that hasn't completed/expired/failed yet * @param job: the job to be terminated * - * @throw ExecutionException - * @throw std::invalid_argument - * @throw std::runtime_error */ void JobManager::terminateJob(const std::shared_ptr &job) { if (job == nullptr) { @@ -800,8 +774,6 @@ namespace wrench { * * @param job: a job to forget * - * @throw std::invalid_argument - * @throw ExecutionException */ void JobManager::forgetJob(Job *job) { if (job == nullptr) { diff --git a/src/wrench/services/Service.cpp b/src/wrench/services/Service.cpp index 7b83641eaf..1c11215b77 100644 --- a/src/wrench/services/Service.cpp +++ b/src/wrench/services/Service.cpp @@ -67,7 +67,6 @@ namespace wrench { * @brief Set a message payload of the Service * @param messagepayload: the message payload (which must a a string representation of a >=0 double) * @param value: the message payload value - * @throw std::invalid_argument */ void Service::setMessagePayload(WRENCH_MESSAGEPAYLOAD_TYPE messagepayload, double value) { // Check that the value is a >=0 double @@ -85,7 +84,6 @@ namespace wrench { * @param property: the property * @return the property value as a string * - * @throw std::invalid_argument */ std::string Service::getPropertyValueAsString(WRENCH_PROPERTY_TYPE property) { if (this->property_list.find(property) == this->property_list.end()) { @@ -101,7 +99,6 @@ namespace wrench { * @param property: the property * @return the property value as a double * - * @throw std::invalid_argument */ double Service::getPropertyValueAsDouble(WRENCH_PROPERTY_TYPE property) { double value; @@ -174,7 +171,6 @@ namespace wrench { * @param property: the property * @return the property value as an unsigned long * - * @throw std::invalid_argument */ unsigned long Service::getPropertyValueAsUnsignedLong(WRENCH_PROPERTY_TYPE property) { unsigned long value; @@ -200,7 +196,6 @@ namespace wrench { * @param message_payload: the message payload * @return the message payload value as a double * - * @throw std::invalid_argument */ double Service::getMessagePayloadValue(WRENCH_MESSAGEPAYLOAD_TYPE message_payload) { if (this->messagepayload_list.find(message_payload) == this->messagepayload_list.end()) { @@ -238,7 +233,6 @@ namespace wrench { * @param property: the property * @return the property value as a boolean * - * @throw std::invalid_argument */ bool Service::getPropertyValueAsBoolean(WRENCH_PROPERTY_TYPE property) { std::string string_value; @@ -260,8 +254,6 @@ namespace wrench { * @param daemonize: true if the daemon is to be daemonized, false otherwise * @param auto_restart: true if the daemon should restart automatically after a reboot or not * - * @throw std::runtime_error - * @throw std::shared_ptr */ void Service::start(const std::shared_ptr &this_service, bool daemonize, bool auto_restart) { // Setting the state to UP @@ -296,8 +288,6 @@ namespace wrench { /** * @brief Synchronously stop the service (does nothing if the service is already stopped) * - * @throw ExecutionException - * @throw std::runtime_error */ void Service::stop() { // Do nothing if the service is already down @@ -351,7 +341,6 @@ namespace wrench { /** * @brief Resume the service * - * @throw ExecutionException */ void Service::resume() { if (this->state != Service::SUSPENDED) { @@ -445,7 +434,6 @@ namespace wrench { /** * @brief Check whether the service is properly configured and running * - * @throws WorkflowExecutionException */ void Service::serviceSanityCheck() { assertServiceIsUp(); @@ -470,7 +458,6 @@ namespace wrench { /** * @brief Throws an exception if the service is not up - * @throw ExecutionException */ void Service::assertServiceIsUp() { if (this->state == Service::DOWN) { diff --git a/src/wrench/services/ServiceMessage.cpp b/src/wrench/services/ServiceMessage.cpp index 6b25661cab..e5b79aa586 100755 --- a/src/wrench/services/ServiceMessage.cpp +++ b/src/wrench/services/ServiceMessage.cpp @@ -25,7 +25,6 @@ namespace wrench { * @param termination_cause: the termination cause (if failure notifications are sent) * @param payload: message size in bytes * - * @throw std::invalid_arguments */ ServiceStopDaemonMessage::ServiceStopDaemonMessage(S4U_CommPort *ack_commport, bool send_failure_notifications, ComputeService::TerminationCause termination_cause, @@ -36,7 +35,6 @@ namespace wrench { * @brief Constructor * @param payload: message size in bytes * - * @throw std::invalid_arguments */ ServiceDaemonStoppedMessage::ServiceDaemonStoppedMessage(double payload) : ServiceMessage(payload) {} diff --git a/src/wrench/services/compute/ComputeService.cpp b/src/wrench/services/compute/ComputeService.cpp index 7a4e0b40de..ff17a2afcc 100644 --- a/src/wrench/services/compute/ComputeService.cpp +++ b/src/wrench/services/compute/ComputeService.cpp @@ -92,9 +92,6 @@ namespace wrench { * - "-u": username (optional) * - to a CloudComputeService: {} * - * @throw ExecutionException - * @throw std::invalid_argument - * @throw std::runtime_error */ void ComputeService::submitJob(const std::shared_ptr &job, const std::map &service_specific_args) { if (job == nullptr) { @@ -111,9 +108,6 @@ namespace wrench { * * @param job: the job to terminate * - * @throw std::invalid_argument - * @throw ExecutionException - * @throw std::runtime_error */ void ComputeService::terminateJob(const std::shared_ptr &job) { if (job == nullptr) { @@ -190,8 +184,6 @@ namespace wrench { * perform this operation in zero simulated time. * @return the host count * - * @throw ExecutionException - * @throw std::runtime_error */ unsigned long ComputeService::getNumHosts(bool simulate_it) { std::map dict; @@ -206,9 +198,6 @@ namespace wrench { * perform this operation in zero simulated time. * @return a vector of hostnames * - * - * @throw ExecutionException - * @throw std::runtime_error */ std::vector ComputeService::getHosts(bool simulate_it) { std::map dict; @@ -231,8 +220,6 @@ namespace wrench { * perform this operation in zero simulated time. * @return a map of core counts, indexed by hostnames * - * @throw ExecutionException - * @throw std::runtime_error */ std::map ComputeService::getPerHostNumCores(bool simulate_it) { std::map dict; @@ -253,8 +240,6 @@ namespace wrench { * perform this operation in zero simulated time. * @return total core counts * - * @throw ExecutionException - * @throw std::runtime_error */ unsigned long ComputeService::getTotalNumCores(bool simulate_it) { std::map dict; @@ -277,8 +262,6 @@ namespace wrench { * jobs may be pending and "ahead" in the queue, e.g., because they depend on current * actions that are not using all available resources). * - * @throw ExecutionException - * @throw std::runtime_error */ std::map ComputeService::getPerHostNumIdleCores(bool simulate_it) { std::map dict; @@ -299,8 +282,6 @@ namespace wrench { * perform this operation in zero simulated time. * @return the ram availability map (could be empty) * - * @throw ExecutionException - * @throw std::runtime_error */ std::map ComputeService::getPerHostAvailableMemoryCapacity(bool simulate_it) { std::map dict; @@ -324,8 +305,6 @@ namespace wrench { * perform this operation in zero simulated time. * @return total idle core count. * - * @throw ExecutionException - * @throw std::runtime_error */ unsigned long ComputeService::getTotalNumIdleCores(bool simulate_it) { std::map dict; @@ -376,7 +355,6 @@ namespace wrench { * perform this operation in zero simulated time. * @return a list of flop rates in flop/sec * - * @throw ExecutionException */ std::map ComputeService::getCoreFlopRate(bool simulate_it) { std::map dict; @@ -396,7 +374,6 @@ namespace wrench { * perform this operation in zero simulated time. * @return a map of RAM capacities, indexed by hostname * - * @throw ExecutionException */ std::map ComputeService::getMemoryCapacity(bool simulate_it) { std::map dict; @@ -418,8 +395,6 @@ namespace wrench { * perform this operation in zero simulated time. * @return service information * - * @throw ExecutionException - * @throw std::runtime_error */ std::map ComputeService::getServiceResourceInformation(const std::string &key, bool simulate_it) { assertServiceIsUp(); diff --git a/src/wrench/services/compute/ComputeServiceMessage.cpp b/src/wrench/services/compute/ComputeServiceMessage.cpp index f22f035a13..83b2be80b2 100644 --- a/src/wrench/services/compute/ComputeServiceMessage.cpp +++ b/src/wrench/services/compute/ComputeServiceMessage.cpp @@ -28,7 +28,6 @@ namespace wrench { * @param service_specific_args: a map of extra arguments (each specified by a name and value, both strings) required by some services * @param payload: message size in bytes * - * @throw std::invalid_arguments */ ComputeServiceSubmitCompoundJobRequestMessage::ComputeServiceSubmitCompoundJobRequestMessage( S4U_CommPort *answer_commport, @@ -54,7 +53,6 @@ namespace wrench { * @param failure_cause: cause of the failure (nullptr if success == true) * @param payload: message size in bytes * - * @throw std::invalid_arguments */ ComputeServiceSubmitCompoundJobAnswerMessage::ComputeServiceSubmitCompoundJobAnswerMessage(std::shared_ptr job, std::shared_ptr compute_service, @@ -81,7 +79,6 @@ namespace wrench { * @param cs: the compute service on which the job has completed * @param payload: message size in bytes * - * @throw std::invalid_arguments */ ComputeServiceCompoundJobDoneMessage::ComputeServiceCompoundJobDoneMessage(std::shared_ptr job, std::shared_ptr cs, @@ -104,7 +101,6 @@ namespace wrench { * @param cs: the compute service on which the job has failed * @param payload: message size in bytes * - * @throw std::invalid_argument */ ComputeServiceCompoundJobFailedMessage::ComputeServiceCompoundJobFailedMessage(std::shared_ptr job, std::shared_ptr cs, @@ -126,7 +122,6 @@ namespace wrench { * @param job: a compound job to terminate * @param payload: message size in bytes * - * @throw std::invalid_arguments */ ComputeServiceTerminateCompoundJobRequestMessage::ComputeServiceTerminateCompoundJobRequestMessage( S4U_CommPort *answer_commport, @@ -150,7 +145,6 @@ namespace wrench { * @param failure_cause: cause of the failure (nullptr if success == true) * @param payload: message size in bytes * - * @throw std::invalid_arguments */ ComputeServiceTerminateCompoundJobAnswerMessage::ComputeServiceTerminateCompoundJobAnswerMessage(std::shared_ptr job, std::shared_ptr compute_service, @@ -178,7 +172,6 @@ namespace wrench { * @param cs: the compute service on which the pilot job has started * @param payload: message size in bytes * - * @throw std::invalid_argument */ ComputeServicePilotJobStartedMessage::ComputeServicePilotJobStartedMessage(std::shared_ptr job, std::shared_ptr cs, @@ -200,7 +193,6 @@ namespace wrench { * @param cs: the compute service on which the pilot job has expired * @param payload: message size in bytes * - * @throw std::invalid_argument */ ComputeServicePilotJobExpiredMessage::ComputeServicePilotJobExpiredMessage(std::shared_ptr job, std::shared_ptr cs, @@ -223,7 +215,6 @@ namespace wrench { * @param key: the desired resource information (i.e., dictionary key) that's needed) * @param payload: the message size in bytes * - * @throw std::invalid_argument */ ComputeServiceResourceInformationRequestMessage::ComputeServiceResourceInformationRequestMessage( S4U_CommPort *answer_commport, @@ -246,7 +237,6 @@ namespace wrench { * @param info: the resource description map * @param payload: the message size in bytes * - * @throw std::invalid_argument */ ComputeServiceResourceInformationAnswerMessage::ComputeServiceResourceInformationAnswerMessage( std::map info, double payload) @@ -261,7 +251,6 @@ namespace wrench { * @param ram: the desired RAM * @param payload: the message size in bytes * - * @throw std::invalid_argument */ ComputeServiceIsThereAtLeastOneHostWithAvailableResourcesRequestMessage::ComputeServiceIsThereAtLeastOneHostWithAvailableResourcesRequestMessage( S4U_CommPort *answer_commport, unsigned long num_cores, double ram, double payload) : ComputeServiceMessage( diff --git a/src/wrench/services/compute/bare_metal/BareMetalComputeService.cpp b/src/wrench/services/compute/bare_metal/BareMetalComputeService.cpp index b6abb2ed6d..9fd70f36d6 100644 --- a/src/wrench/services/compute/bare_metal/BareMetalComputeService.cpp +++ b/src/wrench/services/compute/bare_metal/BareMetalComputeService.cpp @@ -58,7 +58,6 @@ namespace wrench { * @brief Helper static method to parse resource specifications to the format * @param spec: specification string * @return a tuple - * @throw std::invalid_argument */ std::tuple BareMetalComputeService::parseResourceSpec(const std::string &spec) { std::vector tokens; @@ -184,9 +183,6 @@ namespace wrench { * - If a "hostname:num_cores" value is provided for an action, then the service will run that * action with this many cores on that host. * - * @throw ExecutionException - * @throw std::invalid_argument - * @throw std::runtime_error */ void BareMetalComputeService::submitCompoundJob( std::shared_ptr job, @@ -277,7 +273,6 @@ namespace wrench { * @param suffix: a string to append to the process name * @param scratch_space: the scratch storage service * - * @throw std::invalid_argument */ BareMetalComputeService::BareMetalComputeService( const std::string &hostname, @@ -328,7 +323,6 @@ namespace wrench { * @param messagepayload_list: a message payload list ({} means "use all defaults") * @param pj: a containing PilotJob (nullptr if none) * - * @throw std::invalid_argument */ void BareMetalComputeService::initiateInstance( const std::string &hostname, @@ -409,7 +403,6 @@ namespace wrench { *x * @return false if the daemon should terminate, true otherwise * - * @throw std::runtime_error */ bool BareMetalComputeService::processNextMessage() { S4U_Simulation::computeZeroFlop(); @@ -484,8 +477,6 @@ namespace wrench { * * @param job: a compound job * - * @throw ExecutionException - * @throw std::runtime_error */ void BareMetalComputeService::terminateCompoundJob(std::shared_ptr job) { assertServiceIsUp(); @@ -715,7 +706,6 @@ namespace wrench { /** * @brief Method to make sure that property specs are valid * - * @throw std::invalid_argument */ void BareMetalComputeService::validateProperties() { bool success = true; diff --git a/src/wrench/services/compute/bare_metal/BareMetalComputeServiceOneShot.cpp b/src/wrench/services/compute/bare_metal/BareMetalComputeServiceOneShot.cpp index 0935cc84cb..ad3f3094ea 100755 --- a/src/wrench/services/compute/bare_metal/BareMetalComputeServiceOneShot.cpp +++ b/src/wrench/services/compute/bare_metal/BareMetalComputeServiceOneShot.cpp @@ -41,7 +41,6 @@ namespace wrench { * @param suffix: a string to append to the process name * @param scratch_space: the scratch space to use * - * @throw std::invalid_argument */ BareMetalComputeServiceOneShot::BareMetalComputeServiceOneShot( std::shared_ptr job, diff --git a/src/wrench/services/compute/batch/BatchComputeService.cpp b/src/wrench/services/compute/batch/BatchComputeService.cpp index 36efabb73e..373007b3ba 100644 --- a/src/wrench/services/compute/batch/BatchComputeService.cpp +++ b/src/wrench/services/compute/batch/BatchComputeService.cpp @@ -77,7 +77,6 @@ namespace wrench { * @param messagepayload_list: a message payload list ({} means "use all defaults") * @param suffix: suffix to append to the service name and commport * - * @throw std::invalid_argument */ BatchComputeService::BatchComputeService(const std::string &hostname, std::vector compute_hosts, @@ -312,7 +311,6 @@ namespace wrench { * @param key: the argument key ("-N", "-c", "-t") * @param args: the argument map * @return the value of the argument - * @throw std::invalid_argument */ unsigned long BatchComputeService::parseUnsignedLongServiceSpecificArgument( const std::string &key, @@ -849,7 +847,6 @@ namespace wrench { * @param executor: the standard job executor * @param job: the job * - * @throw std::runtime_error */ void BatchComputeService::processCompoundJobCompletion( const std::shared_ptr &executor, @@ -1097,7 +1094,6 @@ namespace wrench { /** * @brief Start the process that will replay the background load * - * @throw std::runtime_error */ void BatchComputeService::startBackgroundWorkloadProcess() { if (this->workload_trace.empty()) { diff --git a/src/wrench/services/compute/batch/BatchComputeServiceMessage.cpp b/src/wrench/services/compute/batch/BatchComputeServiceMessage.cpp index 79459dcd06..36376b7df6 100755 --- a/src/wrench/services/compute/batch/BatchComputeServiceMessage.cpp +++ b/src/wrench/services/compute/batch/BatchComputeServiceMessage.cpp @@ -26,7 +26,6 @@ namespace wrench { * @param job_args_to_scheduler: the arguments required by batscheduler of batsim * @param payload: the message size in bytes * - * @throw std::invalid_argument */ BatchSimulationBeginsToSchedulerMessage::BatchSimulationBeginsToSchedulerMessage(S4U_CommPort *answer_commport, std::string job_args_to_scheduler, @@ -51,7 +50,6 @@ namespace wrench { * @param answer_commport: the commport to reply to * @param payload: the message size in bytes * - * @throw std::invalid_argument */ BatchSchedReadyMessage::BatchSchedReadyMessage(std::string &answer_commport, double payload) : BatchComputeServiceMessage("BATCH_SCHED_READY", payload) { @@ -69,7 +67,6 @@ namespace wrench { * @param batsched_decision_reply: the decision reply from Batsched * @param payload: the message size in bytes * - * @throw std::invalid_argument */ BatchExecuteJobFromBatSchedMessage::BatchExecuteJobFromBatSchedMessage(S4U_CommPort *answer_commport, std::string batsched_decision_reply, @@ -94,7 +91,6 @@ namespace wrench { * @param estimated_job_start_time: the estimated job start time * @param payload: the message size in bytes * - * @throw std::invalid_argument */ BatchQueryAnswerMessage::BatchQueryAnswerMessage(double estimated_job_start_time, double payload) : BatchComputeServiceMessage(payload) { @@ -109,7 +105,6 @@ namespace wrench { * @param job_args_to_scheduler: the arguments required by batscheduler of batsim * @param payload: the message size in bytes * - * @throw std::invalid_argument */ BatchJobSubmissionToSchedulerMessage::BatchJobSubmissionToSchedulerMessage(std::string &answer_commport, Job *job, @@ -139,7 +134,6 @@ namespace wrench { * @param reply: the replied answer by scheduler * @param payload: the message size in bytes * - * @throw std::invalid_argument */ BatchJobReplyFromSchedulerMessage::BatchJobReplyFromSchedulerMessage(std::string reply, double payload) : BatchComputeServiceMessage("BATCH_JOB_REPLY_FROM_SCHEDULER", payload), reply(reply) {} @@ -152,7 +146,6 @@ namespace wrench { * @param job: the BatchComputeService job * @param payload: the message size in bytes * - * @throw std::invalid_argument */ BatchComputeServiceJobRequestMessage::BatchComputeServiceJobRequestMessage(S4U_CommPort *answer_commport, std::shared_ptr job, double payload) @@ -176,7 +169,6 @@ namespace wrench { * @param job: a BatchComputeService job * @param payload: the message size in bytes * - * @throw std::invalid_arguments */ AlarmJobTimeOutMessage::AlarmJobTimeOutMessage(std::shared_ptr job, double payload) : ServiceMessage(payload) { @@ -195,7 +187,6 @@ namespace wrench { * @param job_id: the id of a BatchComputeService job * @param payload:the message size in bytes * - * @throw std::invalid_arguments */ AlarmNotifyBatschedMessage::AlarmNotifyBatschedMessage(std::string job_id, double payload) : ServiceMessage("ALARM_NOTIFY_BATSCHED", payload), job_id(job_id) {} diff --git a/src/wrench/services/compute/batch/workload_helper_classes/TraceFileLoader.cpp b/src/wrench/services/compute/batch/workload_helper_classes/TraceFileLoader.cpp index c9ee434cc1..2cd54ff171 100755 --- a/src/wrench/services/compute/batch/workload_helper_classes/TraceFileLoader.cpp +++ b/src/wrench/services/compute/batch/workload_helper_classes/TraceFileLoader.cpp @@ -58,7 +58,6 @@ namespace wrench { * - requested number of nodes * - username * - * @throw std::invalid_argument */ std::vector> TraceFileLoader::loadFromTraceFile(const std::string& filename, bool ignore_invalid_jobs, double desired_submit_time_of_first_job) { @@ -101,7 +100,6 @@ namespace wrench { * - requested number of nodes * - username * - * @throw std::invalid_argument */ std::vector> TraceFileLoader::loadFromTraceFileSWF(const std::string& filename, bool ignore_invalid_jobs, double desired_submit_time_of_first_job) { @@ -309,7 +307,6 @@ namespace wrench { * - requested number of nodes * - username * - * @throw std::invalid_argument */ std::vector> TraceFileLoader::loadFromTraceFileJSON(const std::string& filename, bool ignore_invalid_jobs, double desired_submit_time_of_first_job) { diff --git a/src/wrench/services/compute/cloud/CloudComputeService.cpp b/src/wrench/services/compute/cloud/CloudComputeService.cpp index 9d83fd9a9d..61ed126300 100644 --- a/src/wrench/services/compute/cloud/CloudComputeService.cpp +++ b/src/wrench/services/compute/cloud/CloudComputeService.cpp @@ -37,7 +37,6 @@ namespace wrench { * @param property_list: a property list ({} means "use all defaults") * @param messagepayload_list: a message payload list ({} means "use all defaults") * - * @throw std::runtime_error */ CloudComputeService::CloudComputeService(const std::string &hostname, const std::vector &execution_hosts, @@ -85,8 +84,6 @@ namespace wrench { * * @return A VM name * - * @throw ExecutionException - * @throw std::runtime_error */ std::string CloudComputeService::createVM(unsigned long num_cores, double ram_memory, @@ -127,8 +124,6 @@ namespace wrench { * * @param vm_name: the name of the VM * - * @throw ExecutionException - * @throw std::invalid_argument */ void CloudComputeService::shutdownVM(const std::string &vm_name) { this->shutdownVM(vm_name, false, ComputeService::TerminationCause::TERMINATION_NONE); @@ -142,8 +137,6 @@ namespace wrench { * @param send_failure_notifications: whether to send the failure notifications * @param termination_cause: the termination cause (if failure notifications are sent) * - * @throw ExecutionException - * @throw std::invalid_argument */ void CloudComputeService::shutdownVM(const std::string &vm_name, bool send_failure_notifications, ComputeService::TerminationCause termination_cause) { if (this->vm_list.find(vm_name) == this->vm_list.end()) { @@ -174,8 +167,6 @@ namespace wrench { * * @return A BareMetalComputeService that runs on the VM * - * @throw ExecutionException - * @throw std::invalid_argument */ std::shared_ptr CloudComputeService::startVM(const std::string &vm_name) { if (this->vm_list.find(vm_name) == this->vm_list.end()) { @@ -206,8 +197,6 @@ namespace wrench { * * @return A BareMetalComputeService that runs on the VM, or nullptr if none * - * @throw ExecutionException - * @throw std::invalid_argument */ std::shared_ptr CloudComputeService::getVMComputeService(const std::string &vm_name) { if (this->vm_list.find(vm_name) == this->vm_list.end()) { @@ -223,8 +212,6 @@ namespace wrench { * * @return physical host name * - * @throw ExecutionException - * @throw std::invalid_argument */ std::string CloudComputeService::getVMPhysicalHostname(const std::string &vm_name) { if (this->vm_list.find(vm_name) == this->vm_list.end()) { @@ -238,8 +225,6 @@ namespace wrench { * * @param vm_name: the name of the VM * - * @throw ExecutionException - * @throw std::invalid_argument */ void CloudComputeService::suspendVM(const std::string &vm_name) { if (this->vm_list.find(vm_name) == this->vm_list.end()) { @@ -268,8 +253,6 @@ namespace wrench { * * @param vm_name: the name of the VM * - * @throw ExecutionException - * @throw std::invalid_argument */ void CloudComputeService::resumeVM(const std::string &vm_name) { if (this->vm_list.find(vm_name) == this->vm_list.end()) { @@ -298,8 +281,6 @@ namespace wrench { * * @param vm_name: the name of the VM * - * @throw ExecutionException - * @throw std::invalid_argument */ void CloudComputeService::destroyVM(const std::string &vm_name) { if (this->vm_list.find(vm_name) == this->vm_list.end()) { @@ -327,7 +308,6 @@ namespace wrench { * @brief Method to check whether a VM is currently running * @param vm_name: the name of the VM * @return true or false - * @throw std::invalid_argument */ bool CloudComputeService::isVMRunning(const std::string &vm_name) { auto vm_pair_it = this->vm_list.find(vm_name); @@ -345,7 +325,6 @@ namespace wrench { * @brief Method to check whether a VM is currently down * @param vm_name: the name of the VM * @return true or false - * @throw std::invalid_argument */ bool CloudComputeService::isVMDown(const std::string &vm_name) { auto vm_pair_it = this->vm_list.find(vm_name); @@ -363,7 +342,6 @@ namespace wrench { * @brief Method to check whether a VM is currently running * @param vm_name: the name of the VM * @return true or false - * @throw std::invalid_argument */ bool CloudComputeService::isVMSuspended(const std::string &vm_name) { auto vm_pair_it = this->vm_list.find(vm_name); @@ -408,7 +386,6 @@ namespace wrench { // * @param message: message to be sent // * @return a simulation message // * - // * @throw std::runtime_error // */ // template // std::shared_ptr CloudComputeService::sendRequestAndWaitForAnswer(S4U_CommPort *answer_commport, @@ -426,7 +403,6 @@ namespace wrench { * * @return false if the daemon should terminate, true otherwise * - * @throw std::runtime_error */ bool CloudComputeService::processNextMessage() { S4U_Simulation::computeZeroFlop(); @@ -1150,7 +1126,6 @@ namespace wrench { /** * @brief Validate the service's properties * - * @throw std::invalid_argument */ void CloudComputeService::validateProperties() { // VM Boot overhead diff --git a/src/wrench/services/compute/cloud/CloudComputeServiceMessage.cpp b/src/wrench/services/compute/cloud/CloudComputeServiceMessage.cpp index 13721eb15b..f78f66a215 100755 --- a/src/wrench/services/compute/cloud/CloudComputeServiceMessage.cpp +++ b/src/wrench/services/compute/cloud/CloudComputeServiceMessage.cpp @@ -28,7 +28,6 @@ namespace wrench { * @param answer_commport: the commport to which to send the answer * @param payload: the message size in bytes * - * @throw std::invalid_argument */ CloudComputeServiceGetExecutionHostsRequestMessage::CloudComputeServiceGetExecutionHostsRequestMessage( S4U_CommPort *answer_commport, double payload) : CloudComputeServiceMessage(payload) { @@ -64,7 +63,6 @@ namespace wrench { * @param messagepayload_list: a message payload list for the BareMetalComputeService that will run on the VM ({} means "use all defaults") * @param payload: the message size in bytes * - * @throw std::invalid_argument */ CloudComputeServiceCreateVMRequestMessage::CloudComputeServiceCreateVMRequestMessage( S4U_CommPort *answer_commport, @@ -112,7 +110,6 @@ namespace wrench { * @param termination_cause: termination cause (for failure notifications) * @param payload: the message size in bytes * - * @throw std::invalid_argument */ CloudComputeServiceShutdownVMRequestMessage::CloudComputeServiceShutdownVMRequestMessage( S4U_CommPort *answer_commport, @@ -150,7 +147,6 @@ namespace wrench { * @param vm_name: the name of the VM host * @param payload: the message size in bytes * - * @throw std::invalid_argument */ CloudComputeServiceStartVMRequestMessage::CloudComputeServiceStartVMRequestMessage( S4U_CommPort *answer_commport, @@ -187,7 +183,6 @@ namespace wrench { * @param vm_name: the name of the VM host * @param payload: the message size in bytes * - * @throw std::invalid_argument */ CloudComputeServiceSuspendVMRequestMessage::CloudComputeServiceSuspendVMRequestMessage( S4U_CommPort *answer_commport, @@ -221,7 +216,6 @@ namespace wrench { * @param vm_name: the name of the VM host * @param payload: the message size in bytes * - * @throw std::invalid_argument */ CloudComputeServiceResumeVMRequestMessage::CloudComputeServiceResumeVMRequestMessage( S4U_CommPort *answer_commport, @@ -256,7 +250,6 @@ namespace wrench { * @param vm_name: the name of the VM host * @param payload: the message size in bytes * - * @throw std::invalid_argument */ CloudComputeServiceDestroyVMRequestMessage::CloudComputeServiceDestroyVMRequestMessage( S4U_CommPort *answer_commport, diff --git a/src/wrench/services/compute/htcondor/HTCondorCentralManagerService.cpp b/src/wrench/services/compute/htcondor/HTCondorCentralManagerService.cpp index 12af4d5850..98e0be4b2e 100644 --- a/src/wrench/services/compute/htcondor/HTCondorCentralManagerService.cpp +++ b/src/wrench/services/compute/htcondor/HTCondorCentralManagerService.cpp @@ -47,7 +47,6 @@ namespace wrench { * @param property_list: a property list ({} means "use all defaults") * @param messagepayload_list: a message payload list ({} means "use all defaults") * - * @throw std::runtime_error */ HTCondorCentralManagerService::HTCondorCentralManagerService( const std::string &hostname, @@ -103,8 +102,6 @@ namespace wrench { * @param job: a compound job * @param service_specific_args: service specific arguments * - * @throw ExecutionException - * @throw std::runtime_error */ void HTCondorCentralManagerService::submitCompoundJob( std::shared_ptr job, @@ -179,7 +176,6 @@ namespace wrench { * * @return false if the daemon should terminate, true otherwise * - * @throw std::runtime_error */ bool HTCondorCentralManagerService::processNextMessage() { // Wait for a message @@ -253,7 +249,6 @@ namespace wrench { * @param job: the job * @param service_specific_args: service specific arguments * - * @throw std::runtime_error */ void HTCondorCentralManagerService::processSubmitCompoundJob( S4U_CommPort *answer_commport, std::shared_ptr job, @@ -275,7 +270,6 @@ namespace wrench { // * @param job: the job // * @param service_specific_args: service specific arguments // * - // * @throw std::runtime_error // */ // void HTCondorCentralManagerService::processSubmitPilotJob( // const std::string &answer_commport, std::shared_ptr job, @@ -296,7 +290,6 @@ namespace wrench { // * // * @param job: the pilot job // * - // * @throw std::runtime_error // */ // void HTCondorCentralManagerService::processPilotJobStarted(std::shared_ptr job) { // // Forward the notification @@ -313,7 +306,6 @@ namespace wrench { // * // * @param job: the pilot job // * - // * @throw std::runtime_error // */ // void HTCondorCentralManagerService::processPilotJobCompletion(std::shared_ptr job) { // // Forward the notification @@ -330,7 +322,6 @@ namespace wrench { * * @param job: the job * - * @throw std::runtime_error */ void HTCondorCentralManagerService::processCompoundJobCompletion(const std::shared_ptr &job) { WRENCH_INFO("A compound job has completed: %s", job->getName().c_str()); @@ -350,7 +341,6 @@ namespace wrench { * * @param job: the job * - * @throw std::runtime_error */ void HTCondorCentralManagerService::processCompoundJobFailure(const std::shared_ptr &job) { WRENCH_INFO("A compound job has failed: %s", job->getName().c_str()); diff --git a/src/wrench/services/compute/htcondor/HTCondorComputeService.cpp b/src/wrench/services/compute/htcondor/HTCondorComputeService.cpp index e7525a972e..97d6d87d3f 100644 --- a/src/wrench/services/compute/htcondor/HTCondorComputeService.cpp +++ b/src/wrench/services/compute/htcondor/HTCondorComputeService.cpp @@ -37,7 +37,6 @@ namespace wrench { * @param property_list: a property list ({} means "use all defaults") * @param messagepayload_list: a message payload list ({} means "use all defaults") * - * @throw std::runtime_error */ HTCondorComputeService::HTCondorComputeService(const std::string &hostname, const std::set> &compute_services, @@ -124,8 +123,6 @@ namespace wrench { * @param job: a compound job * @param service_specific_args: service specific arguments * - * @throw ExecutionException - * @throw std::runtime_error */ void HTCondorComputeService::submitCompoundJob(std::shared_ptr job, const std::map &service_specific_args) { @@ -210,7 +207,6 @@ namespace wrench { * * @return false if the daemon should terminate, true otherwise * - * @throw std::runtime_error */ bool HTCondorComputeService::processNextMessage() { // Wait for a message @@ -257,7 +253,6 @@ namespace wrench { * @param job: the job * @param service_specific_args: service specific arguments * - * @throw std::runtime_error */ void HTCondorComputeService::processSubmitCompoundJob(S4U_CommPort *answer_commport, const std::shared_ptr &job, diff --git a/src/wrench/services/compute/virtualized_cluster/VirtualizedClusterComputeServiceMessage.cpp b/src/wrench/services/compute/virtualized_cluster/VirtualizedClusterComputeServiceMessage.cpp index 5b3b48147c..e6daa4af0a 100755 --- a/src/wrench/services/compute/virtualized_cluster/VirtualizedClusterComputeServiceMessage.cpp +++ b/src/wrench/services/compute/virtualized_cluster/VirtualizedClusterComputeServiceMessage.cpp @@ -28,7 +28,6 @@ namespace wrench { * @param dest_pm_hostname: the name of the destination physical machine host * @param payload: the message size in bytes * - * @throw std::invalid_argument */ VirtualizedClusterComputeServiceMigrateVMRequestMessage::VirtualizedClusterComputeServiceMigrateVMRequestMessage( S4U_CommPort *answer_commport, diff --git a/src/wrench/services/file_registry/FileRegistryService.cpp b/src/wrench/services/file_registry/FileRegistryService.cpp index 416604beec..32300a7970 100644 --- a/src/wrench/services/file_registry/FileRegistryService.cpp +++ b/src/wrench/services/file_registry/FileRegistryService.cpp @@ -52,9 +52,6 @@ namespace wrench { * @param file: the file to lookup * @return The list locations for the file * - * @throw ExecutionException - * @throw std::invalid_argument - * @throw std::runtime_error */ std::set> FileRegistryService::lookupEntry(const std::shared_ptr &file) { if (file == nullptr) { @@ -124,9 +121,6 @@ namespace wrench { * @brief Add an entry * @param location: a file location * - * @throw ExecutionException - * @throw std::invalid_argument - * @throw std::runtime_error */ void FileRegistryService::addEntry(const std::shared_ptr &location) { @@ -158,9 +152,6 @@ namespace wrench { * @brief Remove an entry * @param location: a file location * - * @throw ExecutionException - * @throw std::invalid_argument - * @throw std::runtime_error */ void FileRegistryService::removeEntry(const std::shared_ptr &location) { if (location == nullptr) { diff --git a/src/wrench/services/helper_services/action_execution_service/ActionExecutionService.cpp b/src/wrench/services/helper_services/action_execution_service/ActionExecutionService.cpp index a6c52ca70a..b4a48fddc9 100644 --- a/src/wrench/services/helper_services/action_execution_service/ActionExecutionService.cpp +++ b/src/wrench/services/helper_services/action_execution_service/ActionExecutionService.cpp @@ -68,7 +68,6 @@ namespace wrench { * @brief Helper static method to parse resource specifications to the format * @param spec: specification string * @return a tuple - * @throw std::invalid_argument */ static std::tuple parseResourceSpec(const std::string &spec) { std::vector tokens; @@ -521,7 +520,6 @@ namespace wrench { * * @return false if the daemon should terminate, true otherwise * - * @throw std::runtime_error */ bool ActionExecutionService::processNextMessage() { S4U_Simulation::computeZeroFlop(); @@ -720,8 +718,6 @@ namespace wrench { * @param action: an action * @param termination_cause: termination cause * - * @throw ExecutionException - * @throw std::runtime_error */ void ActionExecutionService::terminateAction(std::shared_ptr action, ComputeService::TerminationCause termination_cause) { @@ -1059,7 +1055,6 @@ namespace wrench { /** * @brief Method to make sure that property specs are valid * - * @throw std::invalid_argument */ void ActionExecutionService::validateProperties() { bool success = true; diff --git a/src/wrench/services/helper_services/action_executor/ActionExecutor.cpp b/src/wrench/services/helper_services/action_executor/ActionExecutor.cpp index cf529e1f07..9983a394f3 100644 --- a/src/wrench/services/helper_services/action_executor/ActionExecutor.cpp +++ b/src/wrench/services/helper_services/action_executor/ActionExecutor.cpp @@ -123,7 +123,6 @@ namespace wrench { * * @return 1 if a failure timestamp should be generated, 0 otherwise * - * @throw std::runtime_error */ int ActionExecutor::main() { S4U_Simulation::computeZeroFlop();// to block in case pstate speed is 0 diff --git a/src/wrench/services/helper_services/alarm/Alarm.cpp b/src/wrench/services/helper_services/alarm/Alarm.cpp index 171985ef97..4b0410149e 100755 --- a/src/wrench/services/helper_services/alarm/Alarm.cpp +++ b/src/wrench/services/helper_services/alarm/Alarm.cpp @@ -79,8 +79,6 @@ namespace wrench { * @param suffix: a (possibly empty) suffix to append to the daemon name (useful in debug output) * @return a shared_ptr reference to the alarm service * - * @throw std::shared_ptr - * @throw std::runtime_error */ std::shared_ptr Alarm::createAndStartAlarm(Simulation *simulation, double date, std::string hostname, diff --git a/src/wrench/services/metering/BandwidthMeterService.cpp b/src/wrench/services/metering/BandwidthMeterService.cpp index 0f14f5345d..e13c76116d 100644 --- a/src/wrench/services/metering/BandwidthMeterService.cpp +++ b/src/wrench/services/metering/BandwidthMeterService.cpp @@ -75,8 +75,6 @@ namespace wrench { /** * @brief Stop the bandwidth meter * - * @throw ExecutionException - * @throw std::runtime_error */ void BandwidthMeterService::stop() { this->commport->putMessage( @@ -140,7 +138,6 @@ namespace wrench { * @brief Process the next message * @return true if the daemon should continue, false otherwise * - * @throw std::runtime_error */ bool BandwidthMeterService::processNextMessage(double timeout) { diff --git a/src/wrench/services/metering/EnergyMeterService.cpp b/src/wrench/services/metering/EnergyMeterService.cpp index d49bbd4c74..e6bdb96878 100755 --- a/src/wrench/services/metering/EnergyMeterService.cpp +++ b/src/wrench/services/metering/EnergyMeterService.cpp @@ -78,8 +78,6 @@ namespace wrench { /** * @brief Stop the energy meter * - * @throw ExecutionException - * @throw std::runtime_error */ void EnergyMeterService::stop() { this->commport->putMessage(new ServiceStopDaemonMessage(nullptr, false, ComputeService::TerminationCause::TERMINATION_NONE, 0.0)); @@ -139,7 +137,6 @@ namespace wrench { * @brief Process the next message * @return true if the daemon should continue, false otherwise * - * @throw std::runtime_error */ bool EnergyMeterService::processNextMessage(double timeout) { diff --git a/src/wrench/services/network_proximity/NetworkProximityService.cpp b/src/wrench/services/network_proximity/NetworkProximityService.cpp index b36668f879..615cd2de82 100644 --- a/src/wrench/services/network_proximity/NetworkProximityService.cpp +++ b/src/wrench/services/network_proximity/NetworkProximityService.cpp @@ -85,8 +85,6 @@ namespace wrench { * - a (x,y) coordinate pair * - a timestamp (the oldest timestamp of measurements used to compute the coordinate) * - * @throw WorkFlowExecutionException - * @throw std::runtime_error */ std::pair, double> NetworkProximityService::getHostCoordinate(const std::string& requested_host) { @@ -123,9 +121,6 @@ namespace wrench { * @return A pair: * - The proximity value between the pair of hosts (or DBL_MAX if none) * - The timestamp of the oldest measurement use to compute the proximity value (or -1.0 if none) - * - * @throw ExecutionException - * @throw std::runtime_error */ std::pair NetworkProximityService::getHostPairDistance(std::pair hosts) { assertServiceIsUp(); @@ -476,7 +471,6 @@ namespace wrench { /** * @brief Internal method to validate Network Proximity Service Properties - * @throw std::invalid_argument */ void NetworkProximityService::validateProperties() { std::string error_prefix = "NetworkProximityService::NetworkProximityService(): "; diff --git a/src/wrench/services/storage/StorageService.cpp b/src/wrench/services/storage/StorageService.cpp index 29b2dd31df..9cfaae3e36 100755 --- a/src/wrench/services/storage/StorageService.cpp +++ b/src/wrench/services/storage/StorageService.cpp @@ -33,7 +33,6 @@ namespace wrench { * @param hostname: the name of the host on which the service should run * @param service_name: the name of the storage service * - * @throw std::invalid_argument */ StorageService::StorageService(const std::string &hostname, const std::string &service_name) : Service(hostname, service_name) { @@ -102,7 +101,6 @@ namespace wrench { * @param num_bytes_to_write: the number of bytes to write to the file. * @param wait_for_answer: whether to wait for the answer * - * @throw ExecutionException */ void StorageService::writeFile(S4U_CommPort *answer_commport, const std::shared_ptr &location, @@ -315,8 +313,6 @@ namespace wrench { * * @param locations: a map of files to locations * - * @throw std::runtime_error - * @throw ExecutionException */ void StorageService::readFiles(std::map, std::shared_ptr> locations) { StorageService::writeOrReadFiles(READ, std::move(locations)); @@ -327,8 +323,6 @@ namespace wrench { * * @param locations: a map of files to locations * - * @throw std::runtime_error - * @throw ExecutionException */ void StorageService::writeFiles(std::map, std::shared_ptr> locations) { StorageService::writeOrReadFiles(WRITE, std::move(locations)); @@ -340,8 +334,6 @@ namespace wrench { * @param action: FileOperation::READ (download) or FileOperation::WRITE * @param locations: a map of files to locations * - * @throw std::runtime_error - * @throw ExecutionException */ void StorageService::writeOrReadFiles(FileOperation action, std::map, std::shared_ptr> locations) { @@ -427,8 +419,6 @@ namespace wrench { * @param src_location: the location where to read the file * @param dst_location: the location where to write the file * - * @throw ExecutionException - * @throw std::invalid_argument */ void StorageService::copyFile(const std::shared_ptr &src_location, const std::shared_ptr &dst_location) { @@ -499,9 +489,6 @@ namespace wrench { * @param src_location: the source location * @param dst_location: the destination location * - * @throw ExecutionException - * @throw std::invalid_argument - * */ void StorageService::initiateFileCopy(S4U_CommPort *answer_commport, const std::shared_ptr &src_location, @@ -556,7 +543,6 @@ namespace wrench { // * // * @param location: a file location, must be the same object as the function is invoked on // * - // * @throw std::invalid_argument // */ // void StorageService::createFile(const std::shared_ptr &location) { // if (location->getStorageService() != this->getSharedPtr()) { diff --git a/src/wrench/services/storage/StorageServiceMessage.cpp b/src/wrench/services/storage/StorageServiceMessage.cpp index ca3dd1a69d..4bd75175fa 100644 --- a/src/wrench/services/storage/StorageServiceMessage.cpp +++ b/src/wrench/services/storage/StorageServiceMessage.cpp @@ -34,7 +34,6 @@ namespace wrench { * @param path: the path * @param payload: the message size in bytes * - * @throw std::invalid_argument */ StorageServiceFreeSpaceRequestMessage::StorageServiceFreeSpaceRequestMessage(S4U_CommPort *answer_commport, const std::string &path, @@ -59,7 +58,6 @@ namespace wrench { * @param free_space: the free space, in bytes, at each mount point, as a map * @param payload: the message size in bytes * - * @throw std::invalid_argument */ StorageServiceFreeSpaceAnswerMessage::StorageServiceFreeSpaceAnswerMessage( double free_space, double payload) @@ -72,8 +70,6 @@ namespace wrench { * @param answer_commport: the commport to which to send the answer * @param location: the file location (hopefully) * @param payload: the message size in bytes - * - * @throw std::invalid_argument */ StorageServiceFileLookupRequestMessage::StorageServiceFileLookupRequestMessage(S4U_CommPort *answer_commport, const std::shared_ptr &location, @@ -95,7 +91,6 @@ namespace wrench { * @param file_is_available: true if the file is available on the storage system * @param payload: the message size in bytes * - * @throw std::invalid_argument */ StorageServiceFileLookupAnswerMessage::StorageServiceFileLookupAnswerMessage(std::shared_ptr file, bool file_is_available, @@ -117,7 +112,6 @@ namespace wrench { * @param location: the location * @param payload: the message size in bytes * - * @throw std::invalid_argument */ StorageServiceFileDeleteRequestMessage::StorageServiceFileDeleteRequestMessage(S4U_CommPort *answer_commport, const std::shared_ptr &location, @@ -141,7 +135,6 @@ namespace wrench { * @param failure_cause: the cause of a failure (nullptr means "no failure") * @param payload: the message size in bytes * - * @throw std::invalid_argument */ StorageServiceFileDeleteAnswerMessage::StorageServiceFileDeleteAnswerMessage(std::shared_ptr file, std::shared_ptr storage_service, @@ -170,7 +163,6 @@ namespace wrench { * @param dst: the destination location * @param payload: the message size in bytes * - * @throw std::invalid_argument */ StorageServiceFileCopyRequestMessage::StorageServiceFileCopyRequestMessage(S4U_CommPort *answer_commport, std::shared_ptr src, @@ -195,7 +187,6 @@ namespace wrench { * @param failure_cause: the cause of a failure (nullptr if success==true) * @param payload: the message size in bytes * - * @throw std::invalid_argument */ StorageServiceFileCopyAnswerMessage::StorageServiceFileCopyAnswerMessage(std::shared_ptr src, std::shared_ptr dst, @@ -225,7 +216,6 @@ namespace wrench { * @param num_bytes_to_write: the number of bytes to write to the file * @param payload: the message size in bytes * - * @throw std::invalid_argument */ StorageServiceFileWriteRequestMessage::StorageServiceFileWriteRequestMessage(S4U_CommPort *answer_commport, simgrid::s4u::Host *requesting_host, @@ -254,7 +244,6 @@ namespace wrench { * @param buffer_size: the buffer size to use * @param payload: the message size in bytes * - * @throw std::invalid_argument */ StorageServiceFileWriteAnswerMessage::StorageServiceFileWriteAnswerMessage(std::shared_ptr &location, bool success, @@ -286,7 +275,6 @@ namespace wrench { * @param num_bytes_to_read: the number of bytes to read * @param payload: the message size in bytes * - * @throw std::invalid_argument */ StorageServiceFileReadRequestMessage::StorageServiceFileReadRequestMessage(S4U_CommPort *answer_commport, @@ -313,7 +301,6 @@ namespace wrench { * @brief Constructor * @param other: packet to copy * - * @throw std::invalid_argument */ StorageServiceFileReadRequestMessage::StorageServiceFileReadRequestMessage(StorageServiceFileReadRequestMessage &other) : StorageServiceFileReadRequestMessage(&other) { } @@ -322,7 +309,6 @@ namespace wrench { * @brief Constructor * @param other: packet to copy * - * @throw std::invalid_argument */ StorageServiceFileReadRequestMessage::StorageServiceFileReadRequestMessage(StorageServiceFileReadRequestMessage *other) : StorageServiceMessage(other->payload), answer_commport(other->answer_commport), location(other->location), num_bytes_to_read(other->num_bytes_to_read) { } @@ -337,7 +323,6 @@ namespace wrench { * @param number_of_sources: the number of sources that will send file chunks over * @param payload: the message size in bytes * - * @throw std::invalid_argument */ StorageServiceFileReadAnswerMessage::StorageServiceFileReadAnswerMessage(std::shared_ptr location, bool success, diff --git a/src/wrench/services/storage/compound/CompoundStorageService.cpp b/src/wrench/services/storage/compound/CompoundStorageService.cpp index 5c35a58482..c1bf480658 100644 --- a/src/wrench/services/storage/compound/CompoundStorageService.cpp +++ b/src/wrench/services/storage/compound/CompoundStorageService.cpp @@ -147,8 +147,6 @@ namespace wrench { * * @param message: the simulation message to process * - * @throw std::runtime_error when receiving an unexpected message type. - * * @return false if the daemon should terminate */ bool CompoundStorageService::processNextMessage(SimulationMessage *message) { @@ -815,7 +813,6 @@ namespace wrench { * @param num_bytes_to_write: number of bytes to write to the file * @param wait_for_answer: whether to wait for the answer * - * @throw ExecutionException */ void CompoundStorageService::writeFile(S4U_CommPort *answer_commport /*unused*/, const std::shared_ptr &location, @@ -1147,8 +1144,6 @@ namespace wrench { * * @return The free space in bytes at the path * - * @throw ExecutionException - * */ double CompoundStorageService::getTotalFreeSpaceAtPath(const std::string &path) { WRENCH_DEBUG("CSS::getFreeSpace Forwarding request to internal services"); @@ -1165,7 +1160,6 @@ namespace wrench { /** * @brief setIsScratch can't be used on a CompoundStorageService because it doesn't have any actual storage resources. * @param is_scratch true or false - * @throw std::logic_error */ void CompoundStorageService::setIsScratch(bool is_scratch) { WRENCH_WARN("CSS::setScratch Forbidden because CompoundStorageService doesn't manage any storage resources itself"); @@ -1242,8 +1236,6 @@ namespace wrench { * * @param ack_commport: the commport to which the ack should be sent * - * @throw wrench::ExecutionException if communication fails. - * * @return false if the daemon should terminate */ bool CompoundStorageService::processStopDaemonRequest(S4U_CommPort *ack_commport) { diff --git a/src/wrench/services/storage/compound/CompoundStorageServiceMessage.cpp b/src/wrench/services/storage/compound/CompoundStorageServiceMessage.cpp index de266acd03..5808a64b2e 100644 --- a/src/wrench/services/storage/compound/CompoundStorageServiceMessage.cpp +++ b/src/wrench/services/storage/compound/CompoundStorageServiceMessage.cpp @@ -26,7 +26,6 @@ namespace wrench { * @param stripe_count: the strip count * @param payload: the message size in bytes * - * @throw std::invalid_argument */ CompoundStorageAllocationRequestMessage::CompoundStorageAllocationRequestMessage(S4U_CommPort *answer_commport, std::shared_ptr file, @@ -49,7 +48,6 @@ namespace wrench { * @param locations: Existing or newly allocated FileLocations for requested file * @param payload: the message size in bytes * - * @throw std::invalid_argument */ CompoundStorageAllocationAnswerMessage::CompoundStorageAllocationAnswerMessage( std::vector> locations, double payload) @@ -63,7 +61,6 @@ namespace wrench { * @param file: the file for which storage allocation is requested * @param payload: the message size in bytes * - * @throw std::invalid_argument */ CompoundStorageLookupRequestMessage::CompoundStorageLookupRequestMessage(S4U_CommPort *answer_commport, std::shared_ptr file, double payload) @@ -83,7 +80,6 @@ namespace wrench { * @param locations: Known FileLocations for requested file * @param payload: the message size in bytes * - * @throw std::invalid_argument */ CompoundStorageLookupAnswerMessage::CompoundStorageLookupAnswerMessage( std::vector> locations, double payload) diff --git a/src/wrench/services/storage/simple/SimpleStorageService.cpp b/src/wrench/services/storage/simple/SimpleStorageService.cpp index 0c98ce2157..a8bc033183 100644 --- a/src/wrench/services/storage/simple/SimpleStorageService.cpp +++ b/src/wrench/services/storage/simple/SimpleStorageService.cpp @@ -97,7 +97,6 @@ namespace wrench { * @param messagepayload_list: a message payload list ({} means "use all defaults") * @param suffix: the suffix (for the service name) * - * @throw std::invalid_argument */ SimpleStorageService::SimpleStorageService( const std::string &hostname, diff --git a/src/wrench/services/storage/storage_helper_classes/FileLocation.cpp b/src/wrench/services/storage/storage_helper_classes/FileLocation.cpp index 7d45a00d86..6840d112db 100755 --- a/src/wrench/services/storage/storage_helper_classes/FileLocation.cpp +++ b/src/wrench/services/storage/storage_helper_classes/FileLocation.cpp @@ -83,7 +83,6 @@ namespace wrench { * @param file: a file * @return a file location specification * - * @throw std::invalid_argument */ std::shared_ptr FileLocation::SCRATCH(const std::shared_ptr &file) { if (file == nullptr) { @@ -100,7 +99,6 @@ namespace wrench { * @param file: a file * @return a file location specification * - * @throw std::invalid_argument */ std::shared_ptr FileLocation::LOCATION(const std::shared_ptr &ss, const std::shared_ptr &file) { if (!ss or !file) { @@ -118,7 +116,6 @@ namespace wrench { * @param file: a file * @return a file location specification * - * @throw std::invalid_argument */ std::shared_ptr FileLocation::LOCATION(const std::shared_ptr &ss, const std::shared_ptr &server_ss, @@ -141,7 +138,6 @@ namespace wrench { * @param path: a path * @return a file location specification * - * @throw std::invalid_argument */ std::shared_ptr FileLocation::LOCATION(const std::shared_ptr &ss, const std::string &path, diff --git a/src/wrench/services/storage/storage_helper_classes/FileTransferThread.cpp b/src/wrench/services/storage/storage_helper_classes/FileTransferThread.cpp index 3e3b662667..60eeaa52a4 100644 --- a/src/wrench/services/storage/storage_helper_classes/FileTransferThread.cpp +++ b/src/wrench/services/storage/storage_helper_classes/FileTransferThread.cpp @@ -275,7 +275,6 @@ namespace wrench { * @param commport: the source commport * @param location: the destination location * - * @throw shared_ptr */ void FileTransferThread::receiveFileFromNetwork(const std::shared_ptr &f, S4U_CommPort *commport, @@ -394,7 +393,6 @@ namespace wrench { * @param num_bytes: number of bytes to transfer * @param commport: the destination commport * - * @throw shared_ptr */ void FileTransferThread::sendLocalFileToNetwork(const std::shared_ptr &f, const std::shared_ptr &location, diff --git a/src/wrench/services/storage/storage_helper_classes/LogicalFileSystem.cpp b/src/wrench/services/storage/storage_helper_classes/LogicalFileSystem.cpp deleted file mode 100644 index 2937a2cf1a..0000000000 --- a/src/wrench/services/storage/storage_helper_classes/LogicalFileSystem.cpp +++ /dev/null @@ -1,374 +0,0 @@ -///** -// * Copyright (c) 2017. The WRENCH Team. -// * -// * This program is free software: you can redistribute it and/or modify -// * it under the terms of the GNU General Public License as published by -// * the Free Software Foundation, either version 3 of the License, or -// * (at your option) any later version. -// */ -// -//#include -//#include -//#include -//#include -// -//#include -//#include -// -//WRENCH_LOG_CATEGORY(wrench_core_logical_file_system, "Log category for Logical File System"); -// -// -//namespace wrench { -// -// const std::string LogicalFileSystem::DEV_NULL = "/dev/null"; -// std::set LogicalFileSystem::mount_points; -// -// /** -// * @brief Method to create a LogicalFileSystem instance -// * @param hostname hostname on which the disk is mounted -// * @param storage_service storage service for which this file system is created -// * @param mount_point the mountpoint -// * @param eviction_policy the cache eviction policy ("NONE", "LRU") -// * @return a shared pointer to a LogicalFileSystem instance -// */ -// std::unique_ptr LogicalFileSystem::createLogicalFileSystem(const std::string &hostname, -// StorageService *storage_service, -// const std::string &mount_point, -// const std::string &eviction_policy) { -// -// if (storage_service == nullptr) { -// throw std::invalid_argument("LogicalFileSystem::createLogicalFileSystem(): nullptr storage_service argument"); -// } -// -// // Check for uniqueness -// auto key = hostname + ":" + mount_point; -// if (mount_point != DEV_NULL) { -// auto lfs = LogicalFileSystem::mount_points.find(key); -// -// if (lfs != LogicalFileSystem::mount_points.end()) { -// throw std::invalid_argument("LogicalFileSystem::createLogicalFileSystem(): A logical file system, used by some storage service, " -// "already exist on host " + -// hostname + " at mount point " + mount_point); -// } -// } -// -// // std::cerr << "CREATING LOGICAL FS " << hostname << ":" << mount_point << "\n"; -// std::unique_ptr to_return; -// if (eviction_policy == "NONE") { -// to_return = std::unique_ptr(new LogicalFileSystemNoCaching(hostname, storage_service, mount_point)); -// } else if (eviction_policy == "LRU") { -// to_return = std::unique_ptr(new LogicalFileSystemLRUCaching(hostname, storage_service, mount_point)); -// } else { -// throw std::invalid_argument("LogicalFileSystem::createLogicalFileSystem(): Unknown cache eviction policy " + eviction_policy); -// } -// LogicalFileSystem::mount_points.insert(key); -// -// // std::cerr << "CREATED LOGICAL FS " << hostname << ":" << mount_point << "\n"; -// return to_return; -// } -// -// -// /** -// * @brief Constructor -// * @param hostname the host on which this file system runs -// * @param storage_service the storage service for which this file system runs -// * @param mount_point the mount point at the host -// */ -// LogicalFileSystem::LogicalFileSystem(const std::string &hostname, StorageService *storage_service, -// const std::string &mount_point) { -// -// this->hostname = hostname; -// this->storage_service = storage_service; -// this->content["/"] = {}; -// -// if (mount_point == DEV_NULL) { -// devnull = true; -// this->total_capacity = std::numeric_limits::infinity(); -// } else { -// devnull = false; -// this->mount_point = FileLocation::sanitizePath("/" + mount_point + "/"); -// // Check validity -// this->disk = S4U_Simulation::hostHasMountPoint(hostname, mount_point); -// if (not this->disk) { -// throw std::invalid_argument("LogicalFileSystem::LogicalFileSystem(): Host " + -// hostname + " does not have a disk mounted at " + mount_point); -// } -// this->total_capacity = S4U_Simulation::getDiskCapacity(hostname, mount_point); -// } -// this->free_space = this->total_capacity; -// this->mount_point = mount_point; -// } -// -// /** -// * @brief Create a new directory -// * -// * @param absolute_path: the directory's absolute path -// * @throw std::invalid_argument -// */ -// void LogicalFileSystem::createDirectory(const std::string &absolute_path) { -// if (devnull) { -// return; -// } -// auto fixed_path = FileLocation::sanitizePath(absolute_path + "/"); -// assertDirectoryDoesNotExist(fixed_path); -// this->content[fixed_path] = {}; -// } -// -// /** -// * @brief Checks whether a directory exists -// * @param absolute_path the directory's absolute path -// * @return true if the directory exists -// */ -// bool LogicalFileSystem::doesDirectoryExist(const std::string &absolute_path) { -// if (devnull) { -// return false; -// } -// if (absolute_path == "/") {// Common case -// return true; -// } else { -// auto fixed_path = FileLocation::sanitizePath(absolute_path + "/"); -// return (this->content.find(fixed_path) != this->content.end()); -// } -// } -// -// /** -// * @brief Checks whether a directory is empty -// * @param absolute_path: the directory's absolute path -// * @return true if the directory is empty -// * -// * @throw std::invalid_argument -// */ -// bool LogicalFileSystem::isDirectoryEmpty(const std::string &absolute_path) { -// if (devnull) { -// return true; -// } -// auto fixed_path = FileLocation::sanitizePath(absolute_path + "/"); -// assertDirectoryExist(fixed_path); -// return (this->content[fixed_path].empty()); -// } -// -// /** -// * @brief Remove an empty directory -// * @param absolute_path: the directory's absolute path -// * -// * @throw std::invalid_argument -// */ -// void LogicalFileSystem::removeEmptyDirectory(const std::string &absolute_path) { -// if (devnull) { -// return; -// } -// auto fixed_path = FileLocation::sanitizePath(absolute_path + "/"); -// assertDirectoryExist(fixed_path); -// assertDirectoryIsEmpty(fixed_path); -// this->content.erase(fixed_path); -// } -// -// -// /** -// * @brief Checks whether a file is in a directory -// * @param file: the file -// * @param absolute_path: the directory's absolute path -// * -// * @return true if the file is present, false if not (or if directory does not exist) -// * -// * @throw std::invalid_argument -// */ -// bool LogicalFileSystem::isFileInDirectory(const std::shared_ptr &file, const std::string &absolute_path) { -// if (devnull) { -// return false; -// } -// if (absolute_path == "/") { -// return (this->content["/"].find(file) != this->content["/"].end()); -// } -// -// auto fixed_path = FileLocation::sanitizePath(absolute_path + "/"); -// -// // If directory does not exist, say "no" -// if (not doesDirectoryExist(fixed_path)) { -// return false; -// } -// -// return (this->content[fixed_path].find(file) != this->content[fixed_path].end()); -// } -// -// /** -// * @brief Get the files in a directory as a set -// * @param absolute_path: the directory's absolute path -// * -// * @return a set of files -// * -// * @throw std::invalid_argument -// */ -// std::set> LogicalFileSystem::listFilesInDirectory(const std::string &absolute_path) { -// std::set> to_return; -// if (devnull) { -// return {}; -// } -// auto fixed_path = FileLocation::sanitizePath(absolute_path + "/"); -// -// assertDirectoryExist(fixed_path); -// for (auto const &f: this->content[fixed_path]) { -// to_return.insert(f.first); -// } -// return to_return; -// } -// -// /** -// * @brief -// * @return Total number of files currently stored in Filesytem -// * -// */ -// double LogicalFileSystem::getTotalNumFiles() const { -// -// double files = 0; -// -// for (const auto &item: this->content) { -// files += item.second.size(); -// } -// -// return files; -// } -// -// /** -// * @brief Get the total capacity -// * @return the total capacity -// */ -// double LogicalFileSystem::getTotalCapacity() const { -// return this->total_capacity; -// } -// -// /** -// * @brief Get the file system's free space -// * @return the free space in bytes -// */ -// double LogicalFileSystem::getFreeSpace() const { -// return this->free_space; -// } -// -// /** -// * @brief Reserve space for a file that will be stored -// * @param file: the file -// * @param absolute_path: the path where it will be written -// * -// * @return true on success, false on failure -// */ -// bool LogicalFileSystem::reserveSpace(const std::shared_ptr &file, -// const std::string &absolute_path) { -// if (devnull) { -// return true; -// } -// -// std::string fixed_path = "/"; -// if (absolute_path != "/") { -// fixed_path = FileLocation::sanitizePath(absolute_path + "/"); -// } -// -// -// std::string key = fixed_path + file->getID(); -// if (this->reserved_space.find(key) != this->reserved_space.end()) { -// WRENCH_WARN("LogicalFileSystem::reserveSpace(): Space was already being reserved for storing file %s at path %s:%s. " -// "This is likely a redundant copy, and nothing needs to be done", -// file->getID().c_str(), this->hostname.c_str(), fixed_path.c_str()); -// return true; -// } -// -// if (this->free_space < file->getSize()) { -// if (!this->evictFiles(file->getSize())) { -// return false; -// } -// } -// -// this->reserved_space[key] = file->getSize(); -// this->free_space -= file->getSize(); -// return true; -// } -// -// /** -// * @brief Unreserved space that was saved for a file (likely a failed transfer) -// * @param file: the file -// * @param absolute_path: the path where it would have been written -// * @throw std::invalid_argument -// */ -// void LogicalFileSystem::unreserveSpace(const std::shared_ptr &file, const std::string &absolute_path) { -// -// if (this->devnull) { -// return; -// } -// -// std::string fixed_path = "/"; -// if (absolute_path != "/") { -// fixed_path = FileLocation::sanitizePath(absolute_path + "/"); -// } -// -// std::string key = fixed_path + file->getID(); -// -// if (this->reserved_space.find(key) == this->reserved_space.end()) { -// return;// oh well, the transfer was cancelled/terminated/whatever -// } -// -// this->reserved_space.erase(key); -// this->free_space += file->getSize(); -// } -// -// -// /** -// * @brief Retrieve the file's last write date -// * @param file: the file -// * @param absolute_path: the file path -// * @return a date in seconds (returns -1.0) if file in not found -// */ -// double LogicalFileSystem::getFileLastWriteDate(const shared_ptr &file, const string &absolute_path) { -// -// if (devnull) { -// return -1; -// } -// auto fixed_path = FileLocation::sanitizePath(absolute_path + "/"); -// -// // If directory does not exist, say "no" -// if (not doesDirectoryExist(fixed_path)) { -// return -1; -// } -// -// if (this->content[fixed_path].find(file) != this->content[fixed_path].end()) { -// return (this->content[fixed_path][file]->last_write_date); -// } else { -// return -1; -// } -// } -// -// -// /** -// * @brief Get the disk on which this file system runs -// * @return The SimGrid disk on which this file system is mounted -// */ -// simgrid::s4u::Disk *LogicalFileSystem::getDisk() { -// return this->disk; -// } -// -// -// /** -// * @brief Stage file in directory -// * @param file: the file to stage -// * @param absolute_path: the directory's absolute path (at the mount point) -// * -// * @throw std::invalid_argument -// */ -// void LogicalFileSystem::stageFile(const std::shared_ptr &file, std::string absolute_path) { -// if (devnull) { -// return; -// } -// -// // std::cerr << "LOGICAL FILE SYSTEM: STAGING FILE\n"; -// // If Space is not sufficient, forget it -// if (this->free_space < file->getSize()) { -// // std::cerr << "FREE SPACE = " << this->free_space << "\n"; -// throw std::invalid_argument("LogicalFileSystem::stageFile(): Insufficient space to store file " + -// file->getID() + " at " + this->hostname + ":" + absolute_path); -// } -// -// auto fixed_path = FileLocation::sanitizePath(absolute_path + "/"); -// -// this->storeFileInDirectory(file, fixed_path); -// } -// -//}// namespace wrench diff --git a/src/wrench/services/storage/storage_helper_classes/LogicalFileSystemLRUCaching.cpp b/src/wrench/services/storage/storage_helper_classes/LogicalFileSystemLRUCaching.cpp deleted file mode 100755 index e4eefae3ca..0000000000 --- a/src/wrench/services/storage/storage_helper_classes/LogicalFileSystemLRUCaching.cpp +++ /dev/null @@ -1,227 +0,0 @@ -///** -// * Copyright (c) 2017. The WRENCH Team. -// * -// * This program is free software: you can redistribute it and/or modify -// * it under the terms of the GNU General Public License as published by -// * the Free Software Foundation, either version 3 of the License, or -// * (at your option) any later version. -// */ -// -//#include -//#include -// -//#include -//#include -// -//WRENCH_LOG_CATEGORY(wrench_core_logical_file_system_lru_caching, "Log category for Logical File System LRU Caching"); -// -// -//namespace wrench { -// -// /** -// * @brief Constructor -// * @param hostname: the host on which the file system is located -// * @param storage_service: the storage service this file system is for -// * @param mount_point: the mount point, defaults to /dev/null -// */ -// LogicalFileSystemLRUCaching::LogicalFileSystemLRUCaching(const std::string &hostname, StorageService *storage_service, const std::string &mount_point) -// : LogicalFileSystem(hostname, storage_service, mount_point) { -// } -// -// -// /** -// * @brief Store file in directory -// * -// * @param file: the file to store -// * @param absolute_path: the directory's absolute path (at the mount point) -// * -// * @throw std::invalid_argument -// */ -// void LogicalFileSystemLRUCaching::storeFileInDirectory(const std::shared_ptr &file, const std::string &absolute_path) { -// if (devnull) { -// return; -// } -// auto fixed_path = FileLocation::sanitizePath(absolute_path + "/"); -// -// // If directory does not exit, create it -// if (not doesDirectoryExist(fixed_path)) { -// createDirectory(fixed_path); -// } -// -// bool file_already_there = this->content[fixed_path].find(file) != this->content[fixed_path].end(); -// -// // If the file was already there, remove its LRU entry -// if (file_already_there) { -// unsigned old_seq = std::static_pointer_cast(this->content[fixed_path][file])->lru_sequence_number; -// this->lru_list.erase(old_seq); -// } -// -// this->content[fixed_path][file] = std::make_shared(S4U_Simulation::getClock(), this->next_lru_sequence_number++, 0); -// this->lru_list[this->next_lru_sequence_number - 1] = std::make_tuple(fixed_path, file); -// -// std::string key = FileLocation::sanitizePath(fixed_path) + file->getID(); -// if (this->reserved_space.find(key) != this->reserved_space.end()) { -// this->reserved_space.erase(key); -// } else if (not file_already_there) { -// this->free_space -= file->getSize(); -// } -// } -// -// /** -// * @brief Remove a file in a directory -// * @param file: the file to remove -// * @param absolute_path: the directory's absolute path -// * -// * @throw std::invalid_argument -// */ -// void LogicalFileSystemLRUCaching::removeFileFromDirectory(const std::shared_ptr &file, const std::string &absolute_path) { -// if (devnull) { -// return; -// } -// auto fixed_path = FileLocation::sanitizePath(absolute_path + "/"); -// -// assertDirectoryExist(fixed_path); -// assertFileIsInDirectory(file, fixed_path); -// auto seq = std::static_pointer_cast(this->content[fixed_path][file])->lru_sequence_number; -// this->content[fixed_path].erase(file); -// this->lru_list.erase(seq); -// // print_lru_list(); -// this->free_space += file->getSize(); -// } -// -// /** -// * @brief Remove all files in a directory -// * @param absolute_path: the directory's absolute path -// * -// * @throw std::invalid_argument -// */ -// void LogicalFileSystemLRUCaching::removeAllFilesInDirectory(const std::string &absolute_path) { -// if (devnull) { -// return; -// } -// auto fixed_path = FileLocation::sanitizePath(absolute_path + "/"); -// -// assertDirectoryExist(fixed_path); -// double freed_space = 0; -// for (auto const &s: this->content[fixed_path]) { -// freed_space += s.first->getSize(); -// } -// for (auto const &c: this->content[fixed_path]) { -// this->lru_list.erase(std::static_pointer_cast(c.second)->lru_sequence_number); -// } -// -// this->content[fixed_path].clear(); -// this->free_space += freed_space; -// } -// -// -// /** -// * @brief Update a file's read date -// * @param file: the file -// * @param absolute_path: the path -// */ -// void LogicalFileSystemLRUCaching::updateReadDate(const std::shared_ptr &file, const std::string &absolute_path) { -// if (devnull) { -// return; -// } -// auto fixed_path = FileLocation::sanitizePath(absolute_path + "/"); -// -// // If directory does not exist, do nothing -// if (not doesDirectoryExist(fixed_path)) { -// return; -// } -// -// if (this->content[fixed_path].find(file) != this->content[fixed_path].end()) { -// unsigned new_seq = this->next_lru_sequence_number++; -// unsigned old_seq = std::static_pointer_cast(this->content[fixed_path][file])->lru_sequence_number; -// this->lru_list.erase(old_seq); -// std::static_pointer_cast(this->content[fixed_path][file])->lru_sequence_number = new_seq; -// this->lru_list[new_seq] = std::make_tuple(fixed_path, file); -// // print_lru_list(); -// } -// } -// -// /** -// * @brief Evict LRU files to create some free space -// * @param needed_free_space: the needed free space -// * @return true on success, false on failure -// */ -// bool LogicalFileSystemLRUCaching::evictFiles(double needed_free_space) { -// -// // Easy case: there is already enough space without evicting anything -// if (this->free_space >= needed_free_space) { -// return true; -// } -// -// // Otherwise, we have to try to evict evictable files -// // The worst-case complexity is O(n) here, but we expect -// // very few files to not be evictable. Besides, non-evictable -// // files are likely recently used anyway. -// std::vector to_evict; -// double freeable_space = 0; -// for (auto const &lru: this->lru_list) { -// auto path = std::get<0>(lru.second); -// auto file = std::get<1>(lru.second); -// if (std::static_pointer_cast(this->content[path][file])->num_current_transactions > 0) { -// // std::cerr << "PASSING OVER " << path << ":" << file->getID() << "\n"; -// continue; -// } -// to_evict.push_back(lru.first); -// freeable_space += file->getSize(); -// if (this->free_space + freeable_space >= needed_free_space) { -// break; -// } -// } -// -// // Perhaps that wasn't enough -// if (this->free_space + freeable_space < needed_free_space) { -// return false; -// } -// -// // If it was enough, simply remove files -// for (const unsigned int &key: to_evict) { -// auto path = std::get<0>(this->lru_list[key]); -// auto file = std::get<1>(this->lru_list[key]); -// // std::cerr << "Evicting file " << path.c_str() << ":" << file->getID().c_str() << "\n"; -// WRENCH_INFO("Evicting file %s:%s", path.c_str(), file->getID().c_str()); -// this->lru_list.erase(key); -// this->content[path].erase(file); -// this->free_space += file->getSize(); -// } -// // print_lru_list(); -// -// return true; -// } -// -// /** -// * @brief Increment the number of running transactions that have to do with a file -// * @param file: the file -// * @param absolute_path: the file path -// */ -// void LogicalFileSystemLRUCaching::incrementNumRunningTransactionsForFileInDirectory(const shared_ptr &file, const string &absolute_path) { -// -// auto fixed_path = FileLocation::sanitizePath(absolute_path + "/"); -// -// if ((this->content.find(fixed_path) != this->content.end()) and -// (this->content[fixed_path].find(file) != this->content[fixed_path].end())) { -// std::static_pointer_cast(this->content[fixed_path][file])->num_current_transactions++; -// } -// } -// -// /** -// * @brief Decrement the number of running transactions that have to do with a file -// * @param file: the file -// * @param absolute_path: the file path -// */ -// void LogicalFileSystemLRUCaching::decrementNumRunningTransactionsForFileInDirectory(const shared_ptr &file, const string &absolute_path) { -// -// auto fixed_path = FileLocation::sanitizePath(absolute_path + "/"); -// -// if ((this->content.find(fixed_path) != this->content.end()) and -// (this->content[fixed_path].find(file) != this->content[fixed_path].end())) { -// std::static_pointer_cast(this->content[fixed_path][file])->num_current_transactions--; -// } -// } -// -// -//}// namespace wrench diff --git a/src/wrench/services/storage/storage_helper_classes/LogicalFileSystemNoCaching.cpp b/src/wrench/services/storage/storage_helper_classes/LogicalFileSystemNoCaching.cpp deleted file mode 100755 index 328b4b451a..0000000000 --- a/src/wrench/services/storage/storage_helper_classes/LogicalFileSystemNoCaching.cpp +++ /dev/null @@ -1,145 +0,0 @@ -///** -// * Copyright (c) 2017. The WRENCH Team. -// * -// * This program is free software: you can redistribute it and/or modify -// * it under the terms of the GNU General Public License as published by -// * the Free Software Foundation, either version 3 of the License, or -// * (at your option) any later version. -// */ -// -//#include -//#include -// -//#include -//#include -// -//WRENCH_LOG_CATEGORY(wrench_core_logical_file_system_no_caching, "Log category for Logical File System No caching"); -// -// -//namespace wrench { -// -// /** -// * @brief Constructor -// * @param hostname: the host on which the file system is located -// * @param storage_service: the storage service this file system is for -// * @param mount_point: the mount point, defaults to /dev/null -// */ -// LogicalFileSystemNoCaching::LogicalFileSystemNoCaching(const std::string &hostname, StorageService *storage_service, -// const std::string &mount_point) : LogicalFileSystem(hostname, storage_service, mount_point) { -// } -// -// -// /** -// * @brief Store file in directory -// * -// * @param file: the file to store -// * @param absolute_path: the directory's absolute path (at the mount point) -// * -// * @throw std::invalid_argument -// */ -// void LogicalFileSystemNoCaching::storeFileInDirectory(const std::shared_ptr &file, const std::string &absolute_path) { -// if (devnull) { -// return; -// } -// auto fixed_path = FileLocation::sanitizePath(absolute_path + "/"); -// -// // If directory does not exit, create it -// if (not doesDirectoryExist(fixed_path)) { -// createDirectory(fixed_path); -// } -// -// bool file_already_there = this->content[fixed_path].find(file) != this->content[fixed_path].end(); -// -// std::string key = FileLocation::sanitizePath(fixed_path) + file->getID(); -// if (this->reserved_space.find(key) != this->reserved_space.end()) { -// this->reserved_space.erase(key); -// } else if (not file_already_there) { -// this->free_space -= file->getSize(); -// } -// if (this->free_space < 0) { -// throw std::runtime_error("LogicalFileSystemNoCaching::storeFileInDirectory(): free space is <0, should never happen"); -// } -// -// this->content[fixed_path][file] = std::make_shared(S4U_Simulation::getClock()); -// } -// -// /** -// * @brief Remove a file in a directory -// * @param file: the file to remove -// * @param absolute_path: the directory's absolute path -// * -// * @throw std::invalid_argument -// */ -// void LogicalFileSystemNoCaching::removeFileFromDirectory(const std::shared_ptr &file, const std::string &absolute_path) { -// if (devnull) { -// return; -// } -// auto fixed_path = FileLocation::sanitizePath(absolute_path + "/"); -// -// assertDirectoryExist(fixed_path); -// assertFileIsInDirectory(file, fixed_path); -// this->content[fixed_path].erase(file); -// this->free_space += file->getSize(); -// } -// -// /** -// * @brief Remove all files in a directory -// * @param absolute_path: the directory's absolute path -// * -// * @throw std::invalid_argument -// */ -// void LogicalFileSystemNoCaching::removeAllFilesInDirectory(const std::string &absolute_path) { -// if (devnull) { -// return; -// } -// auto fixed_path = FileLocation::sanitizePath(absolute_path + "/"); -// -// assertDirectoryExist(fixed_path); -// double freed_space = 0; -// for (auto const &s: this->content[fixed_path]) { -// freed_space += s.first->getSize(); -// } -// this->content[fixed_path].clear(); -// this->free_space += freed_space; -// } -// -// -// /** -// * @brief Update a file's read date -// * @param file: the file -// * @param absolute_path: the path -// */ -// void LogicalFileSystemNoCaching::updateReadDate(const std::shared_ptr &file, const std::string &absolute_path) { -// // Do nothing, as with no caching we don't care about the read date (for now at least) -// } -// -// -// /** -// * @brief Evict files to create some free space -// * @param needed_free_space: the needed free space -// * @return always returns false since NoCaching means no evictions -// */ -// bool LogicalFileSystemNoCaching::evictFiles(double needed_free_space) { -// return false; -// } -// -// /** -// * @brief Increment the number of running transactions that have to do with a file -// * @param file: the file -// * @param absolute_path: the file path -// */ -// void LogicalFileSystemNoCaching::incrementNumRunningTransactionsForFileInDirectory(const shared_ptr &file, const string &absolute_path) { -// // Do nothing since no caching -// } -// -// /** -// * @brief Decrement the number of running transactions that have to do with a file -// * @param file: the file -// * @param absolute_path: the file path -// */ -// void LogicalFileSystemNoCaching::decrementNumRunningTransactionsForFileInDirectory(const shared_ptr &file, const string &absolute_path) { -// // Do nothing since no caching -// } -// -// -//}// namespace wrench diff --git a/src/wrench/services/storage/xrootd/Deployment.cpp b/src/wrench/services/storage/xrootd/Deployment.cpp index 90823a0ef9..f8dd7e3720 100755 --- a/src/wrench/services/storage/xrootd/Deployment.cpp +++ b/src/wrench/services/storage/xrootd/Deployment.cpp @@ -130,7 +130,6 @@ namespace wrench { // * @param file: A shared pointer to a file // * @param location: A shared pointer to the Node to put the file on. The Node MUST be a storage server // * - // * @throw std::invalid_argument // */ // void Deployment::createFile(const std::shared_ptr &file, const std::shared_ptr &location) { // if(file==nullptr){ @@ -147,7 +146,6 @@ namespace wrench { * @brief remove a specific file from the registry. DOES NOT REMOVE FILE FROM SERVERS * @param file: A shared pointer to the file to remove * - * @throw std::invalid_argument */ void Deployment::deleteFile(const std::shared_ptr &file) { files.erase(file); @@ -157,7 +155,6 @@ namespace wrench { * @param file: A shared pointer to the file the location is for * @param location: The location to remove * - * @throw std::invalid_argument */ void Deployment::removeFileLocation(const std::shared_ptr &file, const std::shared_ptr &location) { if (file == nullptr) { diff --git a/src/wrench/services/storage/xrootd/Node.cpp b/src/wrench/services/storage/xrootd/Node.cpp index b57095deb0..5fe925b3ce 100644 --- a/src/wrench/services/storage/xrootd/Node.cpp +++ b/src/wrench/services/storage/xrootd/Node.cpp @@ -61,7 +61,6 @@ namespace wrench { * @brief Adds a child node to an XRootD supervisor * @param child: the new child to add * @return the child id of the new node - * @throws runtime_error if node already has 64 children. */ //should this throw an exception instead? std::shared_ptr Node::addChild(std::shared_ptr child) { @@ -915,7 +914,6 @@ namespace wrench { * @brief create a new file in the federation on this node. Use instead of wrench::Simulation::createFile when adding files to XRootD * @param location: a file location, must be the same object as the function is invoked on * - * @throw std::invalid_argument */ void Node::createFile(const std::shared_ptr &location) { if (internalStorage == nullptr) { @@ -930,7 +928,6 @@ namespace wrench { * @brief remove a new file in the federation on this node. * @param location: a file location, must be the same object as the function is invoked on * - * @throw std::invalid_argument */ void Node::removeFile(const std::shared_ptr &location) { if (internalStorage == nullptr) { @@ -947,12 +944,11 @@ namespace wrench { /** * @brief write a file on this node. - * @param answer_commport: a commport on which to send the answer message + * @param answer_commport: a commport on which to send the answer message * @param location: a location - * @param num_bytes_to_write: A number of bytes to write - * @param wait_for_answer: true if this method should wait for the answer, false otherwise + * @param num_bytes_to_write: A number of bytes to write + * @param wait_for_answer: true if this method should wait for the answer, false otherwise * - * @throw std::invalid_argument */ void Node::writeFile(S4U_CommPort *answer_commport, const std::shared_ptr &location, diff --git a/src/wrench/simgrid_S4U_util/S4U_CommPort.cpp b/src/wrench/simgrid_S4U_util/S4U_CommPort.cpp index ecac61d7cb..335618a241 100644 --- a/src/wrench/simgrid_S4U_util/S4U_CommPort.cpp +++ b/src/wrench/simgrid_S4U_util/S4U_CommPort.cpp @@ -115,8 +115,6 @@ namespace wrench { * @param log: should the log message be printed * @return the message, or nullptr (in which case it's likely a brutal termination) * - * @throw std::shared_ptr - * */ std::unique_ptr S4U_CommPort::getMessage(bool log) { @@ -130,7 +128,6 @@ namespace wrench { * @param log: should the log message be printed * @return the message, or nullptr (in which case it's likely a brutal termination) * - * @throw std::shared_ptr */ std::unique_ptr S4U_CommPort::getMessage(double timeout, bool log) { if (this == S4U_CommPort::NULL_COMMPORT) { @@ -236,7 +233,6 @@ namespace wrench { * * @param msg: the SimulationMessage * - * @throw std::shared_ptr */ void S4U_CommPort::putMessage(SimulationMessage *msg) { @@ -308,7 +304,6 @@ namespace wrench { * * @return a pending communication handle * - * @throw std::shared_ptr */ std::shared_ptr S4U_CommPort::iputMessage(SimulationMessage *msg) { @@ -360,7 +355,6 @@ namespace wrench { * * @return a pending communication handle * - * @throw std::shared_ptr */ std::shared_ptr S4U_CommPort::igetMessage() { diff --git a/src/wrench/simgrid_S4U_util/S4U_Daemon.cpp b/src/wrench/simgrid_S4U_util/S4U_Daemon.cpp index 4a4d1a5873..174b186ebd 100644 --- a/src/wrench/simgrid_S4U_util/S4U_Daemon.cpp +++ b/src/wrench/simgrid_S4U_util/S4U_Daemon.cpp @@ -121,7 +121,6 @@ namespace wrench { * @param has_returned_from_main: whether the daemon returned from main() by itself * @param return_value: the return value from main (if has_terminated_cleanly is true) * - * @throw std::runtime_error */ void S4U_Daemon::cleanup(bool has_returned_from_main, int return_value) { // WRENCH_INFO("IN S4U_Daemon::cleanup() for %s", this->process_name.c_str()); @@ -168,8 +167,6 @@ namespace wrench { * @param daemonized: whether the S4U actor should be daemonized * @param auto_restart: whether the S4U actor should automatically restart after a host reboot * - * @throw std::runtime_error - * @throw std::shared_ptr */ void S4U_Daemon::startDaemon(bool daemonized, bool auto_restart) { @@ -310,7 +307,6 @@ namespace wrench { * @brief Kill the daemon/actor (does nothing if already dead) * * @return true if actor was killed, false if not (e.g., daemon was already dead) - * @throw std::shared_ptr */ bool S4U_Daemon::killActor() { // Do the kill only if valid actor and not already done diff --git a/src/wrench/simgrid_S4U_util/S4U_PendingCommunication.cpp b/src/wrench/simgrid_S4U_util/S4U_PendingCommunication.cpp index 0d0c220130..6797f017ea 100644 --- a/src/wrench/simgrid_S4U_util/S4U_PendingCommunication.cpp +++ b/src/wrench/simgrid_S4U_util/S4U_PendingCommunication.cpp @@ -34,7 +34,6 @@ namespace wrench { * * @return A (unique pointer to a) simulation message * - * @throw std::shared_ptr */ std::unique_ptr S4U_PendingCommunication::wait() { return this->wait(-1); @@ -46,7 +45,6 @@ namespace wrench { * * @return A (unique pointer to a) simulation message * - * @throw std::shared_ptr */ std::unique_ptr S4U_PendingCommunication::wait(double timeout) { @@ -158,7 +156,6 @@ namespace wrench { * * @return the index of the comm to which something happened (success or failure) * - * @throw std::invalid_argument */ unsigned long S4U_PendingCommunication::waitForSomethingToHappen( const std::vector> &pending_comms, double timeout) { @@ -179,7 +176,6 @@ namespace wrench { * @return the index of the comm to which something happened (success or failure), or * ULONG_MAX if nothing happened before the timeout expired. * - * @throw std::invalid_argument */ unsigned long S4U_PendingCommunication::waitForSomethingToHappen( std::vector pending_comms, double timeout) { diff --git a/src/wrench/simgrid_S4U_util/S4U_Simulation.cpp b/src/wrench/simgrid_S4U_util/S4U_Simulation.cpp index 3c8ebe2a8d..d7ac222dfd 100755 --- a/src/wrench/simgrid_S4U_util/S4U_Simulation.cpp +++ b/src/wrench/simgrid_S4U_util/S4U_Simulation.cpp @@ -90,7 +90,6 @@ namespace wrench { /** * @brief Start the simulation * - * @throw std::runtime_error */ void S4U_Simulation::runSimulation() { // Setup a handler for deadlocks @@ -139,7 +138,6 @@ namespace wrench { * * @param filename the path to an XML platform description file * - * @throw std::invalid_argument */ void S4U_Simulation::setupPlatform(const std::string &filename) { try { @@ -159,7 +157,6 @@ namespace wrench { * * @param creation_function void() function to create the platform * - * @throw std::invalid_argument */ void S4U_Simulation::setupPlatform(const std::function &creation_function) { creation_function(); @@ -364,7 +361,6 @@ namespace wrench { * @param hostname: the name of the host * @return the number of cores of the host * - * @throw std::invalid_argument */ unsigned int S4U_Simulation::getHostNumCores(const std::string &hostname) { auto host = S4U_Simulation::get_host_or_vm_by_name_or_null(hostname); @@ -388,7 +384,6 @@ namespace wrench { * @param hostname: the name of the host * @return the flop rate in floating point operations per second * - * @throw std::invalid_argument */ double S4U_Simulation::getHostFlopRate(const std::string &hostname) { auto host = S4U_Simulation::get_host_or_vm_by_name_or_null(hostname); @@ -404,7 +399,6 @@ namespace wrench { * @param hostname: the name of the host * @return true or false * - * @throw std::invalid_argument */ bool S4U_Simulation::isHostOn(const std::string &hostname) { @@ -420,7 +414,6 @@ namespace wrench { * * @param hostname: the name of the host to turn off * - * @throw std::invalid_argument */ void S4U_Simulation::turnOffHost(const std::string &hostname) { @@ -436,7 +429,6 @@ namespace wrench { * * @param hostname: the name of the host to turn on * - * @throw std::invalid_argument */ void S4U_Simulation::turnOnHost(const std::string &hostname) { @@ -453,7 +445,6 @@ namespace wrench { * @param link_name: the name of the link * @return true or false * -* @throw std::invalid_argument */ bool S4U_Simulation::isLinkOn(const std::string &link_name) { auto link = simgrid::s4u::Link::by_name_or_null(link_name); @@ -468,7 +459,6 @@ namespace wrench { * * @param link_name: the name of the link to turn off * - * @throw std::invalid_argument */ void S4U_Simulation::turnOffLink(const std::string &link_name) { auto link = simgrid::s4u::Link::by_name_or_null(link_name); @@ -483,7 +473,6 @@ namespace wrench { * * @param link_name: the name of the link to turn on * - * @throw std::invalid_argument */ void S4U_Simulation::turnOnLink(const std::string &link_name) { auto link = simgrid::s4u::Link::by_name_or_null(link_name); @@ -498,7 +487,6 @@ namespace wrench { * * @return the flop rate in floating point operations per second * - * @throw std::invalid_argument */ double S4U_Simulation::getFlopRate() { return simgrid::s4u::Host::current()->get_speed();// changed it to speed of the current pstate @@ -809,8 +797,6 @@ namespace wrench { * @brief Get the energy consumed by the host up to now * @param hostname: the host name * @return the energy consumed by the host in Joules -* @throw std::invalid_argument -* @throw std::runtime_error */ double S4U_Simulation::getEnergyConsumedByHost(const std::string &hostname) { double energy_consumed; @@ -834,7 +820,6 @@ namespace wrench { * @brief Get the total energy consumed by a set of hosts * @param hostnames: the list of hostnames * @return The total energy consumed by all the hosts in Joules - * @throw std::runtime_error */ double S4U_Simulation::getTotalEnergyConsumed(const std::vector &hostnames) { double total_energy = 0; @@ -857,8 +842,6 @@ namespace wrench { * * @param hostname: the host name * @param pstate: the power state index (the power state index is specified in the platform xml description file) -* @throw std::invalid_argument -* @throw std::runtime_error */ void S4U_Simulation::setPstate(const std::string &hostname, unsigned long pstate) { auto host = simgrid::s4u::Host::by_name_or_null(hostname); @@ -883,8 +866,6 @@ namespace wrench { * @brief Get the total number of power states of a host * @param hostname: the host name * @return The number of power states available for the host (as specified in the platform xml description file) -* @throw std::invalid_argument -* @throw std::runtime_error */ int S4U_Simulation::getNumberofPstates(const std::string &hostname) { auto host = simgrid::s4u::Host::by_name_or_null(hostname); @@ -904,7 +885,6 @@ namespace wrench { * @brief Get the current power state of a host * @param hostname: the host name * @return The index of the current pstate of the host (as specified in the platform xml description file) -* @throw std::runtime_error */ unsigned long S4U_Simulation::getCurrentPstate(const std::string &hostname) { auto host = simgrid::s4u::Host::by_name_or_null(hostname); @@ -924,8 +904,6 @@ namespace wrench { * @brief Get the minimum power consumption (i.e., idling) for a host at its current pstate * @param hostname: the host name * @return The power consumption for this host if idle (as specified in the platform xml description file) - * @throw std::invalid_argument - * @throw std::runtime_error */ double S4U_Simulation::getMinPowerConsumption(const std::string &hostname) { auto host = simgrid::s4u::Host::by_name_or_null(hostname); @@ -945,8 +923,6 @@ namespace wrench { * @brief Get the maximum power consumption (i.e., 100% load) for a host at its current pstate * @param hostname: the host name * @return The power consumption for this host if 100% used (as specified in the platform xml description file) - * @throw std::invalid_argument - * @throw std::runtime_error */ double S4U_Simulation::getMaxPowerConsumption(const std::string &hostname) { auto host = simgrid::s4u::Host::by_name_or_null(hostname); @@ -969,8 +945,6 @@ namespace wrench { * @brief Get the list of power states available for a host * @param hostname: the host name * @return a list of power states available for the host (as specified in the platform xml description file) - * @throw std::invalid_argument - * @throw std::runtime_error */ std::vector S4U_Simulation::getListOfPstates(const std::string &hostname) { auto host = simgrid::s4u::Host::by_name_or_null(hostname); @@ -1009,7 +983,6 @@ namespace wrench { * @param hostname: the host's name * @return a vector of mount points * - * @throw std::invalid_argument */ std::vector S4U_Simulation::getDisks(const std::string &hostname) { simgrid::s4u::Host *host; @@ -1100,7 +1073,6 @@ namespace wrench { * @param mount_point: the mount point (e.g., "/home") * @return the capacity of the disk / mount point * -* @throw std::invalid_argument */ double S4U_Simulation::getDiskCapacity(const std::string &hostname, std::string mount_point) { // WRENCH_INFO("==== %s %s ==== ", hostname.c_str(), mount_point.c_str()); diff --git a/src/wrench/simulation/Simulation.cpp b/src/wrench/simulation/Simulation.cpp index 7936b658be..6c584d2205 100644 --- a/src/wrench/simulation/Simulation.cpp +++ b/src/wrench/simulation/Simulation.cpp @@ -95,7 +95,6 @@ namespace wrench { * @param argc: main()'s argument count * @param argv: main()'s argument list * - * @throw std::invalid_argument */ void Simulation::init(int *argc, char **argv) { if (Simulation::initialized) { @@ -313,7 +312,6 @@ namespace wrench { * * @param filename: the path to a SimGrid XML platform description file * - * @throw std::runtime_error */ void Simulation::instantiatePlatform(const std::string &filename) { if (not this->s4u_simulation->isInitialized()) { @@ -335,7 +333,6 @@ namespace wrench { * * @param platform: the string representation of a SimGrid XML platform description * - * @throw std::runtime_error */ void Simulation::instantiatePlatformFromString(const std::string &platform) { auto temp_dir = std::filesystem::temp_directory_path(); @@ -425,7 +422,6 @@ namespace wrench { * @param link_name: the link's name * @param record_as_time_stamp: bool signaling whether or not to record a SimulationTimestampLinkUsage object * @return current bandwidth usage in Bps - * @throws std::invalid_argument */ double Simulation::getLinkUsage(const std::string &link_name, bool record_as_time_stamp) { if (link_name.empty()) { @@ -511,7 +507,6 @@ namespace wrench { /** * @brief Launch the simulation * - * @throw std::runtime_error */ void Simulation::launch() { // Check that the simulation is correctly initialized @@ -563,7 +558,6 @@ namespace wrench { /** * @brief Check that the simulation is correctly instantiated by the user * - * @throw std::runtime_exception */ void Simulation::checkSimulationSetup() { // Check that the simulation is initialized @@ -586,7 +580,6 @@ namespace wrench { /** * @brief Start all services * - * @throw std::runtime_error */ void Simulation::startAllProcesses() { @@ -636,7 +629,6 @@ namespace wrench { * * @param service: a compute service * - * @throw std::invalid_argument */ void Simulation::addService(const std::shared_ptr &service) { if (service == nullptr) { @@ -651,7 +643,6 @@ namespace wrench { * * @param service: a network proximity service * - * @throw std::invalid_argument */ void Simulation::addService(const std::shared_ptr &service) { if (service == nullptr) { @@ -666,7 +657,6 @@ namespace wrench { * * @param service: a storage service * - * @throw std::invalid_argument */ void Simulation::addService(const std::shared_ptr &service) { if (service == nullptr) { @@ -681,7 +671,6 @@ namespace wrench { * * @param service: an execution controller * - * @throw std::invalid_argument */ void Simulation::addService(const std::shared_ptr &service) { if (service == nullptr) { @@ -696,7 +685,6 @@ namespace wrench { * * @param service: a file registry service * - * @throw std::invalid_argument */ void Simulation::addService(const std::shared_ptr &service) { if (service == nullptr) { @@ -711,7 +699,6 @@ namespace wrench { * * @param service: an energy meter service * - * @throw std::invalid_argument */ void Simulation::addService(const std::shared_ptr &service) { if (service == nullptr) { @@ -726,7 +713,6 @@ namespace wrench { * * @param service: a link usage meter service * - * @throw std::invalid_argument */ void Simulation::addService(const std::shared_ptr &service) { if (service == nullptr) { @@ -742,7 +728,6 @@ namespace wrench { * * @param memory_manager: a MemoryManager * - * @throw std::invalid_argument */ void Simulation::addService(const std::shared_ptr &memory_manager) { if (memory_manager == nullptr) { @@ -812,7 +797,6 @@ namespace wrench { * @param mount_point: mount point of disk to read from * @param disk: disk to read from (nullptr if not known) * - * @throw invalid_argument */ void Simulation::readFromDisk(double num_bytes, const std::string &hostname, simgrid::s4u::Disk *disk) { std::string mount_point = disk->get_property("mount"); @@ -836,7 +820,6 @@ namespace wrench { * @param src_disk: source disk (nullptr if not known) * @param dst_disk: dst disk (nullptr if not known) * - * @throw invalid_argument */ void Simulation::readFromDiskAndWriteToDiskConcurrently(double num_bytes_to_read, double num_bytes_to_write, const std::string &hostname, @@ -870,7 +853,6 @@ namespace wrench { * @param hostname: name of the host to write to * @param disk: a simgrid disk to write to (nullptr if not known) * - * @throw invalid_argument */ void Simulation::writeToDisk(double num_bytes, const std::string &hostname, simgrid::s4u::Disk *disk) { std::string mount_point = disk->get_property("mount"); @@ -1219,7 +1201,6 @@ namespace wrench { * @brief Obtains the current energy consumption of a host * @param hostname: the host name * @return current energy consumption in joules - * @throws std::invalid_argument */ double Simulation::getEnergyConsumed(const std::string &hostname) { return this->getEnergyConsumed(hostname, false); @@ -1231,7 +1212,6 @@ namespace wrench { * @param hostname: the host name * @param record_as_time_stamp: bool signaling whether or not to record a SimulationTimestampEnergyConsumption object * @return current energy consumption in joules - * @throws std::invalid_argument */ double Simulation::getEnergyConsumed(const std::string &hostname, bool record_as_time_stamp) { if (hostname.empty()) { @@ -1252,7 +1232,6 @@ namespace wrench { * @brief Obtains the current energy consumption of a host * @param hostnames: the list of hostnames * @return current energy consumption in joules for each host, as a map indexed by hostnames - * @throws std::invalid_argument */ std::map Simulation::getEnergyConsumed(const std::vector &hostnames) { return this->getEnergyConsumed(hostnames, false); @@ -1264,7 +1243,6 @@ namespace wrench { * @param hostnames: the list of hostnames * @param record_as_time_stamps: whether or not to record a SimulationTimestampEnergyConsumption object for each host when this method is called * @return current energy consumption in joules for each host, as a map indexed by hostnames - * @throws std::invalid_argument */ std::map Simulation::getEnergyConsumed(const std::vector &hostnames, bool record_as_time_stamps) { @@ -1340,8 +1318,6 @@ namespace wrench { * the reference and will call the destructor. * @param service: An instance of a service * @return A pointer to the service instance - * @throw std::invalid_argument - * @throw std::runtime_error */ std::shared_ptr Simulation::startNewService(ComputeService *service) { if (service == nullptr) { @@ -1370,8 +1346,6 @@ namespace wrench { * the reference and will call the destructor. * @param service: An instance of a service * @return A pointer to the service instance - * @throw std::invalid_argument - * @throw std::runtime_error */ std::shared_ptr Simulation::startNewService(StorageService *service) { if (service == nullptr) { @@ -1397,8 +1371,6 @@ namespace wrench { * the reference and will call the destructor. * @param service: An instance of a service * @return A pointer to the service instance - * @throw std::invalid_argument - * @throw std::runtime_error */ std::shared_ptr Simulation::startNewService(NetworkProximityService *service) { if (service == nullptr) { @@ -1423,8 +1395,6 @@ namespace wrench { * the reference and will call the destructor. * @param service: An instance of a service * @return A pointer to the service instance - * @throw std::invalid_argument - * @throw std::runtime_error */ std::shared_ptr Simulation::startNewService(FileRegistryService *service) { if (service == nullptr) { @@ -1450,8 +1420,6 @@ namespace wrench { * the reference and will call the destructor. * @param service: An instance of a service * @return A pointer to the service instance - * @throw std::invalid_argument - * @throw std::runtime_error */ std::shared_ptr Simulation::startNewService(MemoryManager *service) { if (service == nullptr) { @@ -1473,7 +1441,6 @@ namespace wrench { /** * @brief Checks that the platform is well defined - * @throw std::invalid_argument */ void Simulation::platformSanityCheck() { auto hostnames = wrench::Simulation::getHostnameList(); @@ -1575,7 +1542,6 @@ namespace wrench { * * @return the DataFile instance (or throws a std::invalid_argument if not found) * - * @throw std::invalid_argument */ std::shared_ptr Simulation::getFileByID(const std::string &id) { if (Simulation::data_files.find(id) == Simulation::data_files.end()) { @@ -1609,7 +1575,6 @@ namespace wrench { * * @return the DataFile instance * - * @throw std::invalid_argument */ std::shared_ptr Simulation::addFile(const std::string &id, double size) { if (size < 0) { diff --git a/src/wrench/simulation/SimulationOutput.cpp b/src/wrench/simulation/SimulationOutput.cpp index 98eadbb0ca..bf7e2520e0 100755 --- a/src/wrench/simulation/SimulationOutput.cpp +++ b/src/wrench/simulation/SimulationOutput.cpp @@ -426,7 +426,6 @@ namespace wrench { * on the gantt chart may end up in 1 of 3 positions (using cores 0 and 1, 1 and 2, or 2 and 3). * @param data: JSON workflow execution data * - * @throws std::runtime_error */ void generateHostUtilizationGraphLayout(std::vector &data) { if (not searchForLayout(data, 0)) { @@ -513,7 +512,6 @@ namespace wrench { * @param writing_file: whether or not the file is written, true by default but will be false when utilized as part * of dumpUnifiedJSON * - * @throws std::invalid_argument */ void SimulationOutput::dumpWorkflowExecutionJSON(const std::shared_ptr &workflow, const std::string &file_path, @@ -684,7 +682,6 @@ namespace wrench { * @param writing_file: whether or not the file is written, true by default but will be false when utilized as part * of dumpUnifiedJSON * - * @throws std::invalid_argument */ void SimulationOutput::dumpWorkflowGraphJSON(const std::shared_ptr &workflow, const std::string &file_path, @@ -823,8 +820,6 @@ namespace wrench { * @param file_path: the path to write the file * @param writing_file: whether or not the file is written, true by default but will be false when utilized as part * of dumpUnifiedJSON - * @throws std::invalid_argument - * @throws std::runtime_error */ void SimulationOutput::dumpHostEnergyConsumptionJSON(const std::string &file_path, bool writing_file) { @@ -970,7 +965,6 @@ namespace wrench { * @param writing_file: whether or not the file is written, true by default but will be false when utilized as part * of dumpUnifiedJSON * - * @throws std::invalid_argument */ void SimulationOutput::dumpPlatformGraphJSON(const std::string &file_path, bool writing_file) { @@ -1232,7 +1226,6 @@ namespace wrench { * @param file_path - path to save JSON at * @param writing_file - boolean, default true, to write the JSON to the specified file path. Used for unified output. * - * @throws invalid_argument */ void SimulationOutput::dumpDiskOperationsJSON(const std::string &file_path, bool writing_file) { @@ -1393,8 +1386,6 @@ namespace wrench { * @param file_path: path where json file is written * @param writing_file: whether to write file to disk. Enabled by default. * - * @throws std::invalid_argument - * @throws std::runtime_error */ void SimulationOutput::dumpLinkUsageJSON(const std::string &file_path, bool writing_file) { diff --git a/src/wrench/simulation/SimulationTimestampTypes.cpp b/src/wrench/simulation/SimulationTimestampTypes.cpp index 06dd220fca..3d37751701 100755 --- a/src/wrench/simulation/SimulationTimestampTypes.cpp +++ b/src/wrench/simulation/SimulationTimestampTypes.cpp @@ -56,7 +56,6 @@ namespace wrench { * @brief Constructor * @param date: the date * @param task: a pointer to the WorkflowTask associated with this timestamp - * @throw std::invalid_argument */ SimulationTimestampTask::SimulationTimestampTask(double date, const std::shared_ptr &task) : task(task) { this->date = date; @@ -117,7 +116,6 @@ namespace wrench { * @brief Constructor * @param date: the date * @param task: the WorkflowTask associated with this timestamp - * @throw std::invalid_argument */ SimulationTimestampTaskStart::SimulationTimestampTaskStart(double date, const std::shared_ptr &task) : SimulationTimestampTask(date, task) { WRENCH_DEBUG("Inserting a Taskstart timestamp for task '%s'", task->getID().c_str()); @@ -140,7 +138,6 @@ namespace wrench { * @brief Constructor * @param date: the date * @param task: the WorkflowTask associated with this timestamp - * @throw std::invalid_argument */ SimulationTimestampTaskFailure::SimulationTimestampTaskFailure(double date, const std::shared_ptr &task) : SimulationTimestampTask(date, task) { WRENCH_DEBUG("Inserting a TaskFailure timestamp for task '%s'", task->getID().c_str()); @@ -273,7 +270,6 @@ namespace wrench { * @param file: the DataFile associated with this file copy * @param src: the source location * @param dst: the destination location - * @throw std::invalid_argument */ SimulationTimestampFileCopyStart::SimulationTimestampFileCopyStart(double date, std::shared_ptr file, std::shared_ptr src, @@ -297,7 +293,6 @@ namespace wrench { * @param file: A workflow file * @param src: the source location * @param dst: the destination location - * @throw std::invalid_argument */ SimulationTimestampFileCopyFailure::SimulationTimestampFileCopyFailure(double date, std::shared_ptr file, std::shared_ptr src, @@ -321,7 +316,6 @@ namespace wrench { * @param file: a workflow file * @param src: the source location * @param dst: the destination location - * @throw std::invalid_argument */ SimulationTimestampFileCopyCompletion::SimulationTimestampFileCopyCompletion(double date, std::shared_ptr file, std::shared_ptr src, @@ -429,7 +423,6 @@ namespace wrench { * @param src: the source location * @param service: service requesting file read * @param task: a task associated to this file read (or nullptr) - * @throw std::invalid_argument */ SimulationTimestampFileReadStart::SimulationTimestampFileReadStart(double date, std::shared_ptr file, @@ -457,7 +450,6 @@ namespace wrench { * @param src: the source location * @param service: service requesting file read * @param task: a workflow task associated to this file read - * @throw std::invalid_argument */ SimulationTimestampFileReadFailure::SimulationTimestampFileReadFailure(double date, const std::shared_ptr &file, const std::shared_ptr &src, @@ -483,7 +475,6 @@ namespace wrench { * @param src: the source location * @param service: service requesting file read * @param task: a task associated to this file read (or nullptr) - * @throw std::invalid_argument */ SimulationTimestampFileReadCompletion::SimulationTimestampFileReadCompletion(double date, const std::shared_ptr &file, const std::shared_ptr &src, @@ -591,7 +582,6 @@ namespace wrench { * @param dst: the destination location * @param service: service requesting file write * @param task: a task associated to this file read (or nullptr) - * @throw std::invalid_argument */ SimulationTimestampFileWriteStart::SimulationTimestampFileWriteStart(double date, std::shared_ptr file, std::shared_ptr dst, @@ -622,7 +612,6 @@ namespace wrench { * @param dst: the destination location * @param service: service requesting file write * @param task: the workflow task - * @throw std::invalid_argument */ SimulationTimestampFileWriteFailure::SimulationTimestampFileWriteFailure(double date, const std::shared_ptr &file, const std::shared_ptr &dst, @@ -648,7 +637,6 @@ namespace wrench { * @param dst: the destination location * @param service: service requesting file write * @param task: a workfow task associated to this file write - * @throw std::invalid_argument */ SimulationTimestampFileWriteCompletion::SimulationTimestampFileWriteCompletion(double date, const std::shared_ptr &file, const std::shared_ptr &dst, @@ -756,7 +744,6 @@ namespace wrench { * @param mount: mount point of disk being read * @param bytes: number of bytes read * @param counter: an integer ID - * @throw std::invalid_argument */ SimulationTimestampDiskReadStart::SimulationTimestampDiskReadStart(double date, std::string hostname, std::string mount, @@ -783,7 +770,6 @@ namespace wrench { * @param mount: mount point of disk being read * @param bytes: number of bytes read * @param counter: an integer ID - * @throw std::invalid_argument */ SimulationTimestampDiskReadFailure::SimulationTimestampDiskReadFailure(double date, const std::string &hostname, const std::string &mount, @@ -809,7 +795,6 @@ namespace wrench { * @param mount: mount point of disk being read * @param bytes: number of bytes read * @param counter: an integer ID - * @throw std::invalid_argument */ SimulationTimestampDiskReadCompletion::SimulationTimestampDiskReadCompletion(double date, const std::string &hostname, @@ -918,7 +903,6 @@ namespace wrench { * @param mount: mount point of disk being write * @param bytes: number of bytes write * @param counter: an integer ID - * @throw std::invalid_argument */ SimulationTimestampDiskWriteStart::SimulationTimestampDiskWriteStart(double date, std::string hostname, std::string mount, @@ -944,7 +928,6 @@ namespace wrench { * @param mount: mount point of disk being write * @param bytes: number of bytes write * @param counter: an integer ID - * @throw std::invalid_argument */ SimulationTimestampDiskWriteFailure::SimulationTimestampDiskWriteFailure(double date, const std::string &hostname, const std::string &mount, @@ -970,7 +953,6 @@ namespace wrench { * @param mount: mount point of disk being write * @param bytes: number of bytes write * @param counter: an integer ID - * @throw std::invalid_argument */ SimulationTimestampDiskWriteCompletion::SimulationTimestampDiskWriteCompletion(double date, const std::string &hostname, const std::string &mount, diff --git a/src/wrench/util/MessageManager.cpp b/src/wrench/util/MessageManager.cpp index ae08fdbb19..aaca458fc8 100644 --- a/src/wrench/util/MessageManager.cpp +++ b/src/wrench/util/MessageManager.cpp @@ -27,7 +27,6 @@ namespace wrench { * @brief Insert a message in the manager's "database" * @param commport: the name of the relevant commport * @param msg: the message - * @throw std::runtime_error */ void MessageManager::manageMessage(const S4U_CommPort *commport, SimulationMessage *msg) { if (msg == nullptr) { diff --git a/src/wrench/util/UnitParser.cpp b/src/wrench/util/UnitParser.cpp index 09668780a5..620dad834c 100755 --- a/src/wrench/util/UnitParser.cpp +++ b/src/wrench/util/UnitParser.cpp @@ -103,7 +103,6 @@ namespace wrench { * @param string: the size specification * @return the size in bytes * - * @throws std::invalid_argument */ double UnitParser::parse_size(const std::string &string) { static const UnitParser::unit_scale units{std::make_tuple("b", 0.125, 2, true), @@ -123,7 +122,6 @@ namespace wrench { * @param string: the size specification * @return the size in bytes * - * @throws std::invalid_argument */ double UnitParser::parse_compute_speed(const std::string &string) { static const UnitParser::unit_scale units{std::make_tuple("f", 1.0, 10, true)}; @@ -139,7 +137,6 @@ namespace wrench { * @param string: the bandwidth specification * @return the bandwidth in byte/sec * - * @throws std::invalid_argument */ double UnitParser::parse_bandwidth(const std::string &string) { static const UnitParser::unit_scale units{std::make_tuple("bps", 0.125, 2, true), @@ -158,7 +155,6 @@ namespace wrench { * @param string: the time specification * @return the time in second * - * @throws std::invalid_argument */ double UnitParser::parse_time(const std::string &string) { static const unit_scale units{std::make_pair("w", 7 * 24 * 60 * 60), diff --git a/src/wrench/workflow/Workflow.cpp b/src/wrench/workflow/Workflow.cpp index f1c14ecbaf..1ef117c4d2 100644 --- a/src/wrench/workflow/Workflow.cpp +++ b/src/wrench/workflow/Workflow.cpp @@ -43,7 +43,6 @@ namespace wrench { * * @return the WorkflowTask instance * - * @throw std::invalid_argument */ std::shared_ptr Workflow::addTask(const std::string &id, double flops, @@ -80,7 +79,6 @@ namespace wrench { * @brief Remove a file from the workflow (but not from the simulation) * @param file: a file * - * @throw std::invalid_argument */ void Workflow::removeFile(const std::shared_ptr &file) { if (this->task_output_files.find(file) != this->task_output_files.end()) { @@ -107,7 +105,6 @@ namespace wrench { * * @param task: a task * - * @throw std::invalid_argument */ void Workflow::removeTask(const std::shared_ptr &task) { if (task == nullptr) { @@ -160,7 +157,6 @@ namespace wrench { * * @return a workflow task (or throws a std::invalid_argument if not found) * - * @throw std::invalid_argument */ std::shared_ptr Workflow::getTaskByID(const std::string &id) { if (tasks.find(id) == tasks.end()) { @@ -177,7 +173,6 @@ namespace wrench { * @param dst: the child task * @param redundant_dependencies: whether DAG redundant dependencies should be kept in the graph * - * @throw std::invalid_argument */ void Workflow::addControlDependency(const std::shared_ptr &src, const std::shared_ptr &dst, bool redundant_dependencies) { if ((src == nullptr) || (dst == nullptr)) { diff --git a/src/wrench/workflow/WorkflowTask.cpp b/src/wrench/workflow/WorkflowTask.cpp index 5bb3ca5919..6c02a4267d 100755 --- a/src/wrench/workflow/WorkflowTask.cpp +++ b/src/wrench/workflow/WorkflowTask.cpp @@ -51,7 +51,6 @@ namespace wrench { * @brief Add an input file to the task * * @param file: the file - * @throw std::invalid_argument */ void WorkflowTask::addInputFile(const std::shared_ptr &file) { WRENCH_DEBUG("Adding file '%s' as input to task %s", file->getID().c_str(), this->getID().c_str()); @@ -477,7 +476,6 @@ namespace wrench { * @brief Set the task's end date * * @param date: the end date - * @throws std::runtime_error */ void WorkflowTask::setEndDate(double date) { if (not this->execution_history.empty()) { @@ -491,7 +489,6 @@ namespace wrench { * @brief Set the date when the computation portion of a WorkflowTask has begun * * @param date: the date when the computation portion of the WorkflowTask has begun - * @throws std::runtime_error */ void WorkflowTask::setComputationStartDate(double date) { if (not this->execution_history.empty()) { @@ -506,7 +503,6 @@ namespace wrench { * @brief Set the date when the computation portion of a WorkflowTask has ended * * @param date: the date when the computation portion of the WorkflowTask has ended - * @throws std::runtime_error */ void WorkflowTask::setComputationEndDate(double date) { if (not this->execution_history.empty()) { @@ -521,7 +517,6 @@ namespace wrench { * @brief Set the date when the read input portion of a WorkflowTask has begun * * @param date: the date when the read input portion of a WorkflowTask has begun - * @throws std::runtime_error */ void WorkflowTask::setReadInputStartDate(double date) { if (not this->execution_history.empty()) { @@ -536,7 +531,6 @@ namespace wrench { * @brief Set the date when the read input portion of a WorkflowTask has completed * * @param date: the date when the read input portion of a WorkflowTask has completed - * @throws std::runtime_error */ void WorkflowTask::setReadInputEndDate(double date) { if (not this->execution_history.empty()) { @@ -551,7 +545,6 @@ namespace wrench { * @brief Set the date when the write output portion of a WorkflowTask has begun * * @param date: the date when the write output portion of a task has begun - * @throws std::runtime_error */ void WorkflowTask::setWriteOutputStartDate(double date) { if (not this->execution_history.empty()) { @@ -566,7 +559,6 @@ namespace wrench { * @brief Set the date when the write output portion of a WorkflowTask has completed * * @param date: the date when the write output portion of a task has completed - * @throws std::runtime_error */ void WorkflowTask::setWriteOutputEndDate(double date) { if (not this->execution_history.empty()) { diff --git a/tools/wrench/wrench-init/base_code/Controller_ACTION.cpp b/tools/wrench/wrench-init/base_code/Controller_ACTION.cpp index 63ad9802df..1955e5904b 100755 --- a/tools/wrench/wrench-init/base_code/Controller_ACTION.cpp +++ b/tools/wrench/wrench-init/base_code/Controller_ACTION.cpp @@ -40,7 +40,6 @@ namespace wrench { * * @return 0 on completion * - * @throw std::runtime_error */ int Controller::main() { diff --git a/tools/wrench/wrench-init/base_code/Controller_WORKFLOW.cpp b/tools/wrench/wrench-init/base_code/Controller_WORKFLOW.cpp index a8e23a677e..3948c33f37 100755 --- a/tools/wrench/wrench-init/base_code/Controller_WORKFLOW.cpp +++ b/tools/wrench/wrench-init/base_code/Controller_WORKFLOW.cpp @@ -38,7 +38,6 @@ namespace wrench { * * @return 0 on completion * - * @throw std::runtime_error */ int Controller::main() {