WRENCH  1.11
Cyberinfrastructure Simulation Workbench
Overview Installation Getting Started WRENCH 101 WRENCH 102
BatchScheduler.h
1 
10 #ifndef WRENCH_BATCHSCHEDULER_H
11 #define WRENCH_BATCHSCHEDULER_H
12 
13 #include <deque>
14 #include "wrench/services/compute/batch/BatchJob.h"
15 
16 namespace wrench {
17 
18 /***********************/
20 /***********************/
21 
22  class BatchComputeService;
23 
28 
29  public:
30 
34  virtual ~BatchScheduler() = default;
35 
41 
49  virtual void init() = 0;
50 
54  virtual void launch() = 0;
55 
59  virtual void shutdown() = 0;
60 
64  virtual void processQueuedJobs() = 0;
65 
71  virtual void processJobSubmission(std::shared_ptr<BatchJob> batch_job) = 0;
72 
78  virtual void processJobFailure(std::shared_ptr<BatchJob> batch_job) = 0;
79 
85  virtual void processJobCompletion(std::shared_ptr<BatchJob> batch_job) = 0;
86 
92  virtual void processJobTermination(std::shared_ptr<BatchJob> batch_job) = 0;
93 
99  virtual void processUnknownJobTermination(std::string job_id) = 0;
100 
107  virtual std::map<std::string, double> getStartTimeEstimates(std::set<std::tuple<std::string, unsigned long, unsigned long, double>> set_of_jobs) = 0;
108 
109  protected:
114 
115  };
116 
117 /***********************/
119 /***********************/
120 }
121 
122 
123 #endif //WRENCH_BATCHSCHEDULER_H
wrench::BatchScheduler::processJobFailure
virtual void processJobFailure(std::shared_ptr< BatchJob > batch_job)=0
Method to process a job failure.
wrench::BatchScheduler::processJobCompletion
virtual void processJobCompletion(std::shared_ptr< BatchJob > batch_job)=0
Method to process a job completion.
wrench::BatchScheduler::cs
BatchComputeService * cs
Compute service for which this scheduler is operating.
Definition: BatchScheduler.h:113
wrench::BatchScheduler::processQueuedJobs
virtual void processQueuedJobs()=0
Method to process queued jobs.
wrench::BatchScheduler::processJobTermination
virtual void processJobTermination(std::shared_ptr< BatchJob > batch_job)=0
Method to process a job termination.
wrench::BatchComputeService
A batch_standard_and_pilot_jobs-scheduled compute service that manages a set of compute hosts and con...
Definition: BatchComputeService.h:49
wrench
Definition: Action.cpp:28
wrench::BatchScheduler
An abstract class that defines a batch_standard_and_pilot_jobs scheduler.
Definition: BatchScheduler.h:27
wrench::BatchScheduler::getStartTimeEstimates
virtual std::map< std::string, double > getStartTimeEstimates(std::set< std::tuple< std::string, unsigned long, unsigned long, double >> set_of_jobs)=0
Method to get start time estimates.
wrench::BatchScheduler::shutdown
virtual void shutdown()=0
Shutdown method.
wrench::BatchScheduler::~BatchScheduler
virtual ~BatchScheduler()=default
Destructor.
wrench::BatchScheduler::init
virtual void init()=0
Initialization method.
wrench::BatchScheduler::BatchScheduler
BatchScheduler(BatchComputeService *cs)
Constructor.
Definition: BatchScheduler.h:40
wrench::BatchScheduler::processJobSubmission
virtual void processJobSubmission(std::shared_ptr< BatchJob > batch_job)=0
Method to process a job submission.
wrench::BatchScheduler::processUnknownJobTermination
virtual void processUnknownJobTermination(std::string job_id)=0
Method to process a job termination when the job is already forgotten (useful for batsched)
wrench::BatchScheduler::launch
virtual void launch()=0
Launch method.