Commit 4ee37700 authored by Pavan Balaji's avatar Pavan Balaji
Browse files

[svn-r10817] Upgrade to hwloc-1.6.1rc1.

No reviewer.
parent e72d2527
......@@ -9,10 +9,10 @@ ACLOCAL_AMFLAGS = -I ./config
SUBDIRS = src include
# SUBDIRS += utils tests
SUBDIRS += utils tests
# We need doc/ if HWLOC_BUILD_DOXYGEN, or during make install if HWLOC_INSTALL_DOXYGEN.
# There's no INSTALL_SUBDIRS, so always enter doc/ and check HWLOC_BUILD/INSTALL_DOXYGEN there
# SUBDIRS += doc
SUBDIRS += doc
# Do not let automake automatically add the non-standalone dirs to the
......@@ -16,6 +16,15 @@ bug fixes (and other actions) for each version of hwloc since version
0.9 (as initially released as "libtopology", then re-branded to "hwloc"
in v0.9.1).
Version 1.6.1
* Fix some crash or buggy detection in the x86 backend when Linux
cgroups/cpusets restrict the available CPUs.
* Add some documentation about existing plugins/components, package
dependencies, and I/O devices specification on the command-line.
Version 1.6.0
* Major changes
......@@ -7,7 +7,7 @@
# greek is used for alpha or beta release tags. If it is non-empty,
# it will be appended to the version number. It does not have to be
......@@ -16,7 +16,7 @@ release=0
# requirement is that it must be entirely printable ASCII characters
# and have no white space.
# If want_repo_rev=1, then the SVN r number will be included in the overall
# hwloc version number in some form.
......@@ -58,4 +58,4 @@ date="Unreleased developer copy"
# 2. Version numbers are described in the Libtool current:revision:age
# format.
autoreconf ${autoreconf_args:"-ivf"}
autoreconf -ivf
......@@ -573,16 +573,6 @@ EOF])
AC_CHECK_FUNCS([getpagesize memalign posix_memalign])
# when autoheader is run, it doesn't know about
# PAC_FUNC_NEEDS_DECL, so it doesn't generate an appropriate line
# in We need to fool it with a dummy AC_DEFINE().
if false ; then
AC_DEFINE([NEEDS_GETPAGESIZE_DECL], 1, [Define to 1 if getpagesize needs a declaration])
if test $ac_cv_func_getpagesize = "yes" ; then
PAC_FUNC_NEEDS_DECL([#include <unistd.h>],getpagesize)
......@@ -176,19 +176,6 @@ AC_CONFIG_FILES([src/libltdl/Makefile])
## Enable creation of libtool-style versioning or no versioning
[AC_HELP_STRING([--enable-versioning],[Enable library versioning])],,
if test "$enable_versioning" = "yes" ; then
libhwloc_so_versionflags="-version-info \$(libhwloc_so_version)"
export libhwloc_so_versionflags
# Party on
......@@ -139,17 +139,26 @@ shell$ make install
The hwloc command-line tool "lstopo" produces human-readable topology
maps, as mentioned above. It can also export maps to the "fig" file
format. Support for PDF, Postscript, and PNG exporting is provided if
the "Cairo" development package can be found in "lstopo" when hwloc
the "Cairo" development package (usually <tt>cairo-devel</tt> or
<tt>libcairo2-dev</tt>) can be found in "lstopo" when hwloc
is configured and build.
The hwloc core may also benefit from the following development packages:
<li>pciutils (libpci) for I/O discovery.</li>
<li>libnuma for memory binding and migration support on Linux.</li>
<li>pciutils (libpci) for I/O discovery.
The relevant development package is usually <tt>pciutils-devel</tt>
or <tt>libpci-dev</tt>.
<li>libnuma for memory binding and migration support on Linux
(<tt>numactl-devel</tt> or <tt>libnuma-dev</tt> package).
<li>libxml2 for full XML import/export support (otherwise, the
internal minimalistic parser will only be able to import
XML files that were exported by the same hwloc release).
See \ref xml for details.</li>
See \ref xml for details.
The relevant development package is usually <tt>libxml2-devel</tt>
or <tt>libxml2-dev</tt>.
libpci and libxml2 support may be statically built inside the main
hwloc library, or as separate dynamically-loaded plugins
......@@ -756,6 +765,8 @@ lstopo (also known as hwloc-info and hwloc-ls) displays the
hierarchical topology map of the current system. The output may be
graphical or textual, and can also be exported to numerous file
formats such as PDF, PNG, XML, and others.
Advanced graphical outputs require the "Cairo" development package
(usually <tt>cairo-devel</tt> or <tt>libcairo2-dev</tt>).
lstopo and lstopo-no-graphics accept the same command-line options.
However graphical outputs are only available in lstopo.
......@@ -1113,7 +1124,8 @@ It can be enabled by passing flags such as <tt>::HWLOC_TOPOLOGY_FLAG_IO_DEVICES<
to hwloc_topology_set_flags() before loading the topology.
Note that I/O discovery requires significant help from the operating system.
The pciutils library is needed to detect PCI devices and bridges,
The pciutils library (the development package is usually <tt>pciutils-devel</tt>
or <tt>libpci-dev</tt>) is needed to detect PCI devices and bridges,
and the actual locality of these devices is only currently detected
on Linux. Also, some operating systems require privileges for probing PCI
devices, see \ref faq_privileged for details.
......@@ -1195,9 +1207,16 @@ lstopo displays the interesting ones by default
hwloc-calc and hwloc-bind may manipulate I/O devices specified
by PCI bus ID or by OS device name.
For instance, <tt>pci=0000:02:03.0</tt> (respectively <tt>os=eth0</tt>)
is replaced by the set of CPUs that are close to this PCI device
(respectively software device).
<tt>pci=0000:02:03.0</tt> is replaced by the set
of CPUs that are close to the PCI device whose bus ID is given.
<tt>os=eth0</tt> is replaced by CPUs that are close to the I/O
device whose software handle is called <tt>eth0</tt>.
This enables easy binding of I/O-intensive applications near the
device they use.
......@@ -1317,7 +1336,7 @@ To make sure binding on an object is possible, one should first check
that its cpuset or nodeset pointer is not NULL.
Then, one should check whether the object is indeed local.
To find out which machine a given object correspond too, one may look
To find out which machine a given object corresponds to, one may look
at the info attributes of the parent Machine object. The <tt>HostName</tt>
info is usually available in Machine objects, it may be retrieved with the
following code:
......@@ -1544,7 +1563,8 @@ First, it can use the libxml2 library for importing/exporting XML
files. It features full XML support, for instance when those files
have to be manipulated by non-hwloc software (e.g. a XSLT parser).
The libxml2 backend is enabled by default if libxml2 development
headers are available.
headers are available (the relevant development package is usually
<tt>libxml2-devel</tt> or <tt>libxml2-dev</tt>).
If libxml2 is not available at configure time,
or if <tt>--disable-libxml2</tt> is passed, hwloc falls back to a
......@@ -1972,6 +1992,66 @@ It creates a <tt>backend</tt> structure that usually contains a
care of the actual topology discovery.
\section plugins_list Existing components and plugins
All components distributed within hwloc are listed below.
The list of actually available components may be listed
at running with the <tt>HWLOC_COMPONENTS_VERBOSE</tt>
environment variable (see \ref envvar).
<dt>aix, darwin, freebsd, hpux, linux, netbsd, osf, solaris, windows</dt>
Each officially supported operating system has its own native component,
which is statically built when supported, and which is used by default.
The x86 architecture (either 32 or 64 bits) has its own component
that may complete or replace the previously-found CPU information.
It is statically built when supported.
A basic component that just tries to detect the number of processing
units in the system. It mostly serves on operating systems that are
not natively supported.
It is always statically built.
PCI object discovery uses the external pciutils library (aka libpci),
see \ref iodevices.
<b>It may be built as a plugin</b>.
Synthetic topology support (see \ref synthetic) is always built statically.
Custom topology support (see \ref multinode) is always built statically.
XML topology import (see \ref xml) is always built statically.
It internally uses one of the XML backends (see \ref xml_backends).
<li><b>xml_nolibxml</b> is a basic and hwloc-specific XML import/export.
It is always statically built.
<li><b>xml_libxml</b> relies on the external libxml2 library for
provinding a feature-complete XML import/export.
<b>It may be built as a plugin</b>.
A dummy plugin that does nothing but is used for debugging plugin support.
\page embed Embedding hwloc in Other Software
......@@ -553,6 +553,11 @@ extern "C" {
#define hwloc_encode_to_base64 HWLOC_NAME(encode_to_base64)
#define hwloc_decode_from_base64 HWLOC_NAME(decode_from_base64)
/* private/solaris-chiptype.h */
#define hwloc_solaris_get_chip_type HWLOC_NAME(solaris_get_chip_type)
#define hwloc_solaris_get_chip_model HWLOC_NAME(solaris_get_chip_model)
......@@ -29,10 +29,6 @@
#include <string.h>
int getpagesize(void);
# define __hwloc_attribute_format(type, str, arg) __attribute__((__format__(type, str, arg)))
......@@ -136,7 +136,7 @@ endif HWLOC_HAVE_WINDOWS
# Installable library
libhwloc_la_SOURCES = $(sources)
libhwloc_la_LDFLAGS = $(ldflags) $(libhwloc_so_versionflags) $(HWLOC_LIBS)
libhwloc_la_LDFLAGS = $(ldflags) -version-info $(libhwloc_so_version) $(HWLOC_LIBS)
......@@ -355,7 +355,7 @@ hwloc_disc_component_try_enable(struct hwloc_topology *topology,
int err;
if ((*excludes) & comp->type) {
if (hwloc_components_verbose)
if (hwloc_components_verbose || verbose_errors)
fprintf(stderr, "Excluding %s component `%s', conflicts with excludes 0x%x\n",
hwloc_disc_component_type_string(comp->type), comp->name, *excludes);
return -1;
......@@ -418,7 +418,7 @@ hwloc_disc_components_enable_others(struct hwloc_topology *topology)
comp = hwloc_disc_component_find(-1, env);
if (comp) {
hwloc_disc_component_try_enable(topology, comp, arg, &excludes, 1 /* envvar forced */, 1 /* envvar forced need warnings on conflicts */);
hwloc_disc_component_try_enable(topology, comp, arg, &excludes, 1 /* envvar forced */, 1 /* envvar forced need warnings */);
} else {
fprintf(stderr, "Cannot find component `%s'\n", env);
......@@ -123,11 +123,7 @@ static void look_proc(struct procinfo *infos, unsigned highest_cpuid, unsigned h
infos->max_log_proc = 1;
hwloc_debug("APIC ID 0x%02x max_log_proc %u\n", infos->apicid, infos->max_log_proc);
infos->socketid = infos->apicid / infos->max_log_proc;
infos->nodeid = (unsigned) -1;
infos->unitid = (unsigned) -1;
infos->logprocid = infos->apicid % infos->max_log_proc;
infos->coreid = (unsigned) -1;
infos->threadid = (unsigned) -1;
hwloc_debug("phys %u thread %u\n", infos->socketid, infos->logprocid);
if (highest_ext_cpuid >= 0x80000004) {
......@@ -746,9 +742,16 @@ int hwloc_look_x86(struct hwloc_topology *topology, unsigned nbprocs, int fulldi
if (!hwloc_have_cpuid())
goto out;
infos = malloc(sizeof(struct procinfo) * nbprocs);
infos = calloc(nbprocs, sizeof(struct procinfo));
if (NULL == infos)
goto out;
for (i = 0; i < nbprocs; i++) {
infos[i].nodeid = (unsigned) -1;
infos[i].socketid = (unsigned) -1;
infos[i].unitid = (unsigned) -1;
infos[i].coreid = (unsigned) -1;
infos[i].threadid = (unsigned) -1;
eax = 0x00;
hwloc_cpuid(&eax, &ebx, &ecx, &edx);
.\" -*- nroff -*-
.\" Copyright © 2010-2012 Inria. All rights reserved.
.\" Copyright © 2010-2013 Inria. All rights reserved.
.\" Copyright © 2010 Université of Bordeaux
.\" Copyright © 2009-2010 Cisco Systems, Inc. All rights reserved.
.\" See COPYING in top-level directory.
......@@ -125,13 +125,15 @@ with the 33rd. The string "0xf...f" -- with no other specified values
Locations may also be a PCI or OS object.
The corresponding value is the set of CPUs that are close to the
physical device.
For example, "pci=02:03.1" is equivalent to the set of processors
For example, "\fBpci=02:03.1\fR" is equivalent to the set of processors
that are close to the hostbridge above PCI device with bus ID "02:03.1".
"os=eth0" is equivalent to all processors close to the network
"\fBos=eth0\fR" is equivalent to all processors close to the network
interface whose software name is "eth0".
Multiple locations can be specified on the hwloc-bind command line
Multiple locations can be specified on the command lines
(delimited by whitespace); the first token of the execution command is
assumed to either follow "--" (if specified) or the first token that
is unrecognized as a location.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment