Portable abstraction of network topologies for high-performance computing.
The netloc documentation spans of these sections:
The Portable Network Locality (netloc) software package provides network topology discovery tools, and an abstract representation of those networks topologies for a range of network types and configurations. It is provided as a companion to the Portable Hardware Locality (hwloc) package. These two software packages work together to provide a comprehensive view of the HPC system topology, spanning from the processor cores in one server to the cores in another - including the complex network(s) in between.
Towards this end, netloc is divided into two sets of components. The first tools are for the admin to extract the information about the topology of the machines with topology discovery tools for each network type and discovery technique (called readers). The second set of tools is for the user to exploit the collected information: to display the topology or create a topology-aware mapping of the processes of an application.
For now, only InfiniBand (See Setup) is supported, but it is planned to be extended it very soon.
The generic installation procedure for both hwloc and netloc is described in Installation.
netloc is disabled by default in this release. It can be enabled by passing
--enable-netloc to the configure command-line. Note that netloc is currently not supported on as many platforms as the original hwloc project.
To use Netloc tools, we need two steps. The first step consists in getting information about network directly from tools distributed by manufacturers. For Infiniband, for instance, this operation needs privileges to access to the network device. For this step we have wrappers in Netloc that will call the right tools with the right options.
The second step will transform the raw files generated by manufacturer tools, into files in a format readable by Netloc tools, and that will not depend on network technologies.
To be clear, let's take an example with Infiniband. This first step is handled by
netloc_ib_gather_raw that will call
ibroutes tools to generate the necessary raw data files. The step has to be run by an administrator, since the Infiniband tools need to access to the network device.
shell$ netloc_ib_gather_raw --help
Usage: netloc_ib_gather_raw [options] <outdir>
Dumps topology information to <outdir>/ib-raw/
Subnets are guessed from the <outdir>/hwloc/ directory where
the hwloc XML exports of some nodes are stored.
Pass sudo to internal ibnetdiscover and ibroute invocations.
Useful when the entire script cannot run as root.
Use <dir> instead of <outdir>/hwloc/ for hwloc XML exports.
--force-subnet [<subnet>:]<board>:<port> to force the discovery
Do not guess subnets from hwloc XML exports.
Force discovery on local board <board> port <port>
and optionally force the subnet id <subnet>
instead of reading it from the first GID.
Examples: --force-subnet mlx4_0:1
Specify exact location of programs. Default is /usr/bin/<program>
Sleep for <n> seconds between invocations of programs probing the network
Ignore errors from ibnetdiscover and ibroute, assume their outputs are ok
Always rediscover to overwrite existing files without asking
Add verbose messages
Do not actually run programs or modify anything
Show this help
shell$ ./netloc_ib_gather_raw /home/netloc/data
WARNING: Not running as root.
Using /home/netloc/data/hwloc as hwloc lstopo XML directory.
Exporting local node hwloc XML...
Found 1 subnets in hwloc directory:
Subnet fe80:0000:0000:0000 is locally accessible from board qib0 port 1.
Looking at fe80:0000:0000:0000 (through local board qib0 port 1)...
Running ibroute for switch 'QLogic 12800-180 GUID=0x00066a00e8001310 L112' LID 18...
Running ibroute for switch 'QLogic 12800-180 GUID=0x00066a00e8001310 L108' LID 20...
Running ibroute for switch 'QLogic 12800-180 GUID=0x00066a00e8001310 L102' LID 23...
Running ibroute for switch 'QLogic 12800-180 GUID=0x00066a00e8001310 L104' LID 25...
Running ibroute for switch 'QLogic 12800-180 GUID=0x00066a00e8001310 L106' LID 24...
Running ibroute for switch 'QLogic 12800-180 GUID=0x00066a00e8001310 L114' LID 22...
Running ibroute for switch 'QLogic 12800-180 GUID=0x00066a00e8001310 L116' LID 21...
Running ibroute for switch 'QLogic 12800-180 GUID=0x00066a00e8001310 L109' LID 12...
Running ibroute for switch 'QLogic 12800-180 GUID=0x00066a00e8001310 L111' LID 11...
Running ibroute for switch 'QLogic 12800-180 GUID=0x00066a00e8001310 L107' LID 13...
Running ibroute for switch 'QLogic 12800-180 GUID=0x00066a00e8001310 L103' LID 17...
Running ibroute for switch 'QLogic 12800-180 GUID=0x00066a00e8001310 L105' LID 16...
Running ibroute for switch 'QLogic 12800-180 GUID=0x00066a00e8001310 L113' LID 15...
The second step, that can be done by a regular user, is done by the tool
shell$ netloc_ib_extract_dats --help
Usage: netloc_ib_extract_dats <path to input raw data files> <output path> [--hwloc-dir
<hwloc xml path>]
hwloc-dir can be an absolute path or a relative path from output path
shell$ netloc_ib_extract_dats /home/netloc/data/ib-raw /home/netloc/data/netloc \
Read subnet: fe80:0000:0000:0000
2 partitions found
Netloc provides a tool,
netloc_draw.html, that displays a topology in a web browser, by using a JSON file.
Generate the JSON file
In order to display a topology, Netloc needs to generate a JSON file corresponding to a topology. For this operation, the user must run
shell$ netloc_draw_to_json --help
Usage: netloc_draw_to_json <path to topology directory>
shell$ netloc_draw_to_json /home/netloc/data/netloc
netloc_draw_to_json command will write a JSON file for each topology file found in the input directory. The output files, written also in the input directory, can be open by
netloc_draw.html in a web browser.
The placement of the nodes is done statically if the topology is detected as a tree. If not, vis.js will use physics to find good positions, and it can be very time consuming.