Le 21/11/2010 21:48, Christopher Samuel a écrit :
> On 22/11/10 07:33, Brice Goglin wrote:
>
> > This patch (on top of the previous patch) should make
> > hwloc-gather-topology.sh work again (and make check too,
> > hopefully).
>
> Well that fixed that part, "patch" whinged that it was
> reversed but -R made it happy.
>
> However, I've now got another failure later on:

It looks like what we fixed in r2773 (committed after rc2 iirc). Patch
attached.

Jeff, can you do a rc3 once make check works for Christopher ?

Brice

commit 25d538d34fbe2e024d24920b72a761f72533f583
Author: bgoglin <bgoglin@4b44e086-7f34-40ce-a3bd-00e031736276>
List-Post: hwloc-devel@lists.open-mpi.org
Date:   Thu Nov 11 15:30:59 2010 +0000

    Fix the zeroing of the destination ulongs in hwloc_cpuset/nodeset_to_linux_libnuma_ulongs

    Thanks to Jirka Hladky for the report



    git-svn-id: https://svn.open-mpi.org/svn/hwloc/trunk@2773 4b44e086-7f34-40ce-a3bd-00e031736276

diff --git a/include/hwloc/linux-libnuma.h b/include/hwloc/linux-libnuma.h
index b29f6c7..44d6abd 100644
--- a/include/hwloc/linux-libnuma.h
+++ b/include/hwloc/linux-libnuma.h
@@ -47,7 +47,8 @@ hwloc_cpuset_to_linux_libnuma_ulongs(hwloc_topology_t topology, hwloc_const_cpus
   unsigned long outmaxnode = -1;

   /* round-up to the next ulong and clear all bytes */
-  memset(mask, 0, (*maxnode+8*sizeof(*mask)-1)/8);
+  *maxnode = (*maxnode + 8*sizeof(*mask) - 1) & ~(8*sizeof(*mask) - 1);
+  memset(mask, 0, *maxnode/8);

   if (depth != HWLOC_TYPE_DEPTH_UNKNOWN) {
     hwloc_obj_t node = NULL;
@@ -89,7 +90,8 @@ hwloc_nodeset_to_linux_libnuma_ulongs(hwloc_topology_t topology, hwloc_const_nod
   unsigned long outmaxnode = -1;

   /* round-up to the next ulong and clear all bytes */
-  memset(mask, 0, (*maxnode+8*sizeof(*mask)-1)/8);
+  *maxnode = (*maxnode + 8*sizeof(*mask) - 1) & ~(8*sizeof(*mask) - 1);
+  memset(mask, 0, *maxnode/8);

   if (depth != HWLOC_TYPE_DEPTH_UNKNOWN) {
     hwloc_obj_t node = NULL;

Reply via email to