OS Manuals

/usr/bin/hwloc-calc

Portable abstraction of hierarchical hardware architectures with CUDA support

From hwloc-cuda-13.2 2.15.0-r0 (enterprise-packages), captured 2026-11-08 by running hwloc-calc --help (exit 0). permalink

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)
OptionDescriptionSource
--no-smt NOnly keep the first PU per core in the input locations.help + man
--cpukind nOnly keep PUs whose CPU kind match.help + man
--default-nodesOnly keep NUMA nodes that are considered default nodes on heterogeneous memory platforms.help + man
--restrict nodeset=]<bitmapRestrict the topology to some processors or NUMA nodes.help + man
--restrict-flags nEnforce flags when restricting the topology.help + man
--disallowedInclude objects disallowed by administrative limitations.help + man
-i XMLRead the topology from <path> instead of discovering the topology of the local machine.help + man
--input directoryhelp
--input-format formathelp
--if formatEnforce the input in the given format, among xml, fsroot, cpuid and synthetic.help + man
--number-of type|depthhelp
-N type|depthReport the number of objects of the given type or depth that intersect the CPU set.help + man
--intersect type|depthhelp
-I type|depthFind 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
--largestReport (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-memoryReport the list of NUMA nodes that are local to the input objects.help + man
--best-memattr attrEnable 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 --logicalUse logical indexes instead of physical/OS indexes for both input and output (default).help + man
-p --physicalUse OS/physical indexes instead of logical indexes for both input and output.help + man
--li --logical-inputUse logical indexes instead of physical/OS indexes for input (default).help + man
--lo --logical-outputUse logical indexes instead of physical/OS indexes for output (default, except for cpusets which are always physical).help + man
--pi --physical-inputUse OS/physical indexes instead of logical indexes for input.help + man
--po --physical-outputUse OS/physical indexes instead of logical indexes for output.help + man
-n --nodesetInterpret both input and output sets as nodesets instead of CPU sets.help + man
--ni --nodeset-inputInterpret input sets as nodesets instead of CPU sets.help + man
--no --nodeset-outputManipulate nodesets instead of cpusets for outputshelp + man
--oo --object-outputWhen 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 sepChange the field separator in the output.help + man
--cpuset-input-format hwloc|list|tasksetChange the format of input bitmap strings (CPU set or nodeset).help + man
--cif hwloc|list|tasksetChange the format of cpuset inputshelp
--cpuset-output-format hwloc|list|taskset|systemd-dbus-apiChange the format of displayed bitmap strings (CPU set or nodeset).help + man
--cof hwloc|list|taskset|systemd-dbus-apiChange the format of cpuset outputshelp
--singleSinglify the output to a single CPU.help + man
-q --quietHide non-fatal error messages.help + man
-v --verboseShow verbose messageshelp + man
--versionReport version and exit.help + man
-h --helpDisplay help message and exit.help + man
--local-memory-flagsChange the flags used to select local NUMA nodes. (in the manual page but not in --help)man
Examples (4) from the manual page, untested

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.