wrench::HomegrownBatchScheduler
-
class HomegrownBatchScheduler : public wrench::BatchScheduler
An abstract class that defines a batch scheduler.
Subclassed by wrench::ConservativeBackfillingBatchScheduler, wrench::ConservativeBackfillingBatchSchedulerCoreLevel, wrench::FCFSBatchScheduler
Public Functions
-
inline explicit HomegrownBatchScheduler(BatchComputeService *cs)
Constructor.
- Parameters:
cs – the batch compute service for which this scheduler is operating
-
inline virtual void init() override
Initialization method.
Virtual methods to override
-
inline virtual void launch() override
Launch method.
-
inline virtual void processUnknownJobTermination(std::string job_id) override
Method to process a job termination when the job is already forgotten (useful for batsched)
- Parameters:
job_id – the id of the batch job that was terminated
-
virtual std::map<simgrid::s4u::Host*, std::tuple<unsigned long, double>> scheduleOnHosts(unsigned long num_nodes, unsigned long cores_per_node, double ram_per_node) = 0
Virtual method to figure out on which actual resources a job could be scheduled right now.
- Parameters:
num_nodes – number of nodes
cores_per_node – number of cores per node
ram_per_node – amount of RAM
- Returns:
a host:<core,RAM> map
-
inline virtual void shutdown() override
Shutdown method.
Public Static Functions
-
static std::map<simgrid::s4u::Host*, std::tuple<unsigned long, double>> selectHostsBestFit(BatchComputeService *cs, unsigned long num_nodes, unsigned long cores_per_node, double ram_per_node)
Best-Fit host selection.
- Parameters:
cs – the compute service
num_nodes – number of nodes
cores_per_node – number of cores per node
ram_per_node – RAM per node in bytes
-
static std::map<simgrid::s4u::Host*, std::tuple<unsigned long, double>> selectHostsFirstFit(BatchComputeService *cs, unsigned long num_nodes, unsigned long cores_per_node, double ram_per_node)
First-Fit selection of hosts.
- Parameters:
cs – the compute service
num_nodes – number of nodes
cores_per_node – number of cores per node
ram_per_node – RAM per node in bytes
-
static std::map<simgrid::s4u::Host*, std::tuple<unsigned long, double>> selectHostsRoundRobin(BatchComputeService *cs, unsigned long *round_robin_host_selector_idx, unsigned long num_nodes, unsigned long cores_per_node, double ram_per_node)
Round-Robin selection of hosts.
- Parameters:
cs – the compute service
round_robin_host_selector_idx – current host selector index
num_nodes – number of nodes
cores_per_node – number of cores per node
ram_per_node – RAM per node in bytes
-
inline explicit HomegrownBatchScheduler(BatchComputeService *cs)