Fix hwloc get-cpubind routine for Solaris. FIRST, check
processor_bind to see if we're bound to a single core. If not, THEN check lgroup affinity. Already CMR'ed to v1.6 (trac 3507) and fixed upstream in hwloc (r5295). This commit was SVN r28040. The following SVN revision numbers were found above: r5295 --> open-mpi/ompi@6df8cb0f02
Этот коммит содержится в:
родитель
6f257c477f
Коммит
3d44f97572
@ -3,7 +3,7 @@
|
||||
* Copyright © 2009-2012 Inria. All rights reserved.
|
||||
* Copyright © 2009-2011 Université Bordeaux 1
|
||||
* Copyright © 2011 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright © 2011 Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright © 2011-2013 Oracle and/or its affiliates. All rights reserved.
|
||||
* See COPYING in top-level directory.
|
||||
*/
|
||||
|
||||
@ -143,6 +143,7 @@ hwloc_solaris_get_sth_cpubind(hwloc_topology_t topology, idtype_t idtype, id_t i
|
||||
int depth = hwloc_get_type_depth(topology, HWLOC_OBJ_NODE);
|
||||
int n;
|
||||
int i;
|
||||
processorid_t binding;
|
||||
|
||||
if (depth < 0) {
|
||||
errno = ENOSYS;
|
||||
@ -152,6 +153,15 @@ hwloc_solaris_get_sth_cpubind(hwloc_topology_t topology, idtype_t idtype, id_t i
|
||||
hwloc_bitmap_zero(hwloc_set);
|
||||
n = hwloc_get_nbobjs_by_depth(topology, depth);
|
||||
|
||||
/* first check if processor_bind() was used to bind to a single processor rather than to an lgroup */
|
||||
|
||||
if ( processor_bind(idtype, id, PBIND_QUERY, &binding) == 0 && binding != PBIND_NONE ) {
|
||||
hwloc_bitmap_only(hwloc_set, binding);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* if not, check lgroups */
|
||||
|
||||
for (i = 0; i < n; i++) {
|
||||
hwloc_obj_t obj = hwloc_get_obj_by_depth(topology, depth, i);
|
||||
lgrp_affinity_t aff = lgrp_affinity_get(idtype, id, obj->os_index);
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user