Fixes #3507: CMR to v1.6: using hwloc to report single-core bindings on Solaris v1.6
authorjsquyres
Sat Feb 09 15:01:11 2013 +0000 (3 months ago)
branchv1.6
changeset 213777b854048599e
parent 21363 27d9ef63b7f2
child 21378 4a94d8d41e95
Fixes #3507: CMR to v1.6: using hwloc to report single-core bindings on Solaris

Custom patch from hwloc upstream to fix Solaris process binding
issue. Thanks to Siegmar Gross for reporting the problem.

Based on https://svn.open-mpi.org/trac/hwloc/changeset/5295 and
https://svn.open-mpi.org/trac/hwloc/changeset/5296.
NEWS
opal/mca/hwloc/hwloc132/README-ompi.txt
opal/mca/hwloc/hwloc132/hwloc/src/topology-solaris.c
     1.1 --- a/NEWS	Fri Feb 01 21:56:44 2013 +0000
     1.2 +++ b/NEWS	Sat Feb 09 15:01:11 2013 +0000
     1.3 @@ -50,6 +50,8 @@
     1.4  1.6.4
     1.5  -----
     1.6  
     1.7 +- Fix process binding issue on Solaris.  Thanks to Siegmar Gross for
     1.8 +  reporting the problem.
     1.9  - Updates for MXM 2.0.
    1.10  - Major VT update to 5.14.2.3.
    1.11  - Fixed F77 constants for Cygwin/Cmake build.
     2.1 --- a/opal/mca/hwloc/hwloc132/README-ompi.txt	Fri Feb 01 21:56:44 2013 +0000
     2.2 +++ b/opal/mca/hwloc/hwloc132/README-ompi.txt	Sat Feb 09 15:01:11 2013 +0000
     2.3 @@ -6,3 +6,5 @@
     2.4  https://svn.open-mpi.org/trac/hwloc/changeset/4319
     2.5  https://svn.open-mpi.org/trac/hwloc/changeset/4340
     2.6  https://svn.open-mpi.org/trac/hwloc/changeset/4345
     2.7 +https://svn.open-mpi.org/trac/hwloc/changeset/5295
     2.8 +https://svn.open-mpi.org/trac/hwloc/changeset/5296
     3.1 --- a/opal/mca/hwloc/hwloc132/hwloc/src/topology-solaris.c	Fri Feb 01 21:56:44 2013 +0000
     3.2 +++ b/opal/mca/hwloc/hwloc132/hwloc/src/topology-solaris.c	Sat Feb 09 15:01:11 2013 +0000
     3.3 @@ -137,6 +137,7 @@
     3.4    int depth = hwloc_get_type_depth(topology, HWLOC_OBJ_NODE);
     3.5    int n;
     3.6    int i;
     3.7 +  processorid_t binding;
     3.8  
     3.9    if (depth < 0) {
    3.10      errno = ENOSYS;
    3.11 @@ -146,6 +147,15 @@
    3.12    hwloc_bitmap_zero(hwloc_set);
    3.13    n = hwloc_get_nbobjs_by_depth(topology, depth);
    3.14  
    3.15 +  /* first check if processor_bind() was used to bind to a single processor rather than to an lgroup */
    3.16 +
    3.17 +  if ( processor_bind(idtype, id, PBIND_QUERY, &binding) == 0 && binding != PBIND_NONE ) {
    3.18 +    hwloc_bitmap_only(hwloc_set, binding);
    3.19 +    return 0;
    3.20 +  }
    3.21 +
    3.22 +  /* if not, check lgroups */
    3.23 +
    3.24    for (i = 0; i < n; i++) {
    3.25      hwloc_obj_t obj = hwloc_get_obj_by_depth(topology, depth, i);
    3.26      lgrp_affinity_t aff = lgrp_affinity_get(idtype, id, obj->os_index);