101
103
The hwloc command-line tool "lstopo" produces human-readable topology maps, as
102
104
mentioned above. It can also export maps to the "fig" file format. Support for
103
105
PDF, Postscript, and PNG exporting is provided if the "Cairo" development
104
package can be found in "lstopo" when hwloc is configured and build.
106
package (usually cairo-devel or libcairo2-dev) can be found in "lstopo" when
107
hwloc is configured and build.
106
109
The hwloc core may also benefit from the following development packages:
108
* pciutils (libpci) for I/O discovery.
109
* libnuma for memory binding and migration support on Linux.
111
* libnuma for memory binding and migration support on Linux (numactl-devel or
112
libnuma-dev package).
113
* hwloc can use one of two different libraries for full I/O device discovery:
115
1. libpciaccess (BSD). The relevant development package is usually
116
libpciaccess-devel or libpciaccess-dev.
117
2. libpci, from the pciutils package (GPL). The relevant development
118
package is usually pciutils-devel or libpci-dev.
120
On Linux, PCI discovery may still be performed even if none of the above
121
libraries can be used.
123
* the AMD OpenCL implementation for OpenCL device discovery.
124
* the NVIDIA CUDA Toolkit for CUDA device discovery.
125
* the NVIDIA Tesla Development Kit for NVML device discovery.
126
* the NV-CONTROL X extension library (NVCtrl) for NVIDIA display discovery.
110
127
* libxml2 for full XML import/export support (otherwise, the internal
111
128
minimalistic parser will only be able to import XML files that were
112
129
exported by the same hwloc release). See Importing and exporting topologies
113
from/to XML files for details.
115
libpci and libxml2 support may be statically built inside the main hwloc
116
library, or as separate dynamically-loaded plugins (see the Components and
130
from/to XML files for details. The relevant development package is usually
131
libxml2-devel or libxml2-dev.
132
* libtool's ltdl library for dynamic plugin loading. The relevant development
133
package is usually libtool-ltdl-devel or libltdl-dev.
135
PCI and XML support may be statically built inside the main hwloc library, or
136
as separate dynamically-loaded plugins (see the Components and plugins
139
Note that because of the possibility of GPL taint (remember that hwloc is
140
BSD-licensed), hwloc's configure script will prefer libpciaccess to the
141
pciutils package. Indeed, if libpciaccess is not found, hwloc will not use
142
pciutils unless it is specifically requested via the --enable-libpci flag is
145
Also note that if you install supplemental libraries in non-standard locations,
146
hwloc's configure script may not be able to find them without some help. You
147
may need to specify additional CPPFLAGS, LDFLAGS, or PKG_CONFIG_PATH values on
148
the configure command line.
150
For example, if libpciaccess was installed into /opt/pciaccess, hwloc's
151
configure script may not find it be default. Try adding PKG_CONFIG_PATH to the
152
./configure command line, like this:
154
./configure PKG_CONFIG_PATH=/opt/pciaccess/lib/pkgconfig ...
320
357
Programming Interface
322
The basic interface is available in hwloc.h. It essentially offers low-level
323
routines for advanced programmers that want to manually manipulate objects and
324
follow links between them. Documentation for everything in hwloc.h are provided
325
later in this document. Developers should also look at hwloc/helper.h (and also
326
in this document, which provides good higher-level topology traversal
359
The basic interface is available in hwloc.h. Some higher-level functions are
360
available in hwloc/helper.h to reduce the need to manually manipulate objects
361
and follow links between them. Documentation for all these is provided later in
362
this document. Developers may also want to look at hwloc/inlines.h which
363
contains the actual inline code of some hwloc.h routines, and at this document,
364
which provides good higher-level topology traversal examples.
329
366
To precisely define the vocabulary used by hwloc, a Terms and Definitions
330
367
section is available and should probably be read first.