Hi Samuel,
please show this little example:
hwloc_obj_t core = hwloc_get_obj_by_type(topology, HWLOC_OBJ_MACHINE, 0);
int return_value = hwloc_get_last_cpu_location(topology, core->cpuset,
HWLOC_CPUBIND_THREAD);
and now in "core->cpuset" I get the new cpuset bitmap, where process/threads
runs. Is it right?
2011/8/10 Samuel Thibault <samuel.thibault_at_[hidden]>
> Gabriele Fatigati, le Wed 10 Aug 2011 09:35:19 +0200, a écrit :
> > 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.
>
> Right, of course.
>
> > I think hwloc_get_last_cpu_location() is used coupled
> with hwloc_get_cpubind()?
>
> Well, they don't _have_ to. They provide a different information. It
> just happens that get_last_cpu_location usually returns an index withing
> what get_cpubind returns ("always", if the binding is strict).
>
> Samuel
> _______________________________________________
> hwloc-users mailing list
> hwloc-users_at_[hidden]
> http://www.open-mpi.org/mailman/listinfo.cgi/hwloc-users
>
--
Ing. Gabriele Fatigati
HPC specialist
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
|