1919#if KMP_USE_HIER_SCHED
2020#include " kmp_dispatch_hier.h"
2121#endif
22- #if KMP_USE_HWLOC
22+ #if KMP_INCLUDES_HWLOC
2323// Copied from hwloc
2424#define HWLOC_GROUP_KIND_INTEL_MODULE 102
2525#define HWLOC_GROUP_KIND_INTEL_TILE 103
@@ -1440,7 +1440,7 @@ void KMPAffinity::pick_api() {
14401440 KMPAffinity *affinity_dispatch;
14411441 if (picked_api)
14421442 return ;
1443- #if KMP_USE_HWLOC
1443+ #if KMP_INCLUDES_HWLOC
14441444 // Only use Hwloc if affinity isn't explicitly disabled and
14451445 // user requests Hwloc topology method
14461446 if (__kmp_affinity_top_method == affinity_top_method_hwloc &&
@@ -1699,7 +1699,7 @@ kmp_affin_mask_t *__kmp_affin_fullMask = NULL;
16991699// Original mask is a subset of full mask in multiple processor groups topology
17001700kmp_affin_mask_t *__kmp_affin_origMask = NULL ;
17011701
1702- #if KMP_USE_HWLOC
1702+ #if KMP_INCLUDES_HWLOC
17031703static inline bool __kmp_hwloc_is_cache_type (hwloc_obj_t obj) {
17041704#if HWLOC_API_VERSION >= 0x00020000
17051705 return hwloc_obj_type_is_cache (obj->type );
@@ -2007,7 +2007,7 @@ static bool __kmp_affinity_create_hwloc_map(kmp_i18n_id_t *const msg_id) {
20072007 __kmp_topology->sort_ids ();
20082008 return true ;
20092009}
2010- #endif // KMP_USE_HWLOC
2010+ #endif // KMP_INCLUDES_HWLOC
20112011
20122012// If we don't know how to retrieve the machine's processor topology, or
20132013// encounter an error in doing so, this routine is called to form a "flat"
@@ -4854,7 +4854,7 @@ static bool __kmp_aux_affinity_initialize_topology(kmp_affinity_t &affinity) {
48544854// In the default code path, errors are not fatal - we just try using
48554855// another method. We only emit a warning message if affinity is on, or the
48564856// verbose flag is set, an the nowarnings flag was not set.
4857- #if KMP_USE_HWLOC
4857+ #if KMP_INCLUDES_HWLOC
48584858 if (!success &&
48594859 __kmp_affinity_dispatch->get_api_type () == KMPAffinity::HWLOC) {
48604860 if (!__kmp_hwloc_error) {
@@ -4914,7 +4914,7 @@ static bool __kmp_aux_affinity_initialize_topology(kmp_affinity_t &affinity) {
49144914// If the user has specified that a paricular topology discovery method is to be
49154915// used, then we abort if that method fails. The exception is group affinity,
49164916// which might have been implicitly set.
4917- #if KMP_USE_HWLOC
4917+ #if KMP_INCLUDES_HWLOC
49184918 else if (__kmp_affinity_top_method == affinity_top_method_hwloc) {
49194919 KMP_ASSERT (__kmp_affinity_dispatch->get_api_type () == KMPAffinity::HWLOC);
49204920 success = __kmp_affinity_create_hwloc_map (&msg_id);
@@ -4923,7 +4923,7 @@ static bool __kmp_aux_affinity_initialize_topology(kmp_affinity_t &affinity) {
49234923 KMP_FATAL (MsgExiting, __kmp_i18n_catgets (msg_id));
49244924 }
49254925 }
4926- #endif // KMP_USE_HWLOC
4926+ #endif // KMP_INCLUDES_HWLOC
49274927
49284928#if KMP_ARCH_X86 || KMP_ARCH_X86_64
49294929 else if (__kmp_affinity_top_method == affinity_top_method_x2apicid ||
@@ -5322,7 +5322,7 @@ void __kmp_affinity_uninitialize(void) {
53225322 __kmp_free (__kmp_osid_to_hwthread_map);
53235323 __kmp_osid_to_hwthread_map = NULL ;
53245324 }
5325- #if KMP_USE_HWLOC
5325+ #if KMP_INCLUDES_HWLOC
53265326 if (__kmp_hwloc_topology != NULL ) {
53275327 hwloc_topology_destroy (__kmp_hwloc_topology);
53285328 __kmp_hwloc_topology = NULL ;
0 commit comments