Hello,
Brad Benton, le Wed 23 Feb 2011 03:48:17 +0100, a écrit :
> Attached are two sets of info...one for the case when SMT
> (Simultaneous MultiThreading) is off, and the other for when it is on.
Ok, found the issue, which is that the device tree also reports the
thread information for the disabled threads, I have commited the
attached fix.
Is it OK for you that we integrate your hwloc-gather-topo-smtoff.tar.bz2
tarball in our series of regression tests?
Samuel
Index: src/topology-linux.c
===================================================================
--- src/topology-linux.c (révision 3204)
+++ src/topology-linux.c (révision 3205)
@@ -2237,7 +2237,8 @@
unsigned int i;
cpuset = hwloc_bitmap_alloc();
for (i = 0; i < nthreads; ++i) {
- hwloc_bitmap_set(cpuset, ntohl(threads[i]));
+ if (hwloc_bitmap_isset(topology->levels[0][0]->complete_cpuset,
ntohl(threads[i])))
+ hwloc_bitmap_set(cpuset, ntohl(threads[i]));
}
free(threads);
} else if ((unsigned int)-1 != reg) {