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;
69 void submitJob(WorkflowJob *job, std::map<std::string, std::string> = {});
71 void terminateJob(WorkflowJob *job);
73 bool supportsStandardJobs();
75 bool supportsPilotJobs();
79 unsigned long getNumHosts();
81 std::map<std::string, unsigned long> getPerHostNumCores();
83 unsigned long getTotalNumCores();
85 std::map<std::string, unsigned long> getPerHostNumIdleCores();
87 virtual unsigned long getTotalNumIdleCores();
89 std::map<std::string, double> getMemoryCapacity();
91 std::map<std::string, double> getPerHostAvailableMemoryCapacity();
93 std::map<std::string, double> getCoreFlopRate();
97 double getTotalScratchSpaceSize();
99 double getFreeScratchSpaceSize();
118 submitStandardJob(StandardJob *job, std::map<std::string, std::string> &service_specific_arguments) = 0;
126 virtual void submitPilotJob(PilotJob *job, std::map<std::string, std::string> &service_specific_arguments) = 0;
132 virtual void terminateStandardJob(StandardJob *job) = 0;
138 virtual void terminatePilotJob(PilotJob *job) = 0;
141 std::string service_name,
142 std::string mailbox_name_prefix,
143 std::string scratch_space_mount_point);
148 std::shared_ptr<StorageService> getScratch();
151 std::string service_name,
152 std::string mailbox_name_prefix,
153 std::shared_ptr<StorageService> scratch_space);
156 std::shared_ptr<StorageService> scratch_space_storage_service;
166 std::shared_ptr<StorageService> getScratchSharedPtr();
174 std::shared_ptr<StorageService> scratch_space_storage_service_shared_ptr;
176 std::map<std::string, std::map<std::string, double>> getServiceResourceInformation();
183 #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. Once the simulation object has been explicitly or imp...
Definition: Simulation.h:45
The compute service base class.
Definition: ComputeService.h:35