Skip to content

Commit 47def0d

Browse files
committed
hwloc: since WHOLE_SYSTEM is no more used, remove useless
checks related to offline and disallowed elements Signed-off-by: Gilles Gouaillardet <[email protected]>
1 parent 1fd501a commit 47def0d

File tree

13 files changed

+51
-322
lines changed

13 files changed

+51
-322
lines changed

ompi/mpiext/affinity/c/mpiext_affinity_str.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ static int get_rsrc_current_binding(char str[OMPI_AFFINITY_STRING_MAX])
131131

132132
/* get our root object */
133133
root = hwloc_get_root_obj(opal_hwloc_topology);
134-
rootset = opal_hwloc_base_get_available_cpus(opal_hwloc_topology, root);
134+
rootset = root->cpuset;
135135

136136
/* get our bindings */
137137
boundset = hwloc_bitmap_alloc();
@@ -324,7 +324,7 @@ static int get_layout_current_binding(char str[OMPI_AFFINITY_STRING_MAX])
324324

325325
/* get our root object */
326326
root = hwloc_get_root_obj(opal_hwloc_topology);
327-
rootset = opal_hwloc_base_get_available_cpus(opal_hwloc_topology, root);
327+
rootset = root->cpuset;
328328

329329
/* get our bindings */
330330
boundset = hwloc_bitmap_alloc();

opal/mca/btl/sm/btl_sm.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,6 @@ sm_btl_first_time_init(mca_btl_sm_t *sm_btl,
294294
if (OPAL_SUCCESS == opal_hwloc_base_get_topology() && num_mem_nodes > 0) {
295295
int numa=0, w;
296296
unsigned n_bound=0;
297-
hwloc_cpuset_t avail;
298297
hwloc_obj_t obj;
299298

300299
/* count the number of NUMA nodes to which we are bound */
@@ -304,10 +303,8 @@ sm_btl_first_time_init(mca_btl_sm_t *sm_btl,
304303
OPAL_HWLOC_AVAILABLE))) {
305304
continue;
306305
}
307-
/* get that NUMA node's available cpus */
308-
avail = opal_hwloc_base_get_available_cpus(opal_hwloc_topology, obj);
309-
/* see if we intersect */
310-
if (hwloc_bitmap_intersects(avail, opal_hwloc_my_cpuset)) {
306+
/* see if we intersect with that NUMA node's cpus */
307+
if (hwloc_bitmap_intersects(obj->cpuset, opal_hwloc_my_cpuset)) {
311308
n_bound++;
312309
numa = w;
313310
}

opal/mca/btl/smcuda/btl_smcuda.c

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
* reserved.
1717
* Copyright (c) 2012-2015 NVIDIA Corporation. All rights reserved.
1818
* Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved.
19-
* Copyright (c) 2014 Research Organization for Information Science
19+
* Copyright (c) 2014-2017 Research Organization for Information Science
2020
* and Technology (RIST). All rights reserved.
2121
* Copyright (c) 2015-2016 Intel, Inc. All rights reserved.
2222
* $COPYRIGHT$
@@ -296,7 +296,6 @@ smcuda_btl_first_time_init(mca_btl_smcuda_t *smcuda_btl,
296296
num_mem_nodes > 0 && NULL != opal_process_info.cpuset) {
297297
int numa=0, w;
298298
unsigned n_bound=0;
299-
hwloc_cpuset_t avail;
300299
hwloc_obj_t obj;
301300

302301
/* count the number of NUMA nodes to which we are bound */
@@ -306,10 +305,8 @@ smcuda_btl_first_time_init(mca_btl_smcuda_t *smcuda_btl,
306305
OPAL_HWLOC_AVAILABLE))) {
307306
continue;
308307
}
309-
/* get that NUMA node's available cpus */
310-
avail = opal_hwloc_base_get_available_cpus(opal_hwloc_topology, obj);
311-
/* see if we intersect */
312-
if (hwloc_bitmap_intersects(avail, opal_hwloc_my_cpuset)) {
308+
/* see if we intersect with that NUMA node's cpus */
309+
if (hwloc_bitmap_intersects(obj->cpuset, opal_hwloc_my_cpuset)) {
313310
n_bound++;
314311
numa = w;
315312
}

opal/mca/hwloc/base/base.h

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
/*
22
* Copyright (c) 2011-2017 Cisco Systems, Inc. All rights reserved
33
* Copyright (c) 2013-2017 Intel, Inc. All rights reserved.
4+
* Copyright (c) 2017 Research Organization for Information Science
5+
* and Technology (RIST). All rights reserved.
46
* $COPYRIGHT$
57
*
68
* Additional copyrights may follow
@@ -132,9 +134,6 @@ typedef enum {
132134
*/
133135
OPAL_DECLSPEC extern opal_hwloc_base_mbfa_t opal_hwloc_base_mbfa;
134136

135-
/* some critical helper functions */
136-
OPAL_DECLSPEC int opal_hwloc_base_filter_cpus(hwloc_topology_t topo);
137-
138137
/**
139138
* Discover / load the hwloc topology (i.e., call hwloc_topology_init() and
140139
* hwloc_topology_load()).
@@ -150,8 +149,6 @@ OPAL_DECLSPEC int opal_hwloc_base_set_topology(char *topofile);
150149
* Free the hwloc topology.
151150
*/
152151
OPAL_DECLSPEC void opal_hwloc_base_free_topology(hwloc_topology_t topo);
153-
OPAL_DECLSPEC hwloc_cpuset_t opal_hwloc_base_get_available_cpus(hwloc_topology_t topo,
154-
hwloc_obj_t obj);
155152
OPAL_DECLSPEC unsigned int opal_hwloc_base_get_nbobjs_by_type(hwloc_topology_t topo,
156153
hwloc_obj_type_t target,
157154
unsigned cache_level,

opal/mca/hwloc/base/hwloc_base_dt.c

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -136,11 +136,6 @@ int opal_hwloc_unpack(opal_buffer_t *buffer, void *dest,
136136
goto cleanup;
137137
}
138138

139-
/* filter the cpus thru any default cpu set */
140-
if (OPAL_SUCCESS != (rc = opal_hwloc_base_filter_cpus(t))) {
141-
goto cleanup;
142-
}
143-
144139
/* pass it back */
145140
tarray[i] = t;
146141

@@ -268,18 +263,6 @@ static void print_hwloc_obj(char **output, char *prefix,
268263
free(tmp);
269264
tmp = tmp2;
270265
}
271-
if (NULL != obj->online_cpuset) {
272-
hwloc_bitmap_snprintf(string, OPAL_HWLOC_MAX_STRING, obj->online_cpuset);
273-
asprintf(&tmp2, "%s%sOnline: %s", tmp, pfx, string);
274-
free(tmp);
275-
tmp = tmp2;
276-
}
277-
if (NULL != obj->allowed_cpuset) {
278-
hwloc_bitmap_snprintf(string, OPAL_HWLOC_MAX_STRING, obj->allowed_cpuset);
279-
asprintf(&tmp2, "%s%sAllowed: %s", tmp, pfx, string);
280-
free(tmp);
281-
tmp = tmp2;
282-
}
283266
if (HWLOC_OBJ_MACHINE == obj->type) {
284267
/* root level object - add support values */
285268
support = (struct hwloc_topology_support*)hwloc_topology_get_support(topo);

0 commit comments

Comments
 (0)