these lines, doesn't works:
set = hwloc_bitmap_alloc();
hwloc_get_cpubind(topology, &set, 0);
hwloc_get_cpubind() crash, because I have to pass set, not &set i suppose.
I think hwloc_get_last_cpu_location() is used coupled with
hwloc_get_cpubind() give me the cpuset, and hwloc_get_last_cpu_location()
give me CPU index where process/thread runs from cpuset passed. It is right?
The phylosophy of these function are
2011/8/9 Samuel Thibault <samuel.thibault_at_[hidden]>
> Gabriele Fatigati, le Tue 09 Aug 2011 18:14:55 +0200, a écrit :
> > hwloc_get_cpubind() function, return, according to the manual, "current
> > or thread binding". What does it means?
> The cpuset to which the current process or thread (according to flags)
> was last bound to. That is, the converse of set_cpubind().
> > It return cpu index where process/ thread runs?
> No, hwloc_get_last_cpu_location() does that.
> > If yes, which cpuset I have to use in function arguments?
> get_cpubind returns a cpuset, you just provide one you have allocated
> the way you prefer.
> > Could you give me a little example to use it?
> It is really just the converse of hwloc_set_cpubind(), so for instance:
> set = hwloc_bitmap_alloc();
> hwloc_get_cpubind(topology, &set, 0)
> hwloc-users mailing list
Ing. Gabriele Fatigati
SuperComputing Applications and Innovation Department
Via Magnanelli 6/3, Casalecchio di Reno (BO) Italy
www.cineca.it Tel: +39 051 6171722
g.fatigati [AT] cineca.it