I report my questions in a different way (in the first question i did a
1) I don't understand the means of set_membind() function. Why I should to
allocate in a node "near" my cpuset and not in my local node (where thread
or process runs?)
2) Which is the behaviour of HWLOC_MEMBIND_BIND flag?
>From the manual:
"Allocate memory on the specified nodes."
It means that I can allocate without binding the memory? What happens if one
thread allocate and another thread in another node read/write for the first
time this memory? In a little example I see the memory is allocated on the
second thread, not where first thread does malloc(). So, when I have to use
HWLOC_MEMBIND_BIND flag? Or it has nothing to do with binding?
If the effective allocation is done when first thread touch the memory,
which is the means of this flag?
2) My goal is to replicate the behaviour of set_area_membind_nodeset() in
some manner for all futures allocation without call this function each time
I allocate some memory. Is it possible to do this?
2011/9/22 Gabriele Fatigati <g.fatigati_at_[hidden]>
> some questions:
> 1) I don't understand the means of HWLOC_MEMBIND_BIND policy. Why I should
> to allocate in a node "near" my cpuset and not in my local node ( where
> thread or process runs?)
> 2) My goal is to replicate the behaviour of set_area_membind_nodeset() in
> some manner for all futures allocation without call this function each time
> I allocate some memory. Is it possible to do this?
> 2011/9/22 Brice Goglin <Brice.Goglin_at_[hidden]>
>> Le 22/09/2011 12:20, Gabriele Fatigati a écrit :
>> > NUMA node(s) near the specified cpuset.
>> > What does "nodes near the specified cpuset" means? The node wherethe
>> > specified cpuset lives?
>> > Set the default memory binding policy of the current process or thread
>> > to prefer the
>> The node near the CPU specified in the cpuset.
>> > The first thread allocates with a malloc an array. The second thread
>> > (bound on other node) initialize the array.
>> > The free memory on the nodes decrease only on the node where the
>> > second thread is. Is it rigth?
>> > hwloc_set_membind involves all future allocations?
>> Yes. And already allocated pages if you add the migrate flag.
>> hwloc-users mailing list
> 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
Ing. Gabriele Fatigati
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