Skip to content

Commit 211dd69

Browse files
committed
utils: document location filters in calc.1 info.1 and hwloc.7
Signed-off-by: Brice Goglin <[email protected]>
1 parent 2d84cae commit 211dd69

File tree

3 files changed

+33
-1
lines changed

3 files changed

+33
-1
lines changed

utils/hwloc/hwloc-calc.1in

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,9 @@ When combined with \fB\-\-nodeset\fR or \fB\-\-nodeset-output\fR,
164164
the nodeset is considered instead of the CPU set for finding matching objects.
165165
This is useful when reporting the output as a number or set of NUMA nodes.
166166

167+
\fI<type\fR may contain a filter to select specific objects among
168+
the type. For instance \fB\-N "numa[mcdram]"\fR counts MCDRAM NUMA nodes on KNL.
169+
167170
If an OS device subtype such as \fIgpu\fR is given instead of \fIosdev\fR,
168171
only the os devices of that subtype will be counted.
169172
.TP
@@ -182,6 +185,9 @@ When combined with \fB\-\-nodeset\fR or \fB\-\-nodeset-output\fR,
182185
the nodeset is considered instead of the CPU set for finding matching objects.
183186
This is useful when reporting the output as a number or set of NUMA nodes.
184187

188+
\fI<type\fR may contain a filter to select specific objects among
189+
the type. For instance \fB\-I "numa[mcdram]"\fR lists MCDRAM NUMA nodes on KNL.
190+
185191
If an OS device subtype such as \fIgpu\fR is given instead of \fIosdev\fR,
186192
only the os devices of that subtype will be returned.
187193

@@ -391,6 +397,16 @@ whose locality is exactly equal to a Package:
391397
$ hwloc-calc --local-memory-flags 0 --best-memattr capacity --physical-output pack:1
392398
4
393399

400+
To find the number of NUMA nodes with subtype MCDRAM (on KNL):
401+
402+
$ hwloc-calc -N "numa[mcdram]" all
403+
4
404+
405+
To find the NUMA node of subtype MCDRAM (on KNL) near a PU:
406+
407+
$ hwloc-calc -I "numa[mcdram]" pu:157
408+
1
409+
394410
Converting object logical indexes (default) from/to physical/OS indexes
395411
may be performed with \fB--intersect\fR combined with either \fB--physical-output\fR
396412
(logical to physical conversion) or \fB--physical-input\fR (physical to logical):

utils/hwloc/hwloc-info.1in

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,12 @@ To display information about the core whose physical index is 2:
295295
os index = 2
296296
...
297297

298+
To list the OS devices that are of subtype OpenCL:
299+
300+
$ hwloc-info -s "os[OpenCL]:all"
301+
OSDev[Co-Processor,GPU]:6
302+
OSDev[Co-Processor,GPU]:8
303+
298304
To list the NUMA nodes that are local a PU:
299305

300306
$ hwloc-info --local-memory pu:25

utils/hwloc/hwloc.7in

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
.\" -*- nroff -*-
2-
.\" Copyright © 2010-2020 Inria. All rights reserved.
2+
.\" Copyright © 2010-2023 Inria. All rights reserved.
33
.\" Copyright © 2010 Université of Bordeaux
44
.\" Copyright © 2009-2010 Cisco Systems, Inc. All rights reserved.
55
.\" See COPYING in top-level directory.
@@ -88,6 +88,16 @@ specify a unique physical object in a topology tree. Both concepts
8888
are described in detail, below.
8989
.br
9090

91+
.br
92+
Some filters may be added after the type to further specify which
93+
objects are wanted.
94+
\fI<type>[subtype=<subtype>]\fR selects objects matching the given
95+
type and also its subtype string attribute.
96+
For instance \fINUMA[MCDRAM]\fR selects NUMA nodes of subtype MCDRAM on KNL.
97+
The prefix \fIsubtype=\fR may be avoided if there is no ambiguity.
98+
\fIOS[Net]\fR also selects OS devices whose OS-device-specific type is Network.
99+
.br
100+
91101
.br
92102
Indexes may also be specified as ranges.
93103
\fIx-y\fR enumerates from index \fIx\fR to \fIy\fR.

0 commit comments

Comments
 (0)