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
27
28 #ifndef MCA_BASE_H
29 #define MCA_BASE_H
30
31 #include "opal_config.h"
32
33 #include "opal/class/opal_object.h"
34 #include "opal/class/opal_list.h"
35
36
37
38
39 #include "opal/mca/mca.h"
40 #include "opal/mca/base/mca_base_var.h"
41 #include "opal/mca/base/mca_base_framework.h"
42 #include "opal/util/cmd_line.h"
43 #include "opal/util/output.h"
44
45 BEGIN_C_DECLS
46
47
48
49
50 struct mca_base_component_list_item_t {
51 opal_list_item_t super;
52 const mca_base_component_t *cli_component;
53 };
54 typedef struct mca_base_component_list_item_t mca_base_component_list_item_t;
55 OPAL_DECLSPEC OBJ_CLASS_DECLARATION(mca_base_component_list_item_t);
56
57
58
59
60 struct mca_base_component_priority_list_item_t {
61 mca_base_component_list_item_t super;
62 int cpli_priority;
63 };
64 typedef struct mca_base_component_priority_list_item_t
65 mca_base_component_priority_list_item_t;
66
67 OPAL_DECLSPEC OBJ_CLASS_DECLARATION(mca_base_component_priority_list_item_t);
68
69
70
71
72 OPAL_DECLSPEC extern char *mca_base_component_path;
73 OPAL_DECLSPEC extern bool mca_base_component_show_load_errors;
74 OPAL_DECLSPEC extern bool mca_base_component_track_load_errors;
75 OPAL_DECLSPEC extern bool mca_base_component_disable_dlopen;
76 OPAL_DECLSPEC extern char *mca_base_system_default_path;
77 OPAL_DECLSPEC extern char *mca_base_user_default_path;
78
79
80
81
82 enum {
83
84 MCA_BASE_VERBOSE_NONE = -1,
85
86 MCA_BASE_VERBOSE_ERROR = 0,
87
88 MCA_BASE_VERBOSE_COMPONENT = 10,
89
90 MCA_BASE_VERBOSE_WARN = 20,
91
92
93 MCA_BASE_VERBOSE_INFO = 40,
94
95
96 MCA_BASE_VERBOSE_TRACE = 60,
97
98 MCA_BASE_VERBOSE_DEBUG = 80,
99
100 MCA_BASE_VERBOSE_MAX = 100,
101 };
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121 OPAL_DECLSPEC int mca_base_open(void);
122
123
124
125
126
127
128
129
130
131
132
133
134
135 OPAL_DECLSPEC void mca_base_close(void);
136
137
138
139
140
141 OPAL_DECLSPEC int mca_base_select(const char *type_name, int output_id,
142 opal_list_t *components_available,
143 mca_base_module_t **best_module,
144 mca_base_component_t **best_component,
145 int *priority_out);
146
147
148
149
150
151
152
153
154
155 OPAL_DECLSPEC int mca_base_is_component_required(opal_list_t *components_available,
156 mca_base_component_t *component,
157 bool exclusive,
158 bool *is_required);
159
160
161
162 OPAL_DECLSPEC int mca_base_cmd_line_setup(opal_cmd_line_t *cmd);
163 OPAL_DECLSPEC int mca_base_cmd_line_process_args(opal_cmd_line_t *cmd,
164 char ***app_env,
165 char ***global_env);
166 OPAL_DECLSPEC void mca_base_cmd_line_wrap_args(char **args);
167
168
169
170 OPAL_DECLSPEC int mca_base_component_compare_priority(mca_base_component_priority_list_item_t *a,
171 mca_base_component_priority_list_item_t *b);
172 OPAL_DECLSPEC int mca_base_component_compare(const mca_base_component_t *a,
173 const mca_base_component_t *b);
174 OPAL_DECLSPEC int mca_base_component_compatible(const mca_base_component_t *a,
175 const mca_base_component_t *b);
176 OPAL_DECLSPEC char * mca_base_component_to_string(const mca_base_component_t *a);
177
178
179
180 OPAL_DECLSPEC int mca_base_component_find (const char *directory, mca_base_framework_t *framework,
181 bool ignore_requested, bool open_dso_components);
182
183
184
185
186
187 int mca_base_component_parse_requested (const char *requested, bool *include_mode,
188 char ***requested_component_names);
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208 OPAL_DECLSPEC int mca_base_components_filter (mca_base_framework_t *framework, uint32_t filter_flags);
209
210
211
212
213
214
215 OPAL_DECLSPEC int mca_base_component_find_finalize(void);
216
217
218 OPAL_DECLSPEC int mca_base_framework_components_register (struct mca_base_framework_t *framework,
219 mca_base_register_flag_t flags);
220
221
222 OPAL_DECLSPEC int mca_base_framework_components_open (struct mca_base_framework_t *framework,
223 mca_base_open_flag_t flags);
224
225 OPAL_DECLSPEC int mca_base_components_open(const char *type_name, int output_id,
226 const mca_base_component_t **static_components,
227 opal_list_t *components_available,
228 bool open_dso_components);
229
230
231
232
233
234
235
236
237
238
239 OPAL_DECLSPEC void mca_base_component_close (const mca_base_component_t *component, int output_id);
240
241
242
243
244
245
246
247
248 void mca_base_component_unload (const mca_base_component_t *component, int output_id);
249
250 OPAL_DECLSPEC int mca_base_components_close(int output_id, opal_list_t *components_available,
251 const mca_base_component_t *skip);
252
253 OPAL_DECLSPEC int mca_base_framework_components_close (struct mca_base_framework_t *framework,
254 const mca_base_component_t *skip);
255
256 END_C_DECLS
257
258 #endif