Ok,

>A process is a container that contains one or several threads. The binding is where >something can run. It's normal that "where a process can run" is "where any of its >threads can run", which means it's the logical OR of their binding.


Ok, now it's clear.

I'm using hwloc_get_last_cpu_location(), not get_cpubind(), sorry..

Well, the first thing to understand is what you're trying to do here. In the vast majority of cases, binding a thread outside of the binding of the corresponding process looks like buggy programming.


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..


2011/9/12 Brice Goglin <Brice.Goglin@inria.fr>
Le 12/09/2011 13:58, Gabriele Fatigati a écrit :
Hi Brice,

but in the manual is not written that get_cpubind() returns the logical OR of the binding of all threads... I ever understand that returns the bind of the calloer, where the caller can be process or thread..

A process is a container that contains one or several threads. The binding is where something can run. It's normal that "where a process can run" is "where any of its threads can run", which means it's the logical OR of their binding.




I'm mixing bind of process and threads, and I've noted that if the process and thread are on the same NUMA node, works well, also on different cores.

If the NUMA node of process is different of NUMA node of threads, there is a problem.


Well, the first thing to understand is what you're trying to do here. In the vast majority of cases, binding a thread outside of the binding of the corresponding process looks like buggy programming.

Brice


_______________________________________________
hwloc-users mailing list
hwloc-users@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