hwloc-distrib - Build a number of cpu masks distributed on the system
topodistrib [options] <integer>
-v Singlify each output to a single CPU.
-v Verbose messages.
--synthetic "2 2"
Simulate a fake hierarchy.
Report version and exit.
hwloc-distrib generates a series of CPU masks in an attempt to
distribute a set of processes around multiple processors in a single
server. These masks can be used with hwloc-bind(1).
NOTE: It is highly recommended that you read the hwloc(7) overview page
before reading this man page. Most of the concepts described in
hwloc(7) directly apply to the hwloc-bind utility.
hwloc-distrib’s operation is best described through several examples.
If 4 processes have to be distributed across a machine, their CPU masks
may be obtained with:
$ hwloc-distrib 4
To get a single processor of each CPU masks (prevent migration in case
$ hwloc-distrib 4 --single
To convert the output into a list of processors that may be passed to
dplace -c inside a mpirun command line:
$ hwloc-distrib 4 --single | xargs hwloc-calc --pulist
Upon successful execution, hwloc-distrib displays one or more CPU mask
strings. The return value is 0.
hwloc-distrib will return nonzero if any kind of error occurs, such as
(but not limited to) failure to parse the command line.