That's exactly what set_area_membind() was meant for.
That said, you can only move entire pages (usually 4kbytes) to
another domain. So you can only move half of your array if you array
is larger than a single page.
You likely need something like this:
[... initialize the hwloc topology ... ]
hwloc_bitmap_t set = hwloc_bitmap_alloc();
hwloc_bitmap_only(set, N); /* where N is the number of the
domain/numa-node where you want to move */
buffer_length_in_bytes, set, HWLOC_MEMBIND_BIND,
Le 27/02/2013 22:02, Aulwes, Rob a écrit :
I'm running OpenMP tests and I see a slow down going from 8
to 16 threads. I'm suspecting that the arrays I'm using are all
allocated on a single NUMA domain, so that threads 9-15
encounter a slowdown when accessing those arrays, because they
have to cross domains. Suppose that I've allocated an array
v[1..100]. Is it possible to use hwloc_set_area_membind_nodeset
to reset a portion of the array to another domain? That is,
can I "move" v[51..100] to a different NUMA domain?
hwloc-users mailing list