Commit 3dbca7ba authored by Pavan Balaji's avatar Pavan Balaji
Browse files

Upgrade to hwloc-1.8

Signed-off-by: Kenneth Raffenetti's avatarKen Raffenetti <>
parent 8d2e0662
......@@ -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
......@@ -62,7 +62,7 @@ if !HWLOC_BUILD_README
dist-hook: cannot-dist
csh "$(top_srcdir)/config/distscript.csh" "$(top_srcdir)" "$(distdir)" "$(HWLOC_VERSION)" "$(HWLOC_SVN_R)"
csh "$(top_srcdir)/config/distscript.csh" "$(top_srcdir)" "$(distdir)" "$(HWLOC_VERSION)"
......@@ -17,6 +17,60 @@ bug fixes (and other actions) for each version of hwloc since version
in v0.9.1).
Version 1.8.0
* New components
+ Add the "linuxpci" component that always works on Linux even when
libpciaccess and libpci aren't available (and even with a modified
file-system root). By default the old "pci" component runs first
because "linuxpci" lacks device names (obj->name is always NULL).
+ Add the topology difference API in hwloc/diff.h for manipulating
many similar topologies.
+ Add hwloc_topology_dup() for duplicating an entire topology.
+ hwloc.h and hwloc/helper.h have been reorganized to clarify the
documentation sections. The actual inline code has moved out of hwloc.h
into the new hwloc/inlines.h.
+ Deprecated functions are now in hwloc/deprecated.h, and not in the
official documentation anymore.
* Tools
+ Add hwloc-diff and hwloc-patch tools together with the new diff API.
+ Add hwloc-compress-dir to (de)compress an entire directory of XML files
using hwloc-diff and hwloc-patch.
+ Object colors in the graphical output of lstopo may be changed by adding
a "lstopoStyle" info attribute. See CUSTOM COLORS in the lstopo(1) manpage
for details. Thanks to Jirka Hladky for discussing the idea.
+ hwloc-gather-topology may now gather I/O-related files on Linux when
--io is given. Only the linuxpci component supports discovering I/O
objects from these extended tarballs.
+ hwloc-annotate now supports --ri to remove/replace info attributes with
a given name.
+ hwloc-info supports "root" and "all" special locations for dumping
information about the root object.
+ lstopo now supports --append-legend to append custom lines of text
to the legend in the graphical output. Thanks to Jirka Hladky for
discussing the idea.
+ hwloc-calc and friends have a more robust parsing of locations given
on the command-line and they report useful error messages about it.
+ Add --whole-system to hwloc-bind, hwloc-calc, hwloc-distances and
hwloc-distrib, and add --restrict to hwloc-bind for uniformity among
* Misc
+ Calling hwloc_topology_load() or hwloc_topology_set_*() on an already
loaded topology now returns an error (deprecated since release 1.6.1).
+ Fix the initialisation of cpusets and nodesets in Group objects added
when inserting PCI hostbridges.
+ Never merge Group objects that were added explicitly by the user with
+ Add a sanity check during dynamic plugin loading to prevent some
crashes when hwloc is dynamically loaded by another plugin mechanisms.
+ Add --with-hwloc-plugins-path to specify the install/load directories
of plugins.
+ Add the MICSerialNumber info attribute to the root object when running
hwloc inside a Xeon Phi to match the same attribute in the MIC OS device
when running in the host.
Version 1.7.2
* Do not create invalid block OS devices on very old Linux kernel such
......@@ -87,8 +87,8 @@ It just happens to be hosted as part of the overall Open MPI project.
Nightly development snapshots are available on the web site. Additionally, the
code can be directly checked out of Subversion:
shell$ svn checkout hwloc-trunk
shell$ cd hwloc-trunk
shell$ git clone
shell$ cd hwloc
shell$ ./
Note that GNU Autoconf >=2.63, Automake >=1.10 and Libtool >=2.2.6 are required
......@@ -110,13 +110,16 @@ The hwloc core may also benefit from the following development packages:
* libnuma for memory binding and migration support on Linux (numactl-devel or
libnuma-dev package).
* hwloc can use one of two different libraries for I/O device discovery:
* hwloc can use one of two different libraries for full I/O device discovery:
1. libpciaccess (BSD). The relevant development package is usually
libpciaccess-devel or libpciaccess-dev.
2. libpci, from the pciutils package (GPL). The relevant development
package is usually pciutils-devel or libpci-dev.
On Linux, PCI discovery may still be performed even if none of the above
libraries can be used.
* the AMD OpenCL implementation for OpenCL device discovery.
* the NVIDIA CUDA Toolkit for CUDA device discovery.
* the NVIDIA Tesla Development Kit for NVML device discovery.
......@@ -126,6 +129,8 @@ The hwloc core may also benefit from the following development packages:
exported by the same hwloc release). See Importing and exporting topologies
from/to XML files for details. The relevant development package is usually
libxml2-devel or libxml2-dev.
* libtool's ltdl library for dynamic plugin loading. The relevant development
package is usually libtool-ltdl-devel or libltdl-dev.
PCI and XML support may be statically built inside the main hwloc library, or
as separate dynamically-loaded plugins (see the Components and plugins
......@@ -351,12 +356,12 @@ And the same output in XML (line breaks added, only PU #0 shown):
Programming Interface
The basic interface is available in hwloc.h. It essentially offers low-level
routines for advanced programmers that want to manually manipulate objects and
follow links between them. Documentation for everything in hwloc.h are provided
later in this document. Developers should also look at hwloc/helper.h (and also
in this document, which provides good higher-level topology traversal
The basic interface is available in hwloc.h. Some higher-level functions are
available in hwloc/helper.h to reduce the need to manually manipulate objects
and follow links between them. Documentation for all these is provided later in
this document. Developers may also want to look at hwloc/inlines.h which
contains the actual inline code of some hwloc.h routines, and at this document,
which provides good higher-level topology traversal examples.
To precisely define the vocabulary used by hwloc, a Terms and Definitions
section is available and should probably be read first.
......@@ -660,7 +665,7 @@ Questions and Bugs
Questions should be sent to the devel mailing list (
community/lists/hwloc.php). Bug reports should be reported in the tracker (
If hwloc discovers an incorrect topology for your machine, the very first thing
you should check is to ensure that you have the most recent updates installed
......@@ -714,5 +719,5 @@ Make sure to have had a look at those too!
Generated on Thu Mar 7 2013 08:08:07 for Hardware Locality (hwloc) by doxygen
Generated on Tue Sep 10 2013 16:08:12 for Hardware Locality (hwloc) by
doxygen 1.8.4
......@@ -2,12 +2,18 @@
# of hwloc in this distribution. The various components of the version
# number below are combined to form a single version number string.
# If snapshot=1, then use the value from snapshot_version as the
# entire hwloc version (i.e., ignore major, minor, release, and
# greek). This is only set to 1 when making snapshot tarballs.
# major, minor, and release are generally combined in the form
# <major>.<minor>.<release>. If release is zero, then it is omitted.
# 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
......@@ -18,31 +24,6 @@ release=2
# If want_repo_rev=1, then the SVN r number will be included in the overall
# hwloc version number in some form.
# If repo_rev=-1, then the repository version number will be obtained
# dynamically at run time, either:
# 1) via the "svnversion" command (if this is a Subversion checkout)
# in the form "r<svn_r>", or
# 2) via the "hg -v -R tip" command (if this is a Mercurial clone)
# in the form of "hg<hash>", using the hash tag at the tip
# 3) via the "git log -1" command (if this is a Git clone) in the form
# of "git<hash>", using the hash tag at the HEAD
# 4) with the date (if none of the above work) in the form of
# "date<date>".
# Alternatively, if repo_rev is not -1, the value of repo_rev_r will
# be directly appended to the version string. This happens during
# "make dist", for example: if the distribution tarball is being made
# from an SVN checkout, if repo_rev=-1, then its value is replaced
# with the output of "svnversion".
# The date when this release was created
date="Unreleased developer copy"
......@@ -52,10 +33,10 @@ date="Unreleased developer copy"
# chapter from the GNU Libtool documentation. Notes:
# 1. Since version numbers are associated with *releases*, the version
# number maintained on the hwloc SVN trunk (and developer branches) is
# always 0:0:0.
# number maintained on the hwloc git master (and developer branches)
# is always 0:0:0.
# 2. Version numbers are described in the Libtool current:revision:age
# format.
if [ -n "$MPICH_AUTOTOOLS_DIR" ] ; then
$autoreconf ${autoreconf_args:-"-ivf"}
autoreconf ${autoreconf_args:-"-ivf"}
......@@ -11,7 +11,7 @@
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# Copyright © 2010 inria. All rights reserved.
# Copyright © 2009-2011 Cisco Systems, Inc. All rights reserved.
# Copyright © 2009-2013 Cisco Systems, Inc. All rights reserved.
# Additional copyrights may follow
......@@ -28,7 +28,6 @@ cd "$builddir"
set distdir="$builddir/$2"
if ("$distdir" == "") then
echo "Must supply relative distdir as argv[2] -- aborting"
......@@ -48,15 +47,6 @@ else
set vpath_msg=no
# We can catch some hard (but possible) to do mistakes by looking at
# our tree's revision number, but only if we are in the source tree.
# Otherwise, use what configure told us, at the cost of allowing one
# or two corner cases in (but otherwise VPATH builds won't work).
set repo_rev=$HWLOC_REPO_REV
if (-d .svn) then
set repo_rev="r`svnversion .`"
set start=`date`
cat <<EOF
......@@ -78,24 +68,6 @@ if (! -d "$distdir") then
exit 1
# See if we need to update the version file with the current repo
# revision number. Do this *before* entering the distribution tree to
# solve a whole host of problems with VPATH (since srcdir may be
# relative or absolute)
set cur_repo_rev="`grep '^repo_rev' ${distdir}/VERSION | cut -d= -f2`"
if ("$cur_repo_rev" == "-1") then
sed -e 's/^repo_rev=.*/repo_rev='$repo_rev'/' "${distdir}/VERSION" > "${distdir}/"
cp "${distdir}/" "${distdir}/VERSION"
rm -f "${distdir}/"
# need to reset the timestamp to not annoy AM dependencies
touch -r "${srcdir}/VERSION" "${distdir}/VERSION"
echo "*** Updated VERSION file with repo rev number: $repo_rev"
echo "*** Did NOT update VERSION file with repo rev number"
# VPATH builds only work if the srcdir has valid docs already built.
# If we're VPATH and the srcdir doesn't have valid docs, then fail.
......@@ -169,63 +141,6 @@ echo "*** Now in distdir: $distdir"
echo "*** Removing latex source from dist tree"
rm -rf doc/doxygen-doc/latex
# Get the latest config.guess and config.sub from
echo "*** Downloading latest config.sub/config.guess from"
cd config
set configdir="`pwd`"
mkdir tmp.$$
cd tmp.$$
# Official HTTP git mirrors for config.guess / config.sub
wget -t 1 -T 10 -O config.guess ';a=blob_plain;f=config.guess;hb=master'
wget -t 1 -T 10 -O config.sub ';a=blob_plain;f=config.sub;hb=master'
chmod +x config.guess config.sub
# Recently, has had zero-legnth config.guess / config.sub
# files, which causes the automated nightly SVN snapshot tarball to
# fail to be made correctly. This is a primitive attempt to fix that.
# If we got zero-length files from wget, use a config.guess /
# config.sub from a known location that is more recent than what ships
# in the current generation of auto* tools. Also check to ensure that
# the resulting scripts are runnable (Jan 2009: there are un-runnable
# scripts available right now because of some git vulnerability).
# Before you complain about this too loudly, remember that we're using
# unreleased software...
set happy=0
if (! -f config.guess || ! -s config.guess) then
echo " - WARNING: Got bad config.guess from (non-existent or empty)"
./config.guess >& /dev/null
if ($status != 0) then
echo " - WARNING: Got bad config.guess from (not executable)"
if (! -f config.sub || ! -s config.sub) then
echo " - WARNING: Got bad config.sub from (non-existent or empty)"
./config.sub `./config.guess` >& /dev/null
if ($status != 0) then
echo " - WARNING: Got bad config.sub from (not executable)"
echo " - Got good config.guess and config.sub from"
chmod +w ../config.sub ../config.guess
cp config.sub config.guess ..
set happy=1
if ("$happy" == "0") then
echo " - WARNING: using included versions for both config.sub and config.guess"
cd ..
rm -rf tmp.$$
cd ..
# All done
......@@ -184,6 +184,11 @@ EOF])
hwloc_components="$hwloc_components linux"
if test x$enable_pci != xno; then
hwloc_components="$hwloc_components linuxpci"
AC_DEFINE(HWLOC_HAVE_LINUXPCI, 1, [Define to 1 if building the Linux PCI component])
AC_DEFINE(HWLOC_IRIX_SYS, 1, [Define to 1 on Irix])
......@@ -439,6 +444,7 @@ EOF])
#include <sys/param.h>
# Do a full link test instead of just using AC_CHECK_FUNCS, which
......@@ -449,15 +455,17 @@ EOF])
# "sysctlbyname" might still be available in libc (which autoconf
# checks for), they might not be actually usable.
#include <stdio.h>
#include <sys/sysctl.h>
#include <stdio.h>
#include <sys/types.h>
#include <sys/sysctl.h>
[return sysctl(NULL,0,NULL,NULL,NULL,0);],
AC_DEFINE([HAVE_SYSCTL],[1],[Define to '1' if sysctl is present and usable]))
#include <stdio.h>
#include <sys/sysctl.h>
#include <stdio.h>
#include <sys/types.h>
#include <sys/sysctl.h>
[return sysctlbyname(NULL,NULL,NULL,NULL,0);],
AC_DEFINE([HAVE_SYSCTLBYNAME],[1],[Define to '1' if sysctlbyname is present and usable]))
......@@ -906,15 +914,39 @@ EOF])
# don't add LIBS/CFLAGS/REQUIRES yet, depends on plugins
# X11 support
[AC_CHECK_LIB([X11], [XOpenDisplay],
# the GL backend just needs XOpenDisplay
# lstopo needs more
[AC_DEFINE([HWLOC_HAVE_X11_KEYSYM], [1], [Define to 1 if X11 headers including Xutil.h and keysym.h are available.])])
AC_SUBST([HWLOC_X11_LIBS], ["-lX11"])