Le 13/03/2012 19:08, Hartmut Kaiser a écrit :
>> -          hwloc_bitmap_from_ith_ulong(obj->cpuset, GroupMask[i].Group,
>> GroupMask[i].Mask);
>> +          hwloc_bitmap_from_ith_ulong(obj->cpuset, 2*GroupMask[i].Group,
>> GroupMask[i].Mask & 0xfffffff);

There's a missing 'f' above.
Here's another almost untested patch, with additional debug printf.
Please remove the previous one and apply this one instead.

Brice



diff --git a/src/topology-windows.c b/src/topology-windows.c
index 55821a4..d695c7a 100644
--- a/src/topology-windows.c
+++ b/src/topology-windows.c
@@ -520,7 +520,9 @@ hwloc_look_windows(struct hwloc_topology *topology)
 	obj = hwloc_alloc_setup_object(type, id);
         obj->cpuset = hwloc_bitmap_alloc();
 	hwloc_debug("%s#%u mask %lx\n", hwloc_obj_type_string(type), id, procInfo[i].ProcessorMask);
-	hwloc_bitmap_from_ulong(obj->cpuset, procInfo[i].ProcessorMask);
+	hwloc_bitmap_from_ulong(obj->cpuset, procInfo[i].ProcessorMask & 0xffffffff);
+	hwloc_bitmap_from_ith_ulong(obj->cpuset, i, procInfo[i].ProcessorMask >> 32);
+	hwloc_debug_bitmap_2args("%s#%u bitmap %s\n", hwloc_obj_type_string(type), id, obj->cpuset);

 	switch (type) {
 	  case HWLOC_OBJ_NODE:
@@ -622,7 +624,9 @@ hwloc_look_windows(struct hwloc_topology *topology)
 	      mask = procInfo->Group.GroupInfo[id].ActiveProcessorMask;
 	      hwloc_debug("group %u %d cpus mask %lx\n", id,
                   procInfo->Group.GroupInfo[id].ActiveProcessorCount, mask);
-	      hwloc_bitmap_from_ith_ulong(obj->cpuset, id, mask);
+	      hwloc_bitmap_from_ith_ulong(obj->cpuset, 2*id, mask & 0xffffffff);
+	      hwloc_bitmap_from_ith_ulong(obj->cpuset, 2*id+1, mask >> 32);
+	      hwloc_debug_bitmap_2args("group %u %d bitmap %s\n", id, procInfo->Group.GroupInfo[id].ActiveProcessorCount, obj->cpuset);
 	      hwloc_insert_object_by_cpuset(topology, obj);
 	    }
 	    continue;
@@ -636,8 +640,10 @@ hwloc_look_windows(struct hwloc_topology *topology)
         obj->cpuset = hwloc_bitmap_alloc();
         for (i = 0; i < num; i++) {
           hwloc_debug("%s#%u %d: mask %d:%lx\n", hwloc_obj_type_string(type), id, i, GroupMask[i].Group, GroupMask[i].Mask);
-          hwloc_bitmap_from_ith_ulong(obj->cpuset, GroupMask[i].Group, GroupMask[i].Mask);
+          hwloc_bitmap_from_ith_ulong(obj->cpuset, 2*GroupMask[i].Group, GroupMask[i].Mask & 0xfffffff);
+          hwloc_bitmap_from_ith_ulong(obj->cpuset, 2*GroupMask[i].Group+1, GroupMask[i].Mask >> 32);
         }
+ 	hwloc_debug_2args("%s#%u bitmap %lx\n", hwloc_obj_type_string(type), id, obj->cpuset);

 	switch (type) {
 	  case HWLOC_OBJ_NODE:

Reply via email to