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, sg_size_t>> scheduleOnHosts(unsigned long num_nodes, unsigned long cores_per_node, sg_size_t 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, sg_size_t>> selectHostsBestFit(BatchComputeService *cs, unsigned long num_nodes, unsigned long cores_per_node, sg_size_t 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, sg_size_t>> selectHostsFirstFit(BatchComputeService *cs, unsigned long num_nodes, unsigned long cores_per_node, sg_size_t 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, sg_size_t>> selectHostsRoundRobin(BatchComputeService *cs, unsigned long *round_robin_host_selector_idx, unsigned long num_nodes, unsigned long cores_per_node, sg_size_t 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