Fix the compile error for libnuma 0.9.x introduced in r24442;
hopefully, this now compiles for libnuma 0.9.x and libnuma 2.0.x. Fixes for the strategy discussed in the commit message for r24442 (i.e., check against numa_get_mems_allowed(), which only exists in libnuma 2.0.x) and the new new new plan on #2698 coming in a separate commit. This commit was SVN r24443. The following SVN revision numbers were found above: r24442 --> open-mpi/ompi@90a8fe4aad
Этот коммит содержится в:
родитель
90a8fe4aad
Коммит
5e082d68f6
@ -69,7 +69,17 @@ int opal_maffinity_libnuma_component_query(mca_base_module_t **module, int *prio
|
||||
|
||||
static int libnuma_module_init(void)
|
||||
{
|
||||
struct bitmask * mask;
|
||||
/* Libnuma didn't start defining an API version until version 2.
|
||||
Sigh. For convenience, ensure it's always defined. */
|
||||
#if !defined(LIBNUMA_API_VERSION)
|
||||
#define LIBNUMA_API_VERSION 1
|
||||
#endif
|
||||
|
||||
#if LIBNUMA_API_VERSION >= 2
|
||||
struct bitmask *mask;
|
||||
#else
|
||||
nodemask_t mask;
|
||||
#endif
|
||||
|
||||
/* If we have a strict policy set, then bind all memory to this
|
||||
numa node. Note that maffinity won't be invoked unless the
|
||||
@ -78,7 +88,11 @@ static int libnuma_module_init(void)
|
||||
numa_get_run_node_mask(). */
|
||||
if (MPOL_BIND == mca_maffinity_libnuma_component.libnuma_policy) {
|
||||
mask = numa_get_run_node_mask();
|
||||
#if LIBNUMA_API_VERSION >= 2
|
||||
numa_set_membind(mask);
|
||||
#else
|
||||
numa_set_membind(&mask);
|
||||
#endif
|
||||
}
|
||||
|
||||
/* We want libnuma to fail to alloc if it can't allocate on the
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user