1
1

Somehow slipped by - ensure we correctly count the cores

Этот коммит содержится в:
Ralph Castain 2015-03-19 17:56:18 -07:00
родитель 43a3baad5e
Коммит ed5d10b816

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

@ -487,7 +487,8 @@ static void df_search_cores(hwloc_obj_t obj, unsigned int *cnt)
if (HWLOC_OBJ_CORE == obj->type) { if (HWLOC_OBJ_CORE == obj->type) {
data = (opal_hwloc_obj_data_t*)obj->userdata; data = (opal_hwloc_obj_data_t*)obj->userdata;
if (NULL == data) { if (NULL == data) {
return; data = OBJ_NEW(opal_hwloc_obj_data_t);
obj->userdata = (void*)data;
} }
if (NULL == opal_hwloc_base_cpu_set) { if (NULL == opal_hwloc_base_cpu_set) {
data->npus = 1; data->npus = 1;
@ -585,6 +586,7 @@ unsigned int opal_hwloc_base_get_npus(hwloc_topology_t topo,
} }
} }
/* cache the info */ /* cache the info */
data = (opal_hwloc_obj_data_t*)obj->userdata; // in case it was added
if (NULL == data) { if (NULL == data) {
data = OBJ_NEW(opal_hwloc_obj_data_t); data = OBJ_NEW(opal_hwloc_obj_data_t);
obj->userdata = (void*)data; obj->userdata = (void*)data;