CONSERVATIVEBFBatchScheduler.h
1 
10 #ifndef WRENCH_CONSERVATIVEBFBATCHSCHEDULER_H
11 #define WRENCH_CONSERVATIVEBFBATCHSCHEDULER_H
12 
13 #include <wrench/services/compute/batch/BatchComputeService.h>
14 #include <wrench/services/compute/batch/batch_schedulers/homegrown/HomegrownBatchScheduler.h>
15 #include <services/compute/batch/batch_schedulers/homegrown/conservative_bf/NodeAvailabilityTimeLine.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<NodeAvailabilityTimeLine> schedule;
50  };
51 
52 
53 /***********************/
55 /***********************/
56 }
57 
58 
59 
60 #endif //WRENCH_CONSERVATIVEBFBATCHSCHEDULER_H
BatchComputeService * cs
Compute service for which this scheduler is operating.
Definition: BatchScheduler.h:106
void processJobFailure(std::shared_ptr< BatchJob > batch_job) override
Method to process a job failure.
Definition: CONSERVATIVEBFBatchScheduler.cpp:217
void processQueuedJobs() override
Method to schedule (possibly) the next jobs to be scheduled.
Definition: CONSERVATIVEBFBatchScheduler.cpp:60
A batch-scheduled compute service that manages a set of compute hosts and controls access to their re...
Definition: BatchComputeService.h:49
void processJobCompletion(std::shared_ptr< BatchJob > batch_job) override
Method to process a job completion.
Definition: CONSERVATIVEBFBatchScheduler.cpp:188
Definition: Alarm.cpp:20
CONSERVATIVEBFBatchScheduler(BatchComputeService *cs)
Constructor.
Definition: CONSERVATIVEBFBatchScheduler.cpp:25
void compactSchedule()
Method to compact the schedule.
Definition: CONSERVATIVEBFBatchScheduler.cpp:115
void processJobSubmission(std::shared_ptr< BatchJob > batch_job) override
Method to process a job submission.
Definition: CONSERVATIVEBFBatchScheduler.cpp:33
An abstract class that defines a batch scheduler.
Definition: HomegrownBatchScheduler.h:25
void processJobTermination(std::shared_ptr< BatchJob > batch_job) override
Method to process a job termination.
Definition: CONSERVATIVEBFBatchScheduler.cpp:208
A class that defines a conservative backfilling batch scheduler.
Definition: CONSERVATIVEBFBatchScheduler.h:26
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: CONSERVATIVEBFBatchScheduler.cpp:230
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: CONSERVATIVEBFBatchScheduler.cpp:286