hwloc/linux: failed to find sysfs cpu topology directory, aborting linux discovery.
Usage: hwloc-calc [topology options] [options] <location> ...
<location> may be a space-separated list of cpusets or objects
as supported by the hwloc-bind utility, e.g:
core:2-3 for the third and fourth cores
node:1.pu:2 the third PU of the second NUMA node
0x12345678 a CPU set given a bitmask string
os=eth0 the operating system device named eth0
pci=0000:01:02.0 the PCI device with the given bus ID
with prefix ~ to remove, ^ for xor and x for intersection
(see Location Specification in hwloc(7) for details).
Input topology options (must be at the beginning):
--no-smt Only keep a single PU per core
--cpukind <n> Only keep PUs in the CPU kind <n>
--cpukind <name>=<value> Only keep PUs whose CPU kind match info <name>=<value>
--default-nodes Only keep default memory nodes
--restrict [nodeset=]<bitmap>
Restrict the topology to some processors or NUMA nodes.
--restrict-flags <n> Set the flags to be used during restrict
--disallowed Include objects disallowed by administrative limitations
--input <XML file>
-i <XML file> Read topology from XML file <path>
--input <directory>
-i <directory> Read topology from chroot containing the /proc and /sys
of another system
--input <directory>
-i <directory> Read topology from directory containing a CPUID dump
--input "node:2 2"
-i "node:2 2" Simulate a fake hierarchy, here with 2 NUMA nodes of 2
processors
--input-format <format>
--if <format> Enforce input format among xml, fsroot, cpuid, synthetic
Output conversion options:
[default] Report the combined input locations as a CPU set
--number-of <type|depth>
-N <type|depth> Report the number of objects intersecting the CPU set
--intersect <type|depth>
-I <type|depth> Report the indexes of object intersecting the CPU set
--hierarchical <type1>.<type2>...
-H <type1>.<type2>... Find the list of objects intersecting the CPU set and
display them as hierarchical combinations such as
type1:index1.type2:index2...
--largest Report the list of largest objects in the CPU set
--local-memory Report the memory nodes that are local to the CPU set
--local-memory flags <x> Change flags for selecting local memory nodes
--best-memattr <attr> Only report the best memory node among the local ones
Input/output set and object options:
-l --logical Use logical object indexes (default)
-p --physical Use physical object indexes
--li --logical-input Use logical indexes for input (default)
--lo --logical-output Use logical indexes for output (default)
--pi --physical-input Use physical indexes for input
--po --physical-output Use physical indexes for output
-n --nodeset Manipulate nodesets instead of cpusets
--ni --nodeset-input Manipulate nodesets instead of cpusets for inputs
--no --nodeset-output Manipulate nodesets instead of cpusets for outputs
Formatting options:
--oo --object-output Report objects instead of object indexes
--sep <sep> Use separator <sep> in the output
--cpuset-input-format <hwloc|list|taskset>
--cif <hwloc|list|taskset>
Change the format of cpuset inputs
--cpuset-output-format <hwloc|list|taskset|systemd-dbus-api>
--cof <hwloc|list|taskset|systemd-dbus-api>
Change the format of cpuset outputs
--single Singlify the output to a single CPU
Miscellaneous options:
-q --quiet Hide non-fatal error messages
-v --verbose Show verbose messages
--version Report version and exit
-h --help Show this usage
Options (40)
| Option | Description | Source |
|---|---|---|
--no-smt N | Only keep the first PU per core in the input locations. | help + man |
--cpukind n | Only keep PUs whose CPU kind match. | help + man |
--default-nodes | Only keep NUMA nodes that are considered default nodes on heterogeneous memory platforms. | help + man |
--restrict nodeset=]<bitmap | Restrict the topology to some processors or NUMA nodes. | help + man |
--restrict-flags n | Enforce flags when restricting the topology. | help + man |
--disallowed | Include objects disallowed by administrative limitations. | help + man |
-i XML | Read the topology from <path> instead of discovering the topology of the local machine. | help + man |
--input directory | help | |
--input-format format | help | |
--if format | Enforce the input in the given format, among xml, fsroot, cpuid and synthetic. | help + man |
--number-of type|depth | help | |
-N type|depth | Report the number of objects of the given type or depth that intersect the CPU set. | help + man |
--intersect type|depth | help | |
-I type|depth | Find the list of objects of the given type or depth that intersect the CPU set and report the comma-separated list of their indexes instead of the cpu mask string. | help + man |
--hierarchical type1>.<type2>... | help | |
-H type1>.<type2>... | Find the list of objects of type <type2> that intersect the CPU set and report the space-separated list of their hierarchical indexes with respect to <type1>, <type2>, etc. | help + man |
--largest | Report (in a human readable format) the list of largest objects which exactly include all input objects (by looking at their CPU sets). | help + man |
--local-memory | Report the list of NUMA nodes that are local to the input objects. | help + man |
--best-memattr attr | Enable the listing of local memory nodes with --local-memory, but only display the local nodes that have the best value for the memory attribute given by <name> (or as an index). | help + man |
-l --logical | Use logical indexes instead of physical/OS indexes for both input and output (default). | help + man |
-p --physical | Use OS/physical indexes instead of logical indexes for both input and output. | help + man |
--li --logical-input | Use logical indexes instead of physical/OS indexes for input (default). | help + man |
--lo --logical-output | Use logical indexes instead of physical/OS indexes for output (default, except for cpusets which are always physical). | help + man |
--pi --physical-input | Use OS/physical indexes instead of logical indexes for input. | help + man |
--po --physical-output | Use OS/physical indexes instead of logical indexes for output. | help + man |
-n --nodeset | Interpret both input and output sets as nodesets instead of CPU sets. | help + man |
--ni --nodeset-input | Interpret input sets as nodesets instead of CPU sets. | help + man |
--no --nodeset-output | Manipulate nodesets instead of cpusets for outputs | help + man |
--oo --object-output | When reporting object indexes (e.g. with -I or --local-memory), this option prefixes these indexes with types (e.g. Core:0 instead of 0). | help + man |
--sep sep | Change the field separator in the output. | help + man |
--cpuset-input-format hwloc|list|taskset | Change the format of input bitmap strings (CPU set or nodeset). | help + man |
--cif hwloc|list|taskset | Change the format of cpuset inputs | help |
--cpuset-output-format hwloc|list|taskset|systemd-dbus-api | Change the format of displayed bitmap strings (CPU set or nodeset). | help + man |
--cof hwloc|list|taskset|systemd-dbus-api | Change the format of cpuset outputs | help |
--single | Singlify the output to a single CPU. | help + man |
-q --quiet | Hide non-fatal error messages. | help + man |
-v --verbose | Show verbose messages | help + man |
--version | Report version and exit. | help + man |
-h --help | Display help message and exit. | help + man |
--local-memory-flags | Change the flags used to select local NUMA nodes. (in the manual page but not in --help) | man |
Examples (4) from the manual page, untested
hwloc-calc package:1 0x000000f0
To display the (physical) CPU mask corresponding to the second package:hwloc-calc package:2 ~PU:even 0x00000c00
To display the (physical) CPU mask corresponding to the third pacakge, excluding its even numbered logical processors:hwloc-calc all ~package:3 0x0000f0ff
To display the (physical) CPU mask of the entire topology except the third package:hwloc-calc 0x0000ffff 0xff000000 0xff00ffff
To combine two (physical) CPU masks: