Hi Samuel,

how the topology gave by lstopo is built? In particolar, how the logical
index P# are initialized?

2011/8/4 Samuel Thibault <samuel.thiba...@inria.fr>

> Hello,
>
> Gabriele Fatigati, le Mon 01 Aug 2011 12:32:44 +0200, a écrit :
> > So, are not physically near. I aspect that with Hyperthreading, and 2
> hardware
> > threads each core, PU P#0 and PU P#1 are on the same core.
>
> Since these are P#0 and 1, they may not be indeed (physical indexes).
> That's the whole problem of the indexes provided by operating systems.
>
> Fortunately,
>
> > If is it not true,
> > using in a OMP PARALLEL region with 2 software threads:
> >
> > $ pragma omp paralle num_threads(2)
> >
> > tid= omp_get_thread_num();
> >
> > 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);
> >
> >
> >
> > i would bind thread 0 on PU P#0 and thread 1 on PU P#1, supposing are
> > physically near.
>
> No, because hwloc functions do not use physical, but logical indexes,
> which it computes according to the topology. Use lstopo --top to check
> the actual binding being used.
>
> Samuel
> _______________________________________________
> hwloc-users mailing list
> hwloc-us...@open-mpi.org
> 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

Reply via email to