WRENCH  1.11
Cyberinfrastructure Simulation Workbench
Overview Installation Getting Started WRENCH 101 WRENCH 102
BatchJob.h
1 #ifndef WRENCH_BATCHJOB_H
2 #define WRENCH_BATCHJOB_H
3 
4 #include "wrench/job/CompoundJob.h"
5 
6 namespace wrench {
7 
8  /***********************/
10  /***********************/
11 
16  class BatchJob {
17  public:
18  //job, jobid, -t, -N, -c, ending s4u_timestamp (-1 as undetermined)
19  BatchJob(std::shared_ptr<CompoundJob> job, unsigned long job_id, unsigned long time_in_minutes, unsigned long number_nodes,
20  unsigned long cores_per_node, std::string username, double ending_time_stamp, double arrival_time_stamp);
21 
22 
23  unsigned long getJobID();
24  unsigned long getRequestedTime();
25  void setRequestedTime(unsigned long time);
26  unsigned long getRequestedCoresPerNode();
27  std::string getUsername();
28  double getMemoryRequirement();
29  double getBeginTimestamp();
30  void setBeginTimestamp(double time_stamp);
31  double getEndingTimestamp();
32  double getArrivalTimestamp();
33  unsigned long getRequestedNumNodes();
34  std::shared_ptr<CompoundJob> getCompoundJob();
35  void setEndingTimestamp(double time_stamp);
36  std::map<std::string, std::tuple<unsigned long, double>> getResourcesAllocated();
37  void setAllocatedResources(std::map<std::string, std::tuple<unsigned long, double>> resources);
38 
43  void setAllocatedNodeIndices(std::vector<int> indices) {
44  this->allocated_node_indices = indices;
45  }
46 
51  std::vector<int> getAllocatedNodeIndices() {
52  return this->allocated_node_indices;
53  }
54 
55  private:
56 
57  friend class ConservativeBackfillingBatchScheduler;
58  friend class ConservativeBackfillingBatchSchedulerCoreLevel;
59 
60  u_int32_t conservative_bf_start_date; // Field used by CONSERVATIVE_BF
61  u_int32_t conservative_bf_expected_end_date; // Field used by CONSERVATIVE_BF
62 
63  unsigned long job_id;
64  unsigned long requested_num_nodes;
65  unsigned long requested_time;
66  std::shared_ptr<CompoundJob> compound_job;
67  unsigned long requested_cores_per_node;
68  std::string username;
69  double begin_time_stamp;
70  double ending_time_stamp;
71  double arrival_time_stamp;
72  std::map<std::string, std::tuple<unsigned long, double>> resources_allocated;
73 
74  std::vector<int> allocated_node_indices;
75 
76  public:
77  // Variables below are for the BatSim-style CSV output log file (only ifdef ENABLED_BATSCHED)
79  std::string csv_metadata;
81  std::string csv_allocated_processors;
82  };
83 
84  /***********************/
86  /***********************/
87 
88 }
89 
90 
91 
92 
93 #endif //WRENCH_BATCHJOB_H
wrench
Definition: Action.cpp:28