wrench::BatchScheduler

class BatchScheduler

An abstract class that defines a batch scheduler.

Subclassed by wrench::HomegrownBatchScheduler

Public Functions

inline explicit BatchScheduler(BatchComputeService *cs)

Constructor.

Parameters:

cs – the batch compute service to which this scheduler is associated

virtual ~BatchScheduler() = default

Destructor.

virtual std::map<std::string, double> getStartTimeEstimates(std::set<std::tuple<std::string, unsigned long, unsigned long, sg_size_t>> set_of_jobs) = 0

Method to get start time estimates.

Parameters:

set_of_jobs – the set of job configurations whose start times should be estimated

Returns:

start time estimates

virtual void init() = 0

Initialization method.

Virtual methods to override

virtual void launch() = 0

Launch method.

virtual void processJobCompletion(std::shared_ptr<BatchJob> batch_job) = 0

Method to process a job completion.

Parameters:

batch_job – the batch job that has completed

virtual void processJobFailure(std::shared_ptr<BatchJob> batch_job) = 0

Method to process a job failure.

Parameters:

batch_job – the batch job that has failed

virtual void processJobSubmission(std::shared_ptr<BatchJob> batch_job) = 0

Method to process a job submission.

Parameters:

batch_job – the batch job that was submitted

virtual void processJobTermination(std::shared_ptr<BatchJob> batch_job) = 0

Method to process a job termination.

Parameters:

batch_job – the batch job that was terminated

virtual void processQueuedJobs() = 0

Method to process queued jobs.

virtual void processUnknownJobTermination(std::string job_id) = 0

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 void shutdown() = 0

Shutdown method.