WRENCH  1.10
Cyberinfrastructure Simulation Workbench
Overview Installation Getting Started WRENCH 101 WRENCH 102
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 
82  void processUnknownJobTermination(std::string job_id) override;
83 
92  std::map<std::string, double> getStartTimeEstimates(std::set<std::tuple<std::string, unsigned long, unsigned long, double>> set_of_jobs) override;
93 
94  private:
95 #ifdef ENABLE_BATSCHED
96 
97  void notifyJobEventsToBatSched(std::string job_id, std::string status, std::string job_state,
98  std::string kill_reason, std::string event_type);
99 
100  void appendJobInfoToCSVOutputFile(BatchJob *batch_job, std::string status);
101 
102  void startBatschedNetworkListener();
103 
104 
105  pid_t pid;
106 
107  unsigned long batsched_port;
108 
109 
110 #endif
111 
112  };
113 
114 /***********************/
116 /***********************/
117 
118 }
119 
120 
121 #endif //WRENCH_BATSCHEDBATCHSCHEDULER_H
wrench::BatschedBatchScheduler::processJobCompletion
void processJobCompletion(std::shared_ptr< BatchJob > batch_job) override
Method to process a job completion.
Definition: BatschedBatchScheduler.cpp:387
wrench::BatschedBatchScheduler::processJobSubmission
void processJobSubmission(std::shared_ptr< BatchJob > batch_job) override
Method to process a job submission.
Definition: BatschedBatchScheduler.cpp:422
wrench::BatchScheduler::cs
BatchComputeService * cs
Compute service for which this scheduler is operating.
Definition: BatchScheduler.h:113
wrench::BatschedBatchScheduler::processJobTermination
void processJobTermination(std::shared_ptr< BatchJob > batch_job) override
Method to process a job termination.
Definition: BatschedBatchScheduler.cpp:399
wrench::BatschedBatchScheduler::BatschedBatchScheduler
BatschedBatchScheduler(BatchComputeService *cs)
Constructor.
Definition: BatschedBatchScheduler.h:32
wrench::BatchJob
A batch job, which encapsulates a WorkflowJob and additional information used by a batch.
Definition: BatchJob.h:16
wrench::BatschedBatchScheduler::launch
void launch() override
Launch method.
Definition: BatschedBatchScheduler.cpp:187
wrench::BatschedBatchScheduler::getStartTimeEstimates
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:201
wrench::BatchComputeService
A batch-scheduled compute service that manages a set of compute hosts and controls access to their re...
Definition: BatchComputeService.h:49
wrench::BatschedBatchScheduler::processUnknownJobTermination
void processUnknownJobTermination(std::string job_id) override
Method to process a job termination when the job is already forgotten (useful for batsched)
Definition: BatschedBatchScheduler.cpp:411
wrench
Definition: Alarm.cpp:20
wrench::BatchScheduler
An abstract class that defines a batch scheduler.
Definition: BatchScheduler.h:27
wrench::BatschedBatchScheduler
A class that defines a batsched batch scheduler.
Definition: BatschedBatchScheduler.h:24
wrench::BatschedBatchScheduler::shutdown
void shutdown() override
Shutdown method.
Definition: BatschedBatchScheduler.cpp:272
wrench::BatschedBatchScheduler::processJobFailure
void processJobFailure(std::shared_ptr< BatchJob > batch_job) override
Method to process a job failure.
Definition: BatschedBatchScheduler.cpp:373
wrench::BatschedBatchScheduler::processQueuedJobs
void processQueuedJobs() override
Method to process queued jobs.
Definition: BatschedBatchScheduler.cpp:317
wrench::BatschedBatchScheduler::init
void init() override
Initialization method.
Definition: BatschedBatchScheduler.cpp:44