13 #include <wrench/managers/EnergyMeter.h> 14 #include "wrench/simgrid_S4U_util/S4U_Daemon.h" 15 #include "wrench/services/Service.h" 16 #include "wrench/wms/DynamicOptimization.h" 17 #include "wrench/wms/StaticOptimization.h" 18 #include "wrench/wms/scheduler/PilotJobScheduler.h" 19 #include "wrench/wms/scheduler/StandardJobScheduler.h" 20 #include "wrench/workflow/Workflow.h" 27 class NetworkProximityService;
28 class FileRegistryService;
52 WMS(std::unique_ptr<StandardJobScheduler> standard_job_scheduler,
53 std::unique_ptr<PilotJobScheduler> pilot_job_scheduler,
54 const std::set<ComputeService *> &compute_services,
55 const std::set<StorageService *> &storage_services,
56 const std::set<NetworkProximityService *> &network_proximity_services,
58 const std::string &hostname,
59 const std::string suffix);
62 void checkDeferredStart();
64 std::shared_ptr<JobManager> createJobManager();
65 std::shared_ptr<DataMovementManager> createDataMovementManager();
66 std::shared_ptr<EnergyMeter> createEnergyMeter(
const std::map<std::string, double> &measurement_periods);
67 std::shared_ptr<EnergyMeter> createEnergyMeter(
const std::vector<std::string> &hostnames,
double measurement_period);
69 void runDynamicOptimizations();
71 void runStaticOptimizations();
73 std::set<ComputeService *> getAvailableComputeServices();
74 std::set<StorageService *> getAvailableStorageServices();
75 std::set<NetworkProximityService *> getAvailableNetworkProximityServices();
78 void waitForAndProcessNextEvent();
80 virtual void processEventStandardJobCompletion(std::unique_ptr<StandardJobCompletedEvent>);
82 virtual void processEventStandardJobFailure(std::unique_ptr<StandardJobFailedEvent>);
84 virtual void processEventPilotJobStart(std::unique_ptr<PilotJobStartedEvent>);
86 virtual void processEventPilotJobExpiration(std::unique_ptr<PilotJobExpiredEvent>);
88 virtual void processEventFileCopyCompletion(std::unique_ptr<FileCopyCompletedEvent>);
90 virtual void processEventFileCopyFailure(std::unique_ptr<FileCopyFailedEvent>);
102 friend class DataMovementManager;
103 friend class JobManager;
110 std::set<ComputeService *> compute_services;
112 std::set<StorageService *> storage_services;
114 std::set<NetworkProximityService *> network_proximity_services;
119 std::unique_ptr<StandardJobScheduler> standard_job_scheduler;
121 std::unique_ptr<PilotJobScheduler> pilot_job_scheduler;
124 std::vector<std::unique_ptr<DynamicOptimization>> dynamic_optimizations;
126 std::vector<std::unique_ptr<StaticOptimization>> static_optimizations;
133 virtual int main() = 0;
139 #endif //WRENCH_WMS_H PilotJobScheduler * getPilotJobScheduler()
Get the WMS's pilot scheduler.
Definition: WMS.cpp:361
A (mostly virtual) base class for implementing PilotJob scheduling algorithms to be used by a WMS...
Definition: PilotJobScheduler.h:26
A service that can be added to the simulation and that can be used by a WMS when executing a workflow...
Definition: Service.h:26
A workflow (to be executed by a WMS)
Definition: Workflow.h:30
StandardJobScheduler * getStandardJobScheduler()
Get the WMS's pilot scheduler.
Definition: WMS.cpp:369
void addWorkflow(Workflow *workflow, double start_time=0)
Assign a workflow to the WMS.
Definition: WMS.cpp:274
A class that provides basic simulation methods.
Definition: Simulation.h:34
void addDynamicOptimization(std::unique_ptr< DynamicOptimization >)
Add a dynamic optimization to the list of optimizations. Optimizations are executed in order of inser...
Definition: WMS.cpp:63
A file registry service (a.k.a. replica catalog) that holds a database of which files are available a...
Definition: FileRegistryService.h:33
A (mostly virtual) base class for implementing StandardJob scheduling algorithms to be used by a WMS...
Definition: StandardJobScheduler.h:31
Workflow * getWorkflow()
Get the workflow that was assigned to the WMS.
Definition: WMS.cpp:299
A workflow management system (WMS)
Definition: WMS.h:33
void addStaticOptimization(std::unique_ptr< StaticOptimization >)
Add a static optimization to the list of optimizations. Optimizations are executed in order of insert...
Definition: WMS.cpp:73
Definition: TerminalOutput.cpp:15