44 lines
1.6 KiB
Diff
44 lines
1.6 KiB
Diff
|
From: Egbert Eich <eich@suse.de>
|
||
|
Date: Fri Oct 14 17:49:13 2016 +0200
|
||
|
Subject: [PATCH] slurmd: Fix for newer API versions
|
||
|
Git-commit: 9f263fa4cd8e9e8090eda2f533294e10ae984190
|
||
|
References:
|
||
|
Signed-off-by: Egbert Eich <eich@suse.com>
|
||
|
|
||
|
Replace hwloc_topology_ignore_type() by hwloc_topology_set_type_filter()
|
||
|
for API versions >= 0x00020000
|
||
|
|
||
|
Signed-off-by: Egbert Eich <eich@suse.de>
|
||
|
---
|
||
|
src/slurmd/common/xcpuinfo.c | 15 +++++++++++++++
|
||
|
1 file changed, 15 insertions(+)
|
||
|
|
||
|
diff --git a/src/slurmd/common/xcpuinfo.c b/src/slurmd/common/xcpuinfo.c
|
||
|
index ee213d3..ae9112f 100644
|
||
|
--- a/src/slurmd/common/xcpuinfo.c
|
||
|
+++ b/src/slurmd/common/xcpuinfo.c
|
||
|
@@ -203,8 +203,23 @@ get_cpuinfo(uint16_t *p_cpus, uint16_t *p_boards,
|
||
|
hwloc_topology_set_flags(topology, HWLOC_TOPOLOGY_FLAG_WHOLE_SYSTEM);
|
||
|
|
||
|
/* ignores cache, misc */
|
||
|
+#if HWLOC_API_VERSION < 0x00020000
|
||
|
hwloc_topology_ignore_type (topology, HWLOC_OBJ_CACHE);
|
||
|
hwloc_topology_ignore_type (topology, HWLOC_OBJ_MISC);
|
||
|
+#else
|
||
|
+ hwloc_topology_set_type_filter(topology,HWLOC_OBJ_L1CACHE,
|
||
|
+ HWLOC_TYPE_FILTER_KEEP_NONE);
|
||
|
+ hwloc_topology_set_type_filter(topology,HWLOC_OBJ_L2CACHE,
|
||
|
+ HWLOC_TYPE_FILTER_KEEP_NONE);
|
||
|
+ hwloc_topology_set_type_filter(topology,HWLOC_OBJ_L3CACHE,
|
||
|
+ HWLOC_TYPE_FILTER_KEEP_NONE);
|
||
|
+ hwloc_topology_set_type_filter(topology,HWLOC_OBJ_L4CACHE,
|
||
|
+ HWLOC_TYPE_FILTER_KEEP_NONE);
|
||
|
+ hwloc_topology_set_type_filter(topology,HWLOC_OBJ_L5CACHE,
|
||
|
+ HWLOC_TYPE_FILTER_KEEP_NONE);
|
||
|
+ hwloc_topology_set_type_filter(topology,HWLOC_OBJ_MISC
|
||
|
+ ,HWLOC_TYPE_FILTER_KEEP_NONE);
|
||
|
+#endif
|
||
|
|
||
|
/* load topology */
|
||
|
debug2("hwloc_topology_load");
|