SST/macro
job_launcher.h
Go to the documentation of this file.
1 #ifndef JOB_LAUNCHER_H
2 #define JOB_LAUNCHER_H
3 
5 #include <sprockit/unordered.h>
12 
13 namespace sstmac {
14 namespace sw {
15 
16 /**
17  * @brief The job_launcher class performs the combined operations a queue scheduler like PBS or MOAB
18  * and a job launcher like SLURM (srun) or ALPS (aprun).
19  * The job launcher allocates nodes to each requested MPI job (or other application).
20  * Once nodes are allocated, the job_launcher has to assign MPI ranks to each node (mapping or indexing).
21  * Each application can request its a specific allocation or indexing.
22  * However, it is ultimately the responsibility of the job launcher to decide on the final
23  * allocation/indexing. In most cases, the job_launcher will honor exactly each applications's request
24  * unless there is a conflict - in which case the job_launcher must arbitrate conflicting requests.
25  */
26 class job_launcher :
28  public event_handler
29 {
30  public:
31  void handle(event *ev);
32 
33  void
34  set_interconnect(hw::interconnect* ic);
35 
36  node_id
37  node_for_task(app_id aid, task_id tid) const;
38 
39  app_launch*
40  task_mapper(app_id aid) const;
41 
42  virtual void
43  init_factory_params(sprockit::sim_parameters *params);
44 
45  /**
46  * @brief handle_new_launch_request As if a new job had been submitted with qsub or salloc.
47  * The job_launcher receives a new request to launch an application, at which point
48  * it can choose to launch the application immediately if node allocation succeeds.
49  * @param appnum A unique integer identifying the application launched
50  * @param appman An object specifying all the details (indexing, allocation, application type)
51  * of the application being launched
52  */
53  virtual void
55 
56  protected:
57  void
59 
60  protected:
61  hw::interconnect* interconnect_;
64 
65  std::map<app_id, app_launch*> apps_launched_;
66 
67 };
68 
70 
72  public job_launcher
73 {
74  public:
75  std::string
76  to_string() const {
77  return "default job launcher";
78  }
79 
80  protected:
82 
83 };
84 
85 }
86 }
87 
88 
89 
90 #endif // JOB_LAUNCHER_H
The job_launcher class performs the combined operations a queue scheduler like PBS or MOAB and a job ...
Definition: job_launcher.h:26
std::set< node_id > ordered_node_set
Definition: node_set.h:10
std::string to_string() const
Definition: job_launcher.h:76
void satisfy_launch_request(app_launch *appman)
app_launch * task_mapper(app_id aid) const
void set_interconnect(hw::interconnect *ic)
std::map< app_id, app_launch * > apps_launched_
Definition: job_launcher.h:65
virtual void handle_new_launch_request(app_launch *appman)=0
handle_new_launch_request As if a new job had been submitted with qsub or salloc. ...
int task_id
Definition: task_id.h:20
virtual void init_factory_params(sprockit::sim_parameters *params)
The main interface for something that can respond to an event (sst_message).
Definition: event_handler.h:24
ordered_node_set allocated_
Definition: job_launcher.h:62
SUMI = Simulator unified messagine interface It is also the name for a solid ink in Japanese - i...
node_id node_for_task(app_id aid, task_id tid) const
ordered_node_set available_
Definition: job_launcher.h:63
DeclareFactory(blas_kernel)
hw::interconnect * interconnect_
Definition: job_launcher.h:61
void handle(event *ev)
endpoint_id node_id
Definition: node_address.h:20
int app_id
Definition: app_id.h:20