Re: [hwloc-users] Thread core affinity

2011-07-29 Thread Samuel Thibault
Gabriele Fatigati, le Fri 29 Jul 2011 13:34:29 +0200, a écrit : > I forgot to tell you these code block is inside a parallel OpenMP region. This > is the complete code: > > #pragma omp parallel num_threads(6) > { > int tid = omp_get_thread_num(); > > hwloc_obj_t core =

Re: [hwloc-users] Thread core affinity

2011-07-29 Thread Gabriele Fatigati
Sorry, I forgot to tell you these code block is inside a parallel OpenMP region. This is the complete code: #pragma omp parallel num_threads(6) { int tid = omp_get_thread_num(); hwloc_obj_t core = hwloc_get_obj_by_type(topology, HWLOC_OBJ_CORE, tid); hwloc_cpuset_t set =

Re: [hwloc-users] Thread core affinity

2011-07-29 Thread Samuel Thibault
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 =

Re: [hwloc-users] Thread core affinity

2011-07-29 Thread Gabriele Fatigati
Hi Samuel, 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,

Re: [hwloc-users] Thread core affinity

2011-07-29 Thread Samuel Thibault
Hello, Gabriele Fatigati, le Fri 29 Jul 2011 12:43:47 +0200, a écrit : > I'm so confused. I see couples of cores with the same core id! ( Core#8 for > example)  How is it possible?  That's because they are on different sockets. These are physical IDs (not logical IDs), and are thus not garanteed

[hwloc-users] Thread core affinity

2011-07-29 Thread Gabriele Fatigati
Dear hwloc users, I have some questions about thread core affinity managed by hwloc. 1) A simple hwloc-hello.c program in the manual on my machine give me the follow results: *** Objects at level 0 Index 0: Machine#0(47GB) *** Objects at level 1 Index 0: NUMANode#0(24GB) Index 1: