1
1

Fix call to opal_hwloc_base_get_topology.

Make sure the HWLOC topology is available as early as possible, so that
we can fail graciously.

Signed-off-by: George Bosilca <bosilca@icl.utk.edu>
Этот коммит содержится в:
George Bosilca 2017-07-12 18:12:00 -04:00
родитель 6061454055
Коммит 8a7f0baee0
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 09C926752C9F09B1
2 изменённых файлов: 4 добавлений и 5 удалений

Просмотреть файл

@ -62,6 +62,9 @@ mca_topo_treematch_component_2_2_0_t mca_topo_treematch_component =
static int init_query(bool enable_progress_threads, bool enable_mpi_threads)
{
if (OPAL_SUCCESS != opal_hwloc_base_get_topology()) {
return OPAL_ERR_NOT_SUPPORTED;
}
if(NULL == opal_hwloc_topology) {
return OPAL_ERR_NOT_SUPPORTED;
}

Просмотреть файл

@ -238,9 +238,6 @@ int mca_topo_treematch_dist_graph_create(mca_topo_base_module_t* topo_module,
/* Then, we need to know if the processes are bound */
/* We make the hypothesis that all processes are in */
/* the same state : all bound or none bound */
if (OPAL_SUCCESS != opal_hwloc_base_get_topology()) {
goto fallback;
}
root_obj = hwloc_get_root_obj(opal_hwloc_topology);
if (NULL == root_obj) goto fallback;
@ -254,7 +251,6 @@ int mca_topo_treematch_dist_graph_create(mca_topo_base_module_t* topo_module,
* all the calls that involve collective communications, so we have to lay the logic
* accordingly.
*/
if(hwloc_bitmap_isincluded(root_obj->cpuset,set)){ /* processes are not bound on the machine */
#ifdef __DEBUG__
if (0 == rank)
@ -296,7 +292,7 @@ int mca_topo_treematch_dist_graph_create(mca_topo_base_module_t* topo_module,
num_objs_in_node,num_procs_in_node,
nodes_roots,lindex_to_grank,comm_old);
}
if (!oversubscribed_pus) {
/* Update the data used to compute the correct binding */
if(hwloc_bitmap_isincluded(root_obj->cpuset,set)){ /* processes are not bound on the machine */