Skip to content

Commit 2d84cae

Browse files
committed
utils/tests: check location filters in calc and info tests
Signed-off-by: Brice Goglin <[email protected]>
1 parent c24290f commit 2d84cae

File tree

4 files changed

+46
-0
lines changed

4 files changed

+46
-0
lines changed

utils/hwloc/test-hwloc-calc.output

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,15 @@ Group0:1.Group2:2 Group0:1.Group2:3
7676
# Number of objects at depth 3 in a NUMA Node
7777
16
7878

79+
# Number of MCDRAM subtype NUMA Nodes
80+
4
81+
82+
# List of MCDRAM subtype NUMA Nodes near 2 L3
83+
3,5
84+
85+
# Hierarchical list of MCDRAM subtype NUMA nodes within Package
86+
Package:0.NUMANode:1 Package:0.NUMANode:7
87+
7988
# List of Machine objects
8089
0
8190

utils/hwloc/test-hwloc-calc.sh.in

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,15 @@ set -e
120120
echo "# Number of objects at depth 3 in a NUMA Node"
121121
$calc --if synthetic --input "node:4 core:4 pu:4" node:2 -N 3
122122
echo
123+
echo "# Number of MCDRAM subtype NUMA Nodes"
124+
$calc --if xml --input $xmldir/64intel64-fakeKNL-SNC4-hybrid.xml -N 'numa[mcdram]' all
125+
echo
126+
echo "# List of MCDRAM subtype NUMA Nodes near 2 L3"
127+
$calc --if xml --input $xmldir/64intel64-fakeKNL-SNC4-hybrid.xml -I 'numa[mcdram]' l3:1-2
128+
echo
129+
echo "# Hierarchical list of MCDRAM subtype NUMA nodes within Package"
130+
$calc --if xml --input $xmldir/64intel64-fakeKNL-SNC4-hybrid.xml -H 'pack.numa[mcdram]' 'numa[mcdram]:0' 'numa[mcdram]:3'
131+
echo
123132

124133
echo "# List of Machine objects"
125134
$calc --if synthetic --input "node:4 core:4 pu:4" root --intersect Machine

utils/hwloc/test-hwloc-info.output

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -504,6 +504,22 @@ NUMANode:10
504504
NUMANode:11
505505

506506

507+
# MCDRAM subtype NUMA filter
508+
NUMANode:3
509+
NUMANode:5
510+
511+
# NVML subtype OSdev type filter
512+
OSDev[Co-Processor,GPU]:2
513+
OSDev[Co-Processor,GPU]:5
514+
OSDev[Co-Processor,GPU]:8
515+
OSDev[Co-Processor,GPU]:11
516+
517+
# GPU OSdev type filter
518+
OSDev[Co-Processor,GPU]:3
519+
OSDev[Co-Processor,GPU]:4
520+
OSDev[Co-Processor,GPU]:5
521+
522+
507523
# cpukinds for the entire machine
508524
Machine L#0
509525
type = Machine

utils/hwloc/test-hwloc-info.sh.in

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ srcdir="$HWLOC_top_srcdir/utils/hwloc"
1515
builddir="$HWLOC_top_builddir/utils/hwloc"
1616
info="$builddir/hwloc-info"
1717
linuxdir="$HWLOC_top_srcdir/tests/hwloc/linux"
18+
xmldir="$HWLOC_top_srcdir/tests/hwloc/xml"
1819

1920
HWLOC_PLUGINS_PATH=${HWLOC_top_builddir}/hwloc/.libs
2021
export HWLOC_PLUGINS_PATH
@@ -119,6 +120,17 @@ set -e
119120
$info --if synthetic --input "pack:4 [numa(memory=1000000)] l3:2 [numa(memory=1000)] core:4 pu:2" --local-memory-flags larger --best-memattr capacity -s pu:63
120121
echo
121122

123+
echo
124+
echo "# MCDRAM subtype NUMA filter"
125+
$info --if xml --input $xmldir/64intel64-fakeKNL-SNC4-hybrid.xml -s 'numa[mcdram]:1-2'
126+
echo
127+
echo "# NVML subtype OSdev type filter"
128+
$info --if xml --input $xmldir/power8gpudistances.xml -s 'os[nvml]:all'
129+
echo
130+
echo "# GPU OSdev type filter"
131+
$info --if xml --input $xmldir/power8gpudistances.xml -s 'os[gpu]:3-5'
132+
echo
133+
122134
echo
123135
echo "# cpukinds for the entire machine"
124136
$info --if xml --input $linuxdir/fakeheterocpunuma.xml all

0 commit comments

Comments
 (0)