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;
117 submitStandardJob(
StandardJob *job,
const std::map<std::string, std::string> &service_specific_arguments) = 0;
125 virtual void submitPilotJob(
PilotJob *job,
const std::map<std::string, std::string> &service_specific_arguments) = 0;
131 virtual void terminateStandardJob(
StandardJob *job) = 0;
137 virtual void terminatePilotJob(
PilotJob *job) = 0;
143 std::shared_ptr<StorageService> getScratch();
147 std::string service_name,
148 std::string mailbox_name_prefix,
149 std::string scratch_space_mount_point);
155 void submitJob(
WorkflowJob *job,
const std::map<std::string, std::string>& = {});
157 ComputeService(
const std::string &hostname,
158 std::string service_name,
159 std::string mailbox_name_prefix,
160 std::shared_ptr<StorageService> scratch_space);
163 std::shared_ptr<StorageService> scratch_space_storage_service;
182 std::shared_ptr<StorageService> scratch_space_storage_service_shared_ptr;
184 std::map<std::string, std::map<std::string, double>> getServiceResourceInformation();
191 #endif //SIMULATION_COMPUTESERVICE_H
double getTotalScratchSpaceSize()
Get the total capacity of the compute service's scratch storage space.
Definition: ComputeService.cpp:451
std::map< std::string, double > getPerHostAvailableMemoryCapacity()
Get ram availability for each of the compute service's host.
Definition: ComputeService.cpp:291
bool hasScratch()
Checks if the compute service has a scratch space.
Definition: ComputeService.cpp:485
std::map< std::string, unsigned long > getPerHostNumIdleCores()
Get idle core counts for each of the compute service's host.
Definition: ComputeService.cpp:264
double getTTL()
Get the time-to-live of the compute service.
Definition: ComputeService.cpp:394
virtual unsigned long getTotalNumIdleCores()
Get the total idle core count for all hosts of the compute service.
Definition: ComputeService.cpp:318
A helper daemon (co-located with and explicitly started by a WMS), which is used to handle all job ex...
Definition: JobManager.h:40
std::map< std::string, double > getCoreFlopRate()
Get the per-core flop rate of the compute service's hosts.
Definition: ComputeService.cpp:343
The compute service base class.
Definition: ComputeService.h:35
A standard (i.e., non-pilot) workflow job that can be submitted to a ComputeService by a WMS (via a J...
Definition: StandardJob.h:37
std::map< std::string, unsigned long > getPerHostNumCores()
Get core counts for each of the compute service's host.
Definition: ComputeService.cpp:211
double getFreeScratchSpaceSize()
Get the free space on the compute service's scratch storage space.
Definition: ComputeService.cpp:460
Abstraction of a job used for executing tasks in a Workflow.
Definition: WorkflowJob.h:34
std::shared_ptr< StorageService > getScratchSharedPtr()
Get a shared pointer to the compute service's scratch storage space.
Definition: ComputeService.cpp:477
void stop() override
Stop the compute service - must be called by the stop() method of derived classes.
Definition: ComputeService.cpp:33
unsigned long getTotalNumCores()
Get the total core counts for all hosts of the compute service.
Definition: ComputeService.cpp:238
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:46
bool supportsStandardJobs()
Get whether the compute service supports standard jobs or not.
Definition: ComputeService.cpp:168
A pilot (i.e., non-standard) workflow job that can be submitted to a ComputeService by a WMS (via a J...
Definition: PilotJob.h:29
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
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
unsigned long getNumHosts()
Get the number of hosts that the compute service manages.
Definition: ComputeService.cpp:187
void terminateJob(WorkflowJob *job)
Terminate a previously-submitted job (which may or may not be running yet)
Definition: ComputeService.cpp:90
std::map< std::string, double > getMemoryCapacity()
Get the RAM capacities for each of the compute service's hosts.
Definition: ComputeService.cpp:368
bool supportsPilotJobs()
Get whether the compute service supports pilot jobs or not.
Definition: ComputeService.cpp:176