|
7 | 7 | * Copyright (c) 2018 Research Organization for Information Science
|
8 | 8 | * and Technology (RIST). All rights reserved.
|
9 | 9 | *
|
10 |
| - * Copyright (c) 2021-2023 Nanook Consulting. All rights reserved. |
| 10 | + * Copyright (c) 2021-2024 Nanook Consulting All rights reserved. |
11 | 11 | * Copyright (c) 2023 Advanced Micro Devices, Inc. All rights reserved.
|
12 | 12 | * $COPYRIGHT$
|
13 | 13 | *
|
|
28 | 28 | #include <stdarg.h>
|
29 | 29 | #include <stdint.h>
|
30 | 30 | #include <hwloc.h>
|
31 |
| -#if HWLOC_API_VERSION >= 0x20000 |
32 |
| -# include <hwloc/shmem.h> |
33 |
| -#endif |
34 |
| - |
35 |
| -#if HWLOC_API_VERSION < 0x10b00 |
36 |
| -#define HWLOC_OBJ_NUMANODE HWLOC_OBJ_NODE |
37 |
| -#define HWLOC_OBJ_PACKAGE HWLOC_OBJ_SOCKET |
38 |
| -#endif |
39 |
| -#if HWLOC_API_VERSION < 0x10a00 |
40 |
| -static inline hwloc_obj_t hwloc_get_numanode_obj_by_os_index(hwloc_topology_t topology, unsigned os_index) |
41 |
| -{ |
42 |
| - hwloc_obj_t obj = NULL; |
43 |
| - while ((obj = hwloc_get_next_obj_by_type(topology, HWLOC_OBJ_NUMANODE, obj)) != NULL) |
44 |
| - if (obj->os_index == os_index) |
45 |
| - return obj; |
46 |
| - return NULL; |
47 |
| -} |
48 |
| -#endif |
| 31 | +#include <hwloc/shmem.h> |
49 | 32 |
|
50 | 33 | #include "src/class/pmix_list.h"
|
51 | 34 | #include "src/class/pmix_value_array.h"
|
@@ -161,20 +144,6 @@ PRTE_EXPORT extern hwloc_obj_type_t prte_hwloc_levels[];
|
161 | 144 | PRTE_EXPORT extern char *prte_hwloc_default_cpu_list;
|
162 | 145 | PRTE_EXPORT extern bool prte_hwloc_default_use_hwthread_cpus;
|
163 | 146 |
|
164 |
| -#if HWLOC_API_VERSION < 0x20000 |
165 |
| -# define HWLOC_OBJ_L3CACHE HWLOC_OBJ_CACHE |
166 |
| -# define HWLOC_OBJ_L2CACHE HWLOC_OBJ_CACHE |
167 |
| -# define HWLOC_OBJ_L1CACHE HWLOC_OBJ_CACHE |
168 |
| -# if HWLOC_API_VERSION < 0x10a00 |
169 |
| -# define HWLOC_OBJ_PACKAGE HWLOC_OBJ_SOCKET |
170 |
| -# endif |
171 |
| -# define HAVE_DECL_HWLOC_OBJ_OSDEV_COPROC 0 |
172 |
| -# define HAVE_HWLOC_TOPOLOGY_DUP 0 |
173 |
| -#else |
174 |
| -# define HAVE_DECL_HWLOC_OBJ_OSDEV_COPROC 1 |
175 |
| -# define HAVE_HWLOC_TOPOLOGY_DUP 1 |
176 |
| -#endif |
177 |
| - |
178 | 147 | /**
|
179 | 148 | * Debugging output stream
|
180 | 149 | */
|
@@ -210,20 +179,6 @@ PRTE_EXPORT extern bool prte_hwloc_synthetic_topo;
|
210 | 179 | hwloc_bitmap_free(bind); \
|
211 | 180 | } while (0);
|
212 | 181 |
|
213 |
| -#if HWLOC_API_VERSION < 0x20000 |
214 |
| -# define PRTE_HWLOC_MAKE_OBJ_CACHE(level, obj, cache_level) \ |
215 |
| - do { \ |
216 |
| - obj = HWLOC_OBJ_CACHE; \ |
217 |
| - cache_level = level; \ |
218 |
| - } while (0) |
219 |
| -#else |
220 |
| -# define PRTE_HWLOC_MAKE_OBJ_CACHE(level, obj, cache_level) \ |
221 |
| - do { \ |
222 |
| - obj = HWLOC_OBJ_L##level##CACHE; \ |
223 |
| - cache_level = 0; \ |
224 |
| - } while (0) |
225 |
| -#endif |
226 |
| - |
227 | 182 | PRTE_EXPORT prte_hwloc_locality_t prte_hwloc_base_get_relative_locality(hwloc_topology_t topo,
|
228 | 183 | char *cpuset1,
|
229 | 184 | char *cpuset2);
|
@@ -283,17 +238,6 @@ PRTE_EXPORT hwloc_cpuset_t prte_hwloc_base_generate_cpuset(hwloc_topology_t topo
|
283 | 238 |
|
284 | 239 | PRTE_EXPORT hwloc_cpuset_t prte_hwloc_base_filter_cpus(hwloc_topology_t topo);
|
285 | 240 |
|
286 |
| -/** |
287 |
| - * Free the hwloc topology. |
288 |
| - */ |
289 |
| -PRTE_EXPORT unsigned int prte_hwloc_base_get_nbobjs_by_type(hwloc_topology_t topo, |
290 |
| - hwloc_obj_type_t target, |
291 |
| - unsigned cache_level); |
292 |
| - |
293 |
| -PRTE_EXPORT hwloc_obj_t prte_hwloc_base_get_obj_by_type(hwloc_topology_t topo, |
294 |
| - hwloc_obj_type_t target, |
295 |
| - unsigned cache_level, |
296 |
| - unsigned int instance); |
297 | 241 | PRTE_EXPORT unsigned int prte_hwloc_base_get_obj_idx(hwloc_topology_t topo, hwloc_obj_t obj);
|
298 | 242 |
|
299 | 243 | /**
|
@@ -354,7 +298,7 @@ PRTE_EXPORT char *prte_hwloc_base_cset2str(hwloc_const_cpuset_t cpuset,
|
354 | 298 |
|
355 | 299 | PRTE_EXPORT void prte_hwloc_get_binding_info(hwloc_const_cpuset_t cpuset,
|
356 | 300 | bool use_hwthread_cpus,
|
357 |
| - hwloc_topology_t topo, int *pkgnum, |
| 301 | + hwloc_topology_t topo, int *pkgnum, |
358 | 302 | char *cores, int sz);
|
359 | 303 |
|
360 | 304 | /* get the hwloc object that corresponds to the given processor id and type */
|
|
0 commit comments