CONSERVATIVEBFBatchSchedulerCoreLevel.h
1 
10 #ifndef WRENCH_CONSERVATIVEBFBATCHSCHEDULERCORELEVEL_H
11 #define WRENCH_CONSERVATIVEBFBATCHSCHEDULERCORELEVEL_H
12 
13 #include <wrench/services/compute/batch/BatchComputeService.h>
14 #include <wrench/services/compute/batch/batch_schedulers/homegrown/HomegrownBatchScheduler.h>
15 #include "CoreAvailabilityTimeLine.h"
16 
17 namespace wrench {
18 
19 /***********************/
21 /***********************/
22 
27 
28  public:
29 
31 
32  // TODO: IMPLEMENT EVERYTHING
33  void processQueuedJobs() override;
34 
35  void processJobSubmission(std::shared_ptr<BatchJob> batch_job) override;
36  void processJobFailure(std::shared_ptr<BatchJob> batch_job) override;
37  void processJobCompletion(std::shared_ptr<BatchJob> batch_job) override;
38  void processJobTermination(std::shared_ptr<BatchJob> batch_job) override;
39 
40  void compactSchedule();
41 
42  std::map <std::string, std::tuple<unsigned long, double>> scheduleOnHosts(unsigned long, unsigned long, double) override;
43 
44  std::map<std::string, double>
45  getStartTimeEstimates(std::set <std::tuple<std::string, unsigned long, unsigned long, double>> set_of_jobs) override;
46 
47  private:
48 
49  std::unique_ptr<CoreAvailabilityTimeLine> schedule;
50  };
51 
52 
53 /***********************/
55 /***********************/
56 }
57 
58 
59 
60 #endif //WRENCH_CONSERVATIVEBFBATCHSCHEDULERCORELEVEL_H
BatchComputeService * cs
Compute service for which this scheduler is operating.
Definition: BatchScheduler.h:113
void processJobSubmission(std::shared_ptr< BatchJob > batch_job) override
Method to process a job submission.
Definition: CONSERVATIVEBFBatchSchedulerCoreLevel.cpp:33
void processQueuedJobs() override
Method to schedule (possibly) the next jobs to be scheduled.
Definition: CONSERVATIVEBFBatchSchedulerCoreLevel.cpp:66
A class that defines a conservative backfilling batch scheduler.
Definition: CONSERVATIVEBFBatchSchedulerCoreLevel.h:26
A batch-scheduled compute service that manages a set of compute hosts and controls access to their re...
Definition: BatchComputeService.h:49
void processJobTermination(std::shared_ptr< BatchJob > batch_job) override
Method to process a job termination.
Definition: CONSERVATIVEBFBatchSchedulerCoreLevel.cpp:220
Definition: Alarm.cpp:20
std::map< std::string, double > getStartTimeEstimates(std::set< std::tuple< std::string, unsigned long, unsigned long, double >> set_of_jobs) override
Method to obtain start time estimates.
Definition: CONSERVATIVEBFBatchSchedulerCoreLevel.cpp:298
void processJobCompletion(std::shared_ptr< BatchJob > batch_job) override
Method to process a job completion.
Definition: CONSERVATIVEBFBatchSchedulerCoreLevel.cpp:200
std::map< std::string, std::tuple< unsigned long, double > > scheduleOnHosts(unsigned long, unsigned long, double) override
Method to figure out on which actual resources a job could be scheduled right now.
Definition: CONSERVATIVEBFBatchSchedulerCoreLevel.cpp:242
void compactSchedule()
Method to compact the schedule.
Definition: CONSERVATIVEBFBatchSchedulerCoreLevel.cpp:124
An abstract class that defines a batch scheduler.
Definition: HomegrownBatchScheduler.h:26
void processJobFailure(std::shared_ptr< BatchJob > batch_job) override
Method to process a job failure.
Definition: CONSERVATIVEBFBatchSchedulerCoreLevel.cpp:229
CONSERVATIVEBFBatchSchedulerCoreLevel(BatchComputeService *cs)
Constructor.
Definition: CONSERVATIVEBFBatchSchedulerCoreLevel.cpp:25