Skip to content

Commit b8d4e94

Browse files
rhc54hppritcha
authored andcommitted
Raise min required HWLOC version to 2.1.0
We no longer support all the way to pre-StoneAge versions. Signed-off-by: Ralph Castain <[email protected]> (from upstream commit cd8b2f7)
1 parent cafa80c commit b8d4e94

18 files changed

+71
-499
lines changed

VERSION

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ release=0
2323
# List in x.y.z format.
2424

2525
pmix_min_version=4.2.4
26-
hwloc_min_version=1.11.0
26+
hwloc_min_version=2.1.0
2727
event_min_version=2.0.21
2828
automake_min_version=1.13.4
2929
autoconf_min_version=2.69.0

src/docs/show-help-files/help-prte-hwloc-base.rst

-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ additional information may be of help:
8181
.. code::
8282
8383
Message: %s
84-
Cache level: %d
8584
8685
[missing-cpulist]
8786

src/hwloc/hwloc-internal.h

+3-59
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Copyright (c) 2018 Research Organization for Information Science
88
* and Technology (RIST). All rights reserved.
99
*
10-
* Copyright (c) 2021-2023 Nanook Consulting. All rights reserved.
10+
* Copyright (c) 2021-2024 Nanook Consulting All rights reserved.
1111
* Copyright (c) 2023 Advanced Micro Devices, Inc. All rights reserved.
1212
* $COPYRIGHT$
1313
*
@@ -28,24 +28,7 @@
2828
#include <stdarg.h>
2929
#include <stdint.h>
3030
#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>
4932

5033
#include "src/class/pmix_list.h"
5134
#include "src/class/pmix_value_array.h"
@@ -161,20 +144,6 @@ PRTE_EXPORT extern hwloc_obj_type_t prte_hwloc_levels[];
161144
PRTE_EXPORT extern char *prte_hwloc_default_cpu_list;
162145
PRTE_EXPORT extern bool prte_hwloc_default_use_hwthread_cpus;
163146

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-
178147
/**
179148
* Debugging output stream
180149
*/
@@ -210,20 +179,6 @@ PRTE_EXPORT extern bool prte_hwloc_synthetic_topo;
210179
hwloc_bitmap_free(bind); \
211180
} while (0);
212181

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-
227182
PRTE_EXPORT prte_hwloc_locality_t prte_hwloc_base_get_relative_locality(hwloc_topology_t topo,
228183
char *cpuset1,
229184
char *cpuset2);
@@ -283,17 +238,6 @@ PRTE_EXPORT hwloc_cpuset_t prte_hwloc_base_generate_cpuset(hwloc_topology_t topo
283238

284239
PRTE_EXPORT hwloc_cpuset_t prte_hwloc_base_filter_cpus(hwloc_topology_t topo);
285240

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);
297241
PRTE_EXPORT unsigned int prte_hwloc_base_get_obj_idx(hwloc_topology_t topo, hwloc_obj_t obj);
298242

299243
/**
@@ -354,7 +298,7 @@ PRTE_EXPORT char *prte_hwloc_base_cset2str(hwloc_const_cpuset_t cpuset,
354298

355299
PRTE_EXPORT void prte_hwloc_get_binding_info(hwloc_const_cpuset_t cpuset,
356300
bool use_hwthread_cpus,
357-
hwloc_topology_t topo, int *pkgnum,
301+
hwloc_topology_t topo, int *pkgnum,
358302
char *cores, int sz);
359303

360304
/* get the hwloc object that corresponds to the given processor id and type */

src/hwloc/hwloc.c

-11
Original file line numberDiff line numberDiff line change
@@ -377,23 +377,12 @@ int prte_hwloc_base_set_default_binding(void *jd, void *opt)
377377
PRTE_SET_DEFAULT_BINDING_POLICY(jdata->map->binding, PRTE_BIND_TO_PACKAGE);
378378
} else if (HWLOC_OBJ_NUMANODE== options->maptype) {
379379
PRTE_SET_DEFAULT_BINDING_POLICY(jdata->map->binding, PRTE_BIND_TO_NUMA);
380-
#if HWLOC_API_VERSION < 0x20000
381-
} else if (HWLOC_OBJ_CACHE == options->maptype) {
382-
if (1 == options->cmaplvl) {
383-
PRTE_SET_DEFAULT_BINDING_POLICY(jdata->map->binding, PRTE_BIND_TO_L1CACHE);
384-
} else if (2 == options->cmaplvl) {
385-
PRTE_SET_DEFAULT_BINDING_POLICY(jdata->map->binding, PRTE_BIND_TO_L2CACHE);
386-
} else if (3 == options->cmaplvl) {
387-
PRTE_SET_DEFAULT_BINDING_POLICY(jdata->map->binding, PRTE_BIND_TO_L3CACHE);
388-
}
389-
#else
390380
} else if (HWLOC_OBJ_L1CACHE == options->maptype) {
391381
PRTE_SET_DEFAULT_BINDING_POLICY(jdata->map->binding, PRTE_BIND_TO_L1CACHE);
392382
} else if (HWLOC_OBJ_L2CACHE == options->maptype) {
393383
PRTE_SET_DEFAULT_BINDING_POLICY(jdata->map->binding, PRTE_BIND_TO_L2CACHE);
394384
} else if (HWLOC_OBJ_L3CACHE == options->maptype) {
395385
PRTE_SET_DEFAULT_BINDING_POLICY(jdata->map->binding, PRTE_BIND_TO_L3CACHE);
396-
#endif
397386
} else if (HWLOC_OBJ_CORE == options->maptype) {
398387
PRTE_SET_DEFAULT_BINDING_POLICY(jdata->map->binding, PRTE_BIND_TO_CORE);
399388
} else if (HWLOC_OBJ_PU == options->maptype) {

0 commit comments

Comments
 (0)