Custom patch for hwloc (that will be included in hwloc 1.1.2) so that
we don't barf on Linux non-NUMA (NNUMA, aka UMA ;-) ) platforms. This commit was SVN r24448.
Этот коммит содержится в:
родитель
2368410eff
Коммит
8143b201a9
@ -862,6 +862,13 @@ hwloc_linux_membind_mask_from_nodeset(hwloc_topology_t topology __hwloc_attribut
|
|||||||
unsigned max_os_index = 0; /* highest os_index + 1 */
|
unsigned max_os_index = 0; /* highest os_index + 1 */
|
||||||
unsigned long *linuxmask;
|
unsigned long *linuxmask;
|
||||||
unsigned i;
|
unsigned i;
|
||||||
|
hwloc_nodeset_t linux_nodeset = NULL;
|
||||||
|
|
||||||
|
if (hwloc_bitmap_isfull(nodeset)) {
|
||||||
|
linux_nodeset = hwloc_bitmap_alloc();
|
||||||
|
hwloc_bitmap_only(linux_nodeset, 0);
|
||||||
|
nodeset = linux_nodeset;
|
||||||
|
}
|
||||||
|
|
||||||
max_os_index = hwloc_bitmap_last(nodeset);
|
max_os_index = hwloc_bitmap_last(nodeset);
|
||||||
if (max_os_index == (unsigned) -1)
|
if (max_os_index == (unsigned) -1)
|
||||||
@ -878,6 +885,9 @@ hwloc_linux_membind_mask_from_nodeset(hwloc_topology_t topology __hwloc_attribut
|
|||||||
for(i=0; i<max_os_index/HWLOC_BITS_PER_LONG; i++)
|
for(i=0; i<max_os_index/HWLOC_BITS_PER_LONG; i++)
|
||||||
linuxmask[i] = hwloc_bitmap_to_ith_ulong(nodeset, i);
|
linuxmask[i] = hwloc_bitmap_to_ith_ulong(nodeset, i);
|
||||||
|
|
||||||
|
if (linux_nodeset)
|
||||||
|
hwloc_bitmap_free(linux_nodeset);
|
||||||
|
|
||||||
*max_os_index_p = max_os_index;
|
*max_os_index_p = max_os_index;
|
||||||
*linuxmaskp = linuxmask;
|
*linuxmaskp = linuxmask;
|
||||||
return 0;
|
return 0;
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user