BatschedBatchScheduler.h
1 
10 #ifndef WRENCH_BATSCHEDBATCHSCHEDULER_H
11 #define WRENCH_BATSCHEDBATCHSCHEDULER_H
12 
13 #include "wrench/services/compute/batch/batch_schedulers/BatchScheduler.h"
14 
15 namespace wrench {
16 
17 /***********************/
19 /***********************/
20 
25 
26  public:
27 
33 
37  void init() override;
38 
42  void launch() override;
43 
47  void shutdown() override;
48 
52  void processQueuedJobs() override;
53 
58  void processJobSubmission(std::shared_ptr<BatchJob> batch_job) override;
59 
64  void processJobFailure(std::shared_ptr<BatchJob> batch_job) override;
65 
70  void processJobCompletion(std::shared_ptr<BatchJob> batch_job) override;
71 
76  void processJobTermination(std::shared_ptr<BatchJob> batch_job) override;
77 
86  std::map<std::string, double> getStartTimeEstimates(std::set<std::tuple<std::string, unsigned long, unsigned long, double>> set_of_jobs) override;
87 
88  private:
89 #ifdef ENABLE_BATSCHED
90 
91  void notifyJobEventsToBatSched(std::string job_id, std::string status, std::string job_state,
92  std::string kill_reason, std::string event_type);
93 
94  void appendJobInfoToCSVOutputFile(BatchJob *batch_job, std::string status);
95 
96  void startBatschedNetworkListener();
97 
98 
99  pid_t pid;
100 
101  unsigned long batsched_port;
102 
103 
104 #endif
105 
106  };
107 
108 /***********************/
110 /***********************/
111 
112 }
113 
114 
115 #endif //WRENCH_BATSCHEDBATCHSCHEDULER_H
void processJobCompletion(std::shared_ptr< BatchJob > batch_job) override
Method to process a job completion.
Definition: BatschedBatchScheduler.cpp:371
void processJobSubmission(std::shared_ptr< BatchJob > batch_job) override
Method to process a job submission.
Definition: BatschedBatchScheduler.cpp:392
BatchComputeService * cs
Compute service for which this scheduler is operating.
Definition: BatchScheduler.h:106
void processJobTermination(std::shared_ptr< BatchJob > batch_job) override
Method to process a job termination.
Definition: BatschedBatchScheduler.cpp:382
BatschedBatchScheduler(BatchComputeService *cs)
Constructor.
Definition: BatschedBatchScheduler.h:32
A batch job, which encapsulates a WorkflowJob and additional information used by a batch.
Definition: BatchJob.h:16
void launch() override
Launch method.
Definition: BatschedBatchScheduler.cpp:178
std::map< std::string, double > getStartTimeEstimates(std::set< std::tuple< std::string, unsigned long, unsigned long, double >> set_of_jobs) override
Method to get start time estimates.
Definition: BatschedBatchScheduler.cpp:192
A batch-scheduled compute service that manages a set of compute hosts and controls access to their re...
Definition: BatchComputeService.h:49
Definition: Alarm.cpp:20
An abstract class that defines a batch scheduler.
Definition: BatchScheduler.h:27
A class that defines a batsched batch scheduler.
Definition: BatschedBatchScheduler.h:24
void shutdown() override
Shutdown method.
Definition: BatschedBatchScheduler.cpp:260
void processJobFailure(std::shared_ptr< BatchJob > batch_job) override
Method to process a job failure.
Definition: BatschedBatchScheduler.cpp:360
void processQueuedJobs() override
Method to process queued jobs.
Definition: BatschedBatchScheduler.cpp:305
void init() override
Initialization method.
Definition: BatschedBatchScheduler.cpp:38