Index: runtime/src/kmp.h =================================================================== --- runtime/src/kmp.h +++ runtime/src/kmp.h @@ -96,6 +96,12 @@ #ifndef HWLOC_OBJ_PACKAGE #define HWLOC_OBJ_PACKAGE HWLOC_OBJ_SOCKET #endif +#if HWLOC_API_VERSION >= 0x00020000 +// hwloc 2.0 changed type of depth of object from unsigned to int +typedef int kmp_hwloc_depth_t; +#else +typedef unsigned int kmp_hwloc_depth_t; +#endif #endif #if KMP_ARCH_X86 || KMP_ARCH_X86_64 Index: runtime/src/kmp_affinity.cpp =================================================================== --- runtime/src/kmp_affinity.cpp +++ runtime/src/kmp_affinity.cpp @@ -457,7 +457,8 @@ } static int __kmp_hwloc_count_children_by_depth(hwloc_topology_t t, - hwloc_obj_t o, unsigned depth, + hwloc_obj_t o, + kmp_hwloc_depth_t depth, hwloc_obj_t *f) { if (o->depth == depth) { if (*f == NULL)