Sorry,
Gabriele Fatigati, le Fri 29 Jul 2011 13:24:17 +0200, a écrit :
> yhanks for yout quick reply!
>
> But i have a litte doubt. in a non SMT machine, Is it better use this:
>
> hwloc_obj_t core = hwloc_get_obj_by_type(topology, HWLOC_OBJ_CORE, tid);
> hwloc_cpuset_t set = hwloc_bitmap_dup(core->cpuset);
> hwloc_bitmap_singlify(set);
> hwloc_set_cpubind(topology, set, HWLOC_CPUBIND_THREAD);
>
> or:
>
> hwloc_obj_t core = hwloc_get_obj_by_type(topology, HWLOC_OBJ_PU, tid);
> hwloc_cpuset_t set = hwloc_bitmap_dup(core->cpuset);
> hwloc_bitmap_singlify(set);
> hwloc_set_cpubind(topology, set, HWLOC_CPUBIND_THREAD);
>
> because work in the same way( i suppose).They'll both work about the same way on SMT too, since in the end it'll
pick up only one thread. Whether you want to assign threads to cores or
threads then depends on your application: do you want to let its threads
share a core or not.
Samuel
_______________________________________________
hwloc-users mailing list
hwloc-users@open-mpi.org
http://www.open-mpi.org/mailman/listinfo.cgi/hwloc-users