@@ -36,75 +36,186 @@ file="$tmp/test-hwloc-calc.output"
36
36
37
37
set -e
38
38
(
39
+ echo " # root"
39
40
$calc --if synthetic --input " node:4 core:4 pu:4" root
41
+ echo
42
+ echo " # all --taskset"
40
43
$calc --if synthetic --input " node:4 core:4 pu:4" all --taskset
41
44
echo
45
+
46
+ echo " # hex"
42
47
$calc --if synthetic --input " node:4 core:4 pu:4" 0xf
48
+ echo
49
+ echo " # hex combination"
43
50
$calc --if synthetic --input " node:4 core:4 pu:4" 0xf ~ 0x3 0xff0 ' ^0xf0'
51
+ echo
52
+ echo " # object combination"
44
53
$calc --if synthetic --input " node:4 core:4 pu:4" core:0 pu:15 ~ pu:0 ' ^pu:2'
45
54
echo
55
+
56
+ echo " # --no-smt NUMA Node range"
46
57
$calc --if synthetic --input " node:4 core:4 pu:4" --no-smt node:2-3
58
+ echo
59
+ echo " # --no-smt hex"
47
60
$calc --if synthetic --input " node:4 core:4 pu:4" --no-smt 0x1fe
61
+ echo
62
+ echo " # --no-smt=1 hex"
48
63
$calc --if synthetic --input " node:4 core:4 pu:4" --no-smt=1 0x1fe
64
+ echo
65
+ echo " # --no-smt=2 hex"
49
66
$calc --if synthetic --input " node:4 core:4 pu:4" --no-smt=2 0x1fe
67
+ echo
68
+ echo " # --no-smt=3 hex"
50
69
$calc --if synthetic --input " node:4 core:4 pu:4" --no-smt=3 0x1fe
70
+ echo
71
+ echo " # --no-smt=4 hex"
51
72
$calc --if synthetic --input " node:4 core:4 pu:4" --no-smt=4 0x1fe
73
+ echo
74
+ echo " # --no-smt=-1 hex"
52
75
$calc --if synthetic --input " node:4 core:4 pu:4" --no-smt=-1 0x1fe
53
76
echo
77
+
78
+ echo " # even PUs"
54
79
$calc --if synthetic --input " node:4 core:4 pu:4" pu:even
80
+ echo
81
+ echo " # NUMA Nodes 2+"
55
82
$calc --if synthetic --input " node:4 core:4 pu:4" node:2-
83
+ echo
84
+ echo " # cores 12+"
56
85
$calc --if synthetic --input " node:4 core:4 pu:4" core:12-
86
+ echo
87
+ echo " # PU wrapping range"
57
88
$calc --if synthetic --input " node:4 core:4 pu:4" pu:62:10
89
+ echo
90
+ echo " # some PUs in all Cores"
58
91
$calc --if synthetic --input " node:4 core:4 pu:4" core:all.pu:1:2
92
+ echo
93
+ echo " # one PU in odd Cores"
59
94
$calc --if synthetic --input " node:4 core:4 pu:4" core:odd.pu:0
95
+ echo
96
+ echo " # combination of different ranges, hierarchical or not"
60
97
$calc --if synthetic --input " node:4 core:4 pu:4" pu:6:2 core:3-4.pu:1-3 node:2.pu:14:2 node:3.core:3.pu:3
61
98
echo
99
+
100
+ echo " # Number of NUMA Nodes"
62
101
$calc --if synthetic --input " node:4 core:4 pu:4" root --number-of node
102
+ echo
103
+ echo " # Number of Cores in a NUMA Node"
63
104
$calc --if synthetic --input " node:4 core:4 pu:4" node:2 -N core
105
+ echo
106
+ echo " # Number of objects at depth 3 in a NUMA Node"
64
107
$calc --if synthetic --input " node:4 core:4 pu:4" node:2 -N 3
65
108
echo
109
+
110
+ echo " # List of Machine objects"
66
111
$calc --if synthetic --input " node:4 core:4 pu:4" root --intersect Machine
112
+ echo
113
+ echo " # List of NUMA Nodes in a range of Cores"
67
114
$calc --if synthetic --input " node:4 core:4 pu:4" core:4-7 -I NUMANode
115
+ echo
116
+ echo " # List of NUMA Nodes in a range of Cores (again)"
68
117
$calc --if synthetic --input " node:4 core:4 pu:4" core:10-15 -I NUMANode
69
118
echo
119
+
120
+ echo " # Hierarchical spec for a range of PUs"
70
121
$calc --if synthetic --input " node:4 core:4 pu:4" pu:2-3 --hierarchical group.pu
122
+ echo
123
+ echo " # Hierarchical spec for a range of PUs, with different separator"
71
124
$calc --if synthetic --input " node:4 core:4 pu:4" pu:3-6 -H group.core --sep foo
125
+ echo
126
+ echo " # Hierarchical spec for a range of PUs (again)"
72
127
$calc --if synthetic --input " node:4 core:4 pu:4" pu:3-6 -H core.pu
128
+ echo
129
+ echo " # List of PUs from another invocation with hierarchical output"
73
130
$calc --if synthetic --input " node:4 core:4 pu:4" -I pu ` $calc --if synthetic --input " node:4 core:4 pu:4" pu:3-6 -H core.pu`
131
+ echo
132
+ echo " # Hierarchical spec for a range of PUs (3 levels)"
74
133
$calc --if synthetic --input " node:4 core:4 pu:4" pu:11:4 -H group.core.pu
134
+ echo
135
+ echo " # List of PUs from another invocation with hierarchical output (again)"
75
136
$calc --if synthetic --input " node:4 core:4 pu:4" -I pu ` $calc --if synthetic --input " node:4 core:4 pu:4" pu:11:4 -H group.core.pu`
76
137
echo
138
+
139
+ echo " # --largest"
77
140
$calc --if synthetic --input " node:4 core:4 pu:4" pu:12-37 --largest
141
+ echo
142
+ echo " # --largest, with different separator"
78
143
$calc --if synthetic --input " node:4 core:4 pu:4" pu:22-47 --largest --sep " _"
79
144
echo
145
+
146
+ echo " # Singlified output"
80
147
$calc --if synthetic --input " node:4 core:4 pu:4" pu:22-47 --single
148
+ echo
149
+ echo " # Singlified PU list"
81
150
$calc --if synthetic --input " node:4 core:4 pu:4" pu:22-47 --single --pulist
82
151
echo
152
+
153
+ echo " # PU list with physical output"
83
154
$calc --if synthetic --input " node:4 core:4 pu:4" pu:33-37 --pulist --po
155
+ echo
156
+ echo " # NUMA Node list of physical output and different separator"
84
157
$calc --if synthetic --input " node:4 core:4 pu:4" pu:30-37 --nodelist --po --sep foo
85
158
echo
159
+
160
+ echo " # Manipulating NUMA Nodes with nodesets"
86
161
$calc --if synthetic --input " node:4 core:4 pu:4" -n node:1-2
162
+ echo
163
+ echo " # Nodeset output of PUs"
87
164
$calc --if synthetic --input " node:4 core:4 pu:4" --no pu:63
165
+ echo
166
+ echo " # Converting NUMA Nodes from logical to physical"
88
167
$calc --if synthetic --input " node:4 core:4 pu:4" --ni 0x5 --nodelist --po
89
168
echo
169
+
170
+ echo " # Physical output of NUMA Nodes when out-of-order in the topology"
90
171
$calc --if synthetic --input " node:4(indexes=3,2,1,0) pu:2" node:1-2 --po -I node
172
+ echo
173
+ echo " # Converting physical to logical PU indexes when complexly ordered in the topology"
91
174
$calc --if synthetic --input " node:4 core:4 pu:4(indexes=node:core)" --pi pu:2-5 -I pu
92
175
echo
176
+
177
+ echo " # Caches with attributes"
93
178
$calc --if synthetic --input " numa:2 l3:2 pu:1" numa:0 l3u:3
179
+ echo
180
+ echo " # Groups with attributes"
94
181
$calc --if synthetic --input " group:2 numa:2 l2:2 l1d:2 pu:1" Group0:1 NUMA:0
182
+ echo
183
+ echo " # Caches without attributes"
95
184
$calc --if synthetic --input " group:2 numa:2 l2:2 l1d:2 pu:1" l2:0-2 L1cache:13:3
96
185
echo
186
+
187
+ echo " # OS devices by name"
97
188
$calc --if xml --input $xmldir /96em64t-4n4d3ca2co-pci.xml os=eth6 os=eth4
189
+ echo
190
+ echo " # OS devices by name (again)"
98
191
$calc --if xml --input $xmldir /96em64t-4n4d3ca2co-pci.xml os=sdc os=sr0 ~ os=sda
192
+ echo
193
+ echo " # OS devices by range"
99
194
$calc --if xml --input $xmldir /96em64t-4n4d3ca2co-pci.xml os:7-8
195
+ echo
196
+ echo " # PCI devices by range"
100
197
$calc --if xml --input $xmldir /96em64t-4n4d3ca2co-pci.xml pci:10-11
198
+ echo
199
+ echo " # PCI devices by vendors/device IDs and range wrapping around"
101
200
$calc --if xml --input $xmldir /96em64t-4n4d3ca2co-pci.xml pci' [1000:0062]' :3:2
201
+ echo
202
+ echo " # PCI devices by vendors/device IDs and index"
102
203
$calc --if xml --input $xmldir /96em64t-4n4d3ca2co-pci.xml pci' [14e4:1639]' :1
204
+ echo
205
+ echo " # PCI devices by vendors/device IDs and range"
103
206
$calc --if xml --input $xmldir /96em64t-4n4d3ca2co-pci.xml pci' [14e4:1639]' :2-5
207
+ echo
208
+ echo " # PCI devices added"
104
209
$calc --if xml --input $xmldir /96em64t-4n4d3ca2co-pci.xml pci=0000:62:00.1 pci=0000:02:00.1
210
+ echo
211
+ echo " # PCI devices intersection"
105
212
$calc --if xml --input $xmldir /96em64t-4n4d3ca2co-pci.xml pci=0000:62:00.1 xpci=0000:02:00.0
213
+ echo
214
+ echo " # PCI devices intersection (again)"
106
215
$calc --if xml --input $xmldir /96em64t-4n4d3ca2co-pci.xml pci=0000:02:00.0 xpci=0000:02:00.1
107
216
echo
217
+
218
+ echo " # Reading from stdin"
108
219
cat << EOF | $calc --if synthetic --input "node:4 core:4 pu:4"
109
220
pu:0
110
221
core:0 core:15
@@ -114,6 +225,7 @@ node:0 node:3
114
225
0x1,0x0,0x0
115
226
root
116
227
EOF
228
+ echo
117
229
) > " $file "
118
230
@DIFF@ @HWLOC_DIFF_U@ @HWLOC_DIFF_W@ $srcdir /test-hwloc-calc.output " $file "
119
231
rm -rf " $tmp "
0 commit comments