|
47 | 47 | #include "opal/runtime/opal.h" |
48 | 48 | #include "opal/runtime/opal_progress_threads.h" |
49 | 49 |
|
| 50 | +#include "orte/mca/rml/base/base.h" |
| 51 | +#include "orte/mca/routed/base/base.h" |
50 | 52 | #include "orte/mca/errmgr/errmgr.h" |
51 | 53 | #include "orte/mca/dfs/base/base.h" |
52 | 54 | #include "orte/mca/grpcomm/base/base.h" |
| 55 | +#include "orte/mca/oob/base/base.h" |
| 56 | +#include "orte/mca/rml/rml.h" |
53 | 57 | #include "orte/mca/odls/odls_types.h" |
54 | 58 | #include "orte/mca/filem/base/base.h" |
55 | 59 | #include "orte/mca/errmgr/base/base.h" |
@@ -173,14 +177,73 @@ int orte_ess_base_app_setup(bool db_restrict_local) |
173 | 177 | } |
174 | 178 | OBJ_DESTRUCT(&kv); |
175 | 179 | } |
176 | | - |
| 180 | + /* Setup the communication infrastructure */ |
| 181 | + /* |
| 182 | + * OOB Layer |
| 183 | + */ |
| 184 | + if (ORTE_SUCCESS != (ret = mca_base_framework_open(&orte_oob_base_framework, 0))) { |
| 185 | + ORTE_ERROR_LOG(ret); |
| 186 | + error = "orte_oob_base_open"; |
| 187 | + goto error; |
| 188 | + } |
| 189 | + if (ORTE_SUCCESS != (ret = orte_oob_base_select())) { |
| 190 | + ORTE_ERROR_LOG(ret); |
| 191 | + error = "orte_oob_base_select"; |
| 192 | + goto error; |
| 193 | + } |
| 194 | + /* Runtime Messaging Layer */ |
| 195 | + if (ORTE_SUCCESS != (ret = mca_base_framework_open(&orte_rml_base_framework, 0))) { |
| 196 | + ORTE_ERROR_LOG(ret); |
| 197 | + error = "orte_rml_base_open"; |
| 198 | + goto error; |
| 199 | + } |
| 200 | + if (ORTE_SUCCESS != (ret = orte_rml_base_select())) { |
| 201 | + ORTE_ERROR_LOG(ret); |
| 202 | + error = "orte_rml_base_select"; |
| 203 | + goto error; |
| 204 | + } |
177 | 205 | /* setup the errmgr */ |
178 | 206 | if (ORTE_SUCCESS != (ret = orte_errmgr_base_select())) { |
179 | 207 | ORTE_ERROR_LOG(ret); |
180 | 208 | error = "orte_errmgr_base_select"; |
181 | 209 | goto error; |
182 | 210 | } |
183 | | - |
| 211 | + /* Routed system */ |
| 212 | + if (ORTE_SUCCESS != (ret = mca_base_framework_open(&orte_routed_base_framework, 0))) { |
| 213 | + ORTE_ERROR_LOG(ret); |
| 214 | + error = "orte_routed_base_open"; |
| 215 | + goto error; |
| 216 | + } |
| 217 | + if (ORTE_SUCCESS != (ret = orte_routed_base_select())) { |
| 218 | + ORTE_ERROR_LOG(ret); |
| 219 | + error = "orte_routed_base_select"; |
| 220 | + goto error; |
| 221 | + } |
| 222 | + /* |
| 223 | + * Group communications |
| 224 | + */ |
| 225 | + if (ORTE_SUCCESS != (ret = mca_base_framework_open(&orte_grpcomm_base_framework, 0))) { |
| 226 | + ORTE_ERROR_LOG(ret); |
| 227 | + error = "orte_grpcomm_base_open"; |
| 228 | + goto error; |
| 229 | + } |
| 230 | + if (ORTE_SUCCESS != (ret = orte_grpcomm_base_select())) { |
| 231 | + ORTE_ERROR_LOG(ret); |
| 232 | + error = "orte_grpcomm_base_select"; |
| 233 | + goto error; |
| 234 | + } |
| 235 | + /* enable communication via the rml */ |
| 236 | + if (ORTE_SUCCESS != (ret = orte_rml.enable_comm())) { |
| 237 | + ORTE_ERROR_LOG(ret); |
| 238 | + error = "orte_rml.enable_comm"; |
| 239 | + goto error; |
| 240 | + } |
| 241 | + /* setup the routed info */ |
| 242 | + if (ORTE_SUCCESS != (ret = orte_routed.init_routes(ORTE_PROC_MY_NAME->jobid, NULL))) { |
| 243 | + ORTE_ERROR_LOG(ret); |
| 244 | + error = "orte_routed.init_routes"; |
| 245 | + goto error; |
| 246 | + } |
184 | 247 | /* open the distributed file system */ |
185 | 248 | if (ORTE_SUCCESS != (ret = mca_base_framework_open(&orte_dfs_base_framework, 0))) { |
186 | 249 | ORTE_ERROR_LOG(ret); |
@@ -216,7 +279,13 @@ int orte_ess_base_app_finalize(void) |
216 | 279 | (void) mca_base_framework_close(&orte_filem_base_framework); |
217 | 280 | (void) mca_base_framework_close(&orte_errmgr_base_framework); |
218 | 281 |
|
| 282 | + /* now can close the rml and its friendly group comm */ |
| 283 | + (void) mca_base_framework_close(&orte_grpcomm_base_framework); |
219 | 284 | (void) mca_base_framework_close(&orte_dfs_base_framework); |
| 285 | + (void) mca_base_framework_close(&orte_routed_base_framework); |
| 286 | + |
| 287 | + (void) mca_base_framework_close(&orte_rml_base_framework); |
| 288 | + (void) mca_base_framework_close(&orte_oob_base_framework); |
220 | 289 | (void) mca_base_framework_close(&orte_state_base_framework); |
221 | 290 |
|
222 | 291 | orte_session_dir_finalize(ORTE_PROC_MY_NAME); |
@@ -270,7 +339,7 @@ void orte_ess_base_app_abort(int status, bool report) |
270 | 339 | * the message if routing is enabled as this indicates we |
271 | 340 | * have someone to send to |
272 | 341 | */ |
273 | | - if (report && orte_create_session_dirs) { |
| 342 | + if (report && orte_routing_is_enabled && orte_create_session_dirs) { |
274 | 343 | myfile = opal_os_path(false, orte_process_info.proc_session_dir, "aborted", NULL); |
275 | 344 | fd = open(myfile, O_CREAT, S_IRUSR); |
276 | 345 | close(fd); |
|
0 commit comments