1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26 #ifndef ORTE_MCA_RMAPS_BASE_H
27 #define ORTE_MCA_RMAPS_BASE_H
28
29
30
31
32 #include "orte_config.h"
33 #include "orte/types.h"
34
35 #include "opal/class/opal_list.h"
36 #include "opal/util/printf.h"
37 #include "orte/mca/mca.h"
38
39 #include "orte/runtime/orte_globals.h"
40
41 #include "orte/mca/rmaps/rmaps.h"
42
43 BEGIN_C_DECLS
44
45
46
47
48 ORTE_DECLSPEC extern mca_base_framework_t orte_rmaps_base_framework;
49
50 ORTE_DECLSPEC int orte_rmaps_base_select(void);
51
52
53
54
55
56
57
58
59 typedef struct {
60
61 opal_list_t selected_modules;
62
63 char *ppr;
64
65 int cpus_per_rank;
66
67 bool display_map;
68
69 char *slot_list;
70
71 orte_mapping_policy_t mapping;
72 orte_ranking_policy_t ranking;
73
74 char *device;
75
76 bool inherit;
77 } orte_rmaps_base_t;
78
79
80
81
82 ORTE_DECLSPEC extern orte_rmaps_base_t orte_rmaps_base;
83
84
85
86
87 ORTE_DECLSPEC extern bool orte_rmaps_base_pernode;
88 ORTE_DECLSPEC extern int orte_rmaps_base_n_pernode;
89 ORTE_DECLSPEC extern int orte_rmaps_base_n_persocket;
90
91
92
93
94 typedef struct {
95 opal_list_item_t super;
96 int pri;
97 orte_rmaps_base_module_t *module;
98 mca_base_component_t *component;
99 } orte_rmaps_base_selected_module_t;
100 OBJ_CLASS_DECLARATION(orte_rmaps_base_selected_module_t);
101
102
103
104
105 ORTE_DECLSPEC void orte_rmaps_base_map_job(int sd, short args, void *cbdata);
106 ORTE_DECLSPEC int orte_rmaps_base_assign_locations(orte_job_t *jdata);
107
108
109
110
111
112 ORTE_DECLSPEC int orte_rmaps_base_get_vpid_range(orte_jobid_t jobid,
113 orte_vpid_t *start, orte_vpid_t *range);
114 ORTE_DECLSPEC int orte_rmaps_base_set_vpid_range(orte_jobid_t jobid,
115 orte_vpid_t start, orte_vpid_t range);
116
117
118 ORTE_DECLSPEC char* orte_rmaps_base_print_mapping(orte_mapping_policy_t mapping);
119 ORTE_DECLSPEC char* orte_rmaps_base_print_ranking(orte_ranking_policy_t ranking);
120
121 ORTE_DECLSPEC int orte_rmaps_base_prep_topology(hwloc_topology_t topo);
122
123 ORTE_DECLSPEC int orte_rmaps_base_filter_nodes(orte_app_context_t *app,
124 opal_list_t *nodes,
125 bool remove);
126
127 ORTE_DECLSPEC int orte_rmaps_base_set_mapping_policy(orte_job_t *jdata,
128 orte_mapping_policy_t *policy,
129 char **device, char *spec);
130 ORTE_DECLSPEC int orte_rmaps_base_set_ranking_policy(orte_ranking_policy_t *policy,
131 orte_mapping_policy_t mapping,
132 char *spec);
133
134 ORTE_DECLSPEC void orte_rmaps_base_display_map(orte_job_t *jdata);
135
136 END_C_DECLS
137
138 #endif