1
1

Merge pull request #5218 from rhc54/topic/cleanup

Fix external hwloc builds
Этот коммит содержится в:
Ralph Castain 2018-06-03 13:36:10 -07:00 коммит произвёл GitHub
родитель 3020b699f3 7c0ec7e851
Коммит 82a664a5ff
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
4 изменённых файлов: 35 добавлений и 38 удалений

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

@ -23,8 +23,8 @@ with_memory_manager=no
with_tm=no
with_psm=no
with_psm2=no
with_libfabric=/home/common/libfabric/build
with_devel_headers=yes
with_libfabric=no
with_portals=no
with_valgrind=no
if [ -n "$SLURMHOME" ] ; then

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

@ -13,7 +13,7 @@
* Copyright (c) 2011-2018 Cisco Systems, Inc. All rights reserved
* Copyright (c) 2012-2017 Los Alamos National Security, LLC.
* All rights reserved.
* Copyright (c) 2013-2017 Intel, Inc. All rights reserved.
* Copyright (c) 2013-2018 Intel, Inc. All rights reserved.
* Copyright (c) 2015-2017 Research Organization for Information Science
* and Technology (RIST). All rights reserved.
* $COPYRIGHT$
@ -708,9 +708,7 @@ static hwloc_obj_t df_search(hwloc_topology_t topo,
opal_hwloc_resource_type_t rtype,
unsigned int *num_objs)
{
unsigned k;
hwloc_obj_t obj;
opal_hwloc_obj_data_t *data;
int search_depth;
search_depth = hwloc_get_type_depth(topo, target);
@ -757,7 +755,7 @@ static hwloc_obj_t df_search(hwloc_topology_t topo,
return found;
}
if (OPAL_HWLOC_AVAILABLE == rtype) {
int idx = 0;
unsigned idx = 0;
if (num_objs)
*num_objs = hwloc_get_nbobjs_inside_cpuset_by_depth(topo, start->cpuset, search_depth);
obj = NULL;

3
opal/mca/hwloc/external/configure.m4 поставляемый
Просмотреть файл

@ -4,6 +4,7 @@
# Copyright (c) 2014-2017 Research Organization for Information Science
# and Technology (RIST). All rights reserved.
#
# Copyright (c) 2018 Intel, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
@ -63,7 +64,7 @@ AC_DEFUN([MCA_opal_hwloc_external_POST_CONFIG],[
# the MCA_hwloc_external_openfabrics_helper define).
AS_IF([test "$opal_hwloc_dir" != ""],
[opal_hwloc_include="$opal_hwloc_dir/include/hwloc.h"
opal_hwloc_shmem_include="$opal_hwloc_dir/include/hwloc/shmem.h",
opal_hwloc_shmem_include="$opal_hwloc_dir/include/hwloc/shmem.h"
opal_hwloc_openfabrics_include="$opal_hwloc_dir/include/hwloc/openfabrics-verbs.h"],
[opal_hwloc_include="hwloc.h"
opal_hwloc_shmem_include="hwloc/shmem.h"

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

@ -165,20 +165,20 @@ static int bind_generic(orte_job_t *jdata,
/* use the min_bound object that intersects locale->cpuset at target_depth */
tmp_obj = NULL;
trg_obj = NULL;
min_bound = UINT_MAX;
while (tmp_obj = hwloc_get_next_obj_by_depth(node->topology->topo, target_depth, tmp_obj)) {
trg_obj = NULL;
min_bound = UINT_MAX;
while (NULL != (tmp_obj = hwloc_get_next_obj_by_depth(node->topology->topo, target_depth, tmp_obj))) {
if (!hwloc_bitmap_intersects(locale->cpuset, tmp_obj->cpuset))
continue;
data = (opal_hwloc_obj_data_t*)tmp_obj->userdata;
if (NULL == data) {
data = (opal_hwloc_obj_data_t*)tmp_obj->userdata;
if (NULL == data) {
data = OBJ_NEW(opal_hwloc_obj_data_t);
tmp_obj->userdata = data;
}
if (data->num_bound < min_bound) {
min_bound = data->num_bound;
trg_obj = tmp_obj;
}
if (data->num_bound < min_bound) {
min_bound = data->num_bound;
trg_obj = tmp_obj;
}
}
if (NULL == trg_obj) {
/* there aren't any such targets under this object */
@ -580,7 +580,6 @@ int orte_rmaps_base_compute_bindings(orte_job_t *jdata)
orte_node_t *node;
int i, rc;
struct hwloc_topology_support *support;
bool force_down = false;
int bind_depth;
opal_output_verbose(5, orte_rmaps_base_framework.framework_output,
@ -701,7 +700,6 @@ int orte_rmaps_base_compute_bindings(orte_job_t *jdata)
}
} else if (OPAL_BIND_TO_NUMA < bind) {
/* bind every proc downwards */
force_down = true;
goto execute;
}
/* if the binding policy is less than numa, then we are unbound - so
@ -803,33 +801,33 @@ int orte_rmaps_base_compute_bindings(orte_job_t *jdata)
/* determine the relative depth on this node */
#if HWLOC_API_VERSION < 0x20000
if (HWLOC_OBJ_CACHE == hwb) {
/* must use a unique function because blasted hwloc
* just doesn't deal with caches very well...sigh
*/
bind_depth = hwloc_get_cache_type_depth(node->topology->topo, clvl, (hwloc_obj_cache_type_t)-1);
} else
if (HWLOC_OBJ_CACHE == hwb) {
/* must use a unique function because blasted hwloc
* just doesn't deal with caches very well...sigh
*/
bind_depth = hwloc_get_cache_type_depth(node->topology->topo, clvl, (hwloc_obj_cache_type_t)-1);
} else
#endif
bind_depth = hwloc_get_type_depth(node->topology->topo, hwb);
bind_depth = hwloc_get_type_depth(node->topology->topo, hwb);
#if HWLOC_API_VERSION < 0x20000
if (0 > bind_depth)
if (0 > bind_depth)
#else
if (0 > bind_depth && HWLOC_TYPE_DEPTH_NUMANODE != bind_depth)
#endif
{
/* didn't find such an object */
orte_show_help("help-orte-rmaps-base.txt", "orte-rmaps-base:no-objects",
true, hwloc_obj_type_string(hwb), node->name);
return ORTE_ERR_SILENT;
}
opal_output_verbose(5, orte_rmaps_base_framework.framework_output,
"%s bind_depth: %d",
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME),
bind_depth);
if (ORTE_SUCCESS != (rc = bind_generic(jdata, node, bind_depth))) {
ORTE_ERROR_LOG(rc);
return rc;
}
/* didn't find such an object */
orte_show_help("help-orte-rmaps-base.txt", "orte-rmaps-base:no-objects",
true, hwloc_obj_type_string(hwb), node->name);
return ORTE_ERR_SILENT;
}
opal_output_verbose(5, orte_rmaps_base_framework.framework_output,
"%s bind_depth: %d",
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME),
bind_depth);
if (ORTE_SUCCESS != (rc = bind_generic(jdata, node, bind_depth))) {
ORTE_ERROR_LOG(rc);
return rc;
}
}
return ORTE_SUCCESS;