10 #ifndef SIMULATION_COMPUTESERVICE_H 11 #define SIMULATION_COMPUTESERVICE_H 19 #include "wrench/services/Service.h" 20 #include "wrench/workflow/job/WorkflowJob.h" 41 friend class StandardJobExecutorTest;
54 static constexpr
unsigned long ALL_CORES = ULONG_MAX;
59 static constexpr
double ALL_RAM = DBL_MAX;
74 void submitJob(WorkflowJob *job, std::map<std::string, std::string> = {});
76 void terminateJob(WorkflowJob *job);
78 bool supportsStandardJobs();
80 bool supportsPilotJobs();
84 unsigned long getNumHosts();
86 std::map<std::string, unsigned long> getNumCores();
88 std::map<std::string, unsigned long> getNumIdleCores();
90 unsigned long getTotalNumCores();
92 unsigned long getTotalNumIdleCores();
94 std::map<std::string, double> getMemoryCapacity();
96 std::map<std::string, double> getCoreFlopRate();
100 double getTotalScratchSpaceSize();
102 double getFreeScratchSpaceSize();
113 submitStandardJob(StandardJob *job, std::map<std::string, std::string> &service_specific_arguments) = 0;
115 virtual void submitPilotJob(PilotJob *job, std::map<std::string, std::string> &service_specific_arguments) = 0;
117 virtual void terminateStandardJob(StandardJob *job) = 0;
119 virtual void terminatePilotJob(PilotJob *job) = 0;
122 std::string service_name,
123 std::string mailbox_name_prefix,
124 double scratch_space_size);
131 std::string service_name,
132 std::string mailbox_name_prefix,
137 std::shared_ptr<StorageService> scratch_space_storage_service_shared_ptr;
148 std::shared_ptr<StorageService> getScratchSharedPtr();
156 std::map<std::string, std::map<std::string, double>> getServiceResourceInformation();
163 #endif //SIMULATION_COMPUTESERVICE_H 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
static constexpr double ALL_RAM
A convenient constant to mean "use all ram of a physical host" whenever a ram capacity is needed when...
Definition: ComputeService.h:59
static constexpr unsigned long ALL_CORES
A convenient constant to mean "use all cores of a physical host" whenever a number of cores is needed...
Definition: ComputeService.h:54
A class that provides basic simulation methods.
Definition: Simulation.h:34
The compute service base class.
Definition: ComputeService.h:35
The storage service base class.
Definition: StorageService.h:35
Definition: TerminalOutput.cpp:15