Le 25/09/2011 20:27, Gabriele Fatigati a écrit :
> if(tid==0){
>
>  set_membind(HWLOCMEMBIND_BIND, node 0)
>  malloc(array)...
>
> }
>
> if (tid==1){
>  set_membind(HWLOCMEMBIND_BIND, node 1)
>
> for(i...)
>   array(i)
> }
>
> end parallel region
>
>
> array is allocated on node 1, not node 0 as I expected So it seems
> set_membind() of second thread influence in some manner array
> allocation using first touch.

Why do you call set_membind() here? It's whole point is to change the
allocation policy of the current thread. If this thread then
first-touches some data, this data will obviously get allocated
acocording to set_membind().

If you don't want set_membind() to modify the allocation policy of the
current thread, why do you call it?

Brice


Reply via email to