Ok Brice,
thanks very much for your explanations. But I don't understand why a process
inherits core bound of his threads according to your example:
>It worked because you never mixed it with single thread binding. If you
bind process X to >coreA and then thread Y of process X to coreB, what you
should now see with get_cpubind is >that process X is now bound to cores
A+B, thread Y to B, and all other threads to A.
2011/9/12 Brice Goglin <Brice.Goglin_at_[hidden]>
> Le 12/09/2011 14:17, Gabriele Fatigati a écrit :
> > Mm, and why? In a hybrid code ( MPI + OpenMP), my idea is to bind a
> > single MPI process in one core, and his threads in other cores.
> > Otherwise I have all threads that runs on a single core.
> >
>
> The usual way to do that is to first bind the entire process to all
> cores available to all its thread and then bind each thread to a single
> core.
>
> For instance, if doing Open MPI + OpenMP with one process per socket
> * you pass --bind-to-socket on the mpirun/mpiexec command-line
> * when the MPI process starts, the OpenMP runtime calls something like
> get_cpubind to find out how many cores were given to it
> * it creates the exact same number of OpenMP threads and bind one of
> them on each core
>
> Brice
>
> _______________________________________________
> 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
|