|
58 | 58 | #include "orte/mca/plm/base/base.h" |
59 | 59 | #include "orte/mca/odls/base/base.h" |
60 | 60 | #include "orte/mca/errmgr/errmgr.h" |
| 61 | +#include "orte/mca/rmaps/base/base.h" |
61 | 62 | #if OPAL_ENABLE_FT_CR == 1 |
62 | 63 | #include "orte/mca/snapc/base/base.h" |
63 | 64 | #include "orte/mca/sstore/base/base.h" |
@@ -116,6 +117,7 @@ int orte_ess_base_orted_setup(char **hosts) |
116 | 117 | char *param; |
117 | 118 | hwloc_obj_t obj; |
118 | 119 | unsigned i, j; |
| 120 | + orte_topology_t *t; |
119 | 121 | opal_list_t transports; |
120 | 122 |
|
121 | 123 | /* my name is set, xfer it to the OPAL layer */ |
@@ -333,13 +335,8 @@ int orte_ess_base_orted_setup(char **hosts) |
333 | 335 | /* create and store a node object where we are */ |
334 | 336 | node = OBJ_NEW(orte_node_t); |
335 | 337 | node->name = strdup(orte_process_info.nodename); |
336 | | - node->index = opal_pointer_array_set_item(orte_node_pool, ORTE_PROC_MY_NAME->vpid, node); |
337 | | - /* point our topology to the one detected locally */ |
338 | | - node->topology = OBJ_NEW(orte_topology_t); |
339 | | - node->topology->sig = strdup(orte_topo_signature); |
340 | | - node->topology->topo = opal_hwloc_topology; |
341 | | - /* add it to the array of known ones */ |
342 | | - opal_pointer_array_add(orte_node_topologies, node->topology); |
| 338 | + node->index = ORTE_PROC_MY_NAME->vpid; |
| 339 | + opal_pointer_array_set_item(orte_node_pool, ORTE_PROC_MY_NAME->vpid, node); |
343 | 340 |
|
344 | 341 | /* create and store a proc object for us */ |
345 | 342 | proc = OBJ_NEW(orte_proc_t); |
@@ -496,14 +493,40 @@ int orte_ess_base_orted_setup(char **hosts) |
496 | 493 | error = "orte_rtc_base_select"; |
497 | 494 | goto error; |
498 | 495 | } |
| 496 | + if (ORTE_SUCCESS != (ret = mca_base_framework_open(&orte_rmaps_base_framework, 0))) { |
| 497 | + ORTE_ERROR_LOG(ret); |
| 498 | + error = "orte_rmaps_base_open"; |
| 499 | + goto error; |
| 500 | + } |
| 501 | + if (ORTE_SUCCESS != (ret = orte_rmaps_base_select())) { |
| 502 | + ORTE_ERROR_LOG(ret); |
| 503 | + error = "orte_rmaps_base_find_available"; |
| 504 | + goto error; |
| 505 | + } |
| 506 | + |
| 507 | + /* if a topology file was given, then the rmaps framework open |
| 508 | + * will have reset our topology. Ensure we always get the right |
| 509 | + * one by setting our node topology afterwards |
| 510 | + */ |
| 511 | + t = OBJ_NEW(orte_topology_t); |
| 512 | + t->topo = opal_hwloc_topology; |
| 513 | + /* generate the signature */ |
| 514 | + orte_topo_signature = opal_hwloc_base_get_topo_signature(opal_hwloc_topology); |
| 515 | + t->sig = strdup(orte_topo_signature); |
| 516 | + opal_pointer_array_add(orte_node_topologies, t); |
| 517 | + node->topology = t; |
| 518 | + if (15 < opal_output_get_verbosity(orte_ess_base_framework.framework_output)) { |
| 519 | + opal_output(0, "%s Topology Info:", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME)); |
| 520 | + opal_dss.dump(0, opal_hwloc_topology, OPAL_HWLOC_TOPO); |
| 521 | + } |
499 | 522 |
|
500 | | - /* if we are using static ports, then we need to setup |
| 523 | + /* if we were given the host list, then we need to setup |
501 | 524 | * the daemon info so the RML can function properly |
502 | 525 | * without requiring a wireup stage. This must be done |
503 | 526 | * after we enable_comm as that function determines our |
504 | 527 | * own port, which we need in order to construct the nidmap |
505 | 528 | */ |
506 | | - if (orte_static_ports) { |
| 529 | + if (NULL != hosts) { |
507 | 530 | /* extract the node info from the environment and |
508 | 531 | * build a nidmap from it - this will update the |
509 | 532 | * routing plan as well |
|
0 commit comments