[mpich-commits] [mpich] MPICH primary repository branch, master, updated. v3.0.4-105-ga3bce75

mysql vizuser noreply at mpich.org
Tue Apr 30 08:44:25 CDT 2013


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "MPICH primary repository".

The branch, master has been updated
       via  a3bce754975b9b3c7e3ca6ba31fa20d00a79ac63 (commit)
       via  b5533838fcc0410b61028ff0b5719c8eb9a1a43e (commit)
       via  c0ed8d2701e0c55586120e66ab6d58fca5577eaf (commit)
       via  5be8001f1485825e97fd4507032a74e47a065213 (commit)
      from  a9640dc49d25f95ffbccd04476e42c5c23d0c96e (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.mpich.org/mpich.git/commitdiff/a3bce754975b9b3c7e3ca6ba31fa20d00a79ac63

commit a3bce754975b9b3c7e3ca6ba31fa20d00a79ac63
Author: Pavan Balaji <balaji at mcs.anl.gov>
Date:   Sun Apr 28 22:34:29 2013 -0500

    Merge hydra-specific hwloc patches.
    
    1. Cherry-picked [0e247915] and [de777969].
    
    2. Comment out LTDL support in hwloc.  LTDL build breaks in hwloc-1.7
    in embedded mode.  This has been reported to hwloc, but they don't
    have a fix yet.  We will need to maintain this patch till they do.
    
    No reviewer.

diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/Makefile.am b/src/pm/hydra/tools/topo/hwloc/hwloc/Makefile.am
index a76d42e..5d635d5 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/Makefile.am
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/Makefile.am
@@ -9,10 +9,10 @@ ACLOCAL_AMFLAGS = -I ./config
 
 SUBDIRS = src include
 if HWLOC_BUILD_STANDALONE
-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
 endif
 
 # Do not let automake automatically add the non-standalone dirs to the
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/autogen.sh b/src/pm/hydra/tools/topo/hwloc/hwloc/autogen.sh
index d69ef09..88a122a 100755
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/autogen.sh
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/autogen.sh
@@ -1,2 +1,2 @@
 :
-autoreconf -ivf
+autoreconf ${autoreconf_args:"-ivf"}
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/configure.ac b/src/pm/hydra/tools/topo/hwloc/hwloc/configure.ac
index 8f0260b..5700b77 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/configure.ac
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/configure.ac
@@ -185,9 +185,22 @@ if test "x$hwloc_have_plugins" = xyes; then
 fi
 
 # Is ltdl included?
-AM_CONDITIONAL([HWLOC_LTDL_INCLUDED], [test "x$with_included_ltdl" = xyes])
+# AM_CONDITIONAL([HWLOC_LTDL_INCLUDED], [test "x$with_included_ltdl" = xyes])
 
 
+## Enable creation of libtool-style versioning or no versioning
+AC_ARG_ENABLE(versioning,
+        [AC_HELP_STRING([--enable-versioning],[Enable library versioning])],,
+        [enable_versioning=yes])
+
+if test "$enable_versioning" = "yes" ; then
+   libhwloc_so_versionflags="-version-info \$(libhwloc_so_version)"
+else
+   libhwloc_so_versionflags="-avoid-version"
+fi
+export libhwloc_so_versionflags
+AC_SUBST(libhwloc_so_versionflags)
+
 # Party on
 AC_OUTPUT
 
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/src/Makefile.am b/src/pm/hydra/tools/topo/hwloc/hwloc/src/Makefile.am
index e44b3f4..44413cd 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/src/Makefile.am
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/src/Makefile.am
@@ -201,16 +201,16 @@ endif HWLOC_HAVE_WINDOWS
 # Installable library
 
 libhwloc_la_SOURCES = $(sources)
-libhwloc_la_LDFLAGS = $(ldflags) -version-info $(libhwloc_so_version) $(HWLOC_LIBS)
+libhwloc_la_LDFLAGS = $(ldflags) $(libhwloc_so_versionflags) $(HWLOC_LIBS)
 
 if HWLOC_HAVE_PLUGINS
 AM_CPPFLAGS += $(LTDLINCL)
 libhwloc_la_LDFLAGS += -export-dynamic
 libhwloc_la_LIBADD = $(LIBLTDL)
 libhwloc_la_DEPENDENCIES = $(LTDLDEPS)
-if HWLOC_LTDL_INCLUDED
-SUBDIRS = libltdl
-endif
+# if HWLOC_LTDL_INCLUDED
+# SUBDIRS = libltdl
+# endif
 endif
 
 # Embedded library (note the lack of a .so version number -- that

http://git.mpich.org/mpich.git/commitdiff/b5533838fcc0410b61028ff0b5719c8eb9a1a43e

commit b5533838fcc0410b61028ff0b5719c8eb9a1a43e
Author: Pavan Balaji <balaji at mcs.anl.gov>
Date:   Sun Apr 28 22:32:27 2013 -0500

    Upgraded to hwloc-1.7.
    
    No reviewer.

diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/COPYING b/src/pm/hydra/tools/topo/hwloc/hwloc/COPYING
index b943b93..32128c7 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/COPYING
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/COPYING
@@ -2,6 +2,7 @@ Copyright © 2009 CNRS
 Copyright © 2009 inria.  All rights reserved.
 Copyright © 2009 Université Bordeaux 1
 Copyright © 2009 Cisco Systems, Inc.  All rights reserved.
+Copyright © 2012 Blue Brain Project, EPFL. All rights reserved.
 See COPYING in top-level directory.
 
 Redistribution and use in source and binary forms, with or without
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/HACKING b/src/pm/hydra/tools/topo/hwloc/hwloc/HACKING
index 2f386ec..03e3e1b 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/HACKING
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/HACKING
@@ -136,8 +136,6 @@ Building the Windows zipballs on Windows with MinGW:
 
 - Install
   $ make install
-- Add some text files and remove pkg-config file
-  $ make install-winball
 - Create the zipball
   $ zip -r hwloc-win<size>-build-<version>.zip hwloc-win<size>-build-<version>
 
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/Makefile.am b/src/pm/hydra/tools/topo/hwloc/hwloc/Makefile.am
index 918d3a1..a76d42e 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/Makefile.am
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/Makefile.am
@@ -9,21 +9,23 @@ ACLOCAL_AMFLAGS = -I ./config
 
 SUBDIRS = src include
 if HWLOC_BUILD_STANDALONE
-# 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
 endif
 
 # Do not let automake automatically add the non-standalone dirs to the
 # distribution tarball if we're building in embedded mode.
 DIST_SUBDIRS = $(SUBDIRS)
 
-# Only install the pkg file if we're building in standalone mode
+# Only install the pkg file if we're building in standalone mode (and not on Windows)
 if HWLOC_BUILD_STANDALONE
+if !HWLOC_HAVE_WINDOWS
 pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = hwloc.pc
 endif
+endif
 
 # Only install the valgrind suppressions file if we're building in standalone mode
 if HWLOC_BUILD_STANDALONE
@@ -75,14 +77,16 @@ doc readme:
 	$(MAKE) -C doc readme
 endif HWLOC_BUILD_STANDALONE
 
+if HWLOC_BUILD_STANDALONE
+if HWLOC_HAVE_WINDOWS
 #
-# Winball specific rules, to be manually run after make install
+# Winball specific rules
 #
-if HWLOC_BUILD_STANDALONE
-.PHONY: install-winball
-install-winball:
-	sed -e 's/$$/'$$'\015'/ < $(srcdir)/README > $(prefix)/README.txt
-	sed -e 's/$$/'$$'\015'/ < $(srcdir)/NEWS > $(prefix)/NEWS.txt
-	sed -e 's/$$/'$$'\015'/ < $(srcdir)/COPYING > $(prefix)/COPYING.txt
-	$(RM) $(pkgconfigdir)/hwloc.pc
+install-data-local:
+	sed -e 's/$$/'$$'\015'/ < $(srcdir)/README > $(DESTDIR)$(prefix)/README.txt
+	sed -e 's/$$/'$$'\015'/ < $(srcdir)/NEWS > $(DESTDIR)$(prefix)/NEWS.txt
+	sed -e 's/$$/'$$'\015'/ < $(srcdir)/COPYING > $(DESTDIR)$(prefix)/COPYING.txt
+uninstall-local:
+	rm -f $(DESTDIR)$(prefix)/README.txt $(DESTDIR)$(prefix)/NEWS.txt $(DESTDIR)$(prefix)/COPYING.txt
+endif HWLOC_HAVE_WINDOWS
 endif HWLOC_BUILD_STANDALONE
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/NEWS b/src/pm/hydra/tools/topo/hwloc/hwloc/NEWS
index 24e73c0..acc67c0 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/NEWS
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/NEWS
@@ -1,6 +1,6 @@
 Copyright © 2009 CNRS
 Copyright © 2009-2013 Inria.  All rights reserved.
-Copyright © 2009-2012 Université Bordeaux 1
+Copyright © 2009-2013 Université Bordeaux 1
 Copyright © 2009-2011 Cisco Systems, Inc.  All rights reserved.
 
 $COPYRIGHT$
@@ -17,6 +17,66 @@ bug fixes (and other actions) for each version of hwloc since version
 in v0.9.1).
 
 
+Version 1.7.0
+-------------
+* New operating system backends
+  + Add BlueGene/Q compute node kernel (CNK) support. See the FAQ in the
+    documentation for details. Thanks to Jeff Hammond, Christopher Samuel
+    and Erik Schnetter for their help.
+  + Add NetBSD support, thanks to Aleksej Saushev.
+* New I/O device discovery
+  + Add co-processor OS devices such as "mic0" for Intel Xeon Phi (MIC)
+    on Linux. Thanks to Jerome Vienne for helping.
+  + Add co-processor OS devices such as "cuda0" for NVIDIA CUDA-capable GPUs.
+  + Add co-processor OS devices such as "opencl0d0" for OpenCL GPU devices
+    on the AMD OpenCL implementation.
+  + Add GPU OS devices such as ":0.0" for NVIDIA X11 displays.
+  + Add GPU OS devices such as "nvml0" for NVIDIA GPUs.
+    Thanks to Marwan Abdellah and Stefan Eilemann for helping.
+  These new OS devices have some string info attributes such as CoProcType,
+  GPUModel, etc. to better identify them.
+  See the I/O Devices and Attributes documentation sections for details.
+* New components
+  + Add the "opencl", "cuda", "nvml" and "gl" components for I/O device
+    discovery.
+  + "nvml" also improves the discovery of NVIDIA GPU PCIe link speed.
+  All of these new components may be built as plugins. They may also be
+  disabled entirely by passing --disable-opencl/cuda/nvml/gl to configure.
+  See the I/O Devices, Components and Plugins, and FAQ documentation
+  sections for details.
+* API
+  + Add hwloc_topology_get_flags().
+  + Add hwloc/plugins.h for building external plugins.
+    See the Adding new discovery components and plugins section.
+* Interoperability
+  + Add hwloc/opencl.h, hwloc/nvml.h, hwloc/gl.h and hwloc/intel-mic.h
+    to retrieve the locality of OS devices that correspond to AMD OpenCL
+    GPU devices or indexes, to NVML devices or indexes, to NVIDIA X11
+    displays, or to Intel Xeon Phi (MIC) device indexes.
+  + Add new helpers in hwloc/cuda.h and hwloc/cudart.h to convert
+    between CUDA devices or indexes and hwloc OS devices.
+  + Add hwloc_ibv_get_device_osdev() and clarify the requirements
+    of the OpenFabrics Verbs helpers in hwloc/openfabrics-verbs.h.
+* Tools
+  + hwloc-info is not only a synonym of lstopo -s anymore, it also
+    dumps information about objects given on the command-line.
+* Documentation
+  + Add a section "Existing components and plugins".
+  + Add a list of common OS devices in section "Software devices".
+  + Add a new FAQ entry "Why is lstopo slow?" about lstopo slowness
+    issues because of GPUs.
+  + Clarify the documentation of inline helpers in hwloc/myriexpress.h
+    and hwloc/openfabrics-verbs.h.
+* Misc
+  + Improve cache detection on AIX.
+  + The HWLOC_COMPONENTS variable now excludes the components whose
+    names are prefixed with '-'.
+  + lstopo --ignore PU now works when displaying the topology in
+    graphical and textual mode (not when exporting to XML).
+  + The `libpci' component is now called `pci' but the old name is still
+    accepted in the HWLOC_COMPONENTS variable for backward compatibility.
+
+
 Version 1.6.2
 -------------
 * Use libpciaccess instead of pciutils/libpci by default for I/O discovery.
@@ -97,6 +157,26 @@ Version 1.6.0
   + Add a section about Synthetic topologies in the documentation.
 
 
+Version 1.5.2 (some of these changes are in v1.6.2 but not in v1.6)
+-------------
+* Use libpciaccess instead of pciutils/libpci by default for I/O discovery.
+  pciutils/libpci is only used if --enable-libpci is given to configure
+  because its GPL license may taint hwloc. See the Installation section
+  in the documentation for details.
+* Fix get_cpubind on Solaris when bound to a single PU with
+  processor_bind(). Thanks to Eugene Loh for reporting the problem
+  and providing a patch.
+* Fix some DIR descriptor leaks on Linux.
+* Fix I/O device lists when some were filtered out after a XML import.
+* Add missing Backend string info on Solaris in most cases.
+* Fix the removal of I/O objects when importing a I/O-enabled XML topology
+  without any I/O topology flag.
+* Fix the output of hwloc-calc -H --hierarchical when using logical
+  indexes in the output.
+* Fix the pkg-config output with --libs --static.
+  Thanks to Erik Schnetter for reporting one of the problems.
+
+
 Version 1.5.1
 -------------
 * Fix block OS device detection on Linux kernel 3.3 and later.
@@ -175,6 +255,20 @@ Version 1.5.0
     process on Linux if the list of threads is heavily getting modified.
 
 
+Version 1.4.3
+-------------
+* This release is only meant to fix the pciutils license issue when upgrading
+  to hwloc v1.5 or later is not possible. It contains several other minor
+  fixes but ignores many of them that are only in v1.5 or later.
+* Use libpciaccess instead of pciutils/libpci by default for I/O discovery.
+  pciutils/libpci is only used if --enable-libpci is given to configure
+  because its GPL license may taint hwloc. See the Installation section
+  in the documentation for details.
+* Fix PCIe 3.0 link speed computation.
+* Fix importing of escaped characters with the minimalistic XML backend.
+* Fix a memory leak in the x86 backend.
+
+
 Version 1.4.2
 -------------
 * Fix build on Solaris 9 and earlier when fabsf() is not a compiler
@@ -261,6 +355,17 @@ Version 1.4.0 (does not contain all v1.3.2 changes)
   + Remove references to internal symbols in the tools.
 
 
+Version 1.3.3
+-------------
+* This release is only meant to fix the pciutils license issue when upgrading
+  to hwloc v1.4 or later is not possible. It contains several other minor
+  fixes but ignores many of them that are only in v1.4 or later.
+* Use libpciaccess instead of pciutils/libpci by default for I/O discovery.
+  pciutils/libpci is only used if --enable-libpci is given to configure
+  because its GPL license may taint hwloc. See the Installation section
+  in the documentation for details.
+
+
 Version 1.3.2
 -------------
 * Fix missing last bit in hwloc_linux_get_thread_cpubind().
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/README b/src/pm/hydra/tools/topo/hwloc/hwloc/README
index 7a4d9b6..e8f3b8e 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/README
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/README
@@ -29,10 +29,12 @@ hwloc supports the following operating systems:
   * Solaris
   * AIX
   * Darwin / OS X
-  * FreeBSD and its variants, such as kFreeBSD/GNU
+  * FreeBSD and its variants (such as kFreeBSD/GNU)
+  * NetBSD
   * OSF/1 (a.k.a., Tru64)
   * HP-UX
   * Microsoft Windows
+  * IBM BlueGene/Q Compute Node Kernel (CNK)
 
 Since it uses standard Operating System information, hwloc's support is mostly
 independant from the processor type (x86, powerpc, ...) and just relies on the
@@ -101,20 +103,50 @@ 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 is configured and build.
+package (usually cairo-devel or libcairo2-dev) can be found in "lstopo" when
+hwloc is configured and build.
 
 The hwloc core may also benefit from the following development packages:
 
-  * pciutils (libpci) for I/O discovery.
-  * libnuma for memory binding and migration support on Linux.
+  * 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:
+
+  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.
+
+  * 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.
+  * the NV-CONTROL X extension library (NVCtrl) for NVIDIA display discovery.
   * 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 Importing and exporting topologies
- from/to XML files for details.
+ from/to XML files for details. The relevant development package is usually
+ libxml2-devel or libxml2-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
+section).
+
+Note that because of the possibility of GPL taint (remember that hwloc is
+BSD-licensed), hwloc's configure script will prefer libpciaccess to the
+pciutils package. Indeed, if libpciaccess is not found, hwloc will not use
+pciutils unless it is specifically requested via the --enable-libpci flag is
+provided.
+
+Also note that if you install supplemental libraries in non-standard locations,
+hwloc's configure script may not be able to find them without some help. You
+may need to specify additional CPPFLAGS, LDFLAGS, or PKG_CONFIG_PATH values on
+the configure command line.
+
+For example, if libpciaccess was installed into /opt/pciaccess, hwloc's
+configure script may not find it be default. Try adding PKG_CONFIG_PATH to the
+./configure command line, like this:
 
-libpci and libxml2 support may be statically built inside the main hwloc
-library, or as separate dynamically-loaded plugins (see the Components and
-plugins section).
+./configure PKG_CONFIG_PATH=/opt/pciaccess/lib/pkgconfig ...
 
 CLI Examples
 
@@ -671,6 +703,7 @@ The documentation chapters include
   * Multi-node Topologies
   * Object attributes
   * Importing and exporting topologies from/to XML files
+  * Synthetic topologies
   * Interoperability With Other Software
   * Thread Safety
   * Components and plugins
@@ -681,5 +714,5 @@ Make sure to have had a look at those too!
 
 -------------------------------------------------------------------------------
 
-Generated on Mon Nov 12 2012 03:13:56 for Hardware Locality (hwloc) by   
-doxygen 1.8.1.2
+Generated on Thu Mar 7 2013 08:08:07 for Hardware Locality (hwloc) by   doxygen
+1.8.3.1
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/VERSION b/src/pm/hydra/tools/topo/hwloc/hwloc/VERSION
index 13dcb20..6028396 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/VERSION
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/VERSION
@@ -6,8 +6,8 @@
 # <major>.<minor>.<release>.  If release is zero, then it is omitted.
 
 major=1
-minor=6
-release=2
+minor=7
+release=0
 
 # 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=2
 # requirement is that it must be entirely printable ASCII characters
 # and have no white space.
 
-greek=rc1
+greek=rc2
 
 # 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.
 
-libhwloc_so_version=7:2:2
+libhwloc_so_version=8:0:3
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/autogen.sh b/src/pm/hydra/tools/topo/hwloc/hwloc/autogen.sh
index 88a122a..d69ef09 100755
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/autogen.sh
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/autogen.sh
@@ -1,2 +1,2 @@
 :
-autoreconf ${autoreconf_args:"-ivf"}
+autoreconf -ivf
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/config/hwloc.m4 b/src/pm/hydra/tools/topo/hwloc/hwloc/config/hwloc.m4
index 95fa6d4..c66f26c 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/config/hwloc.m4
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/config/hwloc.m4
@@ -10,6 +10,7 @@ dnl                         All rights reserved.
 dnl Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, 
 dnl                         University of Stuttgart.  All rights reserved.
 dnl Copyright © 2006-2011  Cisco Systems, Inc.  All rights reserved.
+dnl Copyright © 2012  Blue Brain Project, BBP/EPFL. All rights reserved.
 dnl Copyright © 2012       Oracle and/or its affiliates.  All rights reserved.
 dnl See COPYING in top-level directory.
 
@@ -172,6 +173,12 @@ EOF])
     #
     AC_MSG_CHECKING([which OS support to include])
     case ${target} in
+      powerpc64-bgq-linux*) # must be before Linux
+	AC_DEFINE(HWLOC_BGQ_SYS, 1, [Define to 1 on BlueGene/Q])
+	hwloc_bgq=yes
+	AC_MSG_RESULT([bgq])
+	hwloc_components="$hwloc_components bgq"
+	;;
       *-*-linux*)
         AC_DEFINE(HWLOC_LINUX_SYS, 1, [Define to 1 on Linux])
         hwloc_linux=yes
@@ -226,6 +233,12 @@ EOF])
         AC_MSG_RESULT([FreeBSD])
         hwloc_components="$hwloc_components freebsd"
         ;;
+      *-*-*netbsd*)
+        AC_DEFINE(HWLOC_NETBSD_SYS, 1, [Define to 1 on *NETBSD])
+        hwloc_netbsd=yes
+        AC_MSG_RESULT([NetBSD])
+        hwloc_components="$hwloc_components netbsd"
+        ;;
       *)
         AC_MSG_RESULT([Unsupported! ($target)])
         AC_DEFINE(HWLOC_UNSUPPORTED_SYS, 1, [Define to 1 on unsupported systems])
@@ -642,12 +655,12 @@ EOF])
     # PCI support with pciutils instead of pciaccess
     if test "x$enable_pci" != "xno" -a "x$hwloc_pci_lib" != "xpciaccess"; then
         hwloc_pci_happy=yes
-        HWLOC_PKG_CHECK_MODULES([PCI], [libpci], [pci_cleanup], [:], [
+        HWLOC_PKG_CHECK_MODULES([PCIUTILS], [libpci], [pci_cleanup], [:], [
           # manually check pciutils in case a old one without .pc is installed
           AC_CHECK_HEADERS([pci/pci.h], [
 	    # try first without -lz, it's not always needed (RHEL5, Debian Etch)
 	    AC_CHECK_LIB([pci], [pci_init], [
-	      HWLOC_PCI_LIBS="-lpci"
+	      HWLOC_PCIUTILS_LIBS="-lpci"
 	      ], [
               # try again with -lz because it's needed sometimes (FC7).
               # don't use AC_CHECK_LIB again because the cache would
@@ -656,8 +669,8 @@ EOF])
               tmp_save_LIBS=$LIBS
               LIBS="-lpci -lz $LIBS"
               AC_LINK_IFELSE([AC_LANG_CALL([], [pci_init])],
-                             [HWLOC_PCI_LIBS="-lpci -lz"
-                              HWLOC_PCI_ADDITIONAL_LIBS="-lz"
+                             [HWLOC_PCIUTILS_LIBS="-lpci -lz"
+                              HWLOC_PCIUTILS_ADDITIONAL_LIBS="-lz"
                               AC_MSG_RESULT(yes)],
                              [hwloc_pci_happy=no
                               AC_MSG_RESULT(no)])
@@ -669,10 +682,10 @@ EOF])
                 [AC_CHECK_LIB([resolv], [inet_ntoa], 
                     [AC_MSG_CHECKING([for pci_lookup_name in -lpci with -lresolv])
                      tmp_save_LIBS=$LIBS
-                     LIBS="-lpci -lresolv $LIBS $HWLOC_PCI_ADDITIONAL_LIBS"
+                     LIBS="-lpci -lresolv $LIBS $HWLOC_PCIUTILS_ADDITIONAL_LIBS"
                      AC_LINK_IFELSE([AC_LANG_CALL([], [pci_lookup_name])],
-                                    [HWLOC_PCI_LIBS="$HWLOC_PCI_LIBS -lresolv"
-                                     HWLOC_PCI_ADDITIONAL_LIBS="$HWLOC_PCI_ADDITIONAL_LIBS -lresolv"
+                                    [HWLOC_PCIUTILS_LIBS="$HWLOC_PCIUTILS_LIBS -lresolv"
+                                     HWLOC_PCIUTILS_ADDITIONAL_LIBS="$HWLOC_PCIUTILS_ADDITIONAL_LIBS -lresolv"
                                      AC_MSG_RESULT(yes)],
                                     [hwloc_pci_happy=no
                                      AC_MSG_RESULT(no)])
@@ -689,9 +702,16 @@ EOF])
 	    hwloc_pci_happy=no
 	    hwloc_warn_may_use_libpci=yes
 	  fi
+	else
+	  # pciutils not found, error out if it was requested
+	  if test x$enable_libpci = xyes; then
+	    AC_MSG_WARN([Specified --enable-libpci switch, but could not])
+	    AC_MSG_WARN([find appropriate support])
+	    AC_MSG_ERROR([Cannot continue])
+	  fi
 	fi
     fi
-    AC_SUBST(HWLOC_PCI_LIBS)
+    AC_SUBST(HWLOC_PCIUTILS_LIBS)
     # If we asked for pci support but couldn't deliver, fail
     AS_IF([test "$enable_pci" = "yes" -a "$hwloc_pci_happy" = "no" -a "$hwloc_warn_may_use_libpci" != "yes"],
           [AC_MSG_WARN([Specified --enable-pci switch, but could not])
@@ -705,13 +725,13 @@ EOF])
     # pciutils specific checks and enabling
     if test "x$hwloc_pci_lib" = "xpciutils"; then
       tmp_save_CFLAGS="$CFLAGS"
-      CFLAGS="$CFLAGS $HWLOC_PCI_CFLAGS"
+      CFLAGS="$CFLAGS $HWLOC_PCIUTILS_CFLAGS"
       tmp_save_LIBS="$LIBS"
-      LIBS="$LIBS $HWLOC_PCI_LIBS"
+      LIBS="$LIBS $HWLOC_PCIUTILS_LIBS"
 
       AC_CHECK_DECLS([PCI_LOOKUP_NO_NUMBERS],,[:],[[#include <pci/pci.h>]])
       AC_CHECK_DECLS([PCI_LOOKUP_NO_NUMBERS],,[:],[[#include <pci/pci.h>]])
-      AC_CHECK_LIB([pci], [pci_find_cap], [enable_pci_caps=yes], [enable_pci_caps=no], [$HWLOC_PCI_ADDITIONAL_LIBS])
+      AC_CHECK_LIB([pci], [pci_find_cap], [enable_pci_caps=yes], [enable_pci_caps=no], [$HWLOC_PCIUTILS_ADDITIONAL_LIBS])
       if test "x$enable_pci_caps" = "xyes"; then
         AC_DEFINE([HWLOC_HAVE_PCI_FIND_CAP], [1], [Define to 1 if `libpci' has the `pci_find_cap' function.])
       fi
@@ -722,7 +742,7 @@ EOF])
         [pcidev_device_class=yes], [pcidev_device_class=no])
       AC_MSG_RESULT([$pcidev_device_class])
       if test x$pcidev_device_class = xyes; then
-        AC_DEFINE([HWLOC_HAVE_PCIDEV_DEVICE_CLASS], [1], [Define to 1 if struct pci_dev has a `device_class' field.])
+        AC_DEFINE([HWLOC_HAVE_PCIDEV_DEVICE_CLASS], [1], [Define to 1 if `libpci' struct pci_dev has a `device_class' field.])
       fi
 
       AC_MSG_CHECKING(whether struct pci_dev has a domain field)
@@ -731,22 +751,172 @@ EOF])
         [pcidev_domain=yes], [pcidev_domain=no])
       AC_MSG_RESULT([$pcidev_domain])
       if test x$pcidev_domain = xyes; then
-        AC_DEFINE([HWLOC_HAVE_PCIDEV_DOMAIN], [1], [Define to 1 if struct pci_dev has a `domain' field.])
+        AC_DEFINE([HWLOC_HAVE_PCIDEV_DOMAIN], [1], [Define to 1 if `libpci' struct pci_dev has a `domain' field.])
       fi
 
       CFLAGS="$tmp_save_CFLAGS"
       LIBS="$tmp_save_LIBS"
 
-      HWLOC_PCI_REQUIRES=libpci
-      AC_DEFINE([HWLOC_HAVE_LIBPCI], [1], [Define to 1 if you have the `libpci' library.])
+      HWLOC_PCIUTILS_REQUIRES=libpci
+      AC_DEFINE([HWLOC_HAVE_PCIUTILS], [1], [Define to 1 if you have the pciutils `libpci' library.])
     fi
     # final common PCI enabling
     if test "x$hwloc_pci_happy" = "xyes"; then
-      hwloc_components="$hwloc_components libpci"
-      hwloc_libpci_component_maybeplugin=1
+      hwloc_components="$hwloc_components pci"
+      hwloc_pci_component_maybeplugin=1
     fi
     # don't add LIBS/CFLAGS/REQUIRES yet, depends on plugins
 
+    # OpenCL support
+    hwloc_opencl_happy=no
+    if test "x$enable_opencl" != "xno"; then
+        hwloc_opencl_happy=yes
+        AC_CHECK_HEADERS([CL/cl_ext.h], [
+	  AC_CHECK_LIB([OpenCL], [clGetDeviceIDs], [HWLOC_OPENCL_LIBS="-lOpenCL"], [hwloc_opencl_happy=no])
+        ], [hwloc_opencl_happy=no])
+    fi
+    AC_SUBST(HWLOC_OPENCL_LIBS)
+    # Check if required extensions are available
+    if test "x$hwloc_opencl_happy" = "xyes"; then
+      tmp_save_CFLAGS="$CFLAGS"
+      CFLAGS="$CFLAGS $HWLOC_OPENCL_CFLAGS"
+      tmp_save_LIBS="$LIBS"
+      LIBS="$LIBS $HWLOC_OPENCL_LIBS"
+      AC_CHECK_DECLS([CL_DEVICE_TOPOLOGY_AMD],[hwloc_opencl_amd_happy=yes],[:],[[#include <CL/cl_ext.h>]])
+      CFLAGS="$tmp_save_CFLAGS"
+      LIBS="$tmp_save_LIBS"
+      # We can't do anything without CL_DEVICE_TOPOLOGY_AMD so far, so disable OpenCL entirely if not found
+      test "x$hwloc_opencl_amd_happy" != "xyes" && hwloc_opencl_happy=no
+    fi
+    # If we asked for opencl support but couldn't deliver, fail
+    AS_IF([test "$enable_opencl" = "yes" -a "$hwloc_opencl_happy" = "no"],
+          [AC_MSG_WARN([Specified --enable-opencl switch, but could not])
+           AC_MSG_WARN([find appropriate support])
+           AC_MSG_ERROR([Cannot continue])])
+    if test "x$hwloc_opencl_happy" = "xyes"; then
+      AC_DEFINE([HWLOC_HAVE_OPENCL], [1], [Define to 1 if you have the `OpenCL' library.])
+      AC_SUBST([HWLOC_HAVE_OPENCL], [1])
+      hwloc_components="$hwloc_components opencl"
+      hwloc_opencl_component_maybeplugin=1
+    else
+      AC_SUBST([HWLOC_HAVE_OPENCL], [0])
+    fi
+    # don't add LIBS/CFLAGS/REQUIRES yet, depends on plugins
+
+    # CUDA support
+    hwloc_have_cuda=no
+    hwloc_have_cudart=no
+    if test "x$enable_cuda" != "xno"; then
+      AC_CHECK_HEADERS([cuda.h], [
+        AC_MSG_CHECKING(if CUDA_VERSION >= 3020)
+        AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#include <cuda.h>
+#ifndef CUDA_VERSION
+#error CUDA_VERSION undefined
+#elif CUDA_VERSION < 3020
+#error CUDA_VERSION too old
+#endif]], [[int i = 3;]])],
+         [AC_MSG_RESULT(yes)
+          AC_CHECK_LIB([cuda], [cuInit],
+                       [AC_DEFINE([HAVE_CUDA], 1, [Define to 1 if we have -lcuda])
+                        hwloc_have_cuda=yes])],
+         [AC_MSG_RESULT(no)])])
+
+      AC_CHECK_HEADERS([cuda_runtime_api.h], [
+        AC_MSG_CHECKING(if CUDART_VERSION >= 3020)
+        AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#include <cuda_runtime_api.h>
+#ifndef CUDART_VERSION
+#error CUDART_VERSION undefined
+#elif CUDART_VERSION < 3020
+#error CUDART_VERSION too old
+#endif]], [[int i = 3;]])],
+         [AC_MSG_RESULT(yes)
+          AC_CHECK_LIB([cudart], [cudaGetDeviceProperties], [
+            HWLOC_CUDA_LIBS="-lcudart"
+            AC_SUBST(HWLOC_CUDA_LIBS)
+            hwloc_have_cudart=yes
+            AC_DEFINE([HWLOC_HAVE_CUDART], [1], [Define to 1 if you have the `cudart' SDK.])
+          ])
+        ])
+      ])
+
+      AS_IF([test "$enable_cuda" = "yes" -a "$hwloc_have_cudart" = "no"],
+            [AC_MSG_WARN([Specified --enable-cuda switch, but could not])
+             AC_MSG_WARN([find appropriate support])
+             AC_MSG_ERROR([Cannot continue])])
+
+      if test "x$hwloc_have_cudart" = "xyes"; then
+	hwloc_components="$hwloc_components cuda"
+        hwloc_cuda_component_maybeplugin=1
+      fi
+    fi
+    # don't add LIBS/CFLAGS yet, depends on plugins
+
+    # NVML support
+    hwloc_nvml_happy=no
+    if test "x$enable_nvml" != "xno"; then
+	hwloc_nvml_happy=yes
+	AC_CHECK_HEADERS([nvml.h], [
+	  AC_CHECK_LIB([nvidia-ml], [nvmlInit], [HWLOC_NVML_LIBS="-lnvidia-ml"], [hwloc_nvml_happy=no])
+        ], [hwloc_nvml_happy=no])
+    fi
+    if test "x$hwloc_nvml_happy" = "xyes"; then
+      tmp_save_CFLAGS="$CFLAGS"
+      CFLAGS="$CFLAGS $HWLOC_NVML_CFLAGS"
+      tmp_save_LIBS="$LIBS"
+      LIBS="$LIBS $HWLOC_NVML_LIBS"
+      AC_CHECK_DECLS([nvmlDeviceGetMaxPcieLinkGeneration],,[:],[[#include <nvml.h>]])
+      CFLAGS="$tmp_save_CFLAGS"
+      LIBS="$tmp_save_LIBS"
+    fi
+    AC_SUBST(HWLOC_NVML_LIBS)
+    # If we asked for nvml support but couldn't deliver, fail
+    AS_IF([test "$enable_nvml" = "yes" -a "$hwloc_nvml_happy" = "no"],
+	  [AC_MSG_WARN([Specified --enable-nvml switch, but could not])
+	   AC_MSG_WARN([find appropriate support])
+	   AC_MSG_ERROR([Cannot continue])])
+    if test "x$hwloc_nvml_happy" = "xyes"; then
+      AC_DEFINE([HWLOC_HAVE_NVML], [1], [Define to 1 if you have the `NVML' library.])
+      AC_SUBST([HWLOC_HAVE_NVML], [1])
+      hwloc_components="$hwloc_components nvml"
+      hwloc_nvml_component_maybeplugin=1
+    else
+      AC_SUBST([HWLOC_HAVE_NVML], [0])
+    fi
+    # don't add LIBS/CFLAGS/REQUIRES yet, depends on plugins
+
+    # GL Support 
+    hwloc_gl_happy=no
+    if test "x$enable_gl" != "xno"; then
+    	hwloc_gl_happy=yes								
+
+        AC_CHECK_HEADERS([X11/Xlib.h], [
+          AC_CHECK_LIB([X11], [XOpenDisplay], [:], [hwloc_gl_happy=no])
+        ], [hwloc_gl_happy=no])
+       
+        AC_CHECK_HEADERS([NVCtrl/NVCtrl.h], [
+          AC_CHECK_LIB([XNVCtrl], [XNVCTRLQueryTargetAttribute], [:], [hwloc_gl_happy=no], [-lXext])
+        ], [hwloc_gl_happy=no])
+
+        if test "x$hwloc_gl_happy" = "xyes"; then
+            AC_DEFINE([HWLOC_HAVE_GL], [1], [Define to 1 if you have the GL module components.])
+	    HWLOC_GL_LIBS="-lXNVCtrl -lXext -lX11"
+	    AC_SUBST(HWLOC_GL_LIBS)
+	    HWLOC_GL_REQUIRES="xext x11"
+            hwloc_have_gl=yes
+	    hwloc_components="$hwloc_components gl"
+	    hwloc_gl_component_maybeplugin=1
+	else
+            AS_IF([test "$enable_gl" = "yes"], [
+                AC_MSG_WARN([Specified --enable-gl switch, but could not])
+                AC_MSG_WARN([find appropriate support])
+                AC_MSG_ERROR([Cannot continue])
+            ])
+ 	fi      
+    fi
+    # don't add LIBS/CFLAGS yet, depends on plugins
+    
     # libxml2 support
     hwloc_libxml2_happy=
     if test "x$enable_libxml2" != "xno"; then
@@ -862,10 +1032,26 @@ EOF])
     AC_MSG_CHECKING([components to build as plugins])
     AC_MSG_RESULT([$hwloc_plugin_components])
 
-    AS_IF([test "$hwloc_libpci_component" = "static"],
-          [HWLOC_LIBS="$HWLOC_LIBS $HWLOC_PCI_LIBS $HWLOC_PCIACCESS_LIBS"
-           HWLOC_CFLAGS="$HWLOC_CFLAGS $HWLOC_PCI_CFLAGS $HWLOC_PCIACCESS_CFLAGS"
-           HWLOC_REQUIRES="$HWLOC_PCI_REQUIRES $HWLOC_PCIACCESS_REQUIRES $HWLOC_REQUIRES"])
+    AS_IF([test "$hwloc_pci_component" = "static"],
+          [HWLOC_LIBS="$HWLOC_LIBS $HWLOC_PCIUTILS_LIBS $HWLOC_PCIACCESS_LIBS"
+           HWLOC_CFLAGS="$HWLOC_CFLAGS $HWLOC_PCIUTILS_CFLAGS $HWLOC_PCIACCESS_CFLAGS"
+           HWLOC_REQUIRES="$HWLOC_PCIUTILS_REQUIRES $HWLOC_PCIACCESS_REQUIRES $HWLOC_REQUIRES"])
+    AS_IF([test "$hwloc_opencl_component" = "static"],
+          [HWLOC_LIBS="$HWLOC_LIBS $HWLOC_OPENCL_LIBS"
+           HWLOC_CFLAGS="$HWLOC_CFLAGS $HWLOC_OPENCL_CFLAGS"
+           HWLOC_REQUIRES="$HWLOC_OPENCL_REQUIRES $HWLOC_REQUIRES"])
+    AS_IF([test "$hwloc_cuda_component" = "static"],
+          [HWLOC_LIBS="$HWLOC_LIBS $HWLOC_CUDA_LIBS"
+           HWLOC_CFLAGS="$HWLOC_CFLAGS $HWLOC_CUDA_CFLAGS"
+           HWLOC_REQUIRES="$HWLOC_CUDA_REQUIRES $HWLOC_REQUIRES"])
+    AS_IF([test "$hwloc_nvml_component" = "static"],
+          [HWLOC_LIBS="$HWLOC_LIBS $HWLOC_NVML_LIBS"
+           HWLOC_CFLAGS="$HWLOC_CFLAGS $HWLOC_NVML_CFLAGS"
+           HWLOC_REQUIRES="$HWLOC_NVML_REQUIRES $HWLOC_REQUIRES"])
+    AS_IF([test "$hwloc_gl_component" = "static"],
+          [HWLOC_LIBS="$HWLOC_LIBS $HWLOC_GL_LIBS"
+           HWLOC_CFLAGS="$HWLOC_CFLAGS $HWLOC_GL_CFLAGS"
+           HWLOC_REQUIRES="$HWLOC_GL_REQUIRES $HWLOC_REQUIRES"])
     AS_IF([test "$hwloc_xml_libxml_component" = "static"],
           [HWLOC_LIBS="$HWLOC_LIBS $HWLOC_LIBXML2_LIBS"
            HWLOC_CFLAGS="$HWLOC_CFLAGS $HWLOC_LIBXML2_CFLAGS"
@@ -944,6 +1130,8 @@ AC_DEFUN([HWLOC_DO_AM_CONDITIONALS],[
                        [test "x$hwloc_have_libibverbs" = "xyes"])
 	AM_CONDITIONAL([HWLOC_HAVE_CUDA],
 		       [test "x$hwloc_have_cuda" = "xyes"])
+	AM_CONDITIONAL([HWLOC_HAVE_GL],
+		       [test "x$hwloc_have_gl" = "xyes"])
 	AM_CONDITIONAL([HWLOC_HAVE_MYRIEXPRESS],
 		       [test "x$hwloc_have_myriexpress" = "xyes"])
 	AM_CONDITIONAL([HWLOC_HAVE_CUDART],
@@ -951,6 +1139,8 @@ AC_DEFUN([HWLOC_DO_AM_CONDITIONALS],[
         AM_CONDITIONAL([HWLOC_HAVE_LIBXML2], [test "$hwloc_libxml2_happy" = "yes"])
         AM_CONDITIONAL([HWLOC_HAVE_CAIRO], [test "$hwloc_cairo_happy" = "yes"])
         AM_CONDITIONAL([HWLOC_HAVE_PCI], [test "$hwloc_pci_happy" = "yes"])
+        AM_CONDITIONAL([HWLOC_HAVE_OPENCL], [test "$hwloc_opencl_happy" = "yes"])
+        AM_CONDITIONAL([HWLOC_HAVE_NVML], [test "$hwloc_nvml_happy" = "yes"])
         AM_CONDITIONAL([HWLOC_HAVE_SET_MEMPOLICY], [test "x$enable_set_mempolicy" != "xno"])
         AM_CONDITIONAL([HWLOC_HAVE_MBIND], [test "x$enable_mbind" != "xno"])
         AM_CONDITIONAL([HWLOC_HAVE_BUNZIPP], [test "x$BUNZIPP" != "xfalse"])
@@ -963,9 +1153,11 @@ AC_DEFUN([HWLOC_DO_AM_CONDITIONALS],[
                        [test "x$hwloc_install_doxs" = "xyes"])
 
         AM_CONDITIONAL([HWLOC_HAVE_LINUX], [test "x$hwloc_linux" = "xyes"])
+        AM_CONDITIONAL([HWLOC_HAVE_BGQ], [test "x$hwloc_bgq" = "xyes"])
         AM_CONDITIONAL([HWLOC_HAVE_IRIX], [test "x$hwloc_irix" = "xyes"])
         AM_CONDITIONAL([HWLOC_HAVE_DARWIN], [test "x$hwloc_darwin" = "xyes"])
         AM_CONDITIONAL([HWLOC_HAVE_FREEBSD], [test "x$hwloc_freebsd" = "xyes"])
+        AM_CONDITIONAL([HWLOC_HAVE_NETBSD], [test "x$hwloc_netbsd" = "xyes"])
         AM_CONDITIONAL([HWLOC_HAVE_SOLARIS], [test "x$hwloc_solaris" = "xyes"])
         AM_CONDITIONAL([HWLOC_HAVE_AIX], [test "x$hwloc_aix" = "xyes"])
         AM_CONDITIONAL([HWLOC_HAVE_OSF], [test "x$hwloc_osf" = "xyes"])
@@ -978,7 +1170,11 @@ AC_DEFUN([HWLOC_DO_AM_CONDITIONALS],[
         AM_CONDITIONAL([HWLOC_HAVE_CPUID], [test "x$hwloc_have_cpuid" = "xyes"])
 
         AM_CONDITIONAL([HWLOC_HAVE_PLUGINS], [test "x$hwloc_have_plugins" = "xyes"])
-        AM_CONDITIONAL([HWLOC_LIBPCI_BUILD_STATIC], [test "x$hwloc_libpci_component" = "xstatic"])
+        AM_CONDITIONAL([HWLOC_PCI_BUILD_STATIC], [test "x$hwloc_pci_component" = "xstatic"])
+        AM_CONDITIONAL([HWLOC_OPENCL_BUILD_STATIC], [test "x$hwloc_opencl_component" = "xstatic"])
+        AM_CONDITIONAL([HWLOC_CUDA_BUILD_STATIC], [test "x$hwloc_cuda_component" = "xstatic"])
+        AM_CONDITIONAL([HWLOC_NVML_BUILD_STATIC], [test "x$hwloc_nvml_component" = "xstatic"])
+        AM_CONDITIONAL([HWLOC_GL_BUILD_STATIC], [test "x$hwloc_gl_component" = "xstatic"])
         AM_CONDITIONAL([HWLOC_XML_LIBXML_BUILD_STATIC], [test "x$hwloc_xml_libxml_component" = "xstatic"])
 
         AM_CONDITIONAL([HWLOC_HAVE_CXX], [test "x$hwloc_have_cxx" = "xyes"])
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/config/hwloc_components.m4 b/src/pm/hydra/tools/topo/hwloc/hwloc/config/hwloc_components.m4
index a30bad8..7d5c1fa 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/config/hwloc_components.m4
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/config/hwloc_components.m4
@@ -50,6 +50,9 @@ done
 # $2 = list of component names
 #
 AC_DEFUN([HWLOC_LIST_STATIC_COMPONENTS], [
+for comp in [$2]; do
+  echo "HWLOC_DECLSPEC extern const struct hwloc_component hwloc_${comp}_component;" >>[$1]
+done
 cat <<EOF >>[$1]
 static const struct hwloc_component * hwloc_static_components[[]] = {
 EOF
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/config/hwloc_internal.m4 b/src/pm/hydra/tools/topo/hwloc/hwloc/config/hwloc_internal.m4
index 0a47d53..b60f411 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/config/hwloc_internal.m4
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/config/hwloc_internal.m4
@@ -9,7 +9,7 @@ dnl Copyright (c) 2004-2005 The Regents of the University of California.
 dnl                         All rights reserved.
 dnl Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, 
 dnl                         University of Stuttgart.  All rights reserved.
-dnl Copyright ©  2010 inria.  All rights reserved.
+dnl Copyright © 2010-2012 Inria.  All rights reserved.
 dnl Copyright © 2006-2011 Cisco Systems, Inc.  All rights reserved.
 dnl
 dnl See COPYING in top-level directory.
@@ -68,6 +68,26 @@ AC_DEFUN([HWLOC_DEFINE_ARGS],[
 		  AS_HELP_STRING([--enable-libpci],
 				 [Use libpci for PCI support. Note that hwloc may be tainted by the pciutils GPL license.]))
 
+    # OpenCL?
+    AC_ARG_ENABLE([opencl],
+                  AS_HELP_STRING([--disable-opencl],
+                                 [Disable the OpenCL device discovery]))
+
+    # CUDA?
+    AC_ARG_ENABLE([cuda],
+                  AS_HELP_STRING([--disable-cuda],
+                                 [Disable the CUDA device discovery using libcudart]))
+
+    # NVML?
+    AC_ARG_ENABLE([nvml],
+                  AS_HELP_STRING([--disable-nvml],
+                                 [Disable the NVML device discovery]))
+
+    # GL/Display
+    AC_ARG_ENABLE([gl],
+		  AS_HELP_STRING([--disable-gl],
+				 [Disable the GL display device discovery]))
+
     # Linux libnuma
     AC_ARG_ENABLE([libnuma],
                   AS_HELP_STRING([--disable-libnuma],
@@ -349,42 +369,12 @@ EOF
     AC_CHECK_HEADERS([myriexpress.h], [
       AC_MSG_CHECKING(if MX_NUMA_NODE exists)
       AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <myriexpress.h>]],
-                                         [[int a = MX_NUMA_NODE;]],
+                                         [[int a = MX_NUMA_NODE;]])],
                         [AC_MSG_RESULT(yes)
                          AC_CHECK_LIB([myriexpress], [mx_get_info],
                                       [AC_DEFINE([HAVE_MYRIEXPRESS], 1, [Define to 1 if we have -lmyriexpress])
                                        hwloc_have_myriexpress=yes])],
-                        [AC_MSG_RESULT(no)])])])
-
-    AC_CHECK_HEADERS([cuda.h], [
-      AC_MSG_CHECKING(if CUDA_VERSION >= 3020)
-      AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
-#include <cuda.h>
-#ifndef CUDA_VERSION
-#error CUDA_VERSION undefined
-#elif CUDA_VERSION < 3020
-#error CUDA_VERSION too old
-#endif]], [[int i = 3;]])],
-       [AC_MSG_RESULT(yes)
-        AC_CHECK_LIB([cuda], [cuInit],
-		     [AC_DEFINE([HAVE_CUDA], 1, [Define to 1 if we have -lcuda])
-		      hwloc_have_cuda=yes])],
-       [AC_MSG_RESULT(no)])])
-
-    AC_CHECK_HEADERS([cuda_runtime_api.h], [
-      AC_MSG_CHECKING(if CUDART_VERSION >= 3020)
-      AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
-#include <cuda_runtime_api.h>
-#ifndef CUDART_VERSION
-#error CUDART_VERSION undefined
-#elif CUDART_VERSION < 3020
-#error CUDART_VERSION too old
-#endif]], [[int i = 3;]])],
-       [AC_MSG_RESULT(yes)
-        AC_CHECK_LIB([cudart], [cudaGetDeviceCount],
-		     [AC_DEFINE([HAVE_CUDART], 1, [Define to 1 if we have -lcudart])
-		      hwloc_have_cudart=yes])],
-       [AC_MSG_RESULT(no)])])
+                        [AC_MSG_RESULT(no)])])
 
     AC_CHECK_PROGS(XMLLINT, [xmllint])
 
@@ -424,10 +414,11 @@ int foo(void) {
         hwloc_config_prefix[utils/test-hwloc-calc.sh]
         hwloc_config_prefix[utils/test-hwloc-distances.sh]
         hwloc_config_prefix[utils/test-hwloc-distrib.sh]
+        hwloc_config_prefix[utils/test-hwloc-info.sh]
         hwloc_config_prefix[utils/test-hwloc-ls.sh]
         hwloc_config_prefix[utils/test-fake-plugin.sh])
 
-    AC_CONFIG_COMMANDS([chmoding-scripts], [chmod +x ]hwloc_config_prefix[tests/linux/test-topology.sh ]hwloc_config_prefix[tests/xml/test-topology.sh ]hwloc_config_prefix[tests/linux/hwloc-gather-topology ]hwloc_config_prefix[tests/linux/gather/test-gather-topology.sh ]hwloc_config_prefix[tests/wrapper.sh ]hwloc_config_prefix[utils/hwloc-assembler-remote ]hwloc_config_prefix[utils/test-hwloc-annotate.sh ]hwloc_config_prefix[utils/test-hwloc-assembler.sh ]hwloc_config_prefix[utils/test-hwloc-calc.sh ]hwloc_config_prefix[utils/test-hwloc-distances.sh ]hwloc_config_prefix[utils/test-hwloc-distrib.sh ]hwloc_config_prefix[utils/test-hwloc-ls.sh ]hwloc_config_prefix[utils/test-fake-plugin.sh])
+    AC_CONFIG_COMMANDS([chmoding-scripts], [chmod +x ]hwloc_config_prefix[tests/linux/test-topology.sh ]hwloc_config_prefix[tests/xml/test-topology.sh ]hwloc_config_prefix[tests/linux/hwloc-gather-topology ]hwloc_config_prefix[tests/linux/gather/test-gather-topology.sh ]hwloc_config_prefix[tests/wrapper.sh ]hwloc_config_prefix[utils/hwloc-assembler-remote ]hwloc_config_prefix[utils/test-hwloc-annotate.sh ]hwloc_config_prefix[utils/test-hwloc-assembler.sh ]hwloc_config_prefix[utils/test-hwloc-calc.sh ]hwloc_config_prefix[utils/test-hwloc-distances.sh ]hwloc_config_prefix[utils/test-hwloc-distrib.sh ]hwloc_config_prefix[utils/test-hwloc-info.sh ]hwloc_config_prefix[utils/test-hwloc-ls.sh ]hwloc_config_prefix[utils/test-fake-plugin.sh])
 
     # These links are only needed in standalone mode.  It would
     # be nice to m4 foreach this somehow, but whenever I tried
@@ -443,6 +434,12 @@ int foo(void) {
 	hwloc_config_prefix[tests/ports/topology-windows.c]:hwloc_config_prefix[src/topology-windows.c]
 	hwloc_config_prefix[tests/ports/topology-darwin.c]:hwloc_config_prefix[src/topology-darwin.c]
 	hwloc_config_prefix[tests/ports/topology-freebsd.c]:hwloc_config_prefix[src/topology-freebsd.c]
-	hwloc_config_prefix[tests/ports/topology-hpux.c]:hwloc_config_prefix[src/topology-hpux.c])
+	hwloc_config_prefix[tests/ports/topology-netbsd.c]:hwloc_config_prefix[src/topology-netbsd.c]
+	hwloc_config_prefix[tests/ports/topology-hpux.c]:hwloc_config_prefix[src/topology-hpux.c]
+	hwloc_config_prefix[tests/ports/topology-bgq.c]:hwloc_config_prefix[src/topology-bgq.c]
+	hwloc_config_prefix[tests/ports/topology-opencl.c]:hwloc_config_prefix[src/topology-opencl.c]
+	hwloc_config_prefix[tests/ports/topology-cuda.c]:hwloc_config_prefix[src/topology-cuda.c]
+	hwloc_config_prefix[tests/ports/topology-nvml.c]:hwloc_config_prefix[src/topology-nvml.c]
+	hwloc_config_prefix[tests/ports/topology-gl.c]:hwloc_config_prefix[src/topology-gl.c])
     ])
 ])dnl
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/configure.ac b/src/pm/hydra/tools/topo/hwloc/hwloc/configure.ac
index 1e4eb45..8f0260b 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/configure.ac
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/configure.ac
@@ -33,7 +33,7 @@ EOF
 AC_CANONICAL_TARGET
 
 # Init automake
-AM_INIT_AUTOMAKE([1.10 dist-bzip2 subdir-objects foreign tar-ustar -Wall -Werror])
+AM_INIT_AUTOMAKE([1.11 dist-bzip2 subdir-objects foreign tar-ustar parallel-tests -Wall -Werror])
 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
 
 # We want new Libtool.  None of that old stuff.  Pfft.    
@@ -86,7 +86,7 @@ AC_SUBST([libhwloc_so_version])
 # Setup the header file
 AH_TOP([/* -*- c -*-
  *
- * Copyright © 2009, 2012 CNRS, inria., Université Bordeaux 1  All rights reserved.
+ * Copyright © 2009, 2011, 2012 CNRS, inria., Université Bordeaux 1  All rights reserved.
  * Copyright © 2009 Cisco Systems, Inc.  All rights reserved.
  * $COPYRIGHT$
  * 
@@ -184,18 +184,9 @@ if test "x$hwloc_have_plugins" = xyes; then
   HWLOC_LIBS_PRIVATE="$HWLOC_LIBS_PRIVATE $lt_cv_dlopen_libs"
 fi
 
-## Enable creation of libtool-style versioning or no versioning
-AC_ARG_ENABLE(versioning,
-        [AC_HELP_STRING([--enable-versioning],[Enable library versioning])],,
-        [enable_versioning=yes])
+# Is ltdl included?
+AM_CONDITIONAL([HWLOC_LTDL_INCLUDED], [test "x$with_included_ltdl" = xyes])
 
-if test "$enable_versioning" = "yes" ; then
-   libhwloc_so_versionflags="-version-info \$(libhwloc_so_version)"
-else
-   libhwloc_so_versionflags="-avoid-version"
-fi
-export libhwloc_so_versionflags
-AC_SUBST(libhwloc_so_versionflags)
 
 # Party on
 AC_OUTPUT
@@ -229,16 +220,27 @@ fi
 hwloc_xml_status=basic
 AS_IF([test "$hwloc_libxml2_happy" = "yes"], [hwloc_xml_status=full])
 
+# Prepare the I/O summary
+hwloc_probeio_list=
+test "x$hwloc_pci_happy" = "xyes" && hwloc_probeio_list="$hwloc_probeio_list PCI"
+test "x$hwloc_opencl_happy" = "xyes" && hwloc_probeio_list="$hwloc_probeio_list OpenCL"
+test "x$hwloc_have_cudart" = "xyes" && hwloc_probeio_list="$hwloc_probeio_list CUDA"
+test "x$hwloc_nvml_happy" = "xyes" && hwloc_probeio_list="$hwloc_probeio_list NVML"
+test "x$hwloc_gl_happy" = "xyes" && hwloc_probeio_list="$hwloc_probeio_list GL"
+# if anything but PCI, that anything will be useless
+test "x$hwloc_pci_happy" != "xyes" && test "x$hwloc_probeio_list" != "x" && hwloc_probeio_list="$hwloc_probeio_list (cannot work without PCI)"
+# if nothing, say "no"
+test "x$hwloc_probeio_list" = "x" && hwloc_probeio_list=" no"
+
 # Beginning of generic support
 cat <<EOF
 
 -----------------------------------------------------------------------------
 Hwloc optional build support status (more details can be found above):
 
-Probe / display PCI devices: $hwloc_pci_happy
+Probe / display I/O devices:$hwloc_probeio_list
 Graphical output (Cairo):    $hwloc_cairo_happy
 XML input / output:          $hwloc_xml_status
-Plugin support:              $hwloc_have_plugins
 EOF
 
 # Linux specific support
@@ -246,6 +248,13 @@ AS_IF([test "$hwloc_linux" = "yes"], [cat <<EOF
 libnuma memory support:      $hwloc_linux_libnuma_happy
 EOF])
 
+# Plugin support
+hwloc_plugin_summary=$hwloc_have_plugins
+test "x$hwloc_plugin_components" != "x" && hwloc_plugin_summary="yes ("`echo $hwloc_plugin_components`")" # echo removes the starting space
+cat <<EOF
+Plugin support:              $hwloc_plugin_summary
+EOF
+
 # End of generic support
 cat <<EOF
 -----------------------------------------------------------------------------
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/dist/make_dist_tarball b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/dist/make_dist_tarball
index 0bc5cb5..8dd0eb5 100755
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/dist/make_dist_tarball
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/dist/make_dist_tarball
@@ -11,7 +11,7 @@
 # Copyright (c) 2004-2005 The Regents of the University of California.
 #                         All rights reserved.
 # Copyright © 2008-2010  Cisco Systems, Inc.  All rights reserved.
-# Copyright © 2012 Inria.  All rights reserved.
+# Copyright © 2012-2013 Inria.  All rights reserved.
 # $COPYRIGHT$
 # 
 # Additional copyrights may follow
@@ -23,7 +23,7 @@
 # Version of auto tools that we want
 #
 
-AM_TARGET_VERSION=1.12.4
+AM_TARGET_VERSION=1.13.1
 AC_TARGET_VERSION=2.69
 LT_TARGET_VERSION=2.4.2
 
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/hwloc-valgrind.supp b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/hwloc-valgrind.supp
index 22f94b5..e5c3bf3 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/hwloc-valgrind.supp
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/hwloc-valgrind.supp
@@ -32,21 +32,29 @@
 
 # ltdl dlopen global state?
 {
-   ltdl_dlopen_malloc
+   ltdl_dlopen_doit_leak
    Memcheck:Leak
-   fun:malloc
-   fun:_dl_map_object_deps
+   ...
    fun:dl_open_worker
    fun:_dl_catch_error
    fun:_dl_open
    fun:dlopen_doit
-   fun:_dl_catch_error
-   fun:_dlerror_run
+}
+
+# ltdl_dlclose_leak
+{
+   ltdl_dlclose_leak
+   Memcheck:Leak
+   ...
+   fun:_dl_close_worker
+   fun:_dl_close
+   ...
+   fun:dlclose
 }
 
 # lt_dlforeachfile abusing paths
 {
-   fun:lt_dlforeachfile_path
+   lt_dlforeachfile_addr8
    Memcheck:Addr8
    fun:_wordcopy_fwd_dest_aligned
    fun:__GI_memmove
@@ -55,6 +63,69 @@
    fun:lt_dlforeachfile
 }
 
+# cuda
+{
+   cuda_leak
+   Memcheck:Leak
+   ...
+   obj:*libcuda*
+}
+
+# nvml
+{
+   nvmlInit_cond
+   Memcheck:Cond
+   ...
+   obj:*nvidia-ml*
+   ...
+   fun:nvmlInit
+}
+
+# amd opencl
+{
+   atical_leak
+   Memcheck:Leak
+   ...
+   obj:*libatical*
+}
+{
+   atical_cond
+   Memcheck:Cond
+   ...
+   obj:*libatical*
+}
+{
+   amdocl_leak
+   Memcheck:Leak
+   ...
+   obj:*libamdocl*
+}
+{
+   amdocl_param
+   Memcheck:Param
+   write(buf)
+   fun:*write*
+   obj:*libamdocl*
+}
+{
+   opencl_leak
+   Memcheck:Leak
+   ...
+   obj:*libOpenCL*
+   ...
+   fun:clGetPlatformIDs
+}
+{
+   libatiadl_xcb_leak
+   Memcheck:Leak
+   ...
+   obj:*libxcb*
+   ...
+   fun:XOpenDisplay
+   ...
+   obj:*libatiadl*
+}
+
 # 
 {
    libpciaccess_device_name_leak
@@ -71,3 +142,4 @@
    ...
    fun:hwloc_look_libpci
 }
+
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/doc/Makefile.am b/src/pm/hydra/tools/topo/hwloc/hwloc/doc/Makefile.am
index 5d2fda3..d756120 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/doc/Makefile.am
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/doc/Makefile.am
@@ -1,4 +1,4 @@
-# Copyright © 2009-2012 Inria.  All rights reserved.
+# Copyright © 2009-2013 Inria.  All rights reserved.
 # Copyright © 2009-2012 Université Bordeaux 1
 # Copyright © 2009-2010 Cisco Systems, Inc.  All rights reserved.
 # See COPYING in top-level directory.
@@ -66,11 +66,16 @@ dox_inputs = $(DOX_CONFIG) \
        $(HWLOC_top_srcdir)/include/hwloc.h \
        $(HWLOC_top_srcdir)/include/hwloc/helper.h \
        $(HWLOC_top_srcdir)/include/hwloc/bitmap.h \
+       $(HWLOC_top_srcdir)/include/hwloc/plugins.h \
        $(HWLOC_top_srcdir)/include/hwloc/glibc-sched.h \
        $(HWLOC_top_srcdir)/include/hwloc/linux.h \
        $(HWLOC_top_srcdir)/include/hwloc/linux-libnuma.h \
+       $(HWLOC_top_srcdir)/include/hwloc/opencl.h \
        $(HWLOC_top_srcdir)/include/hwloc/cuda.h \
        $(HWLOC_top_srcdir)/include/hwloc/cudart.h \
+       $(HWLOC_top_srcdir)/include/hwloc/nvml.h \
+       $(HWLOC_top_srcdir)/include/hwloc/gl.h \
+       $(HWLOC_top_srcdir)/include/hwloc/intel-mic.h \
        $(HWLOC_top_srcdir)/include/hwloc/openfabrics-verbs.h \
        $(HWLOC_top_srcdir)/include/hwloc/myriexpress.h
 
@@ -290,6 +295,7 @@ man3_types_DATA = \
         $(DOX_MAN_DIR)/man3/HWLOC_OBJ_OSDEV_GPU.3 \
         $(DOX_MAN_DIR)/man3/HWLOC_OBJ_OSDEV_NETWORK.3 \
         $(DOX_MAN_DIR)/man3/HWLOC_OBJ_OSDEV_OPENFABRICS.3 \
+        $(DOX_MAN_DIR)/man3/HWLOC_OBJ_OSDEV_COPROC.3 \
         $(DOX_MAN_DIR)/man3/hwloc_obj_osdev_type_e.3 \
         $(DOX_MAN_DIR)/man3/hwloc_obj_osdev_type_t.3 \
         $(DOX_MAN_DIR)/man3/hwloc_compare_types.3 \
@@ -383,7 +389,8 @@ man3_information_DATA = \
         $(DOX_MAN_DIR)/man3/hwloc_get_depth_type.3 \
         $(DOX_MAN_DIR)/man3/hwloc_get_nbobjs_by_depth.3 \
         $(DOX_MAN_DIR)/man3/hwloc_get_nbobjs_by_type.3 \
-        $(DOX_MAN_DIR)/man3/hwloc_topology_is_thissystem.3
+        $(DOX_MAN_DIR)/man3/hwloc_topology_is_thissystem.3 \
+        $(DOX_MAN_DIR)/man3/hwloc_topology_get_flags.3
 
 man3_traversaldir = $(man3dir)
 man3_traversal_DATA = \
@@ -622,14 +629,32 @@ man3_helper_advanced_io_DATA = \
 
 man3_cudadir = $(man3dir)
 man3_cuda_DATA = \
+        $(DOX_MAN_DIR)/man3/hwlocality_opencl.3 \
+        $(DOX_MAN_DIR)/man3/hwloc_opencl_get_device_cpuset.3 \
+        $(DOX_MAN_DIR)/man3/hwloc_opencl_get_device_osdev.3 \
+        $(DOX_MAN_DIR)/man3/hwloc_opencl_get_device_osdev_by_index.3 \
         $(DOX_MAN_DIR)/man3/hwlocality_cuda.3 \
         $(DOX_MAN_DIR)/man3/hwloc_cuda_get_device_cpuset.3 \
         $(DOX_MAN_DIR)/man3/hwloc_cuda_get_device_pci_ids.3 \
         $(DOX_MAN_DIR)/man3/hwloc_cuda_get_device_pcidev.3 \
+        $(DOX_MAN_DIR)/man3/hwloc_cuda_get_device_osdev.3 \
+        $(DOX_MAN_DIR)/man3/hwloc_cuda_get_device_osdev_by_index.3 \
         $(DOX_MAN_DIR)/man3/hwlocality_cudart.3 \
         $(DOX_MAN_DIR)/man3/hwloc_cudart_get_device_cpuset.3 \
         $(DOX_MAN_DIR)/man3/hwloc_cudart_get_device_pci_ids.3 \
-        $(DOX_MAN_DIR)/man3/hwloc_cudart_get_device_pcidev.3
+        $(DOX_MAN_DIR)/man3/hwloc_cudart_get_device_pcidev.3 \
+        $(DOX_MAN_DIR)/man3/hwloc_cudart_get_device_osdev_by_index.3 \
+        $(DOX_MAN_DIR)/man3/hwlocality_nvml.3 \
+        $(DOX_MAN_DIR)/man3/hwloc_nvml_get_device_cpuset.3 \
+        $(DOX_MAN_DIR)/man3/hwloc_nvml_get_device_osdev.3 \
+        $(DOX_MAN_DIR)/man3/hwloc_nvml_get_device_osdev_by_index.3 \
+        $(DOX_MAN_DIR)/man3/hwlocality_gl.3 \
+        $(DOX_MAN_DIR)/man3/hwloc_gl_get_display_osdev_by_port_device.3 \
+        $(DOX_MAN_DIR)/man3/hwloc_gl_get_display_osdev_by_name.3 \
+        $(DOX_MAN_DIR)/man3/hwloc_gl_get_display_by_osdev.3 \
+        $(DOX_MAN_DIR)/man3/hwlocality_intel_mic.3 \
+        $(DOX_MAN_DIR)/man3/hwloc_intel_mic_get_device_cpuset.3 \
+        $(DOX_MAN_DIR)/man3/hwloc_intel_mic_get_device_osdev_by_index.3
 
 man3_glibc_scheddir = $(man3dir)
 man3_glibc_sched_DATA = \
@@ -667,6 +692,7 @@ man3_openfabricsdir = $(man3dir)
 man3_openfabrics_DATA = \
         $(DOX_MAN_DIR)/man3/hwlocality_openfabrics.3 \
         $(DOX_MAN_DIR)/man3/hwloc_ibv_get_device_cpuset.3 \
+        $(DOX_MAN_DIR)/man3/hwloc_ibv_get_device_osdev.3 \
         $(DOX_MAN_DIR)/man3/hwloc_ibv_get_device_osdev_by_name.3
 
 # end of manpages(3) if HWLOC_BUILD_DOXYGEN
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/doc/doxygen-config.cfg.in b/src/pm/hydra/tools/topo/hwloc/hwloc/doc/doxygen-config.cfg.in
index 199eacf..930fbe7 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/doc/doxygen-config.cfg.in
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/doc/doxygen-config.cfg.in
@@ -11,11 +11,16 @@ INPUT          = \
 		@top_srcdir@/include/hwloc.h \
 		@top_srcdir@/include/hwloc/helper.h \
 		@top_srcdir@/include/hwloc/bitmap.h \
+		@top_srcdir@/include/hwloc/plugins.h \
 		@top_srcdir@/include/hwloc/glibc-sched.h \
 		@top_srcdir@/include/hwloc/linux.h \
 		@top_srcdir@/include/hwloc/linux-libnuma.h \
+		@top_srcdir@/include/hwloc/opencl.h \
 		@top_srcdir@/include/hwloc/cuda.h \
 		@top_srcdir@/include/hwloc/cudart.h \
+		@top_srcdir@/include/hwloc/nvml.h \
+		@top_srcdir@/include/hwloc/gl.h \
+		@top_srcdir@/include/hwloc/intel-mic.h \
 		@top_srcdir@/include/hwloc/openfabrics-verbs.h \
 		@top_srcdir@/include/hwloc/myriexpress.h
 
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/doc/hwloc.doxy b/src/pm/hydra/tools/topo/hwloc/hwloc/doc/hwloc.doxy
index c947011..ad5a185 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/doc/hwloc.doxy
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/doc/hwloc.doxy
@@ -1,7 +1,7 @@
 /*
  * Copyright © 2009 CNRS
  * Copyright © 2009-2013 Inria.  All rights reserved.
- * Copyright © 2009-2012 Université Bordeaux 1
+ * Copyright © 2009-2013 Université Bordeaux 1
  * Copyright © 2009-2011 Cisco Systems, Inc.  All rights reserved.
  * See COPYING in top-level directory.
  */
@@ -53,10 +53,12 @@ and Kerrighed support)</li>
 <li>Solaris</li>
 <li>AIX</li>
 <li>Darwin / OS X</li>
-<li>FreeBSD and its variants, such as kFreeBSD/GNU</li>
+<li>FreeBSD and its variants (such as kFreeBSD/GNU)</li>
+<li>NetBSD</li>
 <li>OSF/1 (a.k.a., Tru64)</li>
 <li>HP-UX</li>
 <li>Microsoft Windows</li>
+<li>IBM BlueGene/Q Compute Node Kernel (CNK)</li>
 </ul>
 
 Since it uses standard Operating System information, hwloc's support is mostly
@@ -145,7 +147,10 @@ is configured and build.
 
 The hwloc core may also benefit from the following development packages:
 <ul>
-<li>Hwloc can use one of two different libraries for I/O device
+<li>libnuma for memory binding and migration support on Linux
+    (<tt>numactl-devel</tt> or <tt>libnuma-dev</tt> package).
+</li>
+<li>hwloc can use one of two different libraries for I/O device
 discovery:
 <ol>
 <li> libpciaccess (BSD).  The relevant development package is usually
@@ -154,8 +159,14 @@ discovery:
 package is usually <tt>pciutils-devel</tt> or <tt>libpci-dev</tt>.  
 </ol>
 </li>
-<li>libnuma for memory binding and migration support on Linux
-    (<tt>numactl-devel</tt> or <tt>libnuma-dev</tt> package).
+
+<li>the AMD OpenCL implementation for OpenCL device discovery.
+</li>
+<li>the NVIDIA CUDA Toolkit for CUDA device discovery.
+</li>
+<li>the NVIDIA Tesla Development Kit for NVML device discovery.
+</li>
+<li>the NV-CONTROL X extension library (NVCtrl) for NVIDIA display discovery.
 </li>
 <li>libxml2 for full XML import/export support (otherwise, the
     internal minimalistic parser will only be able to import
@@ -167,8 +178,8 @@ package is usually <tt>pciutils-devel</tt> or <tt>libpci-dev</tt>.
 </ul>
 
 PCI and XML support may be statically built inside the main hwloc
-library, or as separate dynamically-loaded plugins (see the \ref
-plugins section).
+library, or as separate dynamically-loaded plugins (see the
+\ref plugins section).
 
 Note that because of the possibility of GPL taint (remember that hwloc
 is BSD-licensed), hwloc's <tt>configure</tt> script will prefer
@@ -426,8 +437,9 @@ To precisely define the vocabulary used by hwloc, a \ref termsanddefs
 section is available and should probably be read first.  
 
 Each hwloc object contains a cpuset describing the list of processing
-units that it contains.  These bitmaps may be used for \ref
-hwlocality_cpubinding and \ref hwlocality_membinding.  hwloc offers an extensive
+units that it contains.  These bitmaps may be used for
+\ref hwlocality_cpubinding and \ref hwlocality_membinding.
+hwloc offers an extensive
 bitmap manipulation interface in hwloc/bitmap.h.
 
 Moreover, hwloc also comes with additional helpers for
@@ -463,8 +475,8 @@ memory bindings, some others provide only interfaces for a limited number of
 kinds of CPU and memory binding, and some do not provide any binding interface
 at all.  Hwloc's binding functions would then simply return the ENOSYS error
 (Function not implemented), meaning that the underlying Operating System
-does not provide any interface for them. \ref hwlocality_cpubinding and \ref
-hwlocality_membinding provide more information on which hwloc binding functions
+does not provide any interface for them. \ref hwlocality_cpubinding and
+\ref hwlocality_membinding provide more information on which hwloc binding functions
 should be preferred because interfaces for them are usually available on the
 supported Operating Systems.
 
@@ -785,7 +797,7 @@ tools.
 
 \section cli_lstopo lstopo and lstopo-no-graphics
 
-lstopo (also known as hwloc-info and hwloc-ls) displays the
+lstopo (also known as 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.
@@ -831,6 +843,13 @@ Note that hwloc-calc can also generate lists of logical processors or
 NUMA nodes that are convenient to pass to some external tools such as
 taskset or numactl.
 
+\section cli_hwloc_info hwloc-info
+
+hwloc-info dumps information about the given objects.
+It is intended to be used with tools such as grep for filtering
+certain attribute lines.
+When no object is specified, hwloc-info prints a summary of the topology.
+
 \section cli_hwloc_distrib hwloc-distrib
 
 hwloc-distrib generates a set of bitmap strings that are uniformly
@@ -908,7 +927,7 @@ following environment variables.
 
 <dt>HWLOC_XML_VERBOSE=1</dt>
 <dt>HWLOC_SYNTHETIC_VERBOSE=1</dt>
-  <dd>enable verbose messages in the XML or synthetic topology backends.
+  <dd>enables verbose messages in the XML or synthetic topology backends.
   hwloc XML backends (see \ref xml) can emit some error messages to
   the error output stream.
   Enabling these verbose messages within hwloc can be useful for
@@ -1025,18 +1044,20 @@ following environment variables.
   </dd>
 
 <dt>HWLOC_PLUGINS_VERBOSE=1</dt>
-  <dd>display verbose information about plugins.
+  <dd>displays verbose information about plugins.
   List which directories are scanned, which files are loaded,
   and which components are successfully loaded.
   </dd>
 
 <dt>HWLOC_COMPONENTS=list,of,components</dt>
-  <dd>forces a list of components to enable.
-  Enable the given comma-separated list of components
-   (if they do not conflict with each other).
+  <dd>forces a list of components to enable or disable.
+  Enable or disable the given comma-separated list of components
+  (if they do not conflict with each other). Component names prefixed with
+  <tt>-</tt> are disabled.
   Once the end of the list is reached, hwloc falls back to
   enabling the remaining components (sorted by priority) that do not
-  conflict with the already enabled ones.
+  conflict with the already enabled ones, and unless explicitly disabled in the
+  list.
   If <tt>stop</tt> is met, the enabling loop immediately stops, no
   more component is enabled.
   If the variable is set to an empty string, no specific component is
@@ -1046,11 +1067,14 @@ following environment variables.
   load (<tt>xml=file.xml</tt>).
   The synthetic component may be followed by a synthetic topology
   description (<tt>synthetic=node:2 pu:3</tt>).
+  This variable does not take precedence over the application
+  selecting components with functions such as
+  hwloc_topology_set_xml().
   See \ref plugins for details.
   </dd>
 
 <dt>HWLOC_COMPONENTS_VERBOSE=1</dt>
-  <dd>display verbose information about components.
+  <dd>displays verbose information about components.
   Display messages when components are registered or enabled.
   This is the recommended way to list the available components
   with their priority
@@ -1067,9 +1091,21 @@ following environment variables.
   uses /proc/cpuinfo instead of sysfs.
   may be useful in the doc for debugging?
  HWLOC_DEBUG_CHECK
-  run sanity checks during discovery, as if --enable-debug was passed but
+  runs sanity checks during discovery, as if --enable-debug was passed but
   without debug messages
   may be useful in the doc for debugging?
+ HWLOC_HIDE_DEPRECATED
+  hides some warnings about deprecated features.
+  listed in those warnings so no need to document it
+ HWLOC_FORCE_BGQ
+  makes the bgq component run even if it doesn't recognize the running platform as a BGQ/CNK
+ HWLOC_DEBUG_FAKE_COMPONENT
+  enables debugging message to check that the fake component gets loaded
+ HWLOC_DEBUG_PAGESIZE
+  forces the page size in the Linux code for debugging in topology chroots 
+ HWLOC_NO_LIBXML_EXPORT
+ HWLOC_NO_LIBXML_IMPORT
+  forces the use of the nolibxml XML backend instead of libxml2 if available
 -->
 
 
@@ -1190,18 +1226,75 @@ on the machine and on the topology flags.
 Although each PCI device is uniquely identified by its bus ID
 (e.g. 0000:01:02.3), the application can hardly find out which
 PCI device is actually used when manipulating software handle
-(such as the <em>eth0</em> network interface or the <em>mlx4_0</em>
-OpenFabrics HCA).
-Therefore hwloc tries to add software devices (<tt>::HWLOC_OBJ_OS_DEVICE</tt>)
+(such as the <em>eth0</em> network interface,
+ the <em>sda</em> hard drive,
+ or the <em>mlx4_0</em> OpenFabrics HCA).
+Therefore hwloc tries to add software devices
+(<tt>::HWLOC_OBJ_OS_DEVICE</tt>, also known as OS devices)
 below their PCI objects.
-These objects can be identified by their usual operating system-wide
-names, e.g. <em>eth0</em> or <em>mlx4_0</em>.
+
+hwloc first tries to discover the corresponding names,
+e.g. <em>eth0</em>, <em>sda</em> or <em>mlx4_0</em>,
+from the operating system.
 However, this ability is currently only available on Linux for some
 classes of devices.
-It should especially be noted that proprietary graphics driver
-currently do not create any interesting software device for GPUs,
-they should therefore be manipulated as PCI device objects.
-On the contrary some PCI devices may contain multiple software device
+
+hwloc then tries to discover software devices through additional
+I/O components using external libraries.
+For instance proprietary graphics drivers do not offer any OS name,
+but hwloc may still create one OS object per software handle when
+supported.
+For instance the <tt>opencl</tt> and <tt>cuda</tt> components may
+add some <em>opencl0d0</em> and <em>cuda0</em> OS device objects.
+
+Here is a list of OS device objects commonly created by hwloc
+components when I/O discovery is enabled and supported.
+
+<ul>
+<li>Hard disks (HWLOC_OBJ_OSDEV_BLOCK)
+ <ul>
+ <li><em>sda</em> (Linux component)</li>
+ </ul>
+</li>
+<li>Network interfaces (HWLOC_OBJ_OSDEV_NETWORK)
+ <ul>
+ <li><em>eth0</em>, <em>wlan0</em>, <em>ib0</em> (Linux component)</li>
+ </ul>
+</li>
+<li>OpenFabrics HCAs (HWLOC_OBJ_OSDEV_OPENFABRICS)
+ <ul>
+ <li><em>mlx4_0</em>, <em>qib0</em> (Linux component)</li>
+ </ul>
+</li>
+<li>GPUs (HWLOC_OBJ_OSDEV_GPU)
+ <ul>
+ <li><em>nvml0</em> for the first NVML device
+  (NVML component, using the NVIDIA Management Library)</li>
+ <li><em>:0.0</em> for the first display
+  (GL component, using the NV-CONTROL X extension library, NVCtrl)</li>
+ </ul>
+</li>
+<li>Co-Processors (HWLOC_OBJ_OSDEV_COPROC)
+ <ul>
+ <li><em>opencl0d0</em> for the first device of the first OpenCL platform,
+  <em>opencl1d3</em> for the fourth device of the second OpenCL platform
+  (OpenCL component)</li>
+ <li><em>cuda0</em> for the first NVIDIA CUDA device
+  (CUDA component, using the NVIDIA CUDA Library)</li>
+ <li><em>mic0</em> for the first Intel Xeon Phi (MIC) coprocessor
+  (Linux component)</li>
+ </ul>
+</li>
+<li>DMA engine channel (HWLOC_OBJ_OSDEV_DMA)
+ <ul>
+ <li><em>dma0chan0</em> (Linux component)</li>
+ </ul>
+</li>
+</ul>
+
+When none of the above strategies is supported and enabled,
+hwloc cannot place any OS object inside PCI objects.
+Note that some PCI devices may contain multiple software devices
 (see the example below).
 
 See also \ref interoperability for managing these devices without
@@ -1513,7 +1606,7 @@ architecture name, as reported by the Unix <tt>uname</tt> command.
 <dd>The name of the hwloc backend/component that filled the topology.
 If several components were combined, multiple Backend keys may exist,
 with different values, for instance <tt>x86</tt>, <tt>Linux</tt>
-and <tt>libpci</tt>.
+and <tt>pci</tt>.
 </dd>
 <dt>LinuxCgroup (Machine object)</dt>
 <dd>The name the Linux control group where the calling process is
@@ -1534,6 +1627,25 @@ object instead.
 <dt>PCIVendor, PCIDevice (PCI devices and bridges)</dt>
 <dd>The vendor and device names of the PCI device.
 </dd>
+<dt>CoProcType (Co-Processor OS devices)</dt>
+<dd>The type of co-processor, for instance <tt>"MIC"</tt>, <tt>"CUDA"</tt>
+ or <tt>"OpenCL"</tt>.
+</dd>
+<dt>GPUVendor, GPUModel (GPU or Co-Processor OS devices)</dt>
+<dd>The vendor and model names of the GPU device.
+</dd>
+<dt>OpenCLDeviceType, OpenCLPlatformIndex,
+<dt>OpenCLPlatformName, OpenCLPlatformDeviceIndex (OpenCL GPU OS devices)</dt>
+<dd>The type of OpenCL device,
+ the OpenCL platform index and name,
+ and the index of the device within the platform.
+</dd>
+<dt>NVIDIAUUID, NVIDIASerial (NVML GPU OS devices)</dt>
+<dd>The UUID and Serial of NVIDIA GPUs.
+</dd>
+<dt>MICFamily</dt>
+<dd>The family of an Intel Xeon Phi (MIC) coprocessor.
+</dd>
 <dt>DMIBoardVendor, DMIBoardName, etc. (Machine object)</dt>
 <dd>DMI hardware information such as the motherboard and chassis
 models and vendors, the BIOS revision, etc.,
@@ -1772,8 +1884,8 @@ enabled for the current topology.
   hwloc/openfabrics-verbs.h helps interoperability with the
   OpenFabrics Verbs interface.  For example, it can return a list of
   processors near an OpenFabrics device.
-  Note that if I/O device discovery is enabled, such devices may also
-  appear as PCI objects and as OS objects in the topology.
+  It may also return the corresponding OS device hwloc object for further
+  information (if I/O device discovery is enabled).
  </dd>
 
 <dt>Myrinet Express</dt>
@@ -1785,13 +1897,50 @@ enabled for the current topology.
   appear as PCI objects in the topology.
  </dd>
 
+<dt>Intel Xeon Phi (MIC)</dt>
+ <dd>
+  hwloc/intel-mic.h helps interoperability with Intel Xeon Phi (MIC)
+  coprocessors by returning the list of processors near these devices.
+  It may also return the corresponding OS device hwloc object for further
+  information (if I/O device discovery is enabled).
+ </dd>
+
+<dt>AMD OpenCL</dt>
+ <dd>
+  hwloc/opencl.h enables interoperability with the OpenCL interface.
+  Only the AMD implementation currently offers locality information.
+  It may return the list of processors near an AMD/ATI GPU given as
+  a <tt>cl_device_id</tt>.
+  It may also return the corresponding OS device hwloc object for further
+  information (if I/O device discovery is enabled).
+ </dd>
+
 <dt>NVIDIA CUDA</dt>
  <dd>
   hwloc/cuda.h and hwloc/cudart.h enable interoperability with
   NVIDIA CUDA Driver and Runtime interfaces. For instance, it may
   return the list of processors near NVIDIA GPUs.
-  Note that if I/O device discovery is enabled, GPUs may also
-  appear as PCI objects in the topology.
+  It may also return the corresponding OS device hwloc object for further
+  information (if I/O device discovery is enabled).
+ </dd>
+
+<dt>NVIDIA Management Library (NVML)</dt>
+ <dd>
+  hwloc/nvml.h enables interoperability with the NVIDIA NVML interface.
+  It may return the list of processors near a NVIDIA GPU given as
+  a <tt>nvmlDevice_t</tt>.
+  It may also return the corresponding OS device hwloc object for further
+  information (if I/O device discovery is enabled).
+ </dd>
+
+<dt>NVIDIA displays</dt>
+ <dd>
+  hwloc/gl.h enables interoperability with NVIDIA displays
+  using the NV-CONTROL X extension (NVCtrl library).
+  If I/O device discovery is enabled, it may return the OS device
+  hwloc object that corresponds to a display
+  given as a name such as <em>:0.0</em>
+  or given as a port/device pair (server/screen).
  </dd>
 
 <dt>Taskset command-line tool</dt>
@@ -1813,13 +1962,13 @@ enabled for the current topology.
 \page threadsafety Thread Safety
 
 Like most libraries that mainly fill data structures, hwloc is not
-thread safe but rather reentrant: all state is held in a \ref
-hwloc_topology_t instance without mutex protection.  That means, for
+thread safe but rather reentrant: all state is held in a
+\ref hwloc_topology_t instance without mutex protection.  That means, for
 example, that two threads can safely operate on and modify two
 different \ref hwloc_topology_t instances, but they should not
 simultaneously invoke functions that modify the <em>same</em>
-instance.  Similarly, one thread should not modify a \ref
-hwloc_topology_t instance while another thread is reading or
+instance.  Similarly, one thread should not modify a
+\ref hwloc_topology_t instance while another thread is reading or
 traversing it.  However, two threads can safely read or traverse the
 same \ref hwloc_topology_t instance concurrently.
 
@@ -1846,8 +1995,8 @@ For reference, \ref hwloc_topology_t modification operations include
   after these functions return.  </dd>
 
 <dt>Runtime topology modifications</dt>
-  <dd><tt>hwloc_topology_insert_misc_object_by_*</tt> (see \ref
-  hwlocality_tinker) may modify the topology significantly by adding
+  <dd><tt>hwloc_topology_insert_misc_object_by_*</tt> (see
+  \ref hwlocality_tinker) may modify the topology significantly by adding
   objects inside the tree, changing the topology depth, etc.
   <tt>hwloc_topology_restrict</tt> modifies the topology even more
   dramatically by removing some objects.
@@ -1878,7 +2027,7 @@ Depending on the topology configuration, some components will be used,
 some will be ignored.
 The usual default is to enable the native operating system component,
 (e.g. <tt>linux</tt> or <tt>solaris</tt>) and the
-<tt>libpci</tt> additional component.
+<tt>pci</tt> miscellaneous component.
 If available, an architecture-specific component (such as <tt>x86</tt>)
 may also improve the topology detection.
 
@@ -1895,7 +2044,7 @@ Each one is enabled as long as it does not conflict with the
 previously enabled ones.
 This includes native operating system components,
 architecture-specific ones, and if available, I/O components
-such as <tt>libpci</tt>.
+such as <tt>pci</tt>.
 
 Usually the native operating system component
 (when it exists, e.g. <tt>linux</tt> or <tt>aix</tt>)
@@ -1908,7 +2057,7 @@ that just tries to discover the number of PUs in the system.
 Each component discovers as much topology information as possible.
 Most of them, including most native OS components, do nothing
 unless the topology is still empty.
-Some others, such as <tt>x86</tt> and <tt>libpci</tt>,
+Some others, such as <tt>x86</tt> and <tt>pci</tt>,
 can complete and annotate what other backends still earlier.
 
 Default priorities ensure that clever components are invoked first.
@@ -1937,9 +2086,10 @@ may be set to get verbose messages about component registration
 
 \section plugins_select Selecting which components to use
 
-Aside from topology configuration function such as
-<tt>hwloc_topology_set_custom()</tt>, the default priority order may
-be changed through the  <tt>HWLOC_COMPONENTS</tt> environment
+Once topology configuration functions such as
+<tt>hwloc_topology_set_custom()</tt> have been taken care of,
+the priority order of the remaining components may be changed
+through the  <tt>HWLOC_COMPONENTS</tt> environment
 variable (component names must be separated by commas).
 
 Specifying <tt>x86</tt> in this variable will cause the <tt>x86</tt>
@@ -1951,6 +2101,11 @@ In this case, <tt>x86</tt> would take care of discovering everything
 it supports, instead of only completing what the native OS information.
 This may be useful if the native component is buggy on some platforms.
 
+It is possible to prevent some components from being loaded by prefixing their
+name with <tt>-</tt> in the list. For instance <tt>x86,-pci</tt> will load the
+<tt>x86</tt> component, then let hwloc load all the usual components except
+<tt>pci</tt>.
+
 It is possible to prevent all remaining components from being loaded
 by placing <tt>stop</tt> in the environment variable.
 Only the components listed before this keyword will be enabled.
@@ -1961,7 +2116,7 @@ These arguments behave exactly as if the corresponding string had
 been passed to <tt>hwloc_topology_set_xml()</tt>
 or <tt>hwloc_topology_set_synthetic()</tt>.
 
-\section plugins_config Building components as plugins
+\section plugins_load Loading components from plugins
 
 Components may optionally be built as plugins so that the hwloc core
 library does not directly depend on their dependencies (for instance
@@ -1979,10 +2134,6 @@ All plugins found in this directory are loaded during
 A specific list of directories (colon-separated) to scan may be
 specified in the <tt>HWLOC_PLUGINS_PATH</tt> environment variable.
 
-Plugin filenames must start with <tt>hwloc_</tt>.
-For instance the <tt>libpci</tt> plugin is usually built as
-<tt>hwloc_libpci.so</tt>.
-
 Note that loading a plugin just means that the corresponding component
 is registered to the hwloc core.
 Components are then only enabled if the topology configuration
@@ -1990,29 +2141,54 @@ requests it, as explained in the previous sections.
 
 \section plugins_adding Adding new discovery components and plugins
 
-Each new discovery component requires a new <tt>hwloc_component</tt>
-structure to be exported to the hwloc core with name
-<tt>hwloc_<name>_component</tt>.
-The configure script should then be modified to add
-<tt><name></tt> to the <tt>hwloc_components</tt>
-variable so that the component is actually available at runtime.
+The types and functions cited below are declared in the hwloc/plugins.h header.
+Components are supposed to only use hwloc public headers (hwloc.h and
+anything under the <tt>include/hwloc</tt> subdirectory) and nothing from the
+<tt>include/private</tt> subdirectory in the source tree.
 
-If the new component may be built as a plugin, the configure script
-should also define <tt>hwloc_<name>_component_maybeplugin=1</tt>.
-If the configure scripts decides to enable the component as a plugin,
-the variable <tt>hwloc_<name>_component</tt>
-will be set to <tt>plugin</tt>.
-The build system may then use this variable to actually
-change the way the component is built.
-
-The component structure contains a data field that points to an
-<tt>hwloc_disc_component</tt> which defines an <tt>instantiate</tt>
-callback.
+\subsection plugins_disc_basic Basics of discovery components
+
+Each discovery component is defined by a <tt>hwloc_disc_component</tt>
+structure which contains an <tt>instantiate()</tt> callback.
 This function is invoked when this component is actually used by a topology.
-It creates a <tt>backend</tt> structure that usually contains a
-<tt>discover</tt> and/or <tt>notify_new_object</tt> callback taking
+It fills a new <tt>hwloc_backend</tt> structure that usually contains
+<tt>discover()</tt> and/or <tt>notify_new_object()</tt> callbacks taking
 care of the actual topology discovery.
 
+\note If two discovery components have the same name, only the highest
+priority one is actually made available.
+This offers a way for third-party plugins to override existing components.
+
+\subsection plugins_disc_register Registering a new discovery component
+
+Registering components to the hwloc core relies on a <tt>hwloc_component</tt> structure.
+Its <tt>data</tt> field points to the previously defined <tt>hwloc_disc_component</tt>
+structure while its <tt>type</tt> should be HWLOC_COMPONENT_TYPE_DISC.
+This structure should be named <tt>hwloc_<name>_component</tt>.
+
+The configure script should be modified to add <tt><name></tt>
+to its <tt>hwloc_components</tt> shell variable so that the component
+is actually available.
+
+\note The symbol name of the <tt>hwloc_component</tt> structure
+is independent of the name of the discovery component mentioned
+in the previous section.
+
+When the component is statically built inside the hwloc library,
+the symbol <tt>hwloc_<name>_component</tt> is added by configure
+to the <tt>src/static-components.h</tt>.
+The core then registers all components listed in this file.
+
+If the new component may be built as a plugin, the configure script
+should also define the shell variable
+<tt>hwloc_<name>_component_maybeplugin=1</tt>.
+When the configure script actually enables the component as a plugin,
+it will set the variable <tt>hwloc_<name>_component</tt>
+to <tt>plugin</tt>.
+The build system may then use this variable to change the way the component is built.
+It should create a <tt>hwloc_<name>.so</tt> shared object.
+All these files are loaded in alphabetic order, and the components
+they contain are registered to the hwloc core.
 
 \section plugins_list Existing components and plugins
 
@@ -2022,6 +2198,7 @@ at running with the <tt>HWLOC_COMPONENTS_VERBOSE</tt>
 environment variable (see \ref envvar).
 
 <dl>
+
 <dt>aix, darwin, freebsd, hpux, linux, netbsd, osf, solaris, windows</dt>
 <dd>
  Each officially supported operating system has its own native component,
@@ -2033,6 +2210,12 @@ environment variable (see \ref envvar).
  that may complete or replace the previously-found CPU information.
  It is statically built when supported.
 </dd>
+<dt>bgq</dt>
+<dd>
+ This component is specific to IBM BlueGene/Q compute node (running CNK).
+ It is built and enabled by default when <tt>--host=powerpc64-bgq-linux</tt>
+ is passed to configure (see \ref faq_bgq).
+</dd>
 <dt>no_os</dt>
 <dd>
  A basic component that just tries to detect the number of processing
@@ -2040,13 +2223,46 @@ environment variable (see \ref envvar).
  not natively supported.
  It is always statically built.
 </dd>
-<dt>libpci</dt>
+<dt>pci</dt>
 <dd>
  PCI object discovery uses the external pciaccess library (aka libpciaccess),
  or optionally the pciutils library (libpci),
  see \ref iodevices.
  <b>It may be built as a plugin</b>.
 </dd>
+<dt>opencl</dt>
+<dd>
+ The OpenCL component creates co-processor OS device objects such as
+ <em>opencl0d0</em> (first device of the first OpenCL platform)
+ or <em>opencl1d3</em> (fourth device of the second platform).
+ Only the AMD OpenCL implementation currently offers locality
+ information.
+ <b>It may be built as a plugin</b>.
+</dd>
+<dt>cuda</dt>
+<dd>
+ This component creates co-processor OS device objects such as <em>cuda0</em>
+ that correspond to NVIDIA GPUs used with CUDA library.
+ <b>It may be built as a plugin</b>.
+</dd>
+<dt>nvml</dt>
+<dd>
+ Probing the NVIDIA Management Library creates OS device objects
+ such as <em>nvml0</em> that are useful for batch schedulers.
+ It also detects the actual PCIe link bandwidth without depending
+ on power management state and without requiring administrator
+ privileges.
+ <b>It may be built as a plugin</b>.
+</dd>
+<dt>gl</dt>
+<dd>
+ Probing the NV-CONTROL X extension (NVCtrl library) creates OS
+ device objects such as <em>:0.0</em> corresponding to NVIDIA
+ displays.
+ They are useful for graphical applications that need to place
+ computation and/or data near a rendering GPU.
+ <b>It may be built as a plugin</b>.
+</dd>
 <dt>synthetic</dt>
 <dd>
  Synthetic topology support (see \ref synthetic) is always built statically.
@@ -2271,6 +2487,36 @@ interface, and the import/export may also be directed to memory buffer
 See also \ref xml.
 
 
+\section faq_slow_lstopo Why is lstopo slow?
+
+lstopo enables most hwloc discovery flags by default so that the output
+topology is as precise as possible (while hwloc disables many of them
+by default).
+This includes I/O device discovery through PCI libraries as well as external
+libraries such as NVML.
+To speed up lstopo, you may disable such features with command-line
+options such as <tt>--no-io</tt>.
+
+When NVIDIA GPU probing is enabled with CUDA or NVML, one should make sure that
+the <em>Persistent</em> mode is enabled (with <tt>nvidia-smi -pm 1</tt>)
+to avoid significant GPU initialization overhead.
+
+When AMD GPU discovery is enabled with OpenCL and hwloc is used remotely
+over ssh, some spurious round-trips on the network may significantly
+increase the discovery time.
+Forcing the <tt>DISPLAY</tt> environment variable to the remote X server
+display (usually <tt>:0</tt>) instead of only setting the <tt>COMPUTE</tt>
+variable may avoid this.
+
+Also remember that these components may be disabled at build-time with
+configure flags such as <tt>--disable-opencl</tt>, <tt>--disable-cuda</tt> or <tt>--disable-nvml</tt>,
+and at runtime with the environment variable
+<tt>HWLOC_COMPONENTS=-opencl,cuda,nvml</tt>.
+
+If loading topologies is slow because the machine contains tons of
+processors, one should also consider using XML (see \ref faq_xml).
+
+
 \section faq_privileged Does hwloc require privileged access?
 
 hwloc discovers the topology by querying the operating system.
@@ -2487,4 +2733,20 @@ following code to support old cpuset-only hwloc versions:
 hwloc 0.9 did not define any <tt>HWLOC_API_VERSION</tt> but this very old
 release probably does not deserve support from your application anymore.
 
+
+\section faq_bgq How do I build hwloc for BlueGene/Q?
+
+IBM BlueGene/Q machines run a standard Linux on the I/O node and a
+custom CNK (<em>Compute Node Kernel</em>) on the compute nodes.
+To run on the compute node, hwloc must be cross-compiled from the I/O
+node with the following configuration line:
+\verbatim
+./configure --host=powerpc64-bgq-linux --disable-shared --enable-static \
+  CPPFLAGS='-I/bgsys/drivers/ppcfloor -I/bgsys/drivers/ppcfloor/spi/include/kernel/cnk/'
+\endverbatim
+
+CPPFLAGS may have to be updated if your platform headers are installed
+in a different directory.
+
+
 */
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/include/Makefile.am b/src/pm/hydra/tools/topo/hwloc/hwloc/include/Makefile.am
index e9d6592..32bebf4 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/include/Makefile.am
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/include/Makefile.am
@@ -15,8 +15,13 @@ include_hwloc_HEADERS = \
         hwloc/helper.h \
         hwloc/myriexpress.h \
         hwloc/openfabrics-verbs.h \
+        hwloc/opencl.h \
         hwloc/cuda.h \
         hwloc/cudart.h \
+        hwloc/nvml.h \
+        hwloc/plugins.h \
+        hwloc/gl.h \
+        hwloc/intel-mic.h \
         hwloc/rename.h
 include_hwloc_autogendir = $(includedir)/hwloc/autogen
 nodist_include_hwloc_autogen_HEADERS = hwloc/autogen/config.h 
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/include/hwloc.h b/src/pm/hydra/tools/topo/hwloc/hwloc/include/hwloc.h
index 76d0b8b..9224403 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/include/hwloc.h
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/include/hwloc.h
@@ -1,6 +1,6 @@
 /*
  * Copyright © 2009 CNRS
- * Copyright © 2009-2013 Inria.  All rights reserved.
+ * Copyright © 2009-2012 Inria.  All rights reserved.
  * Copyright © 2009-2012 Université Bordeaux 1
  * Copyright © 2009-2011 Cisco Systems, Inc.  All rights reserved.
  * See COPYING in top-level directory.
@@ -74,11 +74,14 @@ extern "C" {
  */
 
 /** \brief Indicate at build time which hwloc API version is being used. */
-#define HWLOC_API_VERSION 0x00010600
+#define HWLOC_API_VERSION 0x00010700
 
 /** \brief Indicate at runtime which hwloc API version was used at build time. */
 HWLOC_DECLSPEC unsigned hwloc_get_api_version(void);
 
+/** \brief Current component and plugin ABI version (see hwloc/plugins.h) */
+#define HWLOC_COMPONENT_ABI 2
+
 /** @} */
 
 
@@ -270,13 +273,18 @@ typedef enum hwloc_obj_osdev_type_e {
   HWLOC_OBJ_OSDEV_BLOCK,	/**< \brief Operating system block device.
 				  * For instance "sda" on Linux. */
   HWLOC_OBJ_OSDEV_GPU,		/**< \brief Operating system GPU device.
-				  * For instance the "card0" DRM device on Linux. */
+				  * For instance ":0.0" for a GL display,
+				  * "card0" for a Linux DRM device. */
   HWLOC_OBJ_OSDEV_NETWORK,	/**< \brief Operating system network device.
 				  * For instance the "eth0" interface on Linux. */
   HWLOC_OBJ_OSDEV_OPENFABRICS,	/**< \brief Operating system openfabrics device.
 				  * For instance the "mlx4_0" InfiniBand HCA device on Linux. */
-  HWLOC_OBJ_OSDEV_DMA		/**< \brief Operating system dma engine device.
+  HWLOC_OBJ_OSDEV_DMA,		/**< \brief Operating system dma engine device.
 				  * For instance the "dma0chan0" DMA channel on Linux. */
+  HWLOC_OBJ_OSDEV_COPROC	/**< \brief Operating system co-processor device.
+				  * For instance "mic0" for a Xeon Phi (MIC) on Linux,
+				  * "opencl0d0" for a OpenCL device,
+				  * "cuda0" for a CUDA device. */
 } hwloc_obj_osdev_type_t;
 
 /** \brief Compare the depth of two object types
@@ -317,7 +325,8 @@ struct hwloc_obj_memory_s {
   hwloc_uint64_t total_memory; /**< \brief Total memory (in bytes) in this object and its children */
   hwloc_uint64_t local_memory; /**< \brief Local memory (in bytes) */
 
-  unsigned page_types_len; /**< \brief Size of array \p page_types */
+  /** \brief Size of array \p page_types */
+  unsigned page_types_len;
   /** \brief Array of local memory page types, \c NULL if no local memory and \p page_types is 0.
    *
    * The array is sorted by increasing \p size fields.
@@ -485,9 +494,9 @@ typedef struct hwloc_obj * hwloc_obj_t;
 union hwloc_obj_attr_u {
   /** \brief Cache-specific Object Attributes */
   struct hwloc_cache_attr_s {
-    hwloc_uint64_t size;			  /**< \brief Size of cache in bytes */
+    hwloc_uint64_t size;		  /**< \brief Size of cache in bytes */
     unsigned depth;			  /**< \brief Depth of cache (e.g., L1, L2, ...etc.) */
-    unsigned linesize;			  /**< \brief Cache-line size in bytes */
+    unsigned linesize;			  /**< \brief Cache-line size in bytes. 0 if unknown */
     int associativity;			  /**< \brief Ways of associativity,
     					    *  -1 if fully associative, 0 if unknown */
     hwloc_obj_cache_type_t type;          /**< \brief Cache type */
@@ -678,21 +687,20 @@ HWLOC_DECLSPEC int hwloc_topology_ignore_all_keep_structure(hwloc_topology_t top
 /** \brief Flags to be set onto a topology context before load.
  *
  * Flags should be given to hwloc_topology_set_flags().
+ * They may also be returned by hwloc_topology_get_flags().
  */
 enum hwloc_topology_flags_e {
-  HWLOC_TOPOLOGY_FLAG_WHOLE_SYSTEM = (1<<0),
- /**< \brief Detect the whole system, ignore reservations and offline settings.
-   * \hideinitializer
+ /** \brief Detect the whole system, ignore reservations and offline settings.
    *
    * Gather all resources, even if some were disabled by the administrator.
    * For instance, ignore Linux Cpusets and gather all processors and memory nodes,
    * and ignore the fact that some resources may be offline.
+   * \hideinitializer
    */
+  HWLOC_TOPOLOGY_FLAG_WHOLE_SYSTEM = (1UL<<0),
 
-  HWLOC_TOPOLOGY_FLAG_IS_THISSYSTEM = (1<<1),
- /**< \brief Assume that the selected backend provides the topology for the
+ /** \brief Assume that the selected backend provides the topology for the
    * system on which we are running.
-   * \hideinitializer
    *
    * This forces hwloc_topology_is_thissystem to return 1, i.e. makes hwloc assume that
    * the selected backend provides the topology for the system on which we are running,
@@ -707,41 +715,47 @@ enum hwloc_topology_flags_e {
    * This can be used for efficiency reasons to first detect the topology once,
    * save it to an XML file, and quickly reload it later through the XML
    * backend, but still having binding functions actually do bind.
+   * \hideinitializer
    */
+  HWLOC_TOPOLOGY_FLAG_IS_THISSYSTEM = (1UL<<1),
 
   /** \brief Detect PCI devices.
    *
    * By default, I/O devices are ignored. This flag enables I/O device
-   * detection using the libpci backend. Only the common PCI devices (GPUs,
+   * detection using the pci backend. Only the common PCI devices (GPUs,
    * NICs, block devices, ...) and host bridges (objects that connect the host
    * objects to an I/O subsystem) will be added to the topology.
    * Uncommon devices and other bridges (such as PCI-to-PCI bridges) will be
    * ignored.
+   * \hideinitializer
    */
-  HWLOC_TOPOLOGY_FLAG_IO_DEVICES = (1<<2),
+  HWLOC_TOPOLOGY_FLAG_IO_DEVICES = (1UL<<2),
 
   /** \brief Detect PCI bridges.
    *
    * This flag should be combined with HWLOC_TOPOLOGY_FLAG_IO_DEVICES to enable
    * the detection of both common devices and of all useful bridges (bridges that
    * have at least one device behind them).
+   * \hideinitializer
    */
-  HWLOC_TOPOLOGY_FLAG_IO_BRIDGES = (1<<3),
+  HWLOC_TOPOLOGY_FLAG_IO_BRIDGES = (1UL<<3),
 
   /** \brief Detect the whole PCI hierarchy.
    *
    * This flag enables detection of all I/O devices (even the uncommon ones)
-   * and bridges (even those that have no device behind them) using the libpci
+   * and bridges (even those that have no device behind them) using the pci
    * backend.
+   * \hideinitializer
    */
-  HWLOC_TOPOLOGY_FLAG_WHOLE_IO = (1<<4),
+  HWLOC_TOPOLOGY_FLAG_WHOLE_IO = (1UL<<4),
 
   /** \brief Detect instruction caches.
    *
    * This flag enables detection of Instruction caches,
    * instead of only Data and Unified caches.
+   * \hideinitializer
    */
-  HWLOC_TOPOLOGY_FLAG_ICACHES = (1<<5)
+  HWLOC_TOPOLOGY_FLAG_ICACHES = (1UL<<5)
 };
 
 /** \brief Set OR'ed flags to non-yet-loaded topology.
@@ -750,6 +764,8 @@ enum hwloc_topology_flags_e {
  *
  * If this function is called multiple times, the last invokation will erase
  * and replace the set of flags that was previously set.
+ *
+ * The flags set in a topology may be retrieved with hwloc_topology_get_flags()
  */
 HWLOC_DECLSPEC int hwloc_topology_set_flags (hwloc_topology_t topology, unsigned long flags);
 
@@ -1174,21 +1190,23 @@ HWLOC_DECLSPEC hwloc_obj_t hwloc_topology_insert_misc_object_by_parent(hwloc_top
 
 /** \brief Flags to be given to hwloc_topology_restrict(). */
 enum hwloc_restrict_flags_e {
-  HWLOC_RESTRICT_FLAG_ADAPT_DISTANCES = (1<<0),
- /**< \brief Adapt distance matrices according to objects being removed during restriction.
+  /** \brief Adapt distance matrices according to objects being removed during restriction.
    * If this flag is not set, distance matrices are removed.
    * \hideinitializer
    */
-  HWLOC_RESTRICT_FLAG_ADAPT_MISC = (1<<1),
- /**< \brief Move Misc objects to ancestors if their parents are removed during restriction.
+  HWLOC_RESTRICT_FLAG_ADAPT_DISTANCES = (1<<0),
+
+  /** \brief Move Misc objects to ancestors if their parents are removed during restriction.
    * If this flag is not set, Misc objects are removed when their parents are removed.
    * \hideinitializer
    */
-  HWLOC_RESTRICT_FLAG_ADAPT_IO = (1<<2)
- /**< \brief Move I/O objects to ancestors if their parents are removed during restriction.
+  HWLOC_RESTRICT_FLAG_ADAPT_MISC = (1<<1),
+
+  /** \brief Move I/O objects to ancestors if their parents are removed during restriction.
    * If this flag is not set, I/O devices and bridges are removed when their parents are removed.
    * \hideinitializer
    */
+  HWLOC_RESTRICT_FLAG_ADAPT_IO = (1<<2)
 };
 
 /** \brief Restrict the topology to the given CPU set.
@@ -1302,6 +1320,14 @@ hwloc_get_nbobjs_by_type (hwloc_topology_t topology, hwloc_obj_type_t type)
  */
 HWLOC_DECLSPEC int hwloc_topology_is_thissystem(hwloc_topology_t  __hwloc_restrict topology) __hwloc_attribute_pure;
 
+/** \brief Get OR'ed flags of a topology.
+ *
+ * Get the OR'ed set of ::hwloc_topology_flags_e of a topology.
+ *
+ * \return the flags previously set with hwloc_topology_set_flags().
+ */
+HWLOC_DECLSPEC unsigned long hwloc_topology_get_flags (hwloc_topology_t topology);
+
 /** @} */
 
 
@@ -1502,59 +1528,55 @@ HWLOC_DECLSPEC void hwloc_obj_add_info(hwloc_obj_t obj, const char *name, const
  * description of errors that can occur.
  */
 typedef enum {
-  HWLOC_CPUBIND_PROCESS = (1<<0), /**< \brief Bind all threads of the current
-                                   * (possibly) multithreaded process.
-                                   * \hideinitializer */
-  HWLOC_CPUBIND_THREAD = (1<<1),  /**< \brief Bind current thread of current process.
-                                   * \hideinitializer */
-  HWLOC_CPUBIND_STRICT = (1<<2),  /**< \brief Request for strict binding from the OS.
-                                   * \hideinitializer
-                                   *
-                                   * By default, when the designated CPUs are
-                                   * all busy while other CPUs are idle, operating systems
-                                   * may execute the thread/process on those
-                                   * other CPUs instead of the designated CPUs,
-                                   * to let them progress anyway.  Strict
-                                   * binding means that the thread/process will
-                                   * _never_ execute on other cpus than the
-                                   * designated CPUs, even when those are busy
-                                   * with other tasks and other CPUs are idle.
-                                   *
-                                   * \note Depending on the operating system,
-                                   * strict binding may not be
-                                   * possible (e.g., the OS does not implement it) or not
-                                   * allowed (e.g., for an administrative reasons), and the
-                                   * function will fail in that case.
-				   *
-				   * When retrieving the binding of a process,
-				   * this flag checks whether all its threads
-				   * actually have the same binding.
-				   * If the flag is not given, the binding of
-				   * each thread will be accumulated.
-				   *
-				   * \note This flag is meaningless when retrieving
-				   * the binding of a thread.
-                                   */
-  HWLOC_CPUBIND_NOMEMBIND = (1<<3)/**< \brief Avoid any effect on memory binding
-                                   * \hideinitializer
-                                   *
-                                   * On some operating systems, some CPU binding function
-                                   * would also bind the memory on the
-                                   * corresponding NUMA node.  It is often not
-                                   * a problem for the application, but if it
-                                   * is, setting this flag will make hwloc
-                                   * avoid using OS functions that would also
-                                   * bind memory.  This will however reduce the
-                                   * support of CPU bindings, i.e. potentially
-                                   * return -1 with errno set to ENOSYS in some
-                                   * cases.
-                                   *
-                                   * This flag is only meaningful when
-                                   * used with functions that set the
-                                   * CPU binding.  It is ignored when
-                                   * used with functions that get CPU
-                                   * binding information.
-                                   */
+  /** \brief Bind all threads of the current (possibly) multithreaded process.
+   * \hideinitializer */
+  HWLOC_CPUBIND_PROCESS = (1<<0),
+
+  /** \brief Bind current thread of current process.
+   * \hideinitializer */
+  HWLOC_CPUBIND_THREAD = (1<<1),
+
+  /** \brief Request for strict binding from the OS.
+   *
+   * By default, when the designated CPUs are all busy while other
+   * CPUs are idle, operating systems may execute the thread/process
+   * on those other CPUs instead of the designated CPUs, to let them
+   * progress anyway.  Strict binding means that the thread/process
+   * will _never_ execute on other cpus than the designated CPUs, even
+   * when those are busy with other tasks and other CPUs are idle.
+   *
+   * \note Depending on the operating system, strict binding may not
+   * be possible (e.g., the OS does not implement it) or not allowed
+   * (e.g., for an administrative reasons), and the function will fail
+   * in that case.
+   *
+   * When retrieving the binding of a process, this flag checks
+   * whether all its threads  actually have the same binding. If the
+   * flag is not given, the binding of each thread will be
+   * accumulated.
+   *
+   * \note This flag is meaningless when retrieving the binding of a
+   * thread.
+   * \hideinitializer
+   */
+  HWLOC_CPUBIND_STRICT = (1<<2),
+
+  /** \brief Avoid any effect on memory binding
+   *
+   * On some operating systems, some CPU binding function would also
+   * bind the memory on the corresponding NUMA node.  It is often not
+   * a problem for the application, but if it is, setting this flag
+   * will make hwloc avoid using OS functions that would also bind
+   * memory.  This will however reduce the support of CPU bindings,
+   * i.e. potentially return -1 with errno set to ENOSYS in some
+   * cases.
+   *
+   * This flag is only meaningful when used with functions that set
+   * the CPU binding.  It is ignored when used with functions that get
+   * CPU binding information.
+   * \hideinitializer
+   */
+  HWLOC_CPUBIND_NOMEMBIND = (1<<3)
 } hwloc_cpubind_flags_t;
 
 /** \brief Bind current process or thread on cpus given in physical bitmap \p set.
@@ -1714,76 +1736,58 @@ HWLOC_DECLSPEC int hwloc_get_proc_last_cpu_location(hwloc_topology_t topology, h
  * description of errors that can occur.
  */
 typedef enum {
-  HWLOC_MEMBIND_DEFAULT =	0,	/**< \brief Reset the memory allocation policy to the system default.
-					 * \hideinitializer */
-  HWLOC_MEMBIND_FIRSTTOUCH =	1,	/**< \brief Allocate memory
-                                         * but do not immediately bind
-                                         * it to a specific locality.
-                                         * Instead, each page in the
-                                         * allocation is bound only
-                                         * when it is first touched.
-                                         * Pages are individually
-                                         * bound to the local NUMA
-                                         * node of the first thread
-                                         * that touches it. If there is not
-                                         * enough memory on the node, allocation
-                                         * may be done in the specified cpuset
-                                         * before allocating on other nodes.
-                                         * \hideinitializer */
-  HWLOC_MEMBIND_BIND =		2,	/**< \brief Allocate memory on the specified nodes.
-					 * \hideinitializer */
-  HWLOC_MEMBIND_INTERLEAVE =	3,	/**< \brief Allocate memory on
-                                         * the given nodes in an
-                                         * interleaved / round-robin
-                                         * manner.  The precise layout
-                                         * of the memory across
-                                         * multiple NUMA nodes is
-                                         * OS/system specific.
-                                         * Interleaving can be useful
-                                         * when threads distributed across
-                                         * the specified NUMA nodes
-                                         * will all be accessing the whole
-                                         * memory range concurrently, since
-                                         * the interleave will then balance
-                                         * the memory references.
-                                         * \hideinitializer */
-  HWLOC_MEMBIND_REPLICATE =	4,	/**< \brief Replicate memory
-					 * on the given nodes; reads
-					 * from this memory will
-					 * attempt to be serviced from
-					 * the NUMA node local to the
-					 * reading thread.
-					 * Replicating can be useful
-					 * when multiple threads from
-					 * the specified NUMA nodes
-					 * will be sharing the same
-					 * read-only data.
-                                         *
-                                         * This policy can only be
-					 * used with existing memory
-					 * allocations (i.e., the
-					 * hwloc_set_*membind*()
-					 * functions); it cannot be
-					 * used with functions that
-					 * allocate new memory (i.e.,
-					 * the hwloc_alloc*()
-					 * functions).
-					 * \hideinitializer */
-  HWLOC_MEMBIND_NEXTTOUCH =	5,	/**< \brief For each page bound
-                                         * with this policy, by next time
-                                         * it is touched (and next time only),
-                                         * it is moved from
-                                         * its current location to the
-                                         * local NUMA node of the
-                                         * thread where the memory
-                                         * reference occurred (if it
-                                         * needs to be moved at all).
-					 * \hideinitializer */
-  HWLOC_MEMBIND_MIXED = -1              /**< \brief Returned by hwloc_get_membind*()
-                                         * functions when multiple threads or
-                                         * parts of a memory area have
-                                         * differing memory binding policies.
-                                         * \hideinitializer */
+  /** \brief Reset the memory allocation policy to the system default.
+   * \hideinitializer */
+  HWLOC_MEMBIND_DEFAULT =	0,
+
+  /** \brief Allocate memory
+   * but do not immediately bind it to a specific locality. Instead,
+   * each page in the allocation is bound only when it is first
+   * touched. Pages are individually bound to the local NUMA node of
+   * the first thread that touches it. If there is not enough memory
+   * on the node, allocation may be done in the specified cpuset
+   * before allocating on other nodes.
+   * \hideinitializer */
+  HWLOC_MEMBIND_FIRSTTOUCH =	1,
+
+  /** \brief Allocate memory on the specified nodes.
+   * \hideinitializer */
+  HWLOC_MEMBIND_BIND =		2,
+
+  /** \brief Allocate memory on the given nodes in an interleaved
+   * / round-robin manner.  The precise layout of the memory across
+   * multiple NUMA nodes is OS/system specific. Interleaving can be
+   * useful when threads distributed across the specified NUMA nodes
+   * will all be accessing the whole memory range concurrently, since
+   * the interleave will then balance the memory references.
+   * \hideinitializer */
+  HWLOC_MEMBIND_INTERLEAVE =	3,
+
+  /** \brief Replicate memory on the given nodes; reads from this
+   * memory will attempt to be serviced from the NUMA node local to
+   * the reading thread. Replicating can be useful when multiple
+   * threads from the specified NUMA nodes will be sharing the same
+   * read-only data.
+   *
+   * This policy can only be used with existing memory allocations
+   * (i.e., the hwloc_set_*membind*() functions); it cannot be used
+   * with functions that allocate new memory (i.e., the hwloc_alloc*()
+   * functions).
+   * \hideinitializer */
+  HWLOC_MEMBIND_REPLICATE =	4,
+
+  /** \brief For each page bound with this policy, by next time
+   * it is touched (and next time only), it is moved from its current
+   * location to the local NUMA node of the thread where the memory
+   * reference occurred (if it needs to be moved at all).
+   * \hideinitializer */
+  HWLOC_MEMBIND_NEXTTOUCH =	5,
+
+  /** \brief Returned by hwloc_get_membind*() functions when multiple
+   * threads or parts of a memory area have differing memory binding
+   * policies.
+   * \hideinitializer */
+  HWLOC_MEMBIND_MIXED = -1             
 } hwloc_membind_policy_t;
 
 /** \brief Memory binding flags.
@@ -1798,61 +1802,43 @@ typedef enum {
  * description of errors that can occur.
  */
 typedef enum {
-  HWLOC_MEMBIND_PROCESS =       (1<<0), /**< \brief Set policy for all
-                                         * threads of the specified
-                                         * (possibly multithreaded)
-                                         * process.  This flag is
-                                         * mutually exclusive with
-                                         * HWLOC_MEMBIND_THREAD.
-                                         * \hideinitializer */
-  HWLOC_MEMBIND_THREAD =        (1<<1), /**< \brief Set policy for a
-                                         * specific thread of the
-                                         * current process.  This flag
-                                         * is mutually exclusive with
-                                         * HWLOC_MEMBIND_PROCESS.
-                                         * \hideinitializer */
-  HWLOC_MEMBIND_STRICT =        (1<<2), /**< Request strict binding
-                                         * from the OS.  The function
-                                         * will fail if the binding
-                                         * can not be guaranteed /
-                                         * completely enforced.
-                                         *
-                                         * This flag has slightly
-                                         * different meanings
-                                         * depending on which function
-                                         * it is used with.  
-                                         * \hideinitializer  */
-  HWLOC_MEMBIND_MIGRATE =       (1<<3), /**< \brief Migrate existing
-                                         * allocated memory.  If the
-                                         * memory cannot be migrated
-                                         * and the
-                                         * HWLOC_MEMBIND_STRICT flag
-                                         * is passed, an error will be
-                                         * returned.
-                                         * \hideinitializer  */
-  HWLOC_MEMBIND_NOCPUBIND =     (1<<4)  /**< \brief Avoid any effect
-                                         * on CPU binding.
-                                         *
-                                         * On some operating systems,
-                                         * some underlying memory
-                                         * binding functions also bind
-                                         * the application to the
-                                         * corresponding CPU(s).
-                                         * Using this flag will cause
-                                         * hwloc to avoid using OS
-                                         * functions that could
-                                         * potentially affect CPU
-                                         * bindings.  Note, however,
-                                         * that using NOCPUBIND may
-                                         * reduce hwloc's overall
-                                         * memory binding support.
-                                         * Specifically: some of
-                                         * hwloc's memory binding
-                                         * functions may fail with
-                                         * errno set to ENOSYS when
-                                         * used with NOCPUBIND.
-                                         * \hideinitializer
-                                         */
+  /** \brief Set policy for all threads of the specified (possibly
+   * multithreaded) process.  This flag is mutually exclusive with
+   * HWLOC_MEMBIND_THREAD.
+   * \hideinitializer */
+  HWLOC_MEMBIND_PROCESS =       (1<<0),
+
+ /** \brief Set policy for a specific thread of the current process.
+  * This flag is mutually exclusive with HWLOC_MEMBIND_PROCESS.
+  * \hideinitializer */
+  HWLOC_MEMBIND_THREAD =        (1<<1),
+
+ /** Request strict binding from the OS.  The function will fail if
+  * the binding can not be guaranteed / completely enforced.
+  *
+  * This flag has slightly different meanings depending on which
+  * function it is used with.  
+  * \hideinitializer  */
+  HWLOC_MEMBIND_STRICT =        (1<<2),
+
+ /** \brief Migrate existing allocated memory.  If the memory cannot
+  * be migrated and the HWLOC_MEMBIND_STRICT flag is passed, an error
+  * will be returned.
+  * \hideinitializer  */
+  HWLOC_MEMBIND_MIGRATE =       (1<<3),
+
+  /** \brief Avoid any effect on CPU binding.
+   *
+   * On some operating systems, some underlying memory binding
+   * functions also bind the application to the corresponding CPU(s).
+   * Using this flag will cause hwloc to avoid using OS functions that
+   * could potentially affect CPU bindings.  Note, however, that using
+   * NOCPUBIND may reduce hwloc's overall memory binding
+   * support. Specifically: some of hwloc's memory binding functions
+   * may fail with errno set to ENOSYS when used with NOCPUBIND.
+   * \hideinitializer
+   */
+  HWLOC_MEMBIND_NOCPUBIND =     (1<<4)
 } hwloc_membind_flags_t;
 
 /** \brief Set the default memory binding policy of the current
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/include/hwloc/cuda.h b/src/pm/hydra/tools/topo/hwloc/hwloc/include/hwloc/cuda.h
index d02cdde..7344664 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/include/hwloc/cuda.h
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/include/hwloc/cuda.h
@@ -1,5 +1,5 @@
 /*
- * Copyright © 2010-2012 inria.  All rights reserved.
+ * Copyright © 2010-2013 Inria.  All rights reserved.
  * Copyright © 2010-2011 Université Bordeaux 1
  * Copyright © 2011 Cisco Systems, Inc.  All rights reserved.
  * See COPYING in top-level directory.
@@ -18,8 +18,10 @@
 
 #include <hwloc.h>
 #include <hwloc/autogen/config.h>
-#include <hwloc/linux.h>
 #include <hwloc/helper.h>
+#ifdef HWLOC_LINUX_SYS
+#include <hwloc/linux.h>
+#endif
 
 #include <cuda.h>
 
@@ -33,15 +35,17 @@ extern "C" {
  * @{
  */
 
-/** \brief Return the domain, bus and device IDs of device \p cudevice.
+/** \brief Return the domain, bus and device IDs of the CUDA device \p cudevice.
+ *
+ * Device \p cudevice must match the local machine.
  */
 static __hwloc_inline int
 hwloc_cuda_get_device_pci_ids(hwloc_topology_t topology __hwloc_attribute_unused,
-			       CUdevice cudevice, int *domain, int *bus, int *dev)
+			      CUdevice cudevice, int *domain, int *bus, int *dev)
 {
   CUresult cres;
 
-#if CUDA_VERSION >= 4000
+#ifdef CU_DEVICE_ATTRIBUTE_PCI_DOMAIN_ID
   cres = cuDeviceGetAttribute(domain, CU_DEVICE_ATTRIBUTE_PCI_DOMAIN_ID, cudevice);
   if (cres != CUDA_SUCCESS) {
     errno = ENOSYS;
@@ -67,12 +71,18 @@ hwloc_cuda_get_device_pci_ids(hwloc_topology_t topology __hwloc_attribute_unused
 /** \brief Get the CPU set of logical processors that are physically
  * close to device \p cudevice.
  *
- * For the given CUDA Driver API device \p cudevice, read the corresponding
- * kernel-provided cpumap file and return the corresponding CPU set.
+ * Return the CPU set describing the locality of the CUDA device \p cudevice.
+ *
+ * Topology \p topology and device \p cudevice must match the local machine.
+ * I/O devices detection and the CUDA component are not needed in the topology.
+ *
+ * The function only returns the locality of the device.
+ * If more information about the device is needed, OS objects should
+ * be used instead, see hwloc_cuda_get_device_osdev()
+ * and hwloc_cuda_get_device_osdev_by_index().
+ *
  * This function is currently only implemented in a meaningful way for
  * Linux; other systems will simply get a full cpuset.
- *
- * Topology \p topology must match the current machine.
  */
 static __hwloc_inline int
 hwloc_cuda_get_device_cpuset(hwloc_topology_t topology __hwloc_attribute_unused,
@@ -110,13 +120,15 @@ hwloc_cuda_get_device_cpuset(hwloc_topology_t topology __hwloc_attribute_unused,
   return 0;
 }
 
-/** \brief Get the hwloc object for the PCI device corresponding
- * to device \p cudevice.
+/** \brief Get the hwloc PCI device object corresponding to the
+ * CUDA device \p cudevice.
  *
- * For the given CUDA Runtime API device \p cudevice, return the hwloc PCI
- * object containing the device. Returns NULL if there is none.
+ * Return the PCI device object describing the CUDA device \p cudevice.
+ * Return NULL if there is none.
  *
- * IO devices detection must be enabled in topology \p topology.
+ * Topology \p topology and device \p cudevice must match the local machine.
+ * I/O devices detection must be enabled in topology \p topology.
+ * The CUDA component is not needed in the topology.
  */
 static __hwloc_inline hwloc_obj_t
 hwloc_cuda_get_device_pcidev(hwloc_topology_t topology, CUdevice cudevice)
@@ -129,6 +141,74 @@ hwloc_cuda_get_device_pcidev(hwloc_topology_t topology, CUdevice cudevice)
   return hwloc_get_pcidev_by_busid(topology, domain, bus, dev, 0);
 }
 
+/** \brief Get the hwloc OS device object corresponding to CUDA device \p cudevice.
+ *
+ * Return the hwloc OS device object that describes the given
+ * CUDA device \p cudevice. Return NULL if there is none.
+ *
+ * Topology \p topology and device \p cudevice must match the local machine.
+ * I/O devices detection and the NVML component must be enabled in the topology.
+ * If not, the locality of the object may still be found using
+ * hwloc_cuda_get_device_cpuset().
+ *
+ * \note The corresponding hwloc PCI device may be found by looking
+ * at the result parent pointer.
+ */
+static __hwloc_inline hwloc_obj_t
+hwloc_cuda_get_device_osdev(hwloc_topology_t topology, CUdevice cudevice)
+{
+	hwloc_obj_t osdev = NULL;
+	int domain, bus, dev;
+
+	if (hwloc_cuda_get_device_pci_ids(topology, cudevice, &domain, &bus, &dev))
+		return NULL;
+
+	osdev = NULL;
+	while ((osdev = hwloc_get_next_osdev(topology, osdev)) != NULL) {
+		hwloc_obj_t pcidev = osdev->parent;
+		if (strncmp(osdev->name, "cuda", 4))
+			continue;
+		if (pcidev
+		    && pcidev->type == HWLOC_OBJ_PCI_DEVICE
+		    && (int) pcidev->attr->pcidev.domain == domain
+		    && (int) pcidev->attr->pcidev.bus == bus
+		    && (int) pcidev->attr->pcidev.dev == dev
+		    && pcidev->attr->pcidev.func == 0)
+			return osdev;
+	}
+
+	return NULL;
+}
+
+/** \brief Get the hwloc OS device object corresponding to the
+ * CUDA device whose index is \p idx.
+ *
+ * Return the OS device object describing the CUDA device whose
+ * index is \p idx. Return NULL if there is none.
+ *
+ * The topology \p topology does not necessarily have to match the current
+ * machine. For instance the topology may be an XML import of a remote host.
+ * I/O devices detection and the CUDA component must be enabled in the topology.
+ *
+ * \note The corresponding PCI device object can be obtained by looking
+ * at the OS device parent object.
+ *
+ * \note This function is identical to hwloc_cudart_get_device_osdev_by_index().
+ */
+static __hwloc_inline hwloc_obj_t
+hwloc_cuda_get_device_osdev_by_index(hwloc_topology_t topology, unsigned idx)
+{
+	hwloc_obj_t osdev = NULL;
+	while ((osdev = hwloc_get_next_osdev(topology, osdev)) != NULL) {
+		if (HWLOC_OBJ_OSDEV_COPROC == osdev->attr->osdev.type
+		    && osdev->name
+		    && !strncmp("cuda", osdev->name, 4)
+		    && atoi(osdev->name + 4) == (int) idx)
+			return osdev;
+	}
+	return NULL;
+}
+
 /** @} */
 
 
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/include/hwloc/cudart.h b/src/pm/hydra/tools/topo/hwloc/hwloc/include/hwloc/cudart.h
index 83f96a5..903b0b7 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/include/hwloc/cudart.h
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/include/hwloc/cudart.h
@@ -1,5 +1,5 @@
 /*
- * Copyright © 2010-2012 inria.  All rights reserved.
+ * Copyright © 2010-2013 Inria.  All rights reserved.
  * Copyright © 2010-2011 Université Bordeaux 1
  * Copyright © 2011 Cisco Systems, Inc.  All rights reserved.
  * See COPYING in top-level directory.
@@ -18,8 +18,10 @@
 
 #include <hwloc.h>
 #include <hwloc/autogen/config.h>
-#include <hwloc/linux.h>
 #include <hwloc/helper.h>
+#ifdef HWLOC_LINUX_SYS
+#include <hwloc/linux.h>
+#endif
 
 #include <cuda_runtime_api.h>
 
@@ -33,22 +35,24 @@ extern "C" {
  * @{
  */
 
-/** \brief Return the domain, bus and device IDs of device \p device.
+/** \brief Return the domain, bus and device IDs of the CUDA device whose index is \p idx.
+ *
+ * Device index \p idx must match the local machine.
  */
 static __hwloc_inline int
 hwloc_cudart_get_device_pci_ids(hwloc_topology_t topology __hwloc_attribute_unused,
-			       int device, int *domain, int *bus, int *dev)
+				int idx, int *domain, int *bus, int *dev)
 {
   cudaError_t cerr;
   struct cudaDeviceProp prop;
 
-  cerr = cudaGetDeviceProperties(&prop, device);
+  cerr = cudaGetDeviceProperties(&prop, idx);
   if (cerr) {
     errno = ENOSYS;
     return -1;
   }
 
-#if CUDART_VERSION >= 4000
+#ifdef CU_DEVICE_ATTRIBUTE_PCI_DOMAIN_ID
   *domain = prop.pciDomainID;
 #else
   *domain = 0;
@@ -61,18 +65,24 @@ hwloc_cudart_get_device_pci_ids(hwloc_topology_t topology __hwloc_attribute_unus
 }
 
 /** \brief Get the CPU set of logical processors that are physically
- * close to device \p device.
+ * close to device \p idx.
+ *
+ * Return the CPU set describing the locality of the CUDA device
+ * whose index is \p idx.
+ *
+ * Topology \p topology and device \p idx must match the local machine.
+ * I/O devices detection and the CUDA component are not needed in the topology.
+ *
+ * The function only returns the locality of the device.
+ * If more information about the device is needed, OS objects should
+ * be used instead, see hwloc_cudart_get_device_osdev_by_index().
  *
- * For the given CUDA Runtime API device \p device, read the corresponding
- * kernel-provided cpumap file and return the corresponding CPU set.
  * This function is currently only implemented in a meaningful way for
  * Linux; other systems will simply get a full cpuset.
- *
- * Topology \p topology must match the current machine.
  */
 static __hwloc_inline int
 hwloc_cudart_get_device_cpuset(hwloc_topology_t topology __hwloc_attribute_unused,
-			       int device, hwloc_cpuset_t set)
+			       int idx, hwloc_cpuset_t set)
 {
 #ifdef HWLOC_LINUX_SYS
   /* If we're on Linux, use the sysfs mechanism to get the local cpus */
@@ -81,7 +91,7 @@ hwloc_cudart_get_device_cpuset(hwloc_topology_t topology __hwloc_attribute_unuse
   FILE *sysfile = NULL;
   int domain, bus, dev;
 
-  if (hwloc_cudart_get_device_pci_ids(topology, device, &domain, &bus, &dev))
+  if (hwloc_cudart_get_device_pci_ids(topology, idx, &domain, &bus, &dev))
     return -1;
 
   if (!hwloc_topology_is_thissystem(topology)) {
@@ -106,25 +116,58 @@ hwloc_cudart_get_device_cpuset(hwloc_topology_t topology __hwloc_attribute_unuse
   return 0;
 }
 
-/** \brief Get the hwloc object for the PCI device corresponding
- * to device \p device.
+/** \brief Get the hwloc PCI device object corresponding to the
+ * CUDA device whose index is \p idx.
  *
- * For the given CUDA Runtime API device \p device, return the hwloc PCI
- * object containing the device. Returns NULL if there is none.
+ * Return the PCI device object describing the CUDA device whose
+ * index is \p idx. Return NULL if there is none.
  *
- * IO devices detection must be enabled in topology \p topology.
+ * Topology \p topology and device \p idx must match the local machine.
+ * I/O devices detection must be enabled in topology \p topology.
+ * The CUDA component is not needed in the topology.
  */
 static __hwloc_inline hwloc_obj_t
-hwloc_cudart_get_device_pcidev(hwloc_topology_t topology, int device)
+hwloc_cudart_get_device_pcidev(hwloc_topology_t topology, int idx)
 {
   int domain, bus, dev;
 
-  if (hwloc_cudart_get_device_pci_ids(topology, device, &domain, &bus, &dev))
+  if (hwloc_cudart_get_device_pci_ids(topology, idx, &domain, &bus, &dev))
     return NULL;
 
   return hwloc_get_pcidev_by_busid(topology, domain, bus, dev, 0);
 }
 
+/** \brief Get the hwloc OS device object corresponding to the
+ * CUDA device whose index is \p idx.
+ *
+ * Return the OS device object describing the CUDA device whose
+ * index is \p idx. Return NULL if there is none.
+ *
+ * The topology \p topology does not necessarily have to match the current
+ * machine. For instance the topology may be an XML import of a remote host.
+ * I/O devices detection and the CUDA component must be enabled in the topology.
+ * If not, the locality of the object may still be found using
+ * hwloc_cudart_get_device_cpuset().
+ *
+ * \note The corresponding PCI device object can be obtained by looking
+ * at the OS device parent object.
+ *
+ * \note This function is identical to hwloc_cuda_get_device_osdev_by_index().
+ */
+static __hwloc_inline hwloc_obj_t
+hwloc_cudart_get_device_osdev_by_index(hwloc_topology_t topology, unsigned idx)
+{
+	hwloc_obj_t osdev = NULL;
+	while ((osdev = hwloc_get_next_osdev(topology, osdev)) != NULL) {
+		if (HWLOC_OBJ_OSDEV_COPROC == osdev->attr->osdev.type
+		    && osdev->name
+		    && !strncmp("cuda", osdev->name, 4)
+		    && atoi(osdev->name + 4) == (int) idx)
+			return osdev;
+	}
+	return NULL;
+}
+
 /** @} */
 
 
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/include/hwloc/gl.h b/src/pm/hydra/tools/topo/hwloc/hwloc/include/hwloc/gl.h
new file mode 100644
index 0000000..b3c59ae
--- /dev/null
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/include/hwloc/gl.h
@@ -0,0 +1,131 @@
+/*
+ * Copyright © 2012 Blue Brain Project, EPFL. All rights reserved.
+ * Copyright © 2012-2013 Inria.  All rights reserved.
+ * See COPYING in top-level directory.
+ */
+
+/** \file
+ * \brief Macros to help interaction between hwloc and OpenGL displays.
+ *
+ * Applications that use both hwloc and OpenGL may want to include
+ * this file so as to get topology information for OpenGL displays.
+ *
+ * Only the NVIDIA display locality information is currently available,
+ * using the NV-CONTROL X11 extension and the NVCtrl library.
+ */
+
+#ifndef HWLOC_GL_H
+#define HWLOC_GL_H
+
+#include <hwloc.h>
+
+#include <stdio.h>
+#include <string.h>
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/** \defgroup hwlocality_gl OpenGL display specific functions
+ * @{
+ */
+
+/** \brief Get the hwloc OS device object corresponding to the
+ * OpenGL display given by port and device index.
+ *
+ * Return the OS device object describing the OpenGL display
+ * whose port (server) is \p port and device (screen) is \p device.
+ * Return NULL if there is none.
+ *
+ * The topology \p topology does not necessarily have to match the current
+ * machine. For instance the topology may be an XML import of a remote host.
+ * I/O devices detection and the GL component must be enabled in the topology.
+ *
+ * \note The corresponding PCI device object can be obtained by looking
+ * at the OS device parent object.
+ */
+static __hwloc_inline hwloc_obj_t
+hwloc_gl_get_display_osdev_by_port_device(hwloc_topology_t topology,
+					  unsigned port, unsigned device)
+{
+        unsigned x = (unsigned) -1, y = (unsigned) -1;
+        hwloc_obj_t osdev = NULL;
+        while ((osdev = hwloc_get_next_osdev(topology, osdev)) != NULL) {
+                if (HWLOC_OBJ_OSDEV_GPU == osdev->attr->osdev.type
+                    && osdev->name
+                    && sscanf(osdev->name, ":%u.%u", &x, &y) == 2
+                    && port == x && device == y)
+                        return osdev;
+        }
+	errno = EINVAL;
+        return NULL;
+}
+
+/** \brief Get the hwloc OS device object corresponding to the
+ * OpenGL display given by name.
+ *
+ * Return the OS device object describing the OpenGL display
+ * whose name is \p name, built as ":port.device" such as ":0.0" .
+ * Return NULL if there is none.
+ *
+ * The topology \p topology does not necessarily have to match the current
+ * machine. For instance the topology may be an XML import of a remote host.
+ * I/O devices detection and the GL component must be enabled in the topology.
+ *
+ * \note The corresponding PCI device object can be obtained by looking
+ * at the OS device parent object.
+ */
+static __hwloc_inline hwloc_obj_t
+hwloc_gl_get_display_osdev_by_name(hwloc_topology_t topology,
+				   const char *name)
+{
+        hwloc_obj_t osdev = NULL;
+        while ((osdev = hwloc_get_next_osdev(topology, osdev)) != NULL) {
+                if (HWLOC_OBJ_OSDEV_GPU == osdev->attr->osdev.type
+                    && osdev->name
+                    && !strcmp(name, osdev->name))
+                        return osdev;
+        }
+	errno = EINVAL;
+        return NULL;
+}
+
+/** \brief Get the OpenGL display port and device corresponding
+ * to the given hwloc OS object.
+ *
+ * Return the OpenGL display port (server) in \p port and device (screen)
+ * in \p screen that correspond to the given hwloc OS device object.
+ * Return \c -1 if there is none.
+ *
+ * The topology \p topology does not necessarily have to match the current
+ * machine. For instance the topology may be an XML import of a remote host.
+ * I/O devices detection and the GL component must be enabled in the topology.
+ */
+static __hwloc_inline int
+hwloc_gl_get_display_by_osdev(hwloc_topology_t topology __hwloc_attribute_unused,
+			      hwloc_obj_t osdev,
+			      unsigned *port, unsigned *device)
+{
+	unsigned x = -1, y = -1;
+	if (HWLOC_OBJ_OSDEV_GPU == osdev->attr->osdev.type
+	    && sscanf(osdev->name, ":%u.%u", &x, &y) == 2) {
+		*port = x;
+		*device = y;
+		return 0;
+	}
+	errno = EINVAL;
+	return -1;
+}
+
+/** @} */
+
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+
+#endif /* HWLOC_GL_H */
+
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/include/hwloc/intel-mic.h b/src/pm/hydra/tools/topo/hwloc/hwloc/include/hwloc/intel-mic.h
new file mode 100644
index 0000000..38c0815
--- /dev/null
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/include/hwloc/intel-mic.h
@@ -0,0 +1,139 @@
+/*
+ * Copyright © 2013 Inria.  All rights reserved.
+ * See COPYING in top-level directory.
+ */
+
+/** \file
+ * \brief Macros to help interaction between hwloc and Intel Xeon Phi (MIC).
+ *
+ * Applications that use both hwloc and Intel Xeon Phi (MIC) may want to
+ * include this file so as to get topology information for MIC devices.
+ */
+
+#ifndef HWLOC_INTEL_MIC_H
+#define HWLOC_INTEL_MIC_H
+
+#include <hwloc.h>
+#include <hwloc/autogen/config.h>
+#include <hwloc/helper.h>
+#ifdef HWLOC_LINUX_SYS
+#include <hwloc/linux.h>
+#include <dirent.h>
+#include <string.h>
+#endif
+
+#include <stdio.h>
+#include <stdlib.h>
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/** \defgroup hwlocality_intel_mic Intel Xeon Phi (MIC) Specific Functions
+ * @{
+ */
+
+/** \brief Get the CPU set of logical processors that are physically
+ * close to MIC device whose index is \p idx.
+ *
+ * Return the CPU set describing the locality of the MIC device whose index is \p idx.
+ *
+ * Topology \p topology and device index \p idx must match the local machine.
+ * I/O devices detection is not needed in the topology.
+ *
+ * The function only returns the locality of the device.
+ * If more information about the device is needed, OS objects should
+ * be used instead, see hwloc_intel_mic_get_device_osdev_by_index().
+ *
+ * This function is currently only implemented in a meaningful way for
+ * Linux; other systems will simply get a full cpuset.
+ */
+static __hwloc_inline int
+hwloc_intel_mic_get_device_cpuset(hwloc_topology_t topology __hwloc_attribute_unused,
+				  int idx __hwloc_attribute_unused,
+				  hwloc_cpuset_t set)
+{
+#ifdef HWLOC_LINUX_SYS
+	/* If we're on Linux, use the sysfs mechanism to get the local cpus */
+#define HWLOC_INTEL_MIC_DEVICE_SYSFS_PATH_MAX 128
+	char path[HWLOC_INTEL_MIC_DEVICE_SYSFS_PATH_MAX];
+	DIR *sysdir = NULL;
+	FILE *sysfile = NULL;
+	struct dirent *dirent;
+	unsigned pcibus, pcidev, pcifunc;
+
+	if (!hwloc_topology_is_thissystem(topology)) {
+		errno = EINVAL;
+		return -1;
+	}
+
+	sprintf(path, "/sys/class/mic/mic%d", idx);
+	sysdir = opendir(path);
+	if (!sysdir)
+		return -1;
+
+	while ((dirent = readdir(sysdir)) != NULL) {
+		if (sscanf(dirent->d_name, "pci_%02x:%02x.%02x", &pcibus, &pcidev, &pcifunc) == 3) {
+			sprintf(path, "/sys/class/mic/mic%d/pci_%02x:%02x.%02x/local_cpus", idx, pcibus, pcidev, pcifunc);
+			sysfile = fopen(path, "r");
+			if (!sysfile) {
+				closedir(sysdir);
+				return -1;
+			}
+
+			hwloc_linux_parse_cpumap_file(sysfile, set);
+			if (hwloc_bitmap_iszero(set))
+				hwloc_bitmap_copy(set, hwloc_topology_get_complete_cpuset(topology));
+
+			fclose(sysfile);
+			break;
+		}
+	}
+
+	closedir(sysdir);
+#else
+	/* Non-Linux systems simply get a full cpuset */
+	hwloc_bitmap_copy(set, hwloc_topology_get_complete_cpuset(topology));
+#endif
+	return 0;
+}
+
+/** \brief Get the hwloc OS device object corresponding to the
+ * MIC device for the given index.
+ *
+ * Return the OS device object describing the MIC device whose index is \p idx.
+ * Return NULL if there is none.
+ *
+ * The topology \p topology does not necessarily have to match the current
+ * machine. For instance the topology may be an XML import of a remote host.
+ * I/O devices detection must be enabled in the topology.
+ *
+ * \note The corresponding PCI device object can be obtained by looking
+ * at the OS device parent object.
+ */
+static __hwloc_inline hwloc_obj_t
+hwloc_intel_mic_get_device_osdev_by_index(hwloc_topology_t topology,
+					  unsigned idx)
+{
+	hwloc_obj_t osdev = NULL;
+	while ((osdev = hwloc_get_next_osdev(topology, osdev)) != NULL) {
+		if (HWLOC_OBJ_OSDEV_COPROC == osdev->attr->osdev.type
+                    && osdev->name
+		    && !strncmp("mic", osdev->name, 3)
+		    && atoi(osdev->name + 3) == (int) idx)
+                        return osdev;
+        }
+        return NULL;
+}
+
+/** @} */
+
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+
+#endif /* HWLOC_INTEL_MIC_H */
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/include/hwloc/myriexpress.h b/src/pm/hydra/tools/topo/hwloc/hwloc/include/hwloc/myriexpress.h
index a236340..95b7fa7 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/include/hwloc/myriexpress.h
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/include/hwloc/myriexpress.h
@@ -1,5 +1,5 @@
 /*
- * Copyright © 2010-2012 inria.  All rights reserved.
+ * Copyright © 2010-2013 Inria.  All rights reserved.
  * Copyright © 2011 Cisco Systems, Inc.  All rights reserved.
  * See COPYING in top-level directory.
  */
@@ -17,7 +17,6 @@
 
 #include <hwloc.h>
 #include <hwloc/autogen/config.h>
-#include <hwloc/linux.h>
 
 #include <myriexpress.h>
 
@@ -34,10 +33,14 @@ extern "C" {
 /** \brief Get the CPU set of logical processors that are physically
  * close the MX board \p id.
  *
- * For the given Myrinet Express board index \p id, read the
- * OS-provided NUMA node and return the corresponding CPU set.
+ * Return the CPU set describing the locality of the Myrinet Express
+ * board whose index is \p id.
  *
- * Topology \p topology must match the current machine.
+ * Topology \p topology and device \p id must match the local machine.
+ * I/O devices detection is not needed in the topology.
+ *
+ * The function only returns the locality of the device.
+ * No additional information about the device is available.
  */
 static __hwloc_inline int
 hwloc_mx_board_get_device_cpuset(hwloc_topology_t topology,
@@ -72,12 +75,16 @@ hwloc_mx_board_get_device_cpuset(hwloc_topology_t topology,
 }
 
 /** \brief Get the CPU set of logical processors that are physically
- * close to endpoint \p endpoint.
+ * close the MX endpoint \p endpoint.
+ *
+ * Return the CPU set describing the locality of the Myrinet Express
+ * board that runs the MX endpoint \p endpoint.
  *
- * For the given Myrinet Express endpoint \p endpoint, read the
- * OS-provided NUMA node and return the corresponding CPU set.
+ * Topology \p topology and device \p id must match the local machine.
+ * I/O devices detection is not needed in the topology.
  *
- * Topology \p topology must match the current machine.
+ * The function only returns the locality of the endpoint.
+ * No additional information about the endpoint or device is available.
  */
 static __hwloc_inline int
 hwloc_mx_endpoint_get_device_cpuset(hwloc_topology_t topology,
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/include/hwloc/nvml.h b/src/pm/hydra/tools/topo/hwloc/hwloc/include/hwloc/nvml.h
new file mode 100644
index 0000000..2c4127c
--- /dev/null
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/include/hwloc/nvml.h
@@ -0,0 +1,172 @@
+/*
+ * Copyright © 2012-2013 Inria.  All rights reserved.
+ * See COPYING in top-level directory.
+ */
+
+/** \file
+ * \brief Macros to help interaction between hwloc and the NVIDIA Management Library.
+ *
+ * Applications that use both hwloc and the NVIDIA Management Library may want to
+ * include this file so as to get topology information for NVML devices.
+ */
+
+#ifndef HWLOC_NVML_H
+#define HWLOC_NVML_H
+
+#include <hwloc.h>
+#include <hwloc/autogen/config.h>
+#include <hwloc/helper.h>
+#ifdef HWLOC_LINUX_SYS
+#include <hwloc/linux.h>
+#endif
+
+#include <nvml.h>
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/** \defgroup hwlocality_nvml NVIDIA Management Library Specific Functions
+ * @{
+ */
+
+/** \brief Get the CPU set of logical processors that are physically
+ * close to NVML device \p device.
+ *
+ * Return the CPU set describing the locality of the NVML device \p device.
+ *
+ * Topology \p topology and device \p device must match the local machine.
+ * I/O devices detection and the NVML component are not needed in the topology.
+ *
+ * The function only returns the locality of the device.
+ * If more information about the device is needed, OS objects should
+ * be used instead, see hwloc_nvml_get_device_osdev()
+ * and hwloc_nvml_get_device_osdev_by_index().
+ *
+ * This function is currently only implemented in a meaningful way for
+ * Linux; other systems will simply get a full cpuset.
+ */
+static __hwloc_inline int
+hwloc_nvml_get_device_cpuset(hwloc_topology_t topology __hwloc_attribute_unused,
+			     nvmlDevice_t device, hwloc_cpuset_t set)
+{
+#ifdef HWLOC_LINUX_SYS
+  /* If we're on Linux, use the sysfs mechanism to get the local cpus */
+#define HWLOC_NVML_DEVICE_SYSFS_PATH_MAX 128
+  char path[HWLOC_NVML_DEVICE_SYSFS_PATH_MAX];
+  FILE *sysfile = NULL;
+  nvmlReturn_t nvres;
+  nvmlPciInfo_t pci;
+
+  if (!hwloc_topology_is_thissystem(topology)) {
+    errno = EINVAL;
+    return -1;
+  }
+
+  nvres = nvmlDeviceGetPciInfo(device, &pci);
+  if (NVML_SUCCESS != nvres) {
+    errno = EINVAL;
+    return -1;
+  }
+
+  sprintf(path, "/sys/bus/pci/devices/%04x:%02x:%02x.0/local_cpus", pci.domain, pci.bus, pci.device);
+  sysfile = fopen(path, "r");
+  if (!sysfile)
+    return -1;
+
+  hwloc_linux_parse_cpumap_file(sysfile, set);
+  if (hwloc_bitmap_iszero(set))
+    hwloc_bitmap_copy(set, hwloc_topology_get_complete_cpuset(topology));
+
+  fclose(sysfile);
+#else
+  /* Non-Linux systems simply get a full cpuset */
+  hwloc_bitmap_copy(set, hwloc_topology_get_complete_cpuset(topology));
+#endif
+  return 0;
+}
+
+/** \brief Get the hwloc OS device object corresponding to the
+ * NVML device whose index is \p idx.
+ *
+ * Return the OS device object describing the NVML device whose
+ * index is \p idx. Returns NULL if there is none.
+ *
+ * The topology \p topology does not necessarily have to match the current
+ * machine. For instance the topology may be an XML import of a remote host.
+ * I/O devices detection and the NVML component must be enabled in the topology.
+ *
+ * \note The corresponding PCI device object can be obtained by looking
+ * at the OS device parent object.
+ */
+static __hwloc_inline hwloc_obj_t
+hwloc_nvml_get_device_osdev_by_index(hwloc_topology_t topology, unsigned idx)
+{
+	hwloc_obj_t osdev = NULL;
+	while ((osdev = hwloc_get_next_osdev(topology, osdev)) != NULL) {
+                if (HWLOC_OBJ_OSDEV_GPU == osdev->attr->osdev.type
+                    && osdev->name
+		    && !strncmp("nvml", osdev->name, 4)
+		    && atoi(osdev->name + 4) == (int) idx)
+                        return osdev;
+        }
+        return NULL;
+}
+
+/** \brief Get the hwloc OS device object corresponding to NVML device \p device.
+ *
+ * Return the hwloc OS device object that describes the given
+ * NVML device \p device. Return NULL if there is none.
+ *
+ * Topology \p topology and device \p device must match the local machine.
+ * I/O devices detection and the NVML component must be enabled in the topology.
+ * If not, the locality of the object may still be found using
+ * hwloc_nvml_get_device_cpuset().
+ *
+ * \note The corresponding hwloc PCI device may be found by looking
+ * at the result parent pointer.
+ */
+static __hwloc_inline hwloc_obj_t
+hwloc_nvml_get_device_osdev(hwloc_topology_t topology, nvmlDevice_t device)
+{
+	hwloc_obj_t osdev;
+	nvmlReturn_t nvres;
+	nvmlPciInfo_t pci;
+
+	if (!hwloc_topology_is_thissystem(topology)) {
+		errno = EINVAL;
+		return NULL;
+	}
+
+	nvres = nvmlDeviceGetPciInfo(device, &pci);
+	if (NVML_SUCCESS != nvres)
+		return NULL;
+
+	osdev = NULL;
+	while ((osdev = hwloc_get_next_osdev(topology, osdev)) != NULL) {
+		hwloc_obj_t pcidev = osdev->parent;
+		if (strncmp(osdev->name, "nvml", 4))
+			continue;
+		if (pcidev
+		    && pcidev->type == HWLOC_OBJ_PCI_DEVICE
+		    && pcidev->attr->pcidev.domain == pci.domain
+		    && pcidev->attr->pcidev.bus == pci.bus
+		    && pcidev->attr->pcidev.dev == pci.device
+		    && pcidev->attr->pcidev.func == 0)
+			return osdev;
+	}
+
+	return NULL;
+}
+
+/** @} */
+
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+
+#endif /* HWLOC_NVML_H */
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/include/hwloc/opencl.h b/src/pm/hydra/tools/topo/hwloc/hwloc/include/hwloc/opencl.h
new file mode 100644
index 0000000..72d403c
--- /dev/null
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/include/hwloc/opencl.h
@@ -0,0 +1,195 @@
+/*
+ * Copyright © 2012-2013 Inria.  All rights reserved.
+ * Copyright © 2013 Université Bordeaux 1.  All right reserved.
+ * See COPYING in top-level directory.
+ */
+
+/** \file
+ * \brief Macros to help interaction between hwloc and the OpenCL interface.
+ *
+ * Applications that use both hwloc and OpenCL may want to
+ * include this file so as to get topology information for OpenCL devices.
+ *
+ * Only the AMD OpenCL interface currently offers useful locality information
+ * about its devices.
+ */
+
+#ifndef HWLOC_OPENCL_H
+#define HWLOC_OPENCL_H
+
+#include <hwloc.h>
+#include <hwloc/autogen/config.h>
+#include <hwloc/helper.h>
+#ifdef HWLOC_LINUX_SYS
+#include <hwloc/linux.h>
+#endif
+
+#include <CL/cl.h>
+#include <CL/cl_ext.h>
+
+#include <stdio.h>
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/** \defgroup hwlocality_opencl OpenCL Specific Functions
+ * @{
+ */
+
+/** \brief Get the CPU set of logical processors that are physically
+ * close to OpenCL device \p device.
+ *
+ * Return the CPU set describing the locality of the OpenCL device \p device.
+ *
+ * Topology \p topology and device \p device must match the local machine.
+ * I/O devices detection and the OpenCL component are not needed in the topology.
+ *
+ * The function only returns the locality of the device.
+ * If more information about the device is needed, OS objects should
+ * be used instead, see hwloc_opencl_get_device_osdev()
+ * and hwloc_opencl_get_device_osdev_by_index().
+ *
+ * This function is currently only implemented in a meaningful way for
+ * Linux with the AMD OpenCL implementation; other systems will simply
+ * get a full cpuset.
+ */
+static __hwloc_inline int
+hwloc_opencl_get_device_cpuset(hwloc_topology_t topology __hwloc_attribute_unused,
+			       cl_device_id device __hwloc_attribute_unused,
+			       hwloc_cpuset_t set)
+{
+#if (defined HWLOC_LINUX_SYS) && (defined CL_DEVICE_TOPOLOGY_AMD)
+	/* If we're on Linux + AMD OpenCL, use the AMD extension + the sysfs mechanism to get the local cpus */
+#define HWLOC_OPENCL_DEVICE_SYSFS_PATH_MAX 128
+	char path[HWLOC_OPENCL_DEVICE_SYSFS_PATH_MAX];
+	FILE *sysfile = NULL;
+	cl_device_topology_amd amdtopo;
+	cl_int clret;
+
+	if (!hwloc_topology_is_thissystem(topology)) {
+		errno = EINVAL;
+		return -1;
+	}
+
+	clret = clGetDeviceInfo(device, CL_DEVICE_TOPOLOGY_AMD, sizeof(amdtopo), &amdtopo, NULL);
+	if (CL_SUCCESS != clret) {
+		hwloc_bitmap_copy(set, hwloc_topology_get_complete_cpuset(topology));
+		return 0;
+	}
+	if (CL_DEVICE_TOPOLOGY_TYPE_PCIE_AMD != amdtopo.raw.type) {
+		hwloc_bitmap_copy(set, hwloc_topology_get_complete_cpuset(topology));
+		return 0;
+	}
+
+	sprintf(path, "/sys/bus/pci/devices/0000:%02x:%02x.%01x/local_cpus", amdtopo.pcie.bus, amdtopo.pcie.device, amdtopo.pcie.function);
+	sysfile = fopen(path, "r");
+	if (!sysfile)
+		return -1;
+
+	hwloc_linux_parse_cpumap_file(sysfile, set);
+	if (hwloc_bitmap_iszero(set))
+		hwloc_bitmap_copy(set, hwloc_topology_get_complete_cpuset(topology));
+
+	fclose(sysfile);
+#else
+	/* Non-Linux + AMD OpenCL systems simply get a full cpuset */
+	hwloc_bitmap_copy(set, hwloc_topology_get_complete_cpuset(topology));
+#endif
+  return 0;
+}
+
+/** \brief Get the hwloc OS device object corresponding to the
+ * OpenCL device for the given indexes.
+ *
+ * Return the OS device object describing the OpenCL device
+ * whose platform index is \p platform_index,
+ * and whose device index within this platform if \p device_index.
+ * Return NULL if there is none.
+ *
+ * The topology \p topology does not necessarily have to match the current
+ * machine. For instance the topology may be an XML import of a remote host.
+ * I/O devices detection and the OpenCL component must be enabled in the topology.
+ *
+ * \note The corresponding PCI device object can be obtained by looking
+ * at the OS device parent object.
+ */
+static __hwloc_inline hwloc_obj_t
+hwloc_opencl_get_device_osdev_by_index(hwloc_topology_t topology,
+				       unsigned platform_index, unsigned device_index)
+{
+	unsigned x = (unsigned) -1, y = (unsigned) -1;
+	hwloc_obj_t osdev = NULL;
+	while ((osdev = hwloc_get_next_osdev(topology, osdev)) != NULL) {
+		if (HWLOC_OBJ_OSDEV_COPROC == osdev->attr->osdev.type
+                    && osdev->name
+		    && sscanf(osdev->name, "opencl%ud%u", &x, &y) == 2
+		    && platform_index == x && device_index == y)
+                        return osdev;
+        }
+        return NULL;
+}
+
+/** \brief Get the hwloc OS device object corresponding to OpenCL device \p device.
+ *
+ * Return the hwloc OS device object that describes the given
+ * OpenCL device \p device. Return NULL if there is none.
+ *
+ * Topology \p topology and device \p device must match the local machine.
+ * I/O devices detection and the OpenCL component must be enabled in the topology.
+ * If not, the locality of the object may still be found using
+ * hwloc_opencl_get_device_cpuset().
+ *
+ * \note The corresponding hwloc PCI device may be found by looking
+ * at the result parent pointer.
+ */
+static __hwloc_inline hwloc_obj_t
+hwloc_opencl_get_device_osdev(hwloc_topology_t topology __hwloc_attribute_unused,
+			      cl_device_id device __hwloc_attribute_unused)
+{
+#ifdef CL_DEVICE_TOPOLOGY_AMD
+	hwloc_obj_t osdev;
+	cl_device_topology_amd amdtopo;
+	cl_int clret;
+
+	clret = clGetDeviceInfo(device, CL_DEVICE_TOPOLOGY_AMD, sizeof(amdtopo), &amdtopo, NULL);
+	if (CL_SUCCESS != clret) {
+		errno = EINVAL;
+		return NULL;
+	}
+	if (CL_DEVICE_TOPOLOGY_TYPE_PCIE_AMD != amdtopo.raw.type) {
+		errno = EINVAL;
+		return NULL;
+	}
+
+	osdev = NULL;
+	while ((osdev = hwloc_get_next_osdev(topology, osdev)) != NULL) {
+		hwloc_obj_t pcidev = osdev->parent;
+		if (strncmp(osdev->name, "opencl", 6))
+			continue;
+		if (pcidev
+		    && pcidev->type == HWLOC_OBJ_PCI_DEVICE
+		    && pcidev->attr->pcidev.domain == 0
+		    && pcidev->attr->pcidev.bus == amdtopo.pcie.bus
+		    && pcidev->attr->pcidev.dev == amdtopo.pcie.device
+		    && pcidev->attr->pcidev.func == amdtopo.pcie.function)
+			return osdev;
+	}
+
+	return NULL;
+#else
+	return NULL;
+#endif
+}
+
+/** @} */
+
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+
+#endif /* HWLOC_OPENCL_H */
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/include/hwloc/openfabrics-verbs.h b/src/pm/hydra/tools/topo/hwloc/hwloc/include/hwloc/openfabrics-verbs.h
index 0eb6b3e..05ed756 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/include/hwloc/openfabrics-verbs.h
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/include/hwloc/openfabrics-verbs.h
@@ -1,6 +1,6 @@
 /*
  * Copyright © 2009 CNRS
- * Copyright © 2009-2012 inria.  All rights reserved.
+ * Copyright © 2009-2013 Inria.  All rights reserved.
  * Copyright © 2009-2010 Université Bordeaux 1
  * Copyright © 2009-2011 Cisco Systems, Inc.  All rights reserved.
  * See COPYING in top-level directory.
@@ -21,7 +21,9 @@
 
 #include <hwloc.h>
 #include <hwloc/autogen/config.h>
+#ifdef HWLOC_LINUX_SYS
 #include <hwloc/linux.h>
+#endif
 
 #include <infiniband/verbs.h>
 
@@ -38,12 +40,19 @@ extern "C" {
 /** \brief Get the CPU set of logical processors that are physically
  * close to device \p ibdev.
  *
- * For the given OpenFabrics device \p ibdev, read the corresponding
- * kernel-provided cpumap file and return the corresponding CPU set.
+ * Return the CPU set describing the locality of the OpenFabrics
+ * device \p ibdev.
+ *
+ * Topology \p topology and device \p ibdev must match the local machine.
+ * I/O devices detection is not needed in the topology.
+ *
+ * The function only returns the locality of the device.
+ * If more information about the device is needed, OS objects should
+ * be used instead, see hwloc_ibv_get_device_osdev()
+ * and hwloc_ibv_get_device_osdev_by_name().
+ *
  * This function is currently only implemented in a meaningful way for
  * Linux; other systems will simply get a full cpuset.
- *
- * Topology \p topology must match the current machine.
  */
 static __hwloc_inline int
 hwloc_ibv_get_device_cpuset(hwloc_topology_t topology __hwloc_attribute_unused,
@@ -82,15 +91,13 @@ hwloc_ibv_get_device_cpuset(hwloc_topology_t topology __hwloc_attribute_unused,
 /** \brief Get the hwloc OS device object corresponding to the OpenFabrics
  * device named \p ibname.
  *
- * For the OpenFabrics device whose name is \p ibname, return the hwloc OS
- * device object describing the device. Returns NULL if there is none.
- *
+ * Return the OS device object describing the OpenFabrics device whose
+ * name is \p ibname. Returns NULL if there is none.
  * The name \p ibname is usually obtained from ibv_get_device_name().
  *
- * IO devices detection must be enabled in topology \p topology.
- *
- * The topology does not necessary have to match the current machine.
- * For instance the topology may be an XML import of a remote host.
+ * The topology \p topology does not necessarily have to match the current
+ * machine. For instance the topology may be an XML import of a remote host.
+ * I/O devices detection must be enabled in the topology.
  *
  * \note The corresponding PCI device object can be obtained by looking
  * at the OS device parent object.
@@ -108,6 +115,31 @@ hwloc_ibv_get_device_osdev_by_name(hwloc_topology_t topology,
 	return NULL;
 }
 
+/** \brief Get the hwloc OS device object corresponding to the OpenFabrics
+ * device \p ibdev.
+ *
+ * Return the OS device object describing the OpenFabrics device \p ibdev.
+ * Returns NULL if there is none.
+ *
+ * Topology \p topology and device \p ibdev must match the local machine.
+ * I/O devices detection must be enabled in the topology.
+ * If not, the locality of the object may still be found using
+ * hwloc_ibv_get_device_cpuset().
+ *
+ * \note The corresponding PCI device object can be obtained by looking
+ * at the OS device parent object.
+ */
+static __hwloc_inline hwloc_obj_t
+hwloc_ibv_get_device_osdev(hwloc_topology_t topology,
+			   struct ibv_device *ibdev)
+{
+	if (!hwloc_topology_is_thissystem(topology)) {
+		errno = EINVAL;
+		return NULL;
+	}
+	return hwloc_ibv_get_device_osdev_by_name(topology, ibv_get_device_name(ibdev));
+}
+
 /** @} */
 
 
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/include/hwloc/plugins.h b/src/pm/hydra/tools/topo/hwloc/hwloc/include/hwloc/plugins.h
new file mode 100644
index 0000000..1652fa4
--- /dev/null
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/include/hwloc/plugins.h
@@ -0,0 +1,302 @@
+/*
+ * Copyright © 2013 Inria.  All rights reserved.
+ * See COPYING in top-level directory.
+ */
+
+#ifndef HWLOC_PLUGINS_H
+#define HWLOC_PLUGINS_H
+
+/** \file
+ * \brief Public interface for building hwloc plugins.
+ */
+
+struct hwloc_backend;
+
+#include <hwloc.h>
+
+
+
+
+/** \defgroup hwlocality_disc_components Discovery components
+ * @{
+ */
+
+/** \brief Discovery component type */
+typedef enum hwloc_disc_component_type_e {
+  /** \brief CPU-only discovery through the OS, or generic no-OS support.
+   * \hideinitializer */
+  HWLOC_DISC_COMPONENT_TYPE_CPU = (1<<0),
+
+  /** \brief xml, synthetic or custom,
+   * platform-specific components such as bgq.
+   * Anything the discovers CPU and everything else.
+   * No misc backend is expected to complement a global component.
+   * \hideinitializer */
+  HWLOC_DISC_COMPONENT_TYPE_GLOBAL = (1<<1),
+
+  /** \brief PCI, etc.
+   * \hideinitializer */
+  HWLOC_DISC_COMPONENT_TYPE_MISC = (1<<2)
+} hwloc_disc_component_type_t;
+
+/** \brief Discovery component structure
+ *
+ * This is the major kind of components, taking care of the discovery.
+ * They are registered by generic components, either statically-built or as plugins.
+ */
+struct hwloc_disc_component {
+  /** \brief Discovery component type */
+  hwloc_disc_component_type_t type;
+
+  /** \brief Name.
+   * If this component is built as a plugin, this name does not have to match the plugin filename.
+   */
+  const char *name;
+
+  /** \brief Component types to exclude, as an OR'ed set of HWLOC_DISC_COMPONENT_TYPE_*.
+   *
+   * For a GLOBAL component, this usually includes all other types (~0).
+   *
+   * Other components only exclude types that may bring conflicting
+   * topology information. MISC components should likely not be excluded
+   * since they usually bring non-primary additional information.
+   */
+  unsigned excludes;
+
+  /** \brief Instantiate callback to create a backend from the component.
+   * Parameters data1, data2, data3 are NULL except for components
+   * that have special enabling routines such as hwloc_topology_set_xml(). */
+  struct hwloc_backend * (*instantiate)(struct hwloc_disc_component *component, const void *data1, const void *data2, const void *data3);
+
+  /** \brief Component priority.
+   * Used to sort topology->components, higher priority first.
+   * Also used to decide between two components with the same name.
+   *
+   * Usual values are
+   * 50 for native OS (or platform) components,
+   * 45 for x86,
+   * 40 for no-OS fallback,
+   * 30 for global components (xml/synthetic/custom),
+   * 20 for pci,
+   * 10 for other misc components (opencl etc.).
+   */
+  unsigned priority;
+
+  /** \private Used internally to list components by priority on topology->components
+   * (the component structure is usually read-only,
+   *  the core copies it before using this field for queueing)
+   */
+  struct hwloc_disc_component * next;
+};
+
+/** @} */
+
+
+
+
+/** \defgroup hwlocality_disc_backends Discovery backends
+ * @{
+ */
+
+/** \brief Discovery backend structure
+ *
+ * A backend is the instantiation of a discovery component.
+ * When a component gets enabled for a topology,
+ * its instantiate() callback creates a backend.
+ *
+ * hwloc_backend_alloc() initializes all fields to default values
+ * that the component may change (except "component" and "next")
+ * before enabling the backend with hwloc_backend_enable().
+ */
+struct hwloc_backend {
+  /** \private Reserved for the core, set by hwloc_backend_alloc() */
+  struct hwloc_disc_component * component;
+  /** \private Reserved for the core, set by hwloc_backend_enable() */
+  struct hwloc_topology * topology;
+  /** \private Reserved for the core. Set to 1 if forced through envvar, 0 otherwise. */
+  int envvar_forced;
+  /** \private Reserved for the core. Used internally to list backends topology->backends. */
+  struct hwloc_backend * next;
+
+  /** \brief Backend flags, as an OR'ed set of HWLOC_BACKEND_FLAG_* */
+  unsigned long flags;
+
+  /** \brief Backend-specific 'is_custom' property.
+   * Shortcut on !strcmp(..->component->name, "custom").
+   * Only the custom component should touch this. */
+  int is_custom;
+
+  /** \brief Backend-specific 'is_thissystem' property.
+   * Set to 0 or 1 if the backend should enforce the thissystem flag when it gets enabled.
+   * Set to -1 if the backend doesn't care (default). */
+  int is_thissystem;
+
+  /** \brief Backend private data, or NULL if none. */
+  void * private_data;
+  /** \brief Callback for freeing the private_data.
+   * May be NULL.
+   */
+  void (*disable)(struct hwloc_backend *backend);
+
+  /** \brief Main discovery callback.
+   * returns > 0 if it modified the topology tree, -1 on error, 0 otherwise.
+   * May be NULL if type is HWLOC_DISC_COMPONENT_TYPE_MISC. */
+  int (*discover)(struct hwloc_backend *backend);
+
+  /** \brief Callback used by the PCI backend to retrieve the locality of a PCI object from the OS/cpu backend.
+   * May be NULL. */
+  int (*get_obj_cpuset)(struct hwloc_backend *backend, struct hwloc_backend *caller, struct hwloc_obj *obj, hwloc_bitmap_t cpuset);
+
+  /** \brief Callback called by backends to notify this backend that a new object was added.
+   * returns > 0 if it modified the topology tree, 0 otherwise.
+   * May be NULL. */
+  int (*notify_new_object)(struct hwloc_backend *backend, struct hwloc_backend *caller, struct hwloc_obj *obj);
+};
+
+/** \brief Backend flags */
+enum hwloc_backend_flag_e {
+  /** \brief Levels should be reconnected before this backend discover() is used.
+   * \hideinitializer */
+  HWLOC_BACKEND_FLAG_NEED_LEVELS = (1UL<<0)
+};
+
+/** \brief Allocate a backend structure, set good default values, initialize backend->component and topology, etc.
+ * The caller will then modify whatever needed, and call hwloc_backend_enable().
+ */
+HWLOC_DECLSPEC struct hwloc_backend * hwloc_backend_alloc(struct hwloc_disc_component *component);
+
+/** \brief Enable a previously allocated and setup backend. */
+HWLOC_DECLSPEC int hwloc_backend_enable(struct hwloc_topology *topology, struct hwloc_backend *backend);
+
+/** \brief Used by backends discovery callbacks to request locality information from others.
+ *
+ * Traverse the list of enabled backends until one has a
+ * get_obj_cpuset() method, and call it.
+ */
+HWLOC_DECLSPEC int hwloc_backends_get_obj_cpuset(struct hwloc_backend *caller, struct hwloc_obj *obj, hwloc_bitmap_t cpuset);
+
+/** \brief Used by backends discovery callbacks to notify other
+ * backends of new objects.
+ *
+ * Traverse the list of enabled backends (all but caller) and invoke
+ * their notify_new_object() method to notify them that a new object
+ * just got added to the topology.
+ *
+ * Currently only used for notifying of new PCI device objects.
+ */
+HWLOC_DECLSPEC int hwloc_backends_notify_new_object(struct hwloc_backend *caller, struct hwloc_obj *obj);
+
+/** @} */
+
+
+
+
+/** \defgroup hwlocality_generic_components Generic components
+ * @{
+ */
+
+/** \brief Generic component type */
+typedef enum hwloc_component_type_e {
+  /** \brief The data field must point to a struct hwloc_disc_component. */
+  HWLOC_COMPONENT_TYPE_DISC,
+
+  /** \brief The data field must point to a struct hwloc_xml_component. */
+  HWLOC_COMPONENT_TYPE_XML
+} hwloc_component_type_t;
+
+/** \brief Generic component structure
+ *
+ * Generic components structure, either statically listed by configure in static-components.h
+ * or dynamically loaded as a plugin.
+ */
+struct hwloc_component {
+  /** \brief Component ABI version, set to HWLOC_COMPONENT_ABI */
+  unsigned abi;
+
+  /** \brief Component type */
+  hwloc_component_type_t type;
+
+  /** \brief Component flags, unused for now */
+  unsigned long flags;
+
+  /** \brief Component data, pointing to a struct hwloc_disc_component or struct hwloc_xml_component. */
+  void * data;
+};
+
+/** @} */
+
+
+
+
+/** \defgroup hwlocality_components_core_funcs Core functions to be used by components
+ * @{
+ */
+
+/** \brief Add an object to the topology.
+ *
+ * It is sorted along the tree of other objects according to the inclusion of
+ * cpusets, to eventually be added as a child of the smallest object including
+ * this object.
+ *
+ * If the cpuset is empty, the type of the object (and maybe some attributes)
+ * must be enough to find where to insert the object. This is especially true
+ * for NUMA nodes with memory and no CPUs.
+ *
+ * The given object should not have children.
+ *
+ * This shall only be called before levels are built.
+ *
+ * In case of error, hwloc_report_os_error() is called.
+ *
+ * Returns the object on success.
+ * Returns NULL and frees obj on error.
+ * Returns another object and frees obj if it was merged with an identical pre-existing object.
+ */
+HWLOC_DECLSPEC struct hwloc_obj *hwloc_insert_object_by_cpuset(struct hwloc_topology *topology, hwloc_obj_t obj);
+
+/** \brief Type of error callbacks during object insertion */
+typedef void (*hwloc_report_error_t)(const char * msg, int line);
+/** \brief Report an insertion error from a backend */
+HWLOC_DECLSPEC void hwloc_report_os_error(const char * msg, int line);
+/** \brief Check whether insertion errors are hidden */
+HWLOC_DECLSPEC int hwloc_hide_errors(void);
+
+/** \brief Add an object to the topology and specify which error callback to use.
+ *
+ * Aside from the error callback selection, this function is identical to hwloc_insert_object_by_cpuset()
+ */
+HWLOC_DECLSPEC struct hwloc_obj *hwloc__insert_object_by_cpuset(struct hwloc_topology *topology, hwloc_obj_t obj, hwloc_report_error_t report_error);
+
+/** \brief Insert an object somewhere in the topology.
+ *
+ * It is added as the last child of the given parent.
+ * The cpuset is completely ignored, so strange objects such as I/O devices should
+ * preferably be inserted with this.
+ *
+ * The given object may have children.
+ *
+ * Remember to call topology_connect() afterwards to fix handy pointers.
+ */
+HWLOC_DECLSPEC void hwloc_insert_object_by_parent(struct hwloc_topology *topology, hwloc_obj_t parent, hwloc_obj_t obj);
+
+/** \brief Allocate and initialize an object of the given type and physical index */
+static __hwloc_inline struct hwloc_obj *
+hwloc_alloc_setup_object(hwloc_obj_type_t type, signed os_index)
+{
+  struct hwloc_obj *obj = malloc(sizeof(*obj));
+  memset(obj, 0, sizeof(*obj));
+  obj->type = type;
+  obj->os_index = os_index;
+  obj->os_level = -1;
+  obj->attr = malloc(sizeof(*obj->attr));
+  memset(obj->attr, 0, sizeof(*obj->attr));
+  /* do not allocate the cpuset here, let the caller do it */
+  return obj;
+}
+
+/** @} */
+
+
+
+
+#endif /* HWLOC_PLUGINS_H */
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/include/hwloc/rename.h b/src/pm/hydra/tools/topo/hwloc/hwloc/include/hwloc/rename.h
index 7d6e20b..e959b0f 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/include/hwloc/rename.h
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/include/hwloc/rename.h
@@ -1,6 +1,6 @@
 /*
  * Copyright © 2009-2011 Cisco Systems, Inc.  All rights reserved.
- * Copyright © 2010-2012 Inria.  All rights reserved.
+ * Copyright © 2010-2013 Inria.  All rights reserved.
  * See COPYING in top-level directory.
  */
 
@@ -80,6 +80,7 @@ extern "C" {
 #define HWLOC_OBJ_OSDEV_NETWORK HWLOC_NAME_CAPS(OBJ_OSDEV_NETWORK)
 #define HWLOC_OBJ_OSDEV_OPENFABRICS HWLOC_NAME_CAPS(OBJ_OSDEV_OPENFABRICS)
 #define HWLOC_OBJ_OSDEV_DMA HWLOC_NAME_CAPS(OBJ_OSDEV_DMA)
+#define HWLOC_OBJ_OSDEV_COPROC HWLOC_NAME_CAPS(OBJ_OSDEV_COPROC)
 
 #define hwloc_compare_types HWLOC_NAME(compare_types)
 
@@ -168,6 +169,7 @@ extern "C" {
 #define hwloc_get_nbobjs_by_type HWLOC_NAME(get_nbobjs_by_type)
 
 #define hwloc_topology_is_thissystem HWLOC_NAME(topology_is_thissystem)
+#define hwloc_topology_get_flags HWLOC_NAME(topology_get_flags)
 
 #define hwloc_get_obj_by_depth HWLOC_NAME(get_obj_by_depth )
 #define hwloc_get_obj_by_type HWLOC_NAME(get_obj_by_type )
@@ -373,6 +375,7 @@ extern "C" {
 /* openfabrics-verbs.h */
 
 #define hwloc_ibv_get_device_cpuset HWLOC_NAME(ibv_get_device_cpuset)
+#define hwloc_ibv_get_device_osdev HWLOC_NAME(ibv_get_device_osdev)
 #define hwloc_ibv_get_device_osdev_by_name HWLOC_NAME(ibv_get_device_osdev_by_name)
 
 /* myriexpress.h */
@@ -380,17 +383,75 @@ extern "C" {
 #define hwloc_mx_board_get_device_cpuset HWLOC_NAME(mx_board_get_device_cpuset)
 #define hwloc_mx_endpoint_get_device_cpuset HWLOC_NAME(mx_endpoint_get_device_cpuset)
 
+/* intel-mic.h */
+
+#define hwloc_intel_mic_get_device_cpuset HWLOC_NAME(intel_mic_get_device_cpuset)
+#define hwloc_intel_mic_get_device_osdev_by_index HWLOC_NAME(intel_mic_get_device_osdev_by_index)
+
+/* opencl.h */
+
+#define hwloc_opencl_get_device_cpuset HWLOC_NAME(opencl_get_device_cpuset)
+#define hwloc_opencl_get_device_osdev HWLOC_NAME(opencl_get_device_osdev)
+#define hwloc_opencl_get_device_osdev_by_index HWLOC_NAME(opencl_get_device_osdev_by_index)
+
 /* cuda.h */
 
 #define hwloc_cuda_get_device_pci_ids HWLOC_NAME(cuda_get_device_pci_ids)
 #define hwloc_cuda_get_device_cpuset HWLOC_NAME(cuda_get_device_cpuset)
 #define hwloc_cuda_get_device_pcidev HWLOC_NAME(cuda_get_device_pcidev)
+#define hwloc_cuda_get_device_osdev HWLOC_NAME(cuda_get_device_osdev)
+#define hwloc_cuda_get_device_osdev_by_index HWLOC_NAME(cuda_get_device_osdev_by_index)
 
 /* cudart.h */
 
 #define hwloc_cudart_get_device_pci_ids HWLOC_NAME(cudart_get_device_pci_ids)
 #define hwloc_cudart_get_device_cpuset HWLOC_NAME(cudart_get_device_cpuset)
 #define hwloc_cudart_get_device_pcidev HWLOC_NAME(cudart_get_device_pcidev)
+#define hwloc_cudart_get_device_osdev_by_index HWLOC_NAME(cudart_get_device_osdev_by_index)
+
+/* nvml.h */
+
+#define hwloc_nvml_get_device_cpuset HWLOC_NAME(nvml_get_device_cpuset)
+#define hwloc_nvml_get_device_osdev HWLOC_NAME(nvml_get_device_osdev)
+#define hwloc_nvml_get_device_osdev_by_index HWLOC_NAME(nvml_get_device_osdev_by_index)
+
+/* gl.h */
+
+#define hwloc_gl_get_display_osdev_by_port_device HWLOC_NAME(gl_get_display_osdev_by_port_device)
+#define hwloc_gl_get_display_osdev_by_name HWLOC_NAME(gl_get_display_osdev_by_name)
+#define hwloc_gl_get_display_by_osdev HWLOC_NAME(gl_get_display_by_osdev)
+
+/* hwloc/plugins.h */
+
+#define hwloc_disc_component_type_e HWLOC_NAME(disc_component_type_e)
+#define HWLOC_DISC_COMPONENT_TYPE_CPU HWLOC_NAME_CAPS(DISC_COMPONENT_TYPE_CPU)
+#define HWLOC_DISC_COMPONENT_TYPE_GLOBAL HWLOC_NAME_CAPS(DISC_COMPONENT_TYPE_GLOBAL)
+#define HWLOC_DISC_COMPONENT_TYPE_MISC HWLOC_NAME_CAPS(DISC_COMPONENT_TYPE_MISC)
+#define hwloc_disc_component_type_t HWLOC_NAME(disc_component_type_t)
+#define hwloc_disc_component HWLOC_NAME(disc_component)
+
+#define hwloc_backend HWLOC_NAME(backend)
+#define hwloc_backend_flag_e HWLOC_NAME(backend_flag_e)
+#define HWLOC_BACKEND_FLAG_NEED_LEVELS HWLOC_NAME_CAPS(BACKEND_FLAG_NEED_LEVELS)
+
+#define hwloc_backend_alloc HWLOC_NAME(backend_alloc)
+#define hwloc_backend_enable HWLOC_NAME(backend_enable)
+#define hwloc_backends_get_obj_cpuset HWLOC_NAME(backends_get_obj_cpuset)
+#define hwloc_backends_notify_new_object HWLOC_NAME(backends_notify_new_object)
+
+#define hwloc_component_type_e HWLOC_NAME(component_type_e)
+#define HWLOC_COMPONENT_TYPE_DISC HWLOC_NAME_CAPS(COMPONENT_TYPE_DISC)
+#define HWLOC_COMPONENT_TYPE_XML HWLOC_NAME_CAPS(COMPONENT_TYPE_XML)
+#define hwloc_component_type_t HWLOC_NAME(component_type_t)
+#define hwloc_component HWLOC_NAME(component)
+
+#define hwloc_insert_object_by_cpuset HWLOC_NAME(insert_object_by_cpuset)
+#define hwloc_report_error_t HWLOC_NAME(report_error_t)
+#define hwloc_report_os_error HWLOC_NAME(report_os_error)
+#define hwloc_hide_errors HWLOC_NAME(hide_errors)
+#define hwloc__insert_object_by_cpuset HWLOC_NAME(_insert_object_by_cpuset)
+#define hwloc_insert_object_by_parent HWLOC_NAME(insert_object_by_parent)
+#define hwloc_alloc_setup_object HWLOC_NAME(alloc_setup_object)
 
 /* private/debug.h */
 
@@ -429,60 +490,16 @@ extern "C" {
 
 /* private/components.h */
 
-#define HWLOC_DISC_COMPONENT_TYPE_CPU HWLOC_NAME_CAPS(DISC_COMPONENT_TYPE_CPU)
-#define HWLOC_DISC_COMPONENT_TYPE_GLOBAL HWLOC_NAME_CAPS(DISC_COMPONENT_TYPE_GLOBAL)
-#define HWLOC_DISC_COMPONENT_TYPE_ADDITIONAL HWLOC_NAME_CAPS(DISC_COMPONENT_TYPE_ADDITIONAL)
-#define HWLOC_DISC_COMPONENT_TYPE_MAX HWLOC_NAME_CAPS(DISC_COMPONENT_TYPE_MAX)
-
-#define hwloc_disc_component_type_e HWLOC_NAME(disc_component_type_e)
-#define hwloc_disc_component_type_t HWLOC_NAME(disc_component_type_t)
-#define hwloc_disc_component HWLOC_NAME(disc_component)
-
 #define hwloc_disc_component_force_enable HWLOC_NAME(disc_component_force_enable)
 #define hwloc_disc_components_enable_others HWLOC_NAME(disc_components_instantiate_others)
 
-#define hwloc_backend HWLOC_NAME(backend)
-#define hwloc_backend_alloc HWLOC_NAME(backend_alloc)
-#define hwloc_backend_enable HWLOC_NAME(backend_enable)
 #define hwloc_backends_reset HWLOC_NAME(backends_reset)
 #define hwloc_backends_disable_all HWLOC_NAME(backends_disable_all)
 #define hwloc_backends_is_thissystem HWLOC_NAME(backends_is_thissystem)
-#define hwloc_backends_get_obj_cpuset HWLOC_NAME(backends_get_obj_cpuset)
-#define hwloc_backends_notify_new_object HWLOC_NAME(backends_notify_new_object)
-
-#define hwloc_backend_flag_e HWLOC_NAME(backend_flag_e)
-#define HWLOC_BACKEND_FLAG_NEED_LEVELS HWLOC_NAME_CAPS(BACKEND_FLAG_NEED_LEVELS)
 
 #define hwloc_components_init HWLOC_NAME(components_init)
 #define hwloc_components_destroy_all HWLOC_NAME(components_destroy_all)
 
-#define HWLOC_COMPONENT_TYPE_DISC HWLOC_NAME_CAPS(COMPONENT_TYPE_DISC)
-#define HWLOC_COMPONENT_TYPE_XML HWLOC_NAME_CAPS(COMPONENT_TYPE_XML)
-#define HWLOC_COMPONENT_TYPE_MAX HWLOC_NAME_CAPS(COMPONENT_TYPE_MAX)
-
-#define hwloc_component_type_e HWLOC_NAME(component_type_e)
-#define hwloc_component_type_t HWLOC_NAME(component_type_t)
-
-#define hwloc_component HWLOC_NAME(component)
-
-#define hwloc_linux_component HWLOC_NAME(linux_component)
-#define hwloc_xml_component HWLOC_NAME(xml_component)
-#define hwloc_solaris_component HWLOC_NAME(solaris_component)
-#define hwloc_aix_component HWLOC_NAME(aix_component)
-#define hwloc_osf_component HWLOC_NAME(osf_component)
-#define hwloc_windows_component HWLOC_NAME(windows_component)
-#define hwloc_darwin_component HWLOC_NAME(darwin_component)
-#define hwloc_freebsd_component HWLOC_NAME(freebsd_component)
-#define hwloc_hpux_component HWLOC_NAME(hpux_component)
-#define hwloc_synthetic_component HWLOC_NAME(synthetic_component)
-#define hwloc_custom_component HWLOC_NAME(custom_component)
-#define hwloc_x86_component HWLOC_NAME(x86_component)
-#define hwloc_noos_component HWLOC_NAME(noos_component)
-#define hwloc_libpci_component HWLOC_NAME(libpci_component)
-
-#define hwloc_xml_nolibxml_component HWLOC_NAME(xml_nolibxml_component)
-#define hwloc_xml_libxml_component HWLOC_NAME(xml_libxml_component)
-
 /* private/private.h */
 
 #define hwloc_ignore_type_e HWLOC_NAME(ignore_type_e)
@@ -519,15 +536,7 @@ extern "C" {
 #define hwloc_set_freebsd_hooks HWLOC_NAME(set_freebsd_hooks)
 #define hwloc_set_hpux_hooks HWLOC_NAME(set_hpux_hooks)
 
-#define hwloc_insert_object_by_cpuset HWLOC_NAME(insert_object_by_cpuset)
-#define hwloc_report_error_t HWLOC_NAME(report_error_t)
-#define hwloc_report_os_error HWLOC_NAME(report_os_error)
-#define hwloc_hide_errors HWLOC_NAME(hide_errors)
-#define hwloc__insert_object_by_cpuset HWLOC_NAME(_insert_object_by_cpuset)
-#define hwloc_insert_object_by_parent HWLOC_NAME(insert_object_by_parent)
 #define hwloc_add_uname_info HWLOC_NAME(add_uname_info)
-#define hwloc_bitmap_printf_value HWLOC_NAME(bitmap_printf_value)
-#define hwloc_alloc_setup_object HWLOC_NAME(alloc_setup_object)
 #define hwloc_free_unlinked_object HWLOC_NAME(free_unlinked_object)
 #define hwloc__duplicate_objects HWLOC_NAME(_duplicate_objects)
 
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/include/private/components.h b/src/pm/hydra/tools/topo/hwloc/hwloc/include/private/components.h
index 61cc602..56dfa99 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/include/private/components.h
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/include/private/components.h
@@ -3,47 +3,22 @@
  * See COPYING in top-level directory.
  */
 
-#ifndef PRIVATE_COMPONENTS_H
-#define PRIVATE_COMPONENTS_H 1
-
-struct hwloc_backend;
-
-/************************
- * Discovery components *
- ************************/
 
-/* Discovery components taking care of the discovery.
- * They are registered by generic components, either static or plugins.
+#ifdef HWLOC_INSIDE_PLUGIN
+/*
+ * these declarations are internal only, they are not available to plugins
+ * (many functions below are internal static symbols).
  */
+#error This file should not be used in plugins
+#endif
 
-typedef enum hwloc_disc_component_type_e {
-  HWLOC_DISC_COMPONENT_TYPE_CPU = (1<<0), /* CPU-only discovery through the OS, or generic no-OS support.
-					   */
-  HWLOC_DISC_COMPONENT_TYPE_GLOBAL = (1<<1), /* xml, synthetic or custom.
-					      * no additional backend is used.
-					      */
-  HWLOC_DISC_COMPONENT_TYPE_ADDITIONAL = (1<<2), /* pci, etc.
-						  */
-  /* This value is only here so that we can end the enum list without
-     a comma (thereby preventing compiler warnings) */
-  HWLOC_DISC_COMPONENT_TYPE_MAX
-} hwloc_disc_component_type_t;
 
-struct hwloc_disc_component {
-  hwloc_disc_component_type_t type;
-  const char *name;
-  unsigned excludes; /* ORed set of (1<<HWLOC_DISC_COMPONENT_TYPE_*) */
-  struct hwloc_backend * (*instantiate)(struct hwloc_disc_component *component, const void *data1, const void *data2, const void *data3);
+#ifndef PRIVATE_COMPONENTS_H
+#define PRIVATE_COMPONENTS_H 1
+
+#include <hwloc/plugins.h>
 
-  unsigned priority; /* used to sort topology->components, higher priority first.
-		      * 50 for native OS components,
-		      * 45 for x86,
-		      * 40 for no-OS fallback,
-		      * 30 for global components (xml/synthetic/custom),
-		      * 20 for libpci, likely less for other additional components.
-		      */
-  struct hwloc_disc_component * next; /* used internally to list components by priority on topology->components */
-};
+struct hwloc_topology;
 
 extern int hwloc_disc_component_force_enable(struct hwloc_topology *topology,
 					     int envvar_forced, /* 1 if forced through envvar, 0 if forced through API */
@@ -51,160 +26,17 @@ extern int hwloc_disc_component_force_enable(struct hwloc_topology *topology,
 					     const void *data1, const void *data2, const void *data3);
 extern void hwloc_disc_components_enable_others(struct hwloc_topology *topology);
 
-/************
- * Backends *
- ************/
-
-/* A backend is the instantiation of a discovery component.
- * When a component gets enabled for a topology,
- * its instantiate() callback creates a backend.
- *
- * hwloc_backend_alloc() initializes all fields to default values
- * that the component may change (except "component" and "next")
- * before enabling the backend with hwloc_backend_enable().
- */
-
-struct hwloc_backend {
-  struct hwloc_disc_component * component; /* Reserved for the core, set by hwloc_backend_alloc() */
-  struct hwloc_topology * topology; /* Reserved for the core, set by hwloc_backend_enable() */
-
-  unsigned long flags; /* OR'ed set of HWLOC_BACKEND_FLAG_* */
-
-  /* main discovery callback.
-   * returns > 0 if it modified the topology tree, -1 on error, 0 otherwise.
-   * maybe NULL if type is HWLOC_DISC_COMPONENT_TYPE_ADDITIONAL. */
-  int (*discover)(struct hwloc_backend *backend);
-
-  /* used by the libpci backend to retrieve pci device locality from the OS/cpu backend */
-  int (*get_obj_cpuset)(struct hwloc_backend *backend, struct hwloc_backend *caller, struct hwloc_obj *obj, hwloc_bitmap_t cpuset); /* may be NULL */
-
-  /* used by additional backends to notify other backend when new objects are added.
-   * returns > 0 if it modified the topology tree, 0 otherwise. */
-  int (*notify_new_object)(struct hwloc_backend *backend, struct hwloc_backend *caller, struct hwloc_obj *obj); /* may be NULL */
-
-  void (*disable)(struct hwloc_backend *backend); /* may be NULL */
-  void * private_data;
-  int is_custom; /* shortcut on !strcmp(..->component->name, "custom") */
-  int is_thissystem; /* -1 if doesn't matter, 0 or 1 if should enforce thissystem when enabling */
-
-  int envvar_forced; /* 1 if forced through envvar, 0 otherwise */
-
-  struct hwloc_backend * next; /* Used internally to list backends topology->backends.
-				* Reserved for the core.
-				*/
-};
-
-enum hwloc_backend_flag_e {
-  HWLOC_BACKEND_FLAG_NEED_LEVELS = (1<<0) /* Levels should be reconnected before this backend discover() is used */
-};
-
-/* Allocate a backend structure, set good default values, initialize backend->component.
- * The caller will then modify whatever needed, and call hwloc_backend_enable().
- */
-HWLOC_DECLSPEC struct hwloc_backend * hwloc_backend_alloc(struct hwloc_disc_component *component);
-
-/* Enable a previously allocated and setup backend. */
-HWLOC_DECLSPEC int hwloc_backend_enable(struct hwloc_topology *topology, struct hwloc_backend *backend);
-
 /* Compute the topology is_thissystem flag based on enabled backends */
-HWLOC_DECLSPEC void hwloc_backends_is_thissystem(struct hwloc_topology *topology);
-
-/* Used by backends discovery callbacks to request information from others.
- */
-HWLOC_DECLSPEC int hwloc_backends_get_obj_cpuset(struct hwloc_backend *caller, struct hwloc_obj *obj, hwloc_bitmap_t cpuset);
-
-/* Used by backends discovery callbacks to notify other backends (all but caller)
- * that they are adding a new object.
- */
-HWLOC_DECLSPEC int hwloc_backends_notify_new_object(struct hwloc_backend *caller, struct hwloc_obj *obj);
+extern void hwloc_backends_is_thissystem(struct hwloc_topology *topology);
 
 /* Reset the list of currently enabled backend */
 extern void hwloc_backends_reset(struct hwloc_topology *topology);
 /* Disable and destroy all backends used by a topology */
 extern void hwloc_backends_disable_all(struct hwloc_topology *topology);
 
-/**********************
- * Generic components *
- **********************/
-
-/* Generic components structure, either static listed by configure in static-components.h
- * or dynamically loaded as a plugin.
- */
-
 /* Used by the core to setup/destroy the list of components */
 extern void hwloc_components_init(struct hwloc_topology *topology); /* increases components refcount, should be called exactly once per topology (during init) */
 extern void hwloc_components_destroy_all(struct hwloc_topology *topology); /* decreases components refcount, should be called exactly once per topology (during destroy) */
 
-#define HWLOC_COMPONENT_ABI 1
-
-typedef enum hwloc_component_type_e {
-  HWLOC_COMPONENT_TYPE_DISC,	/* The data field must point to a struct hwloc_disc_component. */
-  HWLOC_COMPONENT_TYPE_XML,	/* The data field must point to a struct hwloc_xml_component. */
-  HWLOC_COMPONENT_TYPE_MAX
-} hwloc_component_type_t;
-
-struct hwloc_component {
-  unsigned abi;
-  hwloc_component_type_t type;
-  unsigned long flags; /* unused for now */
-  void * data;
-};
-
-/****************************************
- * Misc component registration routines *
- ****************************************/
-
-#if defined(HWLOC_LINUX_SYS)
-HWLOC_DECLSPEC extern const struct hwloc_component hwloc_linux_component;
-#endif /* HWLOC_LINUX_SYS */
-
-HWLOC_DECLSPEC extern const struct hwloc_component hwloc_xml_component;
-
-#ifdef HWLOC_SOLARIS_SYS
-HWLOC_DECLSPEC extern const struct hwloc_component hwloc_solaris_component;
-#endif /* HWLOC_SOLARIS_SYS */
-
-#ifdef HWLOC_AIX_SYS
-HWLOC_DECLSPEC extern const struct hwloc_component hwloc_aix_component;
-#endif /* HWLOC_AIX_SYS */
-
-#ifdef HWLOC_OSF_SYS
-HWLOC_DECLSPEC extern const struct hwloc_component hwloc_osf_component;
-#endif /* HWLOC_OSF_SYS */
-
-#ifdef HWLOC_WIN_SYS
-HWLOC_DECLSPEC extern const struct hwloc_component hwloc_windows_component;
-#endif /* HWLOC_WIN_SYS */
-
-#ifdef HWLOC_DARWIN_SYS
-HWLOC_DECLSPEC extern const struct hwloc_component hwloc_darwin_component;
-#endif /* HWLOC_DARWIN_SYS */
-
-#ifdef HWLOC_FREEBSD_SYS
-HWLOC_DECLSPEC extern const struct hwloc_component hwloc_freebsd_component;
-#endif /* HWLOC_FREEBSD_SYS */
-
-#ifdef HWLOC_HPUX_SYS
-HWLOC_DECLSPEC extern const struct hwloc_component hwloc_hpux_component;
-#endif /* HWLOC_HPUX_SYS */
-
-#if (defined HWLOC_HAVE_LIBPCI) || (defined HWLOC_HAVE_LIBPCIACCESS)
-HWLOC_DECLSPEC extern const struct hwloc_component hwloc_libpci_component;
-#endif /* HWLOC_HAVE_LIBPCI || HWLOC_HAVE_LIBPCIACCESS */
-
-HWLOC_DECLSPEC extern const struct hwloc_component hwloc_synthetic_component;
-
-HWLOC_DECLSPEC extern const struct hwloc_component hwloc_x86_component;
-
-HWLOC_DECLSPEC extern const struct hwloc_component hwloc_noos_component;
-
-HWLOC_DECLSPEC extern const struct hwloc_component hwloc_custom_component;
-
-
-HWLOC_DECLSPEC extern const struct hwloc_component hwloc_xml_nolibxml_component;
-#ifdef HWLOC_HAVE_LIBXML2
-HWLOC_DECLSPEC extern const struct hwloc_component hwloc_xml_libxml_component;
-#endif
-
 #endif /* PRIVATE_COMPONENTS_H */
 
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/include/private/debug.h b/src/pm/hydra/tools/topo/hwloc/hwloc/include/private/debug.h
index f98c902..b327bf2 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/include/private/debug.h
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/include/private/debug.h
@@ -1,6 +1,6 @@
 /*
  * Copyright © 2009 CNRS
- * Copyright © 2009-2010 inria.  All rights reserved.
+ * Copyright © 2009-2012 Inria.  All rights reserved.
  * Copyright © 2009, 2011 Université Bordeaux 1
  * Copyright © 2011 Cisco Systems, Inc.  All rights reserved.
  * See COPYING in top-level directory.
@@ -31,17 +31,20 @@ static __hwloc_inline void hwloc_debug(const char *s __hwloc_attribute_unused, .
 
 #ifdef HWLOC_DEBUG
 #define hwloc_debug_bitmap(fmt, bitmap) do { \
-  char *s= hwloc_bitmap_printf_value(bitmap); \
+  char *s; \
+  hwloc_bitmap_asprintf(&s, bitmap); \
   fprintf(stderr, fmt, s); \
   free(s); \
 } while (0)
 #define hwloc_debug_1arg_bitmap(fmt, arg1, bitmap) do { \
-  char *s= hwloc_bitmap_printf_value(bitmap); \
+  char *s; \
+  hwloc_bitmap_asprintf(&s, bitmap); \
   fprintf(stderr, fmt, arg1, s); \
   free(s); \
 } while (0)
 #define hwloc_debug_2args_bitmap(fmt, arg1, arg2, bitmap) do { \
-  char *s= hwloc_bitmap_printf_value(bitmap); \
+  char *s; \
+  hwloc_bitmap_asprintf(&s, bitmap); \
   fprintf(stderr, fmt, arg1, arg2, s); \
   free(s); \
 } while (0)
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/include/private/misc.h b/src/pm/hydra/tools/topo/hwloc/hwloc/include/private/misc.h
index 2bc62ce..f2d475e 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/include/private/misc.h
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/include/private/misc.h
@@ -6,30 +6,17 @@
  * See COPYING in top-level directory.
  */
 
-/* Misc internals routines.  */
+/* Misc macros and inlines.  */
 
 #ifndef HWLOC_PRIVATE_MISC_H
 #define HWLOC_PRIVATE_MISC_H
 
 #include <hwloc/autogen/config.h>
 #include <private/autogen/config.h>
-#include <private/private.h>
-
-
-/* On some systems, snprintf returns the size of written data, not the actually
- * required size.  hwloc_snprintf always report the actually required size. */
-int hwloc_snprintf(char *str, size_t size, const char *format, ...) __hwloc_attribute_format(printf, 3, 4);
-
-/* Check whether needle matches the beginning of haystack, at least n, and up
- * to a colon or \0 */
-HWLOC_DECLSPEC
-int hwloc_namecoloncmp(const char *haystack, const char *needle, size_t n);
 
 /* Compile-time assertion */
 #define HWLOC_BUILD_ASSERT(condition) ((void)sizeof(char[1 - 2*!(condition)]))
 
-
-
 #define HWLOC_BITS_PER_LONG (HWLOC_SIZEOF_UNSIGNED_LONG * 8)
 #define HWLOC_BITS_PER_INT (HWLOC_SIZEOF_UNSIGNED_INT * 8)
 
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/include/private/private.h b/src/pm/hydra/tools/topo/hwloc/hwloc/include/private/private.h
index f1484f5..ee6cae7 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/include/private/private.h
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/include/private/private.h
@@ -9,6 +9,16 @@
 
 /* Internal types and helpers. */
 
+
+#ifdef HWLOC_INSIDE_PLUGIN
+/*
+ * these declarations are internal only, they are not available to plugins
+ * (many functions below are internal static symbols).
+ */
+#error This file should not be used in plugins
+#endif
+
+
 #ifndef HWLOC_PRIVATE_H
 #define HWLOC_PRIVATE_H
 
@@ -29,16 +39,6 @@
 #endif
 #include <string.h>
 
-#ifdef HWLOC_HAVE_ATTRIBUTE_FORMAT
-# if HWLOC_HAVE_ATTRIBUTE_FORMAT
-#  define __hwloc_attribute_format(type, str, arg)  __attribute__((__format__(type, str, arg)))
-# else
-#  define __hwloc_attribute_format(type, str, arg)
-# endif
-#else
-# define __hwloc_attribute_format(type, str, arg)
-#endif
-
 enum hwloc_ignore_type_e {
   HWLOC_IGNORE_TYPE_NEVER = 0,
   HWLOC_IGNORE_TYPE_KEEP_STRUCTURE,
@@ -148,6 +148,10 @@ extern void hwloc_set_binding_hooks(struct hwloc_topology *topology);
 extern void hwloc_set_linuxfs_hooks(struct hwloc_binding_hooks *binding_hooks, struct hwloc_topology_support *support);
 #endif /* HWLOC_LINUX_SYS */
 
+#if defined(HWLOC_BGQ_SYS)
+extern void hwloc_set_bgq_hooks(struct hwloc_binding_hooks *binding_hooks, struct hwloc_topology_support *support);
+#endif /* HWLOC_BGQ_SYS */
+
 #ifdef HWLOC_SOLARIS_SYS
 extern void hwloc_set_solaris_hooks(struct hwloc_binding_hooks *binding_hooks, struct hwloc_topology_support *support);
 #endif /* HWLOC_SOLARIS_SYS */
@@ -172,78 +176,17 @@ extern void hwloc_set_darwin_hooks(struct hwloc_binding_hooks *binding_hooks, st
 extern void hwloc_set_freebsd_hooks(struct hwloc_binding_hooks *binding_hooks, struct hwloc_topology_support *support);
 #endif /* HWLOC_FREEBSD_SYS */
 
+#ifdef HWLOC_NETBSD_SYS
+extern void hwloc_set_netbsd_hooks(struct hwloc_binding_hooks *binding_hooks, struct hwloc_topology_support *support);
+#endif /* HWLOC_NETBSD_SYS */
+
 #ifdef HWLOC_HPUX_SYS
 extern void hwloc_set_hpux_hooks(struct hwloc_binding_hooks *binding_hooks, struct hwloc_topology_support *support);
 #endif /* HWLOC_HPUX_SYS */
 
-/*
- * Add an object to the topology.
- * It is sorted along the tree of other objects according to the inclusion of
- * cpusets, to eventually be added as a child of the smallest object including
- * this object.
- *
- * If the cpuset is empty, the type of the object (and maybe some attributes)
- * must be enough to find where to insert the object. This is especially true
- * for NUMA nodes with memory and no CPUs.
- *
- * The given object should not have children.
- *
- * This shall only be called before levels are built.
- *
- * In case of error, hwloc_report_os_error() is called.
- */
-HWLOC_DECLSPEC void hwloc_insert_object_by_cpuset(struct hwloc_topology *topology, hwloc_obj_t obj);
-
-/* Error reporting */
-typedef void (*hwloc_report_error_t)(const char * msg, int line);
-HWLOC_DECLSPEC void hwloc_report_os_error(const char * msg, int line);
-HWLOC_DECLSPEC int hwloc_hide_errors(void);
-/*
- * Add an object to the topology and specify which error callback to use
- */
-HWLOC_DECLSPEC int hwloc__insert_object_by_cpuset(struct hwloc_topology *topology, hwloc_obj_t obj, hwloc_report_error_t report_error);
-
-/*
- * Insert an object somewhere in the topology.
- *
- * It is added as the last child of the given parent.
- * The cpuset is completely ignored, so strange objects such as I/O devices should
- * preferably be inserted with this.
- *
- * The given object may have children.
- *
- * Remember to call topology_connect() afterwards to fix handy pointers.
- */
-HWLOC_DECLSPEC void hwloc_insert_object_by_parent(struct hwloc_topology *topology, hwloc_obj_t parent, hwloc_obj_t obj);
-
 /* Insert uname-specific names/values in the object infos array */
 extern void hwloc_add_uname_info(struct hwloc_topology *topology);
 
-#ifdef HWLOC_INSIDE_LIBHWLOC
-/** \brief Return a locally-allocated stringified bitmap for printf-like calls. */
-static __hwloc_inline char *
-hwloc_bitmap_printf_value(hwloc_const_bitmap_t bitmap)
-{
-  char *buf;
-  hwloc_bitmap_asprintf(&buf, bitmap);
-  return buf;
-}
-
-static __hwloc_inline struct hwloc_obj *
-hwloc_alloc_setup_object(hwloc_obj_type_t type, signed idx)
-{
-  struct hwloc_obj *obj = malloc(sizeof(*obj));
-  memset(obj, 0, sizeof(*obj));
-  obj->type = type;
-  obj->os_index = idx;
-  obj->os_level = -1;
-  obj->attr = malloc(sizeof(*obj->attr));
-  memset(obj->attr, 0, sizeof(*obj->attr));
-  /* do not allocate the cpuset here, let the caller do it */
-  return obj;
-}
-#endif
-
 /* Free obj and its attributes assuming it doesn't have any children/parent anymore */
 extern void hwloc_free_unlinked_object(hwloc_obj_t obj);
 
@@ -335,4 +278,22 @@ extern int hwloc_encode_to_base64(const char *src, size_t srclength, char *targe
  */
 extern int hwloc_decode_from_base64(char const *src, char *target, size_t targsize);
 
+/* Check whether needle matches the beginning of haystack, at least n, and up
+ * to a colon or \0 */
+extern int hwloc_namecoloncmp(const char *haystack, const char *needle, size_t n);
+
+#ifdef HWLOC_HAVE_ATTRIBUTE_FORMAT
+# if HWLOC_HAVE_ATTRIBUTE_FORMAT
+#  define __hwloc_attribute_format(type, str, arg)  __attribute__((__format__(type, str, arg)))
+# else
+#  define __hwloc_attribute_format(type, str, arg)
+# endif
+#else
+# define __hwloc_attribute_format(type, str, arg)
+#endif
+
+/* On some systems, snprintf returns the size of written data, not the actually
+ * required size.  hwloc_snprintf always report the actually required size. */
+extern int hwloc_snprintf(char *str, size_t size, const char *format, ...) __hwloc_attribute_format(printf, 3, 4);
+
 #endif /* HWLOC_PRIVATE_H */
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/include/private/solaris-chiptype.h b/src/pm/hydra/tools/topo/hwloc/hwloc/include/private/solaris-chiptype.h
index 108afbd..b84555b 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/include/private/solaris-chiptype.h
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/include/private/solaris-chiptype.h
@@ -8,6 +8,19 @@
  * $HEADER$
  */
 
+
+#ifdef HWLOC_INSIDE_PLUGIN
+/*
+ * these declarations are internal only, they are not available to plugins
+ * (functions below are internal static symbols).
+ */
+#error This file should not be used in plugins
+#endif
+
+
+#ifndef HWLOC_PRIVATE_SOLARIS_CHIPTYPE_H
+#define HWLOC_PRIVATE_SOLARIS_CHIPTYPE_H
+
 /* SPARC Chip Modes. */
 #define MODE_UNKNOWN            0
 #define MODE_SPITFIRE           1
@@ -43,4 +56,4 @@
 char* hwloc_solaris_get_chip_type(void);
 char* hwloc_solaris_get_chip_model(void);
 
-
+#endif /* HWLOC_PRIVATE_SOLARIS_CHIPTYPE_H */
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/include/private/xml.h b/src/pm/hydra/tools/topo/hwloc/hwloc/include/private/xml.h
index 196776a..04bcff9 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/include/private/xml.h
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/include/private/xml.h
@@ -7,7 +7,6 @@
 #define PRIVATE_XML_H 1
 
 #include <hwloc.h>
-#include <private/private.h>
 
 #include <sys/types.h>
 
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/src/Makefile.am b/src/pm/hydra/tools/topo/hwloc/hwloc/src/Makefile.am
index 77a0f8d..e44b3f4 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/src/Makefile.am
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/src/Makefile.am
@@ -1,5 +1,5 @@
 # Copyright © 2009-2013 Inria.  All rights reserved.
-# Copyright © 2009-2010, 2012 Université Bordeaux 1
+# Copyright © 2009-2012 Université Bordeaux 1
 # Copyright © 2009-2010 Cisco Systems, Inc.  All rights reserved.
 # Copyright © 2011-2012 Oracle and/or its affiliates.  All rights reserved.
 # See COPYING in top-level directory.
@@ -50,22 +50,66 @@ sources += topology-xml-libxml.c
 else
 plugins_LTLIBRARIES += hwloc_xml_libxml.la
 hwloc_xml_libxml_la_SOURCES = topology-xml-libxml.c
-hwloc_xml_libxml_la_CFLAGS = $(AM_CFLAGS) $(HWLOC_LIBXML2_CFLAGS)
+hwloc_xml_libxml_la_CFLAGS = $(AM_CFLAGS) $(HWLOC_LIBXML2_CFLAGS) -DHWLOC_INSIDE_PLUGIN
 hwloc_xml_libxml_la_LDFLAGS = $(plugins_ldflags) $(HWLOC_LIBXML2_LIBS)
 endif
 endif HWLOC_HAVE_LIBXML2
 
 if HWLOC_HAVE_PCI
-if HWLOC_LIBPCI_BUILD_STATIC
-sources += topology-libpci.c
+if HWLOC_PCI_BUILD_STATIC
+sources += topology-pci.c
 else
-plugins_LTLIBRARIES += hwloc_libpci.la
-hwloc_libpci_la_SOURCES = topology-libpci.c
-hwloc_libpci_la_CFLAGS = $(AM_CFLAGS) $(HWLOC_PCI_CFLAGS) $(HWLOC_PCIACCESS_CFLAGS)
-hwloc_libpci_la_LDFLAGS = $(plugins_ldflags) $(HWLOC_PCI_LIBS) $(HWLOC_PCIACCESS_LIBS)
+plugins_LTLIBRARIES += hwloc_pci.la
+hwloc_pci_la_SOURCES = topology-pci.c
+hwloc_pci_la_CFLAGS = $(AM_CFLAGS) $(HWLOC_PCIUTILS_CFLAGS) $(HWLOC_PCIACCESS_CFLAGS) -DHWLOC_INSIDE_PLUGIN
+hwloc_pci_la_LDFLAGS = $(plugins_ldflags) $(HWLOC_PCIUTILS_LIBS) $(HWLOC_PCIACCESS_LIBS)
 endif
 endif HWLOC_HAVE_PCI
 
+if HWLOC_HAVE_OPENCL
+if HWLOC_OPENCL_BUILD_STATIC
+sources += topology-opencl.c
+else
+plugins_LTLIBRARIES += hwloc_opencl.la
+hwloc_opencl_la_SOURCES = topology-opencl.c
+hwloc_opencl_la_CFLAGS = $(AM_CFLAGS) $(HWLOC_OPENCL_CFLAGS) -DHWLOC_INSIDE_PLUGIN
+hwloc_opencl_la_LDFLAGS = $(plugins_ldflags) $(HWLOC_OPENCL_LIBS)
+endif
+endif HWLOC_HAVE_OPENCL
+
+if HWLOC_HAVE_CUDART
+if HWLOC_CUDA_BUILD_STATIC
+sources += topology-cuda.c
+else
+plugins_LTLIBRARIES += hwloc_cuda.la
+hwloc_cuda_la_SOURCES = topology-cuda.c
+hwloc_cuda_la_CFLAGS = $(AM_CFLAGS) $(HWLOC_CUDA_CFLAGS) -DHWLOC_INSIDE_PLUGIN
+hwloc_cuda_la_LDFLAGS = $(plugins_ldflags) $(HWLOC_CUDA_LIBS)
+endif
+endif HWLOC_HAVE_CUDART
+
+if HWLOC_HAVE_NVML
+if HWLOC_NVML_BUILD_STATIC
+sources += topology-nvml.c
+else
+plugins_LTLIBRARIES += hwloc_nvml.la
+hwloc_nvml_la_SOURCES = topology-nvml.c
+hwloc_nvml_la_CFLAGS = $(AM_CFLAGS) $(HWLOC_NVML_CFLAGS) -DHWLOC_INSIDE_PLUGIN
+hwloc_nvml_la_LDFLAGS = $(plugins_ldflags) $(HWLOC_NVML_LIBS)
+endif
+endif HWLOC_HAVE_NVML
+
+if HWLOC_HAVE_GL
+if HWLOC_GL_BUILD_STATIC
+sources += topology-gl.c
+else
+plugins_LTLIBRARIES += hwloc_gl.la
+hwloc_gl_la_SOURCES = topology-gl.c
+hwloc_gl_la_CFLAGS = $(AM_CFLAGS) $(HWLOC_GL_CFLAGS) -DHWLOC_INSIDE_PLUGIN
+hwloc_gl_la_LDFLAGS = $(plugins_ldflags) $(HWLOC_GL_LIBS)
+endif
+endif HWLOC_HAVE_GL
+
 if HWLOC_HAVE_SOLARIS
 sources += topology-solaris.c
 sources += topology-solaris-chiptype.c
@@ -75,6 +119,10 @@ if HWLOC_HAVE_LINUX
 sources += topology-linux.c
 endif HWLOC_HAVE_LINUX
 
+if HWLOC_HAVE_BGQ
+sources += topology-bgq.c
+endif HWLOC_HAVE_BGQ
+
 if HWLOC_HAVE_AIX
 sources += topology-aix.c
 ldflags += -lpthread
@@ -102,6 +150,11 @@ if HWLOC_HAVE_FREEBSD
 sources += topology-freebsd.c
 endif HWLOC_HAVE_FREEBSD
 
+if HWLOC_HAVE_NETBSD
+sources += topology-netbsd.c
+ldflags += -lpthread
+endif HWLOC_HAVE_NETBSD
+
 if HWLOC_HAVE_CPUID
 sources += topology-x86.c
 endif HWLOC_HAVE_CPUID
@@ -110,7 +163,10 @@ if HWLOC_HAVE_GCC
 ldflags += -no-undefined
 endif HWLOC_HAVE_GCC
 
+
 if HWLOC_HAVE_WINDOWS
+# Windows specific rules
+
 LC_MESSAGES=C
 export LC_MESSAGES
 ldflags += -Xlinker --output-def -Xlinker .libs/libhwloc.def
@@ -131,21 +187,31 @@ if HWLOC_HAVE_MS_LIB
 	[ ! -r .libs/libhwloc.def ] || $(INSTALL) .libs/libhwloc.lib $(DESTDIR)$(libdir)
 	[ ! -r .libs/libhwloc.def ] || $(INSTALL) .libs/libhwloc.exp $(DESTDIR)$(libdir)
 endif HWLOC_HAVE_MS_LIB
+
+uninstall-local:
+	rm -f $(DESTDIR)$(libdir)/libhwloc.def
+if HWLOC_HAVE_MS_LIB
+	rm -f $(DESTDIR)$(libdir)/libhwloc.lib $(DESTDIR)$(libdir)/libhwloc.exp
+endif HWLOC_HAVE_MS_LIB
+
+# End of Windows specific rules
 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)
 
 if HWLOC_HAVE_PLUGINS
 AM_CPPFLAGS += $(LTDLINCL)
 libhwloc_la_LDFLAGS += -export-dynamic
 libhwloc_la_LIBADD = $(LIBLTDL)
 libhwloc_la_DEPENDENCIES = $(LTDLDEPS)
-
+if HWLOC_LTDL_INCLUDED
 SUBDIRS = libltdl
 endif
+endif
 
 # Embedded library (note the lack of a .so version number -- that
 # intentionally only appears in the installable library).  Also note
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/src/bind.c b/src/pm/hydra/tools/topo/hwloc/hwloc/src/bind.c
index 1ebb153..046b7cf 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/src/bind.c
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/src/bind.c
@@ -697,6 +697,10 @@ hwloc_set_native_binding_hooks(struct hwloc_binding_hooks *hooks, struct hwloc_t
     hwloc_set_linuxfs_hooks(hooks, support);
 #    endif /* HWLOC_LINUX_SYS */
 
+#    ifdef HWLOC_BGQ_SYS
+    hwloc_set_bgq_hooks(hooks, support);
+#    endif /* HWLOC_BGQ_SYS */
+
 #    ifdef HWLOC_AIX_SYS
     hwloc_set_aix_hooks(hooks, support);
 #    endif /* HWLOC_AIX_SYS */
@@ -721,6 +725,10 @@ hwloc_set_native_binding_hooks(struct hwloc_binding_hooks *hooks, struct hwloc_t
     hwloc_set_freebsd_hooks(hooks, support);
 #    endif /* HWLOC_FREEBSD_SYS */
 
+#    ifdef HWLOC_NETBSD_SYS
+    hwloc_set_netbsd_hooks(hooks, support);
+#    endif /* HWLOC_NETBSD_SYS */
+
 #    ifdef HWLOC_HPUX_SYS
     hwloc_set_hpux_hooks(hooks, support);
 #    endif /* HWLOC_HPUX_SYS */
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/src/components.c b/src/pm/hydra/tools/topo/hwloc/hwloc/src/components.c
index 2d256bb..d988866 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/src/components.c
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/src/components.c
@@ -9,6 +9,10 @@
 #include <private/private.h>
 #include <private/xml.h>
 
+#define HWLOC_COMPONENT_STOP_NAME "stop"
+#define HWLOC_COMPONENT_EXCLUDE_CHAR '-'
+#define HWLOC_COMPONENT_SEPS ","
+
 /* list of all registered discovery components, sorted by priority, higher priority first.
  * noos is last because its priority is 0.
  * others' priority is 10.
@@ -68,7 +72,7 @@ hwloc__dlforeach_cb(const char *filename, void *_data __hwloc_attribute_unused)
   lt_dlhandle handle;
   char *componentsymbolname = NULL;
   struct hwloc_component *component;
-  struct hwloc__plugin_desc *desc;
+  struct hwloc__plugin_desc *desc, **prevdesc;
 
   if (hwloc_plugins_verbose)
     fprintf(stderr, "Plugin dlforeach found `%s'\n", filename);
@@ -134,11 +138,15 @@ hwloc__dlforeach_cb(const char *filename, void *_data __hwloc_attribute_unused)
   desc->filename = strdup(filename);
   desc->component = component;
   desc->handle = handle;
+  desc->next = NULL;
   if (hwloc_plugins_verbose)
     fprintf(stderr, "Plugin descriptor `%s' ready\n", basename);
 
-  desc->next = hwloc_plugins;
-  hwloc_plugins = desc;
+  /* append to the list */
+  prevdesc = &hwloc_plugins;
+  while (*prevdesc)
+    prevdesc = &((*prevdesc)->next);
+  *prevdesc = desc;
   if (hwloc_plugins_verbose)
     fprintf(stderr, "Plugin descriptor `%s' queued\n", basename);
   return 0;
@@ -215,8 +223,8 @@ hwloc_disc_component_type_string(hwloc_disc_component_type_t type)
   switch (type) {
   case HWLOC_DISC_COMPONENT_TYPE_CPU: return "cpu";
   case HWLOC_DISC_COMPONENT_TYPE_GLOBAL: return "global";
-  case HWLOC_DISC_COMPONENT_TYPE_ADDITIONAL: return "additional";
-  default: return "Unknown";
+  case HWLOC_DISC_COMPONENT_TYPE_MISC: return "misc";
+  default: return "**unknown**";
   }
 }
 
@@ -226,18 +234,53 @@ hwloc_disc_component_register(struct hwloc_disc_component *component,
 {
   struct hwloc_disc_component **prev;
 
+  /* check that the component name is valid */
+  if (!strcmp(component->name, HWLOC_COMPONENT_STOP_NAME)) {
+    if (hwloc_components_verbose)
+      fprintf(stderr, "Cannot register discovery component with reserved name `" HWLOC_COMPONENT_STOP_NAME "'\n");
+    return -1;
+  }
+  if (strchr(component->name, HWLOC_COMPONENT_EXCLUDE_CHAR)
+      || strcspn(component->name, HWLOC_COMPONENT_SEPS) != strlen(component->name)) {
+    if (hwloc_components_verbose)
+      fprintf(stderr, "Cannot register discovery component with name `%s' containing reserved characters `%c" HWLOC_COMPONENT_SEPS "'\n",
+	      component->name, HWLOC_COMPONENT_EXCLUDE_CHAR);
+    return -1;
+  }
+  /* check that the component type is valid */
+  switch ((unsigned) component->type) {
+  case HWLOC_DISC_COMPONENT_TYPE_CPU:
+  case HWLOC_DISC_COMPONENT_TYPE_GLOBAL:
+  case HWLOC_DISC_COMPONENT_TYPE_MISC:
+    break;
+  default:
+    fprintf(stderr, "Cannot register discovery component `%s' with unknown type %u\n",
+	    component->name, (unsigned) component->type);
+    return -1;
+  }
+
   prev = &hwloc_disc_components;
   while (NULL != *prev) {
     if (!strcmp((*prev)->name, component->name)) {
-      if (hwloc_components_verbose)
-	fprintf(stderr, "Multiple `%s' components, only registering the first one\n",
-		component->name);
-      return -1;
+      /* if two components have the same name, only keep the highest priority one */
+      if ((*prev)->priority < component->priority) {
+	/* drop the existing component */
+	if (hwloc_components_verbose)
+	  fprintf(stderr, "Dropping previously registered discovery component `%s', priority %u lower than new one %u\n",
+		  (*prev)->name, (*prev)->priority, component->priority);
+	*prev = (*prev)->next;
+      } else {
+	/* drop the new one */
+	if (hwloc_components_verbose)
+	  fprintf(stderr, "Ignoring new discovery component `%s', priority %u lower than previously registered one %u\n",
+		  component->name, component->priority, (*prev)->priority);
+	return -1;
+      }
     }
     prev = &((*prev)->next);
   }
   if (hwloc_components_verbose)
-    fprintf(stderr, "Registered %s component `%s' with priority %u (%s%s)\n",
+    fprintf(stderr, "Registered %s discovery component `%s' with priority %u (%s%s)\n",
 	    hwloc_disc_component_type_string(component->type), component->name, component->priority,
 	    filename ? "from plugin " : "statically build", filename ? filename : "");
 
@@ -278,23 +321,35 @@ hwloc_components_init(struct hwloc_topology *topology __hwloc_attribute_unused)
 #endif
 
   /* hwloc_static_components is created by configure in static-components.h */
-  for(i=0; NULL != hwloc_static_components[i]; i++)
+  for(i=0; NULL != hwloc_static_components[i]; i++) {
+    if (hwloc_static_components[i]->flags) {
+      fprintf(stderr, "Ignoring static component with invalid flags %lx\n",
+	      hwloc_static_components[i]->flags);
+      continue;
+    }
     if (HWLOC_COMPONENT_TYPE_DISC == hwloc_static_components[i]->type)
       hwloc_disc_component_register(hwloc_static_components[i]->data, NULL);
     else if (HWLOC_COMPONENT_TYPE_XML == hwloc_static_components[i]->type)
       hwloc_xml_callbacks_register(hwloc_static_components[i]->data);
     else
       assert(0);
+  }
 
   /* dynamic plugins */
 #ifdef HWLOC_HAVE_PLUGINS
-  for(desc = hwloc_plugins; NULL != desc; desc = desc->next)
+  for(desc = hwloc_plugins; NULL != desc; desc = desc->next) {
+    if (desc->component->flags) {
+      fprintf(stderr, "Ignoring plugin `%s' component with invalid flags %lx\n",
+	      desc->name, desc->component->flags);
+      continue;
+    }
     if (HWLOC_COMPONENT_TYPE_DISC == desc->component->type)
       hwloc_disc_component_register(desc->component->data, desc->filename);
     else if (HWLOC_COMPONENT_TYPE_XML == desc->component->type)
       hwloc_xml_callbacks_register(desc->component->data);
     else
       assert(0);
+  }
 #endif
 
   HWLOC_COMPONENTS_UNLOCK();
@@ -356,7 +411,7 @@ hwloc_disc_component_try_enable(struct hwloc_topology *topology,
 
   if ((*excludes) & comp->type) {
     if (hwloc_components_verbose || verbose_errors)
-      fprintf(stderr, "Excluding %s component `%s', conflicts with excludes 0x%x\n",
+      fprintf(stderr, "Excluding %s discovery component `%s', conflicts with excludes 0x%x\n",
 	      hwloc_disc_component_type_string(comp->type), comp->name, *excludes);
     return -1;
   }
@@ -364,7 +419,7 @@ hwloc_disc_component_try_enable(struct hwloc_topology *topology,
   backend = comp->instantiate(comp, comparg, NULL, NULL);
   if (!backend) {
     if (verbose_errors)
-      fprintf(stderr, "Failed to instantiate component `%s'\n", comp->name);
+      fprintf(stderr, "Failed to instantiate discovery component `%s'\n", comp->name);
     return -1;
   }
 
@@ -387,6 +442,8 @@ hwloc_disc_components_enable_others(struct hwloc_topology *topology)
   int tryall = 1;
   char *env;
 
+  env = getenv("HWLOC_COMPONENTS");
+
   /* compute current excludes */
   backend = topology->backends;
   while (backend) {
@@ -394,55 +451,109 @@ hwloc_disc_components_enable_others(struct hwloc_topology *topology)
     backend = backend->next;
   }
 
-  env = getenv("HWLOC_COMPONENTS");
+  /* enable explicitly listed components */
   if (env) {
+    char *curenv = env;
     size_t s;
 
-    while (*env) {
-      s = strcspn(env, ",");
+    while (*curenv) {
+      s = strcspn(curenv, HWLOC_COMPONENT_SEPS);
       if (s) {
 	char *arg;
 	char c;
-	/* save the last char and replace with \0 */
-	c = env[s];
-	env[s] = '\0';
 
-	if (!strcmp(env, "stop")) {
+	/* replace libpci with pci for backward compatibility with v1.6 */
+	if (!strncmp(curenv, "libpci", s)) {
+	  curenv[0] = curenv[1] = curenv[2] = *HWLOC_COMPONENT_SEPS;
+	  curenv += 3;
+	  s -= 3;
+	} else if (curenv[0] == HWLOC_COMPONENT_EXCLUDE_CHAR && !strncmp(curenv+1, "libpci", s-1)) {
+	  curenv[3] = curenv[0];
+	  curenv[0] = curenv[1] = curenv[2] = *HWLOC_COMPONENT_SEPS;
+	  curenv += 3;
+	  s -= 3;
+	  /* skip this name, it's a negated one */
+	  goto nextname;
+	}
+
+	if (curenv[0] == HWLOC_COMPONENT_EXCLUDE_CHAR)
+	  goto nextname;
+
+	if (!strncmp(curenv, HWLOC_COMPONENT_STOP_NAME, s)) {
 	  tryall = 0;
 	  break;
 	}
 
-	arg = strchr(env, '=');
+	/* save the last char and replace with \0 */
+	c = curenv[s];
+	curenv[s] = '\0';
+
+	arg = strchr(curenv, '=');
 	if (arg) {
 	  *arg = '\0';
 	  arg++;
 	}
 
-	comp = hwloc_disc_component_find(-1, env);
+	comp = hwloc_disc_component_find(-1, curenv);
 	if (comp) {
 	  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);
+	  fprintf(stderr, "Cannot find discovery component `%s'\n", curenv);
 	}
 
-	/* restore last char */
-	env[s] = c;
+	/* restore last char (the second loop below needs env to be unmodified) */
+	curenv[s] = c;
       }
 
-      env += s;
-      if (*env)
+nextname:
+      curenv += s;
+      if (*curenv)
 	/* Skip comma */
-	env++;
+	curenv++;
     }
   }
 
+  /* env is still the same, the above loop didn't modify it */
+
+  /* now enable remaining components (except the explicitly '-'-listed ones) */
   if (tryall) {
     comp = hwloc_disc_components;
     while (NULL != comp) {
+      /* check if this component was explicitly excluded in env */
+      if (env) {
+	char *curenv = env;
+	while (*curenv) {
+	  size_t s = strcspn(curenv, HWLOC_COMPONENT_SEPS);
+	  if (curenv[0] == HWLOC_COMPONENT_EXCLUDE_CHAR && !strncmp(curenv+1, comp->name, s-1)) {
+	    if (hwloc_components_verbose)
+	      fprintf(stderr, "Excluding %s discovery component `%s' because of HWLOC_COMPONENTS environment variable\n",
+	    hwloc_disc_component_type_string(comp->type), comp->name);
+	    goto nextcomp;
+	  }
+	  curenv += s;
+	  if (*curenv)
+	    /* Skip comma */
+	    curenv++;
+	}
+      }
       hwloc_disc_component_try_enable(topology, comp, NULL, &excludes, 0 /* defaults, not envvar forced */, 0 /* defaults don't need warnings on conflicts */);
+nextcomp:
       comp = comp->next;
     }
   }
+
+  if (hwloc_components_verbose) {
+    /* print a summary */
+    int first = 1;
+    backend = topology->backends;
+    fprintf(stderr, "Final list of enabled discovery components: ");
+    while (backend != NULL) {
+      fprintf(stderr, "%s%s", first ? "" : ",", backend->component->name);
+      backend = backend->next;
+      first = 0;
+    }
+    fprintf(stderr, "\n");
+  }
 }
 
 void
@@ -501,12 +612,19 @@ hwloc_backend_enable(struct hwloc_topology *topology, struct hwloc_backend *back
 {
   struct hwloc_backend **pprev;
 
+  /* check backend flags */
+  if (backend->flags & (~(HWLOC_BACKEND_FLAG_NEED_LEVELS))) {
+    fprintf(stderr, "Cannot enable %s discovery component `%s' with unknown flags %lx\n",
+	    hwloc_disc_component_type_string(backend->component->type), backend->component->name, backend->flags);
+    return -1;
+  }
+
   /* make sure we didn't already enable this backend, we don't want duplicates */
   pprev = &topology->backends;
   while (NULL != *pprev) {
     if ((*pprev)->component == backend->component) {
       if (hwloc_components_verbose)
-	fprintf(stderr, "Cannot enable %s component `%s' twice\n",
+	fprintf(stderr, "Cannot enable %s discovery component `%s' twice\n",
 		hwloc_disc_component_type_string(backend->component->type), backend->component->name);
       hwloc_backend_disable(backend);
       errno = EBUSY;
@@ -516,7 +634,7 @@ hwloc_backend_enable(struct hwloc_topology *topology, struct hwloc_backend *back
   }
 
   if (hwloc_components_verbose)
-    fprintf(stderr, "Enabling %s component `%s'\n",
+    fprintf(stderr, "Enabling %s discovery component `%s'\n",
 	    hwloc_disc_component_type_string(backend->component->type), backend->component->name);
 
   /* enqueue at the end */
@@ -614,7 +732,7 @@ hwloc_backends_disable_all(struct hwloc_topology *topology)
   while (NULL != (backend = topology->backends)) {
     struct hwloc_backend *next = backend->next;
     if (hwloc_components_verbose)
-      fprintf(stderr, "Disabling %s component `%s'\n",
+      fprintf(stderr, "Disabling %s discovery component `%s'\n",
 	      hwloc_disc_component_type_string(backend->component->type), backend->component->name);
     hwloc_backend_disable(backend);
     topology->backends = next;
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/src/distances.c b/src/pm/hydra/tools/topo/hwloc/hwloc/src/distances.c
index 35230c7..432c746 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/src/distances.c
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/src/distances.c
@@ -850,7 +850,7 @@ hwloc__groups_by_distances(struct hwloc_topology *topology,
       memset(&(groupsizes[0]), 0, sizeof(groupsizes[0]) * nbgroups);
       for(i=0; i<nbgroups; i++) {
           /* create the Group object */
-          hwloc_obj_t group_obj;
+          hwloc_obj_t group_obj, res_obj;
           group_obj = hwloc_alloc_setup_object(HWLOC_OBJ_GROUP, -1);
           group_obj->cpuset = hwloc_bitmap_alloc();
           group_obj->attr->group.depth = topology->next_group_depth;
@@ -868,8 +868,10 @@ hwloc__groups_by_distances(struct hwloc_topology *topology,
             }
           hwloc_debug_1arg_bitmap("adding Group object with %u objects and cpuset %s\n",
                                   groupsizes[i], group_obj->cpuset);
-          hwloc__insert_object_by_cpuset(topology, group_obj,
-					 fromuser ? hwloc_report_user_distance_error : hwloc_report_os_error);
+          res_obj = hwloc__insert_object_by_cpuset(topology, group_obj,
+						   fromuser ? hwloc_report_user_distance_error : hwloc_report_os_error);
+          assert(res_obj == group_obj); /* somebody else created groups here, things went wrong ?! */
+
           groupobjs[i] = group_obj;
       }
 
@@ -1003,7 +1005,7 @@ hwloc_group_by_distances(struct hwloc_topology *topology)
        * this group will be merged into a regular object if the matrix isn't strangely incomplete
        */
       group_obj = hwloc_alloc_setup_object(HWLOC_OBJ_GROUP, -1);
-      group_obj->attr->group.depth = topology->next_group_depth++;
+      group_obj->attr->group.depth = (unsigned) -1;
       group_obj->cpuset = hwloc_bitmap_alloc();
       for(i=0; i<nbobjs; i++) {
 	/* assemble the group cpuset */
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/src/misc.c b/src/pm/hydra/tools/topo/hwloc/hwloc/src/misc.c
index 11d96ea..9ef3be3 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/src/misc.c
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/src/misc.c
@@ -7,6 +7,7 @@
  */
 
 #include <private/autogen/config.h>
+#include <private/private.h>
 #include <private/misc.h>
 
 #include <stdarg.h>
@@ -14,6 +15,7 @@
 #include <sys/utsname.h>
 #endif
 #include <stdlib.h>
+#include <string.h>
 #include <stdio.h>
 #include <errno.h>
 #include <ctype.h>
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-aix.c b/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-aix.c
index f276ac4..e19faeb 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-aix.c
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-aix.c
@@ -1,7 +1,7 @@
 /*
  * Copyright © 2009 CNRS
  * Copyright © 2009-2012 Inria.  All rights reserved.
- * Copyright © 2009-2011 Université Bordeaux 1
+ * Copyright © 2009-2011, 2013 Université Bordeaux 1
  * Copyright © 2011 Cisco Systems, Inc.  All rights reserved.
  * See COPYING in top-level directory.
  */
@@ -36,6 +36,22 @@
 #include <sys/mman.h>
 #include <sys/systemcfg.h>
 
+#ifndef __power_pc
+#define __power_pc() 0
+#endif
+#ifndef __power_4
+#define __power_4() 0
+#endif
+#ifndef __power_5
+#define __power_5() 0
+#endif
+#ifndef __power_6
+#define __power_6() 0
+#endif
+#ifndef __power_7
+#define __power_7() 0
+#endif
+
 static int
 hwloc_aix_set_sth_cpubind(hwloc_topology_t topology, rstype_t what, rsid_t who, pid_t pid, hwloc_const_bitmap_t hwloc_set, int flags __hwloc_attribute_unused)
 {
@@ -246,7 +262,8 @@ hwloc_aix_set_thread_cpubind(hwloc_topology_t topology, hwloc_thread_t pthread,
   if ((errno = pthread_getthrds_np(&pthread, PTHRDSINFO_QUERY_TID, &info, sizeof(info), NULL, &size)))
     return -1;
   {
-    rsid_t who = { .at_tid = info.__pi_tid };
+    rsid_t who;
+    who.at_tid = info.__pi_tid;
     return hwloc_aix_set_sth_cpubind(topology, R_THREAD, who, getpid(), hwloc_set, flags);
   }
 }
@@ -399,6 +416,7 @@ hwloc_aix_get_sth_membind(hwloc_topology_t topology, rstype_t what, rsid_t who,
     goto out;
 
   hwloc_set = hwloc_bitmap_alloc();
+
   maxcpus = rs_getinfo(rset, R_MAXPROCS, 0);
   for (cpu = 0; cpu < maxcpus; cpu++)
     if (rs_op(RS_TESTRESOURCE, rset, NULL, R_PROCS, cpu) == 1)
@@ -412,6 +430,8 @@ hwloc_aix_get_sth_membind(hwloc_topology_t topology, rstype_t what, rsid_t who,
       hwloc_bitmap_set(nodeset, obj->os_index);
   }
 
+  hwloc_bitmap_free(hwloc_set);
+
   *policy = HWLOC_MEMBIND_DEFAULT;
   res = 0;
 
@@ -622,9 +642,14 @@ look_rset(int sdl, hwloc_obj_type_t type, struct hwloc_topology *topology, int l
       case HWLOC_OBJ_CACHE:
 	obj->attr->cache.size = _system_configuration.L2_cache_size;
 	obj->attr->cache.associativity = _system_configuration.L2_cache_asc;
-	obj->attr->cache.linesize = 0; /* TODO: ? */
+
+	obj->attr->cache.linesize = 0; /* unknown by default */
+	if (__power_pc())
+	  if (__power_4() || __power_5() || __power_6() || __power_7())
+	    obj->attr->cache.linesize = 128;
+
 	obj->attr->cache.depth = 2;
-	obj->attr->cache.type = HWLOC_OBJ_CACHE_UNIFIED; /* FIXME? */
+	obj->attr->cache.type = HWLOC_OBJ_CACHE_UNIFIED; /* OK for power[4567], unknown for others */
 	break;
       case HWLOC_OBJ_GROUP:
 	obj->attr->group.depth = level;
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-bgq.c b/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-bgq.c
new file mode 100644
index 0000000..5a2e611
--- /dev/null
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-bgq.c
@@ -0,0 +1,239 @@
+/*
+ * Copyright © 2013 Inria.  All rights reserved.
+ * See COPYING in top-level directory.
+ */
+
+#include <private/autogen/config.h>
+
+#include <hwloc.h>
+#include <private/private.h>
+#include <private/debug.h>
+
+#include <stdlib.h>
+#include <pthread.h>
+#include <sys/utsname.h>
+#include <spi/include/kernel/location.h>
+#include <spi/include/kernel/process.h>
+
+static int
+hwloc_look_bgq(struct hwloc_backend *backend)
+{
+  struct hwloc_topology *topology = backend->topology;
+  unsigned i;
+  char *env;
+
+  if (!topology->levels[0][0]->cpuset) {
+    /* Nobody created objects yet, setup everything */
+    hwloc_bitmap_t set;
+    hwloc_obj_t obj;
+
+#define HWLOC_BGQ_CORES 17 /* spare core ignored for now */
+
+    hwloc_alloc_obj_cpusets(topology->levels[0][0]);
+    /* mark the 17th core (OS-reserved) as disallowed */
+    hwloc_bitmap_clr_range(topology->levels[0][0]->allowed_cpuset, (HWLOC_BGQ_CORES-1)*4, HWLOC_BGQ_CORES*4-1);
+
+    env = getenv("BG_THREADMODEL");
+    if (!env || atoi(env) != 2) {
+      /* process cannot use cores/threads outside of its Kernel_ThreadMask() */
+      uint64_t bgmask = Kernel_ThreadMask(Kernel_MyTcoord());
+      /* the mask is reversed, manually reverse it */
+      for(i=0; i<64; i++)
+	if (((bgmask >> i) & 1) == 0)
+	  hwloc_bitmap_clr(topology->levels[0][0]->allowed_cpuset, 63-i);
+    }
+
+    /* a single memory bank */
+    set = hwloc_bitmap_alloc();
+    hwloc_bitmap_set(set, 0);
+    topology->levels[0][0]->nodeset = set;
+    topology->levels[0][0]->memory.local_memory = 16ULL*1024*1024*1024ULL;
+
+    /* socket */
+    obj = hwloc_alloc_setup_object(HWLOC_OBJ_SOCKET, 0);
+    set = hwloc_bitmap_alloc();
+    hwloc_bitmap_set_range(set, 0, HWLOC_BGQ_CORES*4-1);
+    obj->cpuset = set;
+    hwloc_obj_add_info(obj, "CPUModel", "IBM PowerPC A2");
+    hwloc_insert_object_by_cpuset(topology, obj);
+
+    /* shared L2 */
+    obj = hwloc_alloc_setup_object(HWLOC_OBJ_CACHE, -1);
+    obj->cpuset = hwloc_bitmap_dup(set);
+    obj->attr->cache.type = HWLOC_OBJ_CACHE_UNIFIED;
+    obj->attr->cache.depth = 2;
+    obj->attr->cache.size = 32*1024*1024;
+    obj->attr->cache.linesize = 128;
+    obj->attr->cache.associativity = 16;
+    hwloc_insert_object_by_cpuset(topology, obj);
+
+    /* Cores */
+    for(i=0; i<HWLOC_BGQ_CORES; i++) {
+      /* Core */
+      obj = hwloc_alloc_setup_object(HWLOC_OBJ_CORE, i);
+      set = hwloc_bitmap_alloc();
+      hwloc_bitmap_set_range(set, i*4, i*4+3);
+      obj->cpuset = set;
+      hwloc_insert_object_by_cpuset(topology, obj);
+      /* L1d */
+      obj = hwloc_alloc_setup_object(HWLOC_OBJ_CACHE, -1);
+      obj->cpuset = hwloc_bitmap_dup(set);
+      obj->attr->cache.type = HWLOC_OBJ_CACHE_DATA;
+      obj->attr->cache.depth = 1;
+      obj->attr->cache.size = 16*1024;
+      obj->attr->cache.linesize = 64;
+      obj->attr->cache.associativity = 8;
+      hwloc_insert_object_by_cpuset(topology, obj);
+      /* L1i */
+      obj = hwloc_alloc_setup_object(HWLOC_OBJ_CACHE, -1);
+      obj->cpuset = hwloc_bitmap_dup(set);
+      obj->attr->cache.type = HWLOC_OBJ_CACHE_INSTRUCTION;
+      obj->attr->cache.depth = 1;
+      obj->attr->cache.size = 16*1024;
+      obj->attr->cache.linesize = 64;
+      obj->attr->cache.associativity = 4;
+      hwloc_insert_object_by_cpuset(topology, obj);
+      /* there's also a L1p "prefetch cache" of 4kB with 128B lines */
+    }
+
+    /* PUs */
+    hwloc_setup_pu_level(topology, HWLOC_BGQ_CORES*4);
+  }
+
+  /* Add BGQ specific information */
+
+  hwloc_obj_add_info(topology->levels[0][0], "Backend", "BGQ");
+  if (topology->is_thissystem)
+    hwloc_add_uname_info(topology);
+  return 1;
+}
+
+static int
+hwloc_bgq_get_thread_cpubind(hwloc_topology_t topology, pthread_t thread, hwloc_bitmap_t hwloc_set, int flags __hwloc_attribute_unused)
+{
+  unsigned pu;
+  cpu_set_t bg_set;
+  int err;
+
+  if (topology->pid) {
+    errno = ENOSYS;
+    return -1;
+  }
+  err = pthread_getaffinity_np(thread, sizeof(bg_set), &bg_set);
+  if (err) {
+    errno = err;
+    return -1;
+  }
+  for(pu=0; pu<64; pu++)
+    if (CPU_ISSET(pu, &bg_set)) {
+      /* the binding cannot contain multiple PUs */
+      hwloc_bitmap_only(hwloc_set, pu);
+      break;
+    }
+  return 0;
+}
+
+static int
+hwloc_bgq_get_thisthread_cpubind(hwloc_topology_t topology, hwloc_bitmap_t hwloc_set, int flags __hwloc_attribute_unused)
+{
+  if (topology->pid) {
+    errno = ENOSYS;
+    return -1;
+  }
+  hwloc_bitmap_only(hwloc_set, Kernel_ProcessorID());
+  return 0;
+}
+
+static int
+hwloc_bgq_set_thread_cpubind(hwloc_topology_t topology, pthread_t thread, hwloc_const_bitmap_t hwloc_set, int flags)
+{
+  unsigned pu;
+  cpu_set_t bg_set;
+  int err;
+
+  if (topology->pid) {
+    errno = ENOSYS;
+    return -1;
+  }
+  /* the binding cannot contain multiple PUs.
+   * keep the first PU only, and error out if STRICT.
+   */
+  if (hwloc_bitmap_weight(hwloc_set) != 1) {
+    if ((flags & HWLOC_CPUBIND_STRICT)) {
+      errno = ENOSYS;
+      return -1;
+    }
+  }
+  pu = hwloc_bitmap_first(hwloc_set);
+  CPU_ZERO(&bg_set);
+  CPU_SET(pu, &bg_set);
+  err = pthread_setaffinity_np(thread, sizeof(bg_set), &bg_set);
+  if (err) {
+    errno = err;
+    return -1;
+  }
+  return 0;
+}
+
+static int
+hwloc_bgq_set_thisthread_cpubind(hwloc_topology_t topology, hwloc_const_bitmap_t hwloc_set, int flags)
+{
+  return hwloc_bgq_set_thread_cpubind(topology, pthread_self(), hwloc_set, flags);
+}
+
+void
+hwloc_set_bgq_hooks(struct hwloc_binding_hooks *hooks __hwloc_attribute_unused,
+		    struct hwloc_topology_support *support __hwloc_attribute_unused)
+{
+  hooks->set_thisthread_cpubind = hwloc_bgq_set_thisthread_cpubind;
+  hooks->set_thread_cpubind = hwloc_bgq_set_thread_cpubind;
+  hooks->get_thisthread_cpubind = hwloc_bgq_get_thisthread_cpubind;
+  hooks->get_thread_cpubind = hwloc_bgq_get_thread_cpubind;
+  /* threads cannot be bound to more than one PU, so get_last_cpu_location == get_cpubind */
+  hooks->get_thisthread_last_cpu_location = hwloc_bgq_get_thisthread_cpubind;
+  /* hooks->get_thread_last_cpu_location = hwloc_bgq_get_thread_cpubind; */
+}
+
+static struct hwloc_backend *
+hwloc_bgq_component_instantiate(struct hwloc_disc_component *component,
+				const void *_data1 __hwloc_attribute_unused,
+				const void *_data2 __hwloc_attribute_unused,
+				const void *_data3 __hwloc_attribute_unused)
+{
+  struct utsname utsname;
+  struct hwloc_backend *backend;
+  char *env;
+  int err;
+
+  env = getenv("HWLOC_FORCE_BGQ");
+  if (!env || !atoi(env)) {
+    err = uname(&utsname);
+    if (err || strcmp(utsname.sysname, "CNK") || strcmp(utsname.machine, "BGQ")) {
+      fprintf(stderr, "*** Found unexpected uname sysname `%s' machine `%s', disabling BGQ backend.\n", utsname.sysname, utsname.machine);
+      fprintf(stderr, "*** Set HWLOC_FORCE_BGQ=1 in the environment to enforce the BGQ backend.\n");
+      return NULL;
+    }
+  }
+
+  backend = hwloc_backend_alloc(component);
+  if (!backend)
+    return NULL;
+  backend->discover = hwloc_look_bgq;
+  return backend;
+}
+
+static struct hwloc_disc_component hwloc_bgq_disc_component = {
+  HWLOC_DISC_COMPONENT_TYPE_GLOBAL,
+  "bgq",
+  ~0,
+  hwloc_bgq_component_instantiate,
+  50,
+  NULL
+};
+
+const struct hwloc_component hwloc_bgq_component = {
+  HWLOC_COMPONENT_ABI,
+  HWLOC_COMPONENT_TYPE_DISC,
+  0,
+  &hwloc_bgq_disc_component
+};
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-cuda.c b/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-cuda.c
new file mode 100644
index 0000000..2351bcb
--- /dev/null
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-cuda.c
@@ -0,0 +1,190 @@
+/*
+ * Copyright © 2011 Université Bordeaux 1
+ * Copyright © 2012 Inria.  All rights reserved.
+ * See COPYING in top-level directory.
+ */
+
+#include <private/autogen/config.h>
+#include <hwloc.h>
+#include <hwloc/plugins.h>
+#include <hwloc/cudart.h>
+
+/* private headers allowed for convenience because this plugin is built within hwloc */
+#include <private/misc.h>
+#include <private/debug.h>
+
+#include <cuda_runtime_api.h>
+
+struct hwloc_cuda_backend_data_s {
+  unsigned nr_devices; /* -1 when unknown yet, first callback will setup */
+  struct hwloc_cuda_device_info_s {
+    int idx;
+    unsigned pcidomain, pcibus, pcidev, pcifunc;
+  } * devices;
+};
+
+/* query all PCI bus ids for later */
+static void
+hwloc_cuda_query_devices(struct hwloc_cuda_backend_data_s *data)
+{
+  cudaError_t cures;
+  int nb, i;
+
+  /* mark the number of devices as 0 in case we fail below,
+   * so that we don't try again later.
+   */
+  data->nr_devices = 0;
+
+  cures = cudaGetDeviceCount(&nb);
+  if (cures)
+    return;
+
+  /* allocate structs */
+  data->devices = malloc(nb * sizeof(*data->devices));
+  if (!data->devices)
+    return;
+
+  for (i = 0; i < nb; i++) {
+    struct hwloc_cuda_device_info_s *info = &data->devices[data->nr_devices];
+    int domain, bus, dev;
+
+    if (hwloc_cudart_get_device_pci_ids(NULL /* topology unused */, i, &domain, &bus, &dev))
+      continue;
+
+    info->idx = i;
+    info->pcidomain = (unsigned) domain;
+    info->pcibus = (unsigned) bus;
+    info->pcidev = (unsigned) dev;
+    info->pcifunc = 0;
+
+    /* validate this device */
+    data->nr_devices++;
+  }
+
+  return;
+}
+
+static int
+hwloc_cuda_backend_notify_new_object(struct hwloc_backend *backend, struct hwloc_backend *caller __hwloc_attribute_unused,
+				     struct hwloc_obj *pcidev)
+{
+  struct hwloc_topology *topology = backend->topology;
+  struct hwloc_cuda_backend_data_s *data = backend->private_data;
+  unsigned i;
+
+  if (!(hwloc_topology_get_flags(topology) & (HWLOC_TOPOLOGY_FLAG_IO_DEVICES|HWLOC_TOPOLOGY_FLAG_WHOLE_IO)))
+    return 0;
+
+  if (!hwloc_topology_is_thissystem(topology)) {
+    hwloc_debug("%s", "\nno CUDA detection (not thissystem)\n");
+    return 0;
+  }
+
+  if (HWLOC_OBJ_PCI_DEVICE != pcidev->type)
+    return 0;
+
+  if (data->nr_devices == (unsigned) -1) {
+    /* first call, lookup all devices */
+    hwloc_cuda_query_devices(data);
+    /* if it fails, data->nr_devices = 0 so we won't do anything below and in next callbacks */
+  }
+
+  if (!data->nr_devices)
+    /* found no devices */
+    return 0;
+
+  for(i=0; i<data->nr_devices; i++) {
+    struct hwloc_cuda_device_info_s *info = &data->devices[i];
+    char cuda_name[32];
+    struct cudaDeviceProp prop;
+    hwloc_obj_t cuda_device;
+    cudaError_t cures;
+
+    if (info->pcidomain != pcidev->attr->pcidev.domain)
+      continue;
+    if (info->pcibus != pcidev->attr->pcidev.bus)
+      continue;
+    if (info->pcidev != pcidev->attr->pcidev.dev)
+      continue;
+    if (info->pcifunc != pcidev->attr->pcidev.func)
+      continue;
+
+    cuda_device = hwloc_alloc_setup_object(HWLOC_OBJ_OS_DEVICE, -1);
+    snprintf(cuda_name, sizeof(cuda_name), "cuda%d", info->idx);
+    cuda_device->name = strdup(cuda_name);
+    cuda_device->depth = (unsigned) HWLOC_TYPE_DEPTH_UNKNOWN;
+    cuda_device->attr->osdev.type = HWLOC_OBJ_OSDEV_COPROC;
+
+    hwloc_obj_add_info(cuda_device, "CoProcType", "CUDA");
+    hwloc_obj_add_info(cuda_device, "Backend", "CUDA");
+    hwloc_obj_add_info(cuda_device, "GPUVendor", "NVIDIA Corporation");
+
+    cures = cudaGetDeviceProperties(&prop, info->idx);
+    if (!cures)
+      hwloc_obj_add_info(cuda_device, "GPUModel", prop.name);
+
+    hwloc_insert_object_by_parent(topology, pcidev, cuda_device);
+    return 1;
+  }
+
+  return 0;
+}
+
+static void
+hwloc_cuda_backend_disable(struct hwloc_backend *backend)
+{
+  struct hwloc_cuda_backend_data_s *data = backend->private_data;
+  free(data->devices);
+  free(data);
+}
+
+static struct hwloc_backend *
+hwloc_cuda_component_instantiate(struct hwloc_disc_component *component,
+                                 const void *_data1 __hwloc_attribute_unused,
+                                 const void *_data2 __hwloc_attribute_unused,
+                                 const void *_data3 __hwloc_attribute_unused)
+{
+  struct hwloc_backend *backend;
+  struct hwloc_cuda_backend_data_s *data;
+
+  /* thissystem may not be fully initialized yet, we'll check flags in discover() */
+
+  backend = hwloc_backend_alloc(component);
+  if (!backend)
+    return NULL;
+
+  data = malloc(sizeof(*data));
+  if (!data) {
+    free(backend);
+    return NULL;
+  }
+  /* the first callback will initialize those */
+  data->nr_devices = (unsigned) -1; /* unknown yet */
+  data->devices = NULL;
+
+  backend->private_data = data;
+  backend->disable = hwloc_cuda_backend_disable;
+
+  backend->notify_new_object = hwloc_cuda_backend_notify_new_object;
+  return backend;
+}
+
+static struct hwloc_disc_component hwloc_cuda_disc_component = {
+  HWLOC_DISC_COMPONENT_TYPE_MISC,
+  "cuda",
+  HWLOC_DISC_COMPONENT_TYPE_GLOBAL,
+  hwloc_cuda_component_instantiate,
+  10, /* after pci */
+  NULL
+};
+
+#ifdef HWLOC_INSIDE_PLUGIN
+HWLOC_DECLSPEC extern const struct hwloc_component hwloc_cuda_component;
+#endif
+
+const struct hwloc_component hwloc_cuda_component = {
+  HWLOC_COMPONENT_ABI,
+  HWLOC_COMPONENT_TYPE_DISC,
+  0,
+  &hwloc_cuda_disc_component
+};
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-custom.c b/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-custom.c
index 1fb5948..2ae27b1 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-custom.c
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-custom.c
@@ -10,8 +10,7 @@
 hwloc_obj_t
 hwloc_custom_insert_group_object_by_parent(struct hwloc_topology *topology, hwloc_obj_t parent, int groupdepth)
 {
-  hwloc_obj_t obj = hwloc_alloc_setup_object(HWLOC_OBJ_GROUP, -1);
-  obj->attr->group.depth = groupdepth;
+  hwloc_obj_t obj;
 
   /* must be called between set_custom() and load(), so there's a single backend, the custom one */
   if (topology->is_loaded || !topology->backends || !topology->backends->is_custom) {
@@ -19,7 +18,10 @@ hwloc_custom_insert_group_object_by_parent(struct hwloc_topology *topology, hwlo
     return NULL;
   }
 
+  obj = hwloc_alloc_setup_object(HWLOC_OBJ_GROUP, -1);
+  obj->attr->group.depth = groupdepth;
   hwloc_insert_object_by_parent(topology, parent, obj);
+  /* insert_object_by_parent() doesn't merge during insert, so obj is still valid */
 
   return obj;
 }
@@ -80,7 +82,7 @@ hwloc_custom_component_instantiate(struct hwloc_disc_component *component,
 static struct hwloc_disc_component hwloc_custom_disc_component = {
   HWLOC_DISC_COMPONENT_TYPE_GLOBAL,
   "custom",
-  HWLOC_DISC_COMPONENT_TYPE_CPU | HWLOC_DISC_COMPONENT_TYPE_GLOBAL | HWLOC_DISC_COMPONENT_TYPE_ADDITIONAL,
+  ~0,
   hwloc_custom_component_instantiate,
   30,
   NULL
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-darwin.c b/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-darwin.c
index a15d407..75314dd 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-darwin.c
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-darwin.c
@@ -1,7 +1,7 @@
 /*
  * Copyright © 2009 CNRS
  * Copyright © 2009-2012 Inria.  All rights reserved.
- * Copyright © 2009-2012 Université Bordeaux 1
+ * Copyright © 2009-2013 Université Bordeaux 1
  * Copyright © 2009-2011 Cisco Systems, Inc.  All rights reserved.
  * See COPYING in top-level directory.
  */
@@ -182,7 +182,6 @@ hwloc_look_darwin(struct hwloc_backend *backend)
       for (i = 0; i < n && cacheconfig[i]; i++)
         hwloc_debug(" %"PRIu64"(%"PRIu64"kB)", cacheconfig[i], cachesize[i] / 1024);
 
-      cacheconfig[i] = cacheconfig32[i];
       /* Now we know how many caches there are */
       n = i;
       hwloc_debug("\n%u cache levels\n", n - 1);
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-fake.c b/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-fake.c
index 2ab6ea4..062c113 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-fake.c
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-fake.c
@@ -21,7 +21,7 @@ hwloc_fake_component_instantiate(struct hwloc_disc_component *component __hwloc_
 }
 
 static struct hwloc_disc_component hwloc_fake_disc_component = {
-  HWLOC_DISC_COMPONENT_TYPE_ADDITIONAL, /* so that it's always enabled when using the OS discovery */
+  HWLOC_DISC_COMPONENT_TYPE_MISC, /* so that it's always enabled when using the OS discovery */
   "fake",
   0, /* nothing to exclude */
   hwloc_fake_component_instantiate,
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-freebsd.c b/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-freebsd.c
index c61af76..c172264 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-freebsd.c
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-freebsd.c
@@ -187,9 +187,6 @@ hwloc_look_freebsd(struct hwloc_backend *backend)
   }
 
   /* Add FreeBSD specific information */
-#ifdef HAVE__SC_LARGE_PAGESIZE
-  topology->levels[0][0]->attr->machine.huge_page_size_kB = sysconf(_SC_LARGE_PAGESIZE);
-#endif
 #ifdef HAVE_SYSCTL
   hwloc_freebsd_node_meminfo_info(topology);
 #endif
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-gl.c b/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-gl.c
new file mode 100644
index 0000000..0896c78
--- /dev/null
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-gl.c
@@ -0,0 +1,261 @@
+/*
+ * Copyright © 2012-2013 Blue Brain Project, BBP/EPFL. All rights reserved.
+ * Copyright © 2012-2013 Inria.  All rights reserved.
+ * See COPYING in top-level directory.
+ */
+
+#include <private/autogen/config.h>
+#include <hwloc.h>
+#include <hwloc/plugins.h>
+
+/* private headers allowed for convenience because this plugin is built within hwloc */
+#include <private/misc.h>
+#include <private/debug.h>
+
+#include <stdarg.h>
+#include <errno.h>
+#include <X11/Xlib.h>
+#include <NVCtrl/NVCtrl.h>
+#include <NVCtrl/NVCtrlLib.h>
+
+#define HWLOC_GL_SERVER_MAX 10
+#define HWLOC_GL_SCREEN_MAX 10
+struct hwloc_gl_backend_data_s {
+  unsigned nr_display;
+  struct hwloc_gl_display_info_s {
+    char name[10];
+    unsigned port, device;
+    unsigned pcidomain, pcibus, pcidevice, pcifunc;
+    char *productname;
+  } display[HWLOC_GL_SERVER_MAX*HWLOC_GL_SCREEN_MAX];
+};
+
+static void
+hwloc_gl_query_devices(struct hwloc_gl_backend_data_s *data)
+{
+  int err;
+  unsigned i,j;
+
+  /* mark the number of display as 0 in case we fail below,
+   * so that we don't try again later.
+   */
+  data->nr_display = 0;
+
+  for (i = 0; i < HWLOC_GL_SERVER_MAX; ++i) {
+    Display* display;
+    char displayName[10];
+    int opcode, event, error;
+
+    /* open X server */
+    snprintf(displayName, sizeof(displayName), ":%u", i);
+    display = XOpenDisplay(displayName);
+    if (!display)
+      continue;
+
+    /* Check for NV-CONTROL extension (it's per server) */
+    if(!XQueryExtension(display, "NV-CONTROL", &opcode, &event, &error)) {
+      XCloseDisplay(display);
+      continue;
+    }
+
+    for (j = 0; j < (unsigned) ScreenCount(display) && j < HWLOC_GL_SCREEN_MAX; j++) {
+      struct hwloc_gl_display_info_s *info = &data->display[data->nr_display];
+      const int screen = j;
+      unsigned int *ptr_binary_data;
+      int data_length;
+      int gpu_number;
+      int nv_ctrl_pci_bus;
+      int nv_ctrl_pci_device;
+      int nv_ctrl_pci_domain;
+      int nv_ctrl_pci_func;
+      char *productname;
+
+      /* the server supports NV-CONTROL but it may contain non-NVIDIA screen that don't support it */
+      if (!XNVCTRLIsNvScreen(display, screen))
+        continue;
+
+      /* Gets the GPU number attached to the default screen. */
+      /* For further details, see the <NVCtrl/NVCtrlLib.h> */
+      err = XNVCTRLQueryTargetBinaryData (display, NV_CTRL_TARGET_TYPE_X_SCREEN, screen, 0,
+                                          NV_CTRL_BINARY_DATA_GPUS_USED_BY_XSCREEN,
+                                          (unsigned char **) &ptr_binary_data, &data_length);
+      if (!err)
+        continue;
+
+      gpu_number = ptr_binary_data[1];
+      free(ptr_binary_data);
+
+      /* Gets the ID's of the GPU defined by gpu_number
+       * For further details, see the <NVCtrl/NVCtrlLib.h> */
+      err = XNVCTRLQueryTargetAttribute(display, NV_CTRL_TARGET_TYPE_GPU, gpu_number, 0,
+                                        NV_CTRL_PCI_DOMAIN, &nv_ctrl_pci_domain);
+      if (!err)
+        continue;
+
+      err = XNVCTRLQueryTargetAttribute(display, NV_CTRL_TARGET_TYPE_GPU, gpu_number, 0,
+                                        NV_CTRL_PCI_BUS, &nv_ctrl_pci_bus);
+      if (!err)
+        continue;
+
+      err = XNVCTRLQueryTargetAttribute(display, NV_CTRL_TARGET_TYPE_GPU, gpu_number, 0,
+                                        NV_CTRL_PCI_DEVICE, &nv_ctrl_pci_device);
+      if (!err)
+        continue;
+
+      err = XNVCTRLQueryTargetAttribute(display, NV_CTRL_TARGET_TYPE_GPU, gpu_number, 0,
+                                        NV_CTRL_PCI_DOMAIN, &nv_ctrl_pci_domain);
+      if (!err)
+        continue;
+
+      err = XNVCTRLQueryTargetAttribute(display, NV_CTRL_TARGET_TYPE_GPU, gpu_number, 0,
+                                        NV_CTRL_PCI_FUNCTION, &nv_ctrl_pci_func);
+      if (!err)
+        continue;
+
+      productname = NULL;
+      err = XNVCTRLQueryTargetStringAttribute(display, NV_CTRL_TARGET_TYPE_GPU, gpu_number, 0,
+                                              NV_CTRL_STRING_PRODUCT_NAME, &productname);
+
+      snprintf(info->name, sizeof(info->name), ":%u.%u", i, j);
+      info->port = i;
+      info->device = j;
+      info->pcidomain = nv_ctrl_pci_domain;
+      info->pcibus = nv_ctrl_pci_bus;
+      info->pcidevice = nv_ctrl_pci_device;
+      info->pcifunc = nv_ctrl_pci_func;
+      info->productname = productname;
+
+      hwloc_debug("GL device %s (product %s) on PCI 0000:%02x:%02x.%u\n", info->name, productname,
+		  nv_ctrl_pci_domain, nv_ctrl_pci_bus, nv_ctrl_pci_device, nv_ctrl_pci_func);
+
+      /* validate this device */
+      data->nr_display++;
+    }
+    XCloseDisplay(display);
+  }
+}
+
+static int
+hwloc_gl_backend_notify_new_object(struct hwloc_backend *backend, struct hwloc_backend *caller __hwloc_attribute_unused,
+				   struct hwloc_obj *pcidev)
+{
+  struct hwloc_topology *topology = backend->topology;
+  struct hwloc_gl_backend_data_s *data = backend->private_data;
+  unsigned i, res;
+
+  if (!(hwloc_topology_get_flags(topology) & (HWLOC_TOPOLOGY_FLAG_IO_DEVICES|HWLOC_TOPOLOGY_FLAG_WHOLE_IO)))
+    return 0;
+
+  if (!hwloc_topology_is_thissystem(topology)) {
+    hwloc_debug("%s", "\nno GL detection (not thissystem)\n");
+    return 0;
+  }
+
+  if (HWLOC_OBJ_PCI_DEVICE != pcidev->type)
+    return 0;
+
+  if (data->nr_display == (unsigned) -1) {
+    /* first call, lookup all display */
+    hwloc_gl_query_devices(data);
+    /* if it fails, data->nr_display = 0 so we won't do anything below and in next callbacks */
+  }
+
+  if (!data->nr_display)
+    /* found no display */
+    return 0;
+
+  /* now the display array is ready to use */
+  res = 0;
+  for(i=0; i<data->nr_display; i++) {
+    struct hwloc_gl_display_info_s *info = &data->display[i];
+    hwloc_obj_t osdev;
+
+    if (info->pcidomain != pcidev->attr->pcidev.domain)
+      continue;
+    if (info->pcibus != pcidev->attr->pcidev.bus)
+      continue;
+    if (info->pcidevice != pcidev->attr->pcidev.dev)
+      continue;
+    if (info->pcifunc != pcidev->attr->pcidev.func)
+      continue;
+
+    osdev = hwloc_alloc_setup_object(HWLOC_OBJ_OS_DEVICE, -1);
+    osdev->name = strdup(info->name);
+    osdev->logical_index = -1;
+    osdev->attr->osdev.type = HWLOC_OBJ_OSDEV_GPU;
+    hwloc_obj_add_info(osdev, "Backend", "GL");
+    hwloc_obj_add_info(osdev, "GPUVendor", "NVIDIA Corporation");
+    if (info->productname)
+      hwloc_obj_add_info(osdev, "GPUModel", info->productname);
+    hwloc_insert_object_by_parent(topology, pcidev, osdev);
+
+    res++;
+    /* there may be others */
+  }
+
+  return res;
+}
+
+static void
+hwloc_gl_backend_disable(struct hwloc_backend *backend)
+{
+  struct hwloc_gl_backend_data_s *data = backend->private_data;
+  unsigned i;
+  if (data->nr_display != (unsigned) -1) { /* could be -1 if --no-io */
+    for(i=0; i<data->nr_display; i++) {
+      struct hwloc_gl_display_info_s *info = &data->display[i];
+      free(info->productname);
+    }
+  }
+  free(backend->private_data);
+}
+
+static struct hwloc_backend *
+hwloc_gl_component_instantiate(struct hwloc_disc_component *component,
+			       const void *_data1 __hwloc_attribute_unused,
+			       const void *_data2 __hwloc_attribute_unused,
+			       const void *_data3 __hwloc_attribute_unused)
+{
+  struct hwloc_backend *backend;
+  struct hwloc_gl_backend_data_s *data;
+
+  /* thissystem may not be fully initialized yet, we'll check flags in discover() */
+
+  backend = hwloc_backend_alloc(component);
+  if (!backend)
+    return NULL;
+
+  data = malloc(sizeof(*data));
+  if (!data) {
+    free(backend);
+    return NULL;
+  }
+  /* the first callback will initialize those */
+  data->nr_display = (unsigned) -1; /* unknown yet */
+
+  backend->private_data = data;
+  backend->disable = hwloc_gl_backend_disable;
+
+  backend->notify_new_object = hwloc_gl_backend_notify_new_object;
+  return backend;
+}
+
+static struct hwloc_disc_component hwloc_gl_disc_component = {
+  HWLOC_DISC_COMPONENT_TYPE_MISC,
+  "gl",
+  HWLOC_DISC_COMPONENT_TYPE_GLOBAL,
+  hwloc_gl_component_instantiate,
+  10, /* after pci */
+  NULL
+};
+
+#ifdef HWLOC_INSIDE_PLUGIN
+HWLOC_DECLSPEC extern const struct hwloc_component hwloc_gl_component;
+#endif
+
+const struct hwloc_component hwloc_gl_component = {
+  HWLOC_COMPONENT_ABI,
+  HWLOC_COMPONENT_TYPE_DISC,
+  0,
+  &hwloc_gl_disc_component
+};
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-hpux.c b/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-hpux.c
index 85ed107..bd84379 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-hpux.c
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-hpux.c
@@ -1,7 +1,7 @@
 /*
  * Copyright © 2009 CNRS
  * Copyright © 2009-2012 Inria.  All rights reserved.
- * Copyright © 2009-2010 Université Bordeaux 1
+ * Copyright © 2009-2010, 2013 Université Bordeaux 1
  * Copyright © 2011 Cisco Systems, Inc.  All rights reserved.
  * See COPYING in top-level directory.
  */
@@ -177,10 +177,6 @@ hwloc_look_hpux(struct hwloc_backend *backend)
 
   hwloc_alloc_obj_cpusets(topology->levels[0][0]);
 
-#ifdef HAVE__SC_LARGE_PAGESIZE
-  topology->levels[0][0]->attr->machine.huge_page_size_kB = sysconf(_SC_LARGE_PAGESIZE);
-#endif
-
   if (has_numa) {
     nbnodes = mpctl(topology->flags & HWLOC_TOPOLOGY_FLAG_WHOLE_SYSTEM ?
       MPC_GETNUMLDOMS_SYS : MPC_GETNUMLDOMS, 0, 0);
@@ -220,7 +216,8 @@ hwloc_look_hpux(struct hwloc_backend *backend)
     if (nodes) {
       /* Add this cpu to its node */
       currentnode = mpctl(MPC_SPUTOLDOM, currentcpu, 0);
-      if ((ldom_t) nodes[i]->os_index != currentnode)
+      /* Hopefully it's just the same as previous cpu */
+      if (i >= nbnodes || (ldom_t) nodes[i]->os_index != currentnode)
         for (i = 0; i < nbnodes; i++)
           if ((ldom_t) nodes[i]->os_index == currentnode)
             break;
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-linux.c b/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-linux.c
index 1b95de0..1566a2f 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-linux.c
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-linux.c
@@ -1,6 +1,6 @@
 /*
  * Copyright © 2009 CNRS
- * Copyright © 2009-2012 Inria.  All rights reserved.
+ * Copyright © 2009-2013 Inria.  All rights reserved.
  * Copyright © 2009-2012 Université Bordeaux 1
  * Copyright © 2009-2011 Cisco Systems, Inc.  All rights reserved.
  * Copyright © 2010 IBM
@@ -37,6 +37,19 @@
 #include <numaif.h>
 #endif
 
+struct hwloc_linux_backend_data_s {
+  char *root_path; /* The path of the file system root, used when browsing, e.g., Linux' sysfs and procfs. */
+  int root_fd; /* The file descriptor for the file system root, used when browsing, e.g., Linux' sysfs and procfs. */
+
+  unsigned mic_id_max; /* -1 if not tried yet, 0 if none to lookup, maxid+1 otherwise */
+};
+
+
+
+/***************************
+ * Misc Abstraction layers *
+ ***************************/
+
 #if !(defined HWLOC_HAVE_SCHED_SETAFFINITY) && (defined HWLOC_HAVE__SYSCALL3)
 /* libc doesn't have support for sched_setaffinity, build system call
  * ourselves: */
@@ -258,10 +271,11 @@ hwloc_opendir(const char *p, int d __hwloc_attribute_unused)
 #endif
 }
 
-struct hwloc_linux_backend_data_s {
-  char *root_path; /* The path of the file system root, used when browsing, e.g., Linux' sysfs and procfs. */
-  int root_fd; /* The file descriptor for the file system root, used when browsing, e.g., Linux' sysfs and procfs. */
-};
+
+
+/*****************************
+ ******* CpuBind Hooks *******
+ *****************************/
 
 int
 hwloc_linux_set_tid_cpubind(hwloc_topology_t topology __hwloc_attribute_unused, pid_t tid __hwloc_attribute_unused, hwloc_const_bitmap_t hwloc_set __hwloc_attribute_unused)
@@ -505,7 +519,8 @@ hwloc_linux_foreach_proc_tid(hwloc_topology_t topology,
 
   taskdir = opendir(taskdir_path);
   if (!taskdir) {
-    errno = ENOSYS;
+    if (errno == ENOENT)
+      errno = EINVAL;
     err = -1;
     goto out;
   }
@@ -544,7 +559,10 @@ hwloc_linux_foreach_proc_tid(hwloc_topology_t topology,
       goto out_with_tids;
     }
     goto retry;
+  } else {
+    free(newtids);
   }
+
   /* if all threads failed, return the last errno. */
   if (failed) {
     err = -1;
@@ -553,7 +571,6 @@ hwloc_linux_foreach_proc_tid(hwloc_topology_t topology,
   }
 
   err = 0;
-  free(newtids);
  out_with_tids:
   free(tids);
  out_with_dir:
@@ -1023,6 +1040,11 @@ hwloc_linux_get_thisthread_last_cpu_location(hwloc_topology_t topology, hwloc_bi
 }
 
 
+
+/***************************
+ ****** Membind hooks ******
+ ***************************/
+
 #if defined HWLOC_HAVE_SET_MEMPOLICY || defined HWLOC_HAVE_MBIND
 static int
 hwloc_linux_membind_policy_from_hwloc(int *linuxpolicy, hwloc_membind_policy_t policy, int flags)
@@ -1074,6 +1096,7 @@ hwloc_linux_membind_mask_from_nodeset(hwloc_topology_t topology __hwloc_attribut
 
   linuxmask = calloc(max_os_index/HWLOC_BITS_PER_LONG, sizeof(long));
   if (!linuxmask) {
+    hwloc_bitmap_free(linux_nodeset);
     errno = ENOMEM;
     return -1;
   }
@@ -1397,6 +1420,50 @@ hwloc_linux_get_area_membind(hwloc_topology_t topology, const void *addr, size_t
 
 #endif /* HWLOC_HAVE_SET_MEMPOLICY */
 
+void
+hwloc_set_linuxfs_hooks(struct hwloc_binding_hooks *hooks,
+			struct hwloc_topology_support *support __hwloc_attribute_unused)
+{
+  hooks->set_thisthread_cpubind = hwloc_linux_set_thisthread_cpubind;
+  hooks->get_thisthread_cpubind = hwloc_linux_get_thisthread_cpubind;
+  hooks->set_thisproc_cpubind = hwloc_linux_set_thisproc_cpubind;
+  hooks->get_thisproc_cpubind = hwloc_linux_get_thisproc_cpubind;
+  hooks->set_proc_cpubind = hwloc_linux_set_proc_cpubind;
+  hooks->get_proc_cpubind = hwloc_linux_get_proc_cpubind;
+#if HAVE_DECL_PTHREAD_SETAFFINITY_NP
+  hooks->set_thread_cpubind = hwloc_linux_set_thread_cpubind;
+#endif /* HAVE_DECL_PTHREAD_SETAFFINITY_NP */
+#if HAVE_DECL_PTHREAD_GETAFFINITY_NP
+  hooks->get_thread_cpubind = hwloc_linux_get_thread_cpubind;
+#endif /* HAVE_DECL_PTHREAD_GETAFFINITY_NP */
+  hooks->get_thisthread_last_cpu_location = hwloc_linux_get_thisthread_last_cpu_location;
+  hooks->get_thisproc_last_cpu_location = hwloc_linux_get_thisproc_last_cpu_location;
+  hooks->get_proc_last_cpu_location = hwloc_linux_get_proc_last_cpu_location;
+#ifdef HWLOC_HAVE_SET_MEMPOLICY
+  hooks->set_thisthread_membind = hwloc_linux_set_thisthread_membind;
+  hooks->get_thisthread_membind = hwloc_linux_get_thisthread_membind;
+  hooks->get_area_membind = hwloc_linux_get_area_membind;
+#endif /* HWLOC_HAVE_SET_MEMPOLICY */
+#ifdef HWLOC_HAVE_MBIND
+  hooks->set_area_membind = hwloc_linux_set_area_membind;
+  hooks->alloc_membind = hwloc_linux_alloc_membind;
+  hooks->alloc = hwloc_alloc_mmap;
+  hooks->free_membind = hwloc_free_mmap;
+  support->membind->firsttouch_membind = 1;
+  support->membind->bind_membind = 1;
+  support->membind->interleave_membind = 1;
+#endif /* HWLOC_HAVE_MBIND */
+#if (defined HWLOC_HAVE_MIGRATE_PAGES) || ((defined HWLOC_HAVE_MBIND) && (defined MPOL_MF_MOVE))
+  support->membind->migrate_membind = 1;
+#endif
+}
+
+
+
+/*******************************************
+ *** Misc Helpers for Topology Discovery ***
+ *******************************************/
+
 /* cpuinfo array */
 struct hwloc_linux_cpuinfo_proc {
   /* set during hwloc_linux_parse_cpuinfo */
@@ -1858,12 +1925,12 @@ hwloc_parse_hugepages_info(struct hwloc_linux_backend_data_s *data,
       hpfd = hwloc_fopen(path, "r", data->root_fd);
       if (hpfd) {
         if (fgets(line, sizeof(line), hpfd)) {
-          fclose(hpfd);
           /* these are the actual total amount of huge pages */
           memory->page_types[index_].count = strtoull(line, NULL, 0);
           *remaining_local_memory -= memory->page_types[index_].count * memory->page_types[index_].size;
           index_++;
         }
+	fclose(hpfd);
       }
     }
     closedir(dir);
@@ -2009,7 +2076,7 @@ hwloc_sysfs_node_meminfo_info(struct hwloc_topology *topology,
 
   sprintf(meminfopath, "%s/node%d/meminfo", syspath, node);
   hwloc_parse_meminfo_info(data, meminfopath,
-			   hwloc_snprintf(NULL, 0, "Node %d ", node),
+			   snprintf(NULL, 0, "Node %d ", node),
 			   &memory->local_memory,
 			   &meminfo_hugepages_count, NULL /* no hugepage size in node-specific meminfo */,
 			   memory->page_types == NULL);
@@ -2070,113 +2137,82 @@ hwloc_parse_node_distance(const char *distancepath, unsigned nbnodes, float *dis
   fclose(fd);
 }
 
-static int
-look_sysfsnode(struct hwloc_topology *topology,
-	       struct hwloc_linux_backend_data_s *data,
-	       const char *path, unsigned *found)
+static void
+hwloc__get_dmi_one_info(struct hwloc_linux_backend_data_s *data,
+			hwloc_obj_t obj,
+			char *path, unsigned pathlen,
+			const char *dmi_name, const char *hwloc_name)
 {
-  unsigned osnode;
-  unsigned nbnodes = 0;
-  DIR *dir;
-  struct dirent *dirent;
-  hwloc_obj_t node;
-  hwloc_bitmap_t nodeset;
-
-  *found = 0;
-
-  /* Get the list of nodes first */
-  dir = hwloc_opendir(path, data->root_fd);
-  if (dir)
-    {
-      nodeset = hwloc_bitmap_alloc();
-      while ((dirent = readdir(dir)) != NULL)
-	{
-	  if (strncmp(dirent->d_name, "node", 4))
-	    continue;
-	  osnode = strtoul(dirent->d_name+4, NULL, 0);
-	  hwloc_bitmap_set(nodeset, osnode);
-	  nbnodes++;
-	}
-      closedir(dir);
-    }
-  else
-    return -1;
-
-  if (nbnodes <= 1)
-    {
-      hwloc_bitmap_free(nodeset);
-      return 0;
-    }
-
-  /* For convenience, put these declarations inside a block. */
-
-  {
-      hwloc_obj_t * nodes = calloc(nbnodes, sizeof(hwloc_obj_t));
-      float * distances = calloc(nbnodes*nbnodes, sizeof(float));
-      unsigned *indexes = calloc(nbnodes, sizeof(unsigned));
-      unsigned index_;
-
-      if (NULL == indexes || NULL == distances || NULL == nodes) {
-          free(nodes);
-          free(indexes);
-          free(distances);
-          goto out;
-      }
-
-      /* Get node indexes now. We need them in order since Linux groups
-       * sparse distances but keep them in order in the sysfs distance files.
-       */
-      index_ = 0;
-      hwloc_bitmap_foreach_begin (osnode, nodeset) {
-	indexes[index_] = osnode;
-	index_++;
-      } hwloc_bitmap_foreach_end();
-      hwloc_bitmap_free(nodeset);
-
-#ifdef HWLOC_DEBUG
-      hwloc_debug("%s", "numa distance indexes: ");
-      for (index_ = 0; index_ < nbnodes; index_++) {
-	hwloc_debug(" %u", indexes[index_]);
-      }
-      hwloc_debug("%s", "\n");
-#endif
+  char dmi_line[64];
+  char *tmp;
+  FILE *fd;
 
-      /* Get actual distances now */
-      for (index_ = 0; index_ < nbnodes; index_++) {
-          char nodepath[SYSFS_NUMA_NODE_PATH_LEN];
-          hwloc_bitmap_t cpuset;
-	  osnode = indexes[index_];
+  strcpy(path+pathlen, dmi_name);
+  fd = hwloc_fopen(path, "r", data->root_fd);
+  if (!fd)
+    return;
 
-          sprintf(nodepath, "%s/node%u/cpumap", path, osnode);
-          cpuset = hwloc_parse_cpumap(nodepath, data->root_fd);
-          if (!cpuset)
-              continue;
+  dmi_line[0] = '\0';
+  tmp = fgets(dmi_line, sizeof(dmi_line), fd);
+  fclose (fd);
 
-          node = hwloc_alloc_setup_object(HWLOC_OBJ_NODE, osnode);
-          node->cpuset = cpuset;
-          node->nodeset = hwloc_bitmap_alloc();
-          hwloc_bitmap_set(node->nodeset, osnode);
+  if (tmp && dmi_line[0] != '\0') {
+    tmp = strchr(dmi_line, '\n');
+    if (tmp)
+      *tmp = '\0';
+    hwloc_debug("found %s '%s'\n", hwloc_name, dmi_line);
+    hwloc_obj_add_info(obj, hwloc_name, dmi_line);
+  }
+}
 
-          hwloc_sysfs_node_meminfo_info(topology, data, path, osnode, &node->memory);
+static void
+hwloc__get_dmi_info(struct hwloc_linux_backend_data_s *data, hwloc_obj_t obj)
+{
+  char path[128];
+  unsigned pathlen;
+  DIR *dir;
 
-          hwloc_debug_1arg_bitmap("os node %u has cpuset %s\n",
-                                  osnode, node->cpuset);
-          hwloc_insert_object_by_cpuset(topology, node);
-          nodes[index_] = node;
+  strcpy(path, "/sys/devices/virtual/dmi/id");
+  dir = hwloc_opendir(path, data->root_fd);
+  if (dir) {
+    pathlen = 27;
+  } else {
+    strcpy(path, "/sys/class/dmi/id");
+    dir = hwloc_opendir(path, data->root_fd);
+    if (dir)
+      pathlen = 17;
+    else
+      return;
+  }
+  closedir(dir);
+
+  path[pathlen++] = '/';
+
+  hwloc__get_dmi_one_info(data, obj, path, pathlen, "product_name", "DMIProductName");
+  hwloc__get_dmi_one_info(data, obj, path, pathlen, "product_version", "DMIProductVersion");
+  hwloc__get_dmi_one_info(data, obj, path, pathlen, "product_serial", "DMIProductSerial");
+  hwloc__get_dmi_one_info(data, obj, path, pathlen, "product_uuid", "DMIProductUUID");
+  hwloc__get_dmi_one_info(data, obj, path, pathlen, "board_vendor", "DMIBoardVendor");
+  hwloc__get_dmi_one_info(data, obj, path, pathlen, "board_name", "DMIBoardName");
+  hwloc__get_dmi_one_info(data, obj, path, pathlen, "board_version", "DMIBoardVersion");
+  hwloc__get_dmi_one_info(data, obj, path, pathlen, "board_serial", "DMIBoardSerial");
+  hwloc__get_dmi_one_info(data, obj, path, pathlen, "board_asset_tag", "DMIBoardAssetTag");
+  hwloc__get_dmi_one_info(data, obj, path, pathlen, "chassis_vendor", "DMIChassisVendor");
+  hwloc__get_dmi_one_info(data, obj, path, pathlen, "chassis_type", "DMIChassisType");
+  hwloc__get_dmi_one_info(data, obj, path, pathlen, "chassis_version", "DMIChassisVersion");
+  hwloc__get_dmi_one_info(data, obj, path, pathlen, "chassis_serial", "DMIChassisSerial");
+  hwloc__get_dmi_one_info(data, obj, path, pathlen, "chassis_asset_tag", "DMIChassisAssetTag");
+  hwloc__get_dmi_one_info(data, obj, path, pathlen, "bios_vendor", "DMIBIOSVendor");
+  hwloc__get_dmi_one_info(data, obj, path, pathlen, "bios_version", "DMIBIOSVersion");
+  hwloc__get_dmi_one_info(data, obj, path, pathlen, "bios_date", "DMIBIOSDate");
+  hwloc__get_dmi_one_info(data, obj, path, pathlen, "sys_vendor", "DMISysVendor");
+}
 
-	  /* Linux nodeX/distance file contains distance from X to other localities (from ACPI SLIT table or so),
-	   * store them in slots X*N...X*N+N-1 */
-          sprintf(nodepath, "%s/node%u/distance", path, osnode);
-          hwloc_parse_node_distance(nodepath, nbnodes, distances+index_*nbnodes, data->root_fd);
-      }
 
-      hwloc_distances_set(topology, HWLOC_OBJ_NODE, nbnodes, indexes, nodes, distances, 0 /* OS cannot force */);
-  }
 
- out:
-  *found = nbnodes;
-  return 0;
-}
+/***********************************
+ ****** Device tree Discovery ******
+ ***********************************/
 
 /* Reads the entire file and returns bytes read if bytes_read != NULL
  * Returned pointer can be freed by using free().  */
@@ -2247,6 +2283,7 @@ hwloc_read_unit32be(const char *p, const char *p1, uint32_t *buf, int root_fd)
   uint32_t *tmp = hwloc_read_raw(p, p1, &cb, root_fd);
   if (sizeof(*buf) != cb) {
     errno = EINVAL;
+    free(tmp); /* tmp is either NULL or contains useless things */
     return -1;
   }
   *buf = htonl(*tmp);
@@ -2315,7 +2352,7 @@ try__add_cache_from_device_tree_cpu(struct hwloc_topology *topology,
 {
   struct hwloc_obj *c = NULL;
 
-  if ( (0 == cache_line_size) && (0 == cache_size) )
+  if (0 == cache_size)
     return;
 
   c = hwloc_alloc_setup_object(HWLOC_OBJ_CACHE, -1);
@@ -2326,7 +2363,7 @@ try__add_cache_from_device_tree_cpu(struct hwloc_topology *topology,
   if (cache_sets == 1)
     /* likely wrong, make it unknown */
     cache_sets = 0;
-  if (cache_sets)
+  if (cache_sets && cache_line_size)
     c->attr->cache.associativity = cache_size / (cache_sets * cache_line_size);
   else
     c->attr->cache.associativity = 0;
@@ -2335,7 +2372,6 @@ try__add_cache_from_device_tree_cpu(struct hwloc_topology *topology,
 			   type == HWLOC_OBJ_CACHE_UNIFIED ? "unified" : (type == HWLOC_OBJ_CACHE_DATA ? "data" : "instruction"),
 			   level, c->cpuset);
   hwloc_insert_object_by_cpuset(topology, c);
-
 }
 
 static void
@@ -2462,7 +2498,7 @@ look_powerpc_device_tree(struct hwloc_topology *topology,
         hwloc_debug("%s has no \"reg\" property, skipping\n", cpu);
       } else {
         struct hwloc_obj *core = NULL;
-        add_device_tree_cpus_node(&cpus, cpuset, l2_cache, phandle, dirent->d_name); 
+        add_device_tree_cpus_node(&cpus, cpuset, l2_cache, phandle, dirent->d_name);
 
         /* Add core */
         core = hwloc_alloc_setup_object(HWLOC_OBJ_CORE, reg);
@@ -2474,8 +2510,8 @@ look_powerpc_device_tree(struct hwloc_topology *topology,
 
         hwloc_bitmap_free(cpuset);
       }
-      free(device_type);
     }
+    free(device_type);
 cont:
     free(cpu);
   }
@@ -2535,6 +2571,124 @@ cont:
   free(cpus.p);
 }
 
+
+
+/**************************************
+ ****** Sysfs Topology Discovery ******
+ **************************************/
+
+static int
+look_sysfsnode(struct hwloc_topology *topology,
+	       struct hwloc_linux_backend_data_s *data,
+	       const char *path, unsigned *found)
+{
+  unsigned osnode;
+  unsigned nbnodes = 0;
+  DIR *dir;
+  struct dirent *dirent;
+  hwloc_bitmap_t nodeset;
+
+  *found = 0;
+
+  /* Get the list of nodes first */
+  dir = hwloc_opendir(path, data->root_fd);
+  if (dir)
+    {
+      nodeset = hwloc_bitmap_alloc();
+      while ((dirent = readdir(dir)) != NULL)
+	{
+	  if (strncmp(dirent->d_name, "node", 4))
+	    continue;
+	  osnode = strtoul(dirent->d_name+4, NULL, 0);
+	  hwloc_bitmap_set(nodeset, osnode);
+	  nbnodes++;
+	}
+      closedir(dir);
+    }
+  else
+    return -1;
+
+  if (nbnodes <= 1)
+    {
+      hwloc_bitmap_free(nodeset);
+      return 0;
+    }
+
+  /* For convenience, put these declarations inside a block. */
+
+  {
+      hwloc_obj_t * nodes = calloc(nbnodes, sizeof(hwloc_obj_t));
+      float * distances = calloc(nbnodes*nbnodes, sizeof(float));
+      unsigned *indexes = calloc(nbnodes, sizeof(unsigned));
+      unsigned index_;
+
+      if (NULL == indexes || NULL == distances || NULL == nodes) {
+          free(nodes);
+          free(indexes);
+          free(distances);
+          hwloc_bitmap_free(nodeset);
+          goto out;
+      }
+
+      /* Get node indexes now. We need them in order since Linux groups
+       * sparse distances but keep them in order in the sysfs distance files.
+       */
+      index_ = 0;
+      hwloc_bitmap_foreach_begin (osnode, nodeset) {
+	indexes[index_] = osnode;
+	index_++;
+      } hwloc_bitmap_foreach_end();
+      hwloc_bitmap_free(nodeset);
+
+#ifdef HWLOC_DEBUG
+      hwloc_debug("%s", "numa distance indexes: ");
+      for (index_ = 0; index_ < nbnodes; index_++) {
+	hwloc_debug(" %u", indexes[index_]);
+      }
+      hwloc_debug("%s", "\n");
+#endif
+
+      /* Get actual distances now */
+      for (index_ = 0; index_ < nbnodes; index_++) {
+          char nodepath[SYSFS_NUMA_NODE_PATH_LEN];
+          hwloc_bitmap_t cpuset;
+          hwloc_obj_t node, res_obj;
+
+	  osnode = indexes[index_];
+
+          sprintf(nodepath, "%s/node%u/cpumap", path, osnode);
+          cpuset = hwloc_parse_cpumap(nodepath, data->root_fd);
+          if (!cpuset)
+              continue;
+
+          node = hwloc_alloc_setup_object(HWLOC_OBJ_NODE, osnode);
+          node->cpuset = cpuset;
+          node->nodeset = hwloc_bitmap_alloc();
+          hwloc_bitmap_set(node->nodeset, osnode);
+
+          hwloc_sysfs_node_meminfo_info(topology, data, path, osnode, &node->memory);
+
+          hwloc_debug_1arg_bitmap("os node %u has cpuset %s\n",
+                                  osnode, node->cpuset);
+          res_obj = hwloc_insert_object_by_cpuset(topology, node);
+          assert(node == res_obj); /* if we got merged, somebody else added NODEs earlier, things went wrong?! */
+
+          nodes[index_] = node;
+
+	  /* Linux nodeX/distance file contains distance from X to other localities (from ACPI SLIT table or so),
+	   * store them in slots X*N...X*N+N-1 */
+          sprintf(nodepath, "%s/node%u/distance", path, osnode);
+          hwloc_parse_node_distance(nodepath, nbnodes, distances+index_*nbnodes, data->root_fd);
+      }
+
+      hwloc_distances_set(topology, HWLOC_OBJ_NODE, nbnodes, indexes, nodes, distances, 0 /* OS cannot force */);
+  }
+
+ out:
+  *found = nbnodes;
+  return 0;
+}
+
 /* Look at Linux' /sys/devices/system/cpu/cpu%d/topology/ */
 static int
 look_sysfscpu(struct hwloc_topology *topology,
@@ -2606,7 +2760,6 @@ look_sysfscpu(struct hwloc_topology *topology,
   caches_added = 0;
   hwloc_bitmap_foreach_begin(i, cpuset)
     {
-      struct hwloc_obj *sock, *core, *book, *thread;
       hwloc_bitmap_t socketset, coreset, bookset, threadset, savedcoreset;
       unsigned mysocketid, mycoreid, mybookid;
       int threadwithcoreid = 0;
@@ -2620,11 +2773,10 @@ look_sysfscpu(struct hwloc_topology *topology,
       socketset = hwloc_parse_cpumap(str, data->root_fd);
       if (socketset && hwloc_bitmap_first(socketset) == i) {
         /* first cpu in this socket, add the socket */
-        sock = hwloc_alloc_setup_object(HWLOC_OBJ_SOCKET, mysocketid);
+        struct hwloc_obj *sock = hwloc_alloc_setup_object(HWLOC_OBJ_SOCKET, mysocketid);
         sock->cpuset = socketset;
         hwloc_debug_1arg_bitmap("os socket %u has cpuset %s\n",
                      mysocketid, socketset);
-        hwloc_insert_object_by_cpuset(topology, sock);
 	/* add cpuinfo */
 	if (cpuinfo_Lprocs) {
 	  for(j=0; j<(int) cpuinfo_numprocs; j++)
@@ -2634,6 +2786,7 @@ look_sysfscpu(struct hwloc_topology *topology,
 	      hwloc_obj_add_info(sock, "CPUModel", cpuinfo_Lprocs[j].cpumodel);
 	    }
 	}
+        hwloc_insert_object_by_cpuset(topology, sock);
         socketset = NULL; /* don't free it */
       }
       hwloc_bitmap_free(socketset);
@@ -2663,7 +2816,7 @@ look_sysfscpu(struct hwloc_topology *topology,
 
       if (coreset && (hwloc_bitmap_first(coreset) == i || threadwithcoreid)) {
 	/* regular core */
-        core = hwloc_alloc_setup_object(HWLOC_OBJ_CORE, mycoreid);
+        struct hwloc_obj *core = hwloc_alloc_setup_object(HWLOC_OBJ_CORE, mycoreid);
 	if (threadwithcoreid) {
 	  /* amd multicore compute-unit, create one core per thread */
 	  core->cpuset = hwloc_bitmap_alloc();
@@ -2685,7 +2838,7 @@ look_sysfscpu(struct hwloc_topology *topology,
         sprintf(str, "%s/cpu%d/topology/book_siblings", path, i);
         bookset = hwloc_parse_cpumap(str, data->root_fd);
         if (bookset && hwloc_bitmap_first(bookset) == i) {
-          book = hwloc_alloc_setup_object(HWLOC_OBJ_GROUP, mybookid);
+          struct hwloc_obj *book = hwloc_alloc_setup_object(HWLOC_OBJ_GROUP, mybookid);
           book->cpuset = bookset;
           hwloc_debug_1arg_bitmap("os book %u has cpuset %s\n",
                        mybookid, bookset);
@@ -2694,23 +2847,22 @@ look_sysfscpu(struct hwloc_topology *topology,
         }
       }
 
+      {
       /* look at the thread */
+      struct hwloc_obj *thread = hwloc_alloc_setup_object(HWLOC_OBJ_PU, i);
       threadset = hwloc_bitmap_alloc();
       hwloc_bitmap_only(threadset, i);
-
-      /* add the thread */
-      thread = hwloc_alloc_setup_object(HWLOC_OBJ_PU, i);
       thread->cpuset = threadset;
       hwloc_debug_1arg_bitmap("thread %d has cpuset %s\n",
 		 i, threadset);
       hwloc_insert_object_by_cpuset(topology, thread);
+      }
 
       /* look at the caches */
       for(j=0; j<10; j++) {
 #define SHARED_CPU_MAP_STRLEN 128
 	char mappath[SHARED_CPU_MAP_STRLEN];
 	char str2[20]; /* enough for a level number (one digit) or a type (Data/Instruction/Unified) */
-	struct hwloc_obj *cache;
 	hwloc_bitmap_t cacheset;
 	unsigned long kB = 0;
 	unsigned linesize = 0;
@@ -2722,11 +2874,12 @@ look_sysfscpu(struct hwloc_topology *topology,
 	sprintf(mappath, "%s/cpu%d/cache/index%d/level", path, i, j);
 	fd = hwloc_fopen(mappath, "r", data->root_fd);
 	if (fd) {
-	  if (fgets(str2,sizeof(str2), fd))
+	  char *res = fgets(str2,sizeof(str2), fd);
+	  fclose(fd);
+	  if (res)
 	    depth = strtoul(str2, NULL, 10)-1;
 	  else
 	    continue;
-	  fclose(fd);
 	} else
 	  continue;
 
@@ -2803,12 +2956,12 @@ look_sysfscpu(struct hwloc_topology *topology,
 
           if (hwloc_bitmap_first(cacheset) == i) {
             /* first cpu in this cache, add the cache */
-            cache = hwloc_alloc_setup_object(HWLOC_OBJ_CACHE, -1);
+            struct hwloc_obj *cache = hwloc_alloc_setup_object(HWLOC_OBJ_CACHE, -1);
             cache->attr->cache.size = kB << 10;
             cache->attr->cache.depth = depth+1;
             cache->attr->cache.linesize = linesize;
 	    cache->attr->cache.type = type;
-	    if (!sets)
+	    if (!linesize || !lines_per_tag || !sets)
 	      cache->attr->cache.associativity = 0; /* unknown */
 	    else if (sets == 1)
 	      cache->attr->cache.associativity = 0; /* likely wrong, make it unknown */
@@ -2837,6 +2990,11 @@ look_sysfscpu(struct hwloc_topology *topology,
 }
 
 
+
+/****************************************
+ ****** cpuinfo Topology Discovery ******
+ ****************************************/
+
 /*
  * architecture properly detected:
  * arm: "Processor\t:"				=> OK
@@ -2942,12 +3100,10 @@ hwloc_linux_parse_cpuinfo(struct hwloc_linux_backend_data_s *data,
       var = strtoul(value,&endptr,0);					\
       if (endptr==value) {						\
 	hwloc_debug("no number in "field" field of %s\n", path);	\
-	free(str);							\
-	return -1;							\
+	goto err;							\
       } else if (var==ULONG_MAX) {					\
 	hwloc_debug("too big "field" number in %s\n", path); 		\
-	free(str);							\
-	return -1;							\
+	goto err;							\
       }									\
       hwloc_debug(field " %lu\n", var)
 #   define getprocnb_end()						\
@@ -2995,6 +3151,13 @@ hwloc_linux_parse_cpuinfo(struct hwloc_linux_backend_data_s *data,
 
   *Lprocs_p = Lprocs;
   return numprocs;
+
+ err:
+  fclose(fd);
+  free(str);
+  free(global_cpumodel);
+  free(Lprocs);
+  return -1;
 }
 
 static void
@@ -3161,60 +3324,11 @@ look_cpuinfo(struct hwloc_topology *topology,
   return 0;
 }
 
-static void
-hwloc__get_dmi_one_info(struct hwloc_linux_backend_data_s *data,
-			hwloc_obj_t obj, const char *sysfs_name, const char *hwloc_name)
-{
-  char sysfs_path[128];
-  char dmi_line[64];
-  char *tmp;
-  FILE *fd;
-
-  snprintf(sysfs_path, sizeof(sysfs_path), "/sys/devices/virtual/dmi/id/%s", sysfs_name);
-  fd = hwloc_fopen(sysfs_path, "r", data->root_fd);
-  if (!fd) {
-    /* old path */
-    snprintf(sysfs_path, sizeof(sysfs_path), "/sys/class/dmi/id/%s", sysfs_name);
-    fd = hwloc_fopen(sysfs_path, "r", data->root_fd);
-    if (!fd)
-      return;
-  }
-
-  dmi_line[0] = '\0';
-  tmp = fgets(dmi_line, sizeof(dmi_line), fd);
-  fclose (fd);
 
-  if (tmp && dmi_line[0] != '\0') {
-    tmp = strchr(dmi_line, '\n');
-    if (tmp)
-      *tmp = '\0';
-    hwloc_debug("found %s '%s'\n", hwloc_name, dmi_line);
-    hwloc_obj_add_info(obj, hwloc_name, dmi_line);
-  }
-}
 
-static void
-hwloc__get_dmi_info(struct hwloc_linux_backend_data_s *data, hwloc_obj_t obj)
-{
-  hwloc__get_dmi_one_info(data, obj, "product_name", "DMIProductName");
-  hwloc__get_dmi_one_info(data, obj, "product_version", "DMIProductVersion");
-  hwloc__get_dmi_one_info(data, obj, "product_serial", "DMIProductSerial");
-  hwloc__get_dmi_one_info(data, obj, "product_uuid", "DMIProductUUID");
-  hwloc__get_dmi_one_info(data, obj, "board_vendor", "DMIBoardVendor");
-  hwloc__get_dmi_one_info(data, obj, "board_name", "DMIBoardName");
-  hwloc__get_dmi_one_info(data, obj, "board_version", "DMIBoardVersion");
-  hwloc__get_dmi_one_info(data, obj, "board_serial", "DMIBoardSerial");
-  hwloc__get_dmi_one_info(data, obj, "board_asset_tag", "DMIBoardAssetTag");
-  hwloc__get_dmi_one_info(data, obj, "chassis_vendor", "DMIChassisVendor");
-  hwloc__get_dmi_one_info(data, obj, "chassis_type", "DMIChassisType");
-  hwloc__get_dmi_one_info(data, obj, "chassis_version", "DMIChassisVersion");
-  hwloc__get_dmi_one_info(data, obj, "chassis_serial", "DMIChassisSerial");
-  hwloc__get_dmi_one_info(data, obj, "chassis_asset_tag", "DMIChassisAssetTag");
-  hwloc__get_dmi_one_info(data, obj, "bios_vendor", "DMIBIOSVendor");
-  hwloc__get_dmi_one_info(data, obj, "bios_version", "DMIBIOSVersion");
-  hwloc__get_dmi_one_info(data, obj, "bios_date", "DMIBIOSDate");
-  hwloc__get_dmi_one_info(data, obj, "sys_vendor", "DMISysVendor");
-}
+/*************************************
+ ****** Main Topology Discovery ******
+ *************************************/
 
 static void
 hwloc_linux_fallback_pu_level(struct hwloc_topology *topology)
@@ -3278,14 +3392,15 @@ hwloc_look_linuxfs(struct hwloc_backend *backend)
       node = strtoul(dirent->d_name+4, NULL, 0);
       snprintf(path, sizeof(path), "/proc/nodes/node%lu/cpuinfo", node);
       err = look_cpuinfo(topology, data, path, machine_online_set);
-      if (err < 0)
+      if (err < 0) {
+        hwloc_bitmap_free(machine_online_set);
         continue;
+      }
       hwloc_bitmap_or(topology->levels[0][0]->online_cpuset, topology->levels[0][0]->online_cpuset, machine_online_set);
       machine = hwloc_alloc_setup_object(HWLOC_OBJ_MACHINE, node);
       machine->cpuset = machine_online_set;
       hwloc_debug_1arg_bitmap("machine number %lu has cpuset %s\n",
 		 node, machine_online_set);
-      hwloc_insert_object_by_cpuset(topology, machine);
 
       /* Get the machine memory attributes */
       hwloc_get_kerrighed_node_meminfo_info(topology, data, node, &machine->memory);
@@ -3293,6 +3408,8 @@ hwloc_look_linuxfs(struct hwloc_backend *backend)
       /* Gather DMI info */
       /* FIXME: get the right DMI info of each machine */
       hwloc__get_dmi_info(data, machine);
+
+      hwloc_insert_object_by_cpuset(topology, machine);
     }
     closedir(nodes_dir);
   } else {
@@ -3354,48 +3471,12 @@ hwloc_look_linuxfs(struct hwloc_backend *backend)
   return 1;
 }
 
-void
-hwloc_set_linuxfs_hooks(struct hwloc_binding_hooks *hooks,
-			struct hwloc_topology_support *support __hwloc_attribute_unused)
-{
-  hooks->set_thisthread_cpubind = hwloc_linux_set_thisthread_cpubind;
-  hooks->get_thisthread_cpubind = hwloc_linux_get_thisthread_cpubind;
-  hooks->set_thisproc_cpubind = hwloc_linux_set_thisproc_cpubind;
-  hooks->get_thisproc_cpubind = hwloc_linux_get_thisproc_cpubind;
-  hooks->set_proc_cpubind = hwloc_linux_set_proc_cpubind;
-  hooks->get_proc_cpubind = hwloc_linux_get_proc_cpubind;
-#if HAVE_DECL_PTHREAD_SETAFFINITY_NP
-  hooks->set_thread_cpubind = hwloc_linux_set_thread_cpubind;
-#endif /* HAVE_DECL_PTHREAD_SETAFFINITY_NP */
-#if HAVE_DECL_PTHREAD_GETAFFINITY_NP
-  hooks->get_thread_cpubind = hwloc_linux_get_thread_cpubind;
-#endif /* HAVE_DECL_PTHREAD_GETAFFINITY_NP */
-  hooks->get_thisthread_last_cpu_location = hwloc_linux_get_thisthread_last_cpu_location;
-  hooks->get_thisproc_last_cpu_location = hwloc_linux_get_thisproc_last_cpu_location;
-  hooks->get_proc_last_cpu_location = hwloc_linux_get_proc_last_cpu_location;
-#ifdef HWLOC_HAVE_SET_MEMPOLICY
-  hooks->set_thisthread_membind = hwloc_linux_set_thisthread_membind;
-  hooks->get_thisthread_membind = hwloc_linux_get_thisthread_membind;
-  hooks->get_area_membind = hwloc_linux_get_area_membind;
-#endif /* HWLOC_HAVE_SET_MEMPOLICY */
-#ifdef HWLOC_HAVE_MBIND
-  hooks->set_area_membind = hwloc_linux_set_area_membind;
-  hooks->alloc_membind = hwloc_linux_alloc_membind;
-  hooks->alloc = hwloc_alloc_mmap;
-  hooks->free_membind = hwloc_free_mmap;
-  support->membind->firsttouch_membind = 1;
-  support->membind->bind_membind = 1;
-  support->membind->interleave_membind = 1;
-#endif /* HWLOC_HAVE_MBIND */
-#if (defined HWLOC_HAVE_MIGRATE_PAGES) || ((defined HWLOC_HAVE_MBIND) && (defined MPOL_MF_MOVE))
-  support->membind->migrate_membind = 1;
-#endif
-}
 
-/*
- * Linux PCI callback
- *
- * Does not support changing the fsroot
+
+/****************************************
+ ***** Linux PCI backend callbacks ******
+ ****************************************
+ * Do not support changing the fsroot (use sysfs)
  */
 
 static hwloc_obj_t
@@ -3407,13 +3488,50 @@ hwloc_linux_add_os_device(struct hwloc_topology *topology, struct hwloc_obj *pci
   obj->attr->osdev.type = type;
 
   hwloc_insert_object_by_parent(topology, pcidev, obj);
+  /* insert_object_by_parent() doesn't merge during insert, so obj is still valid */
 
   return obj;
 }
 
 typedef void (*hwloc_linux_class_fillinfos_t)(struct hwloc_topology *topology, struct hwloc_obj *osdev, const char *osdevpath);
 
-/* look for objects of the given class below a sysfs directory */
+/* cannot be used in fsroot-aware code, would have to move to a per-topology variable */
+static int hwloc_linux_deprecated_classlinks_model = -2; /* -2 if never tried, -1 if unknown, 0 if new (device contains class/name), 1 if old (device contains class:name) */
+
+static void
+hwloc_linux_check_deprecated_classlinks_model(void)
+{
+  DIR *dir;
+  struct dirent *dirent;
+  char path[128];
+  struct stat st;
+
+  hwloc_linux_deprecated_classlinks_model = -1;
+
+  dir = opendir("/sys/class/net");
+  if (!dir)
+    return;
+  while ((dirent = readdir(dir)) != NULL) {
+    if (!strcmp(dirent->d_name, ".") || !strcmp(dirent->d_name, "..") || !strcmp(dirent->d_name, "lo"))
+      continue;
+    snprintf(path, sizeof(path), "/sys/class/net/%s/device/net/%s", dirent->d_name, dirent->d_name);
+    if (stat(path, &st) == 0) {
+      hwloc_linux_deprecated_classlinks_model = 0;
+      goto out;
+    }
+    snprintf(path, sizeof(path), "/sys/class/net/%s/device/net:%s", dirent->d_name, dirent->d_name);
+    if (stat(path, &st) == 0) {
+      hwloc_linux_deprecated_classlinks_model = 1;
+      goto out;
+    }
+  }
+out:
+  closedir(dir);
+}
+
+/* class objects that are immediately below pci devices:
+ * look for objects of the given classname below a sysfs (pcidev) directory
+ */
 static int
 hwloc_linux_class_readdir(struct hwloc_topology *topology, struct hwloc_obj *pcidev, const char *devicepath,
 			  hwloc_obj_osdev_type_t type, const char *classname,
@@ -3426,28 +3544,38 @@ hwloc_linux_class_readdir(struct hwloc_topology *topology, struct hwloc_obj *pci
   hwloc_obj_t obj;
   int res = 0;
 
-  snprintf(path, sizeof(path), "%s/%s", devicepath, classname);
-  dir = opendir(path);
-  if (dir) {
+  if (hwloc_linux_deprecated_classlinks_model == -2)
+    hwloc_linux_check_deprecated_classlinks_model();
+
+  if (hwloc_linux_deprecated_classlinks_model != 1) {
     /* modern sysfs: <device>/<class>/<name> */
-    while ((dirent = readdir(dir)) != NULL) {
-      if (!strcmp(dirent->d_name, ".") || !strcmp(dirent->d_name, ".."))
-	continue;
-      obj = hwloc_linux_add_os_device(topology, pcidev, type, dirent->d_name);
-      if (fillinfo) {
-	snprintf(path, sizeof(path), "%s/%s/%s", devicepath, classname, dirent->d_name);
-	fillinfo(topology, obj, path);
+    snprintf(path, sizeof(path), "%s/%s", devicepath, classname);
+    dir = opendir(path);
+    if (dir) {
+      hwloc_linux_deprecated_classlinks_model = 0;
+      while ((dirent = readdir(dir)) != NULL) {
+	if (!strcmp(dirent->d_name, ".") || !strcmp(dirent->d_name, ".."))
+	  continue;
+	obj = hwloc_linux_add_os_device(topology, pcidev, type, dirent->d_name);
+	if (fillinfo) {
+	  snprintf(path, sizeof(path), "%s/%s/%s", devicepath, classname, dirent->d_name);
+	  fillinfo(topology, obj, path);
+	}
+	res++;
       }
-      res++;
+      closedir(dir);
+      return res;
     }
-    closedir(dir);
-  } else {
+  }
+
+  if (hwloc_linux_deprecated_classlinks_model != 0) {
     /* deprecated sysfs: <device>/<class>:<name> */
     dir = opendir(devicepath);
     if (dir) {
       while ((dirent = readdir(dir)) != NULL) {
 	if (strncmp(dirent->d_name, classname, classnamelen) || dirent->d_name[classnamelen] != ':')
 	  continue;
+	hwloc_linux_deprecated_classlinks_model = 1;
 	obj = hwloc_linux_add_os_device(topology, pcidev, type, dirent->d_name + classnamelen+1);
 	if (fillinfo) {
 	  snprintf(path, sizeof(path), "%s/%s", devicepath, dirent->d_name);
@@ -3456,13 +3584,16 @@ hwloc_linux_class_readdir(struct hwloc_topology *topology, struct hwloc_obj *pci
 	res++;
       }
       closedir(dir);
+      return res;
     }
   }
 
-  return res;
+  return 0;
 }
 
-/* class objects that are immediately below pci devices */
+/*
+ * look for net objects below a pcidev in sysfs
+ */
 static void
 hwloc_linux_net_class_fillinfos(struct hwloc_topology *topology __hwloc_attribute_unused, struct hwloc_obj *obj, const char *osdevpath)
 {
@@ -3502,6 +3633,15 @@ hwloc_linux_net_class_fillinfos(struct hwloc_topology *topology __hwloc_attribut
   }
 }
 
+static int
+hwloc_linux_lookup_net_class(struct hwloc_topology *topology, struct hwloc_obj *pcidev, const char *pcidevpath)
+{
+  return hwloc_linux_class_readdir(topology, pcidev, pcidevpath, HWLOC_OBJ_OSDEV_NETWORK, "net", hwloc_linux_net_class_fillinfos);
+}
+
+/*
+ * look for infiniband objects below a pcidev in sysfs
+ */
 static void
 hwloc_linux_infiniband_class_fillinfos(struct hwloc_topology *topology __hwloc_attribute_unused, struct hwloc_obj *obj, const char *osdevpath)
 {
@@ -3598,20 +3738,19 @@ hwloc_linux_infiniband_class_fillinfos(struct hwloc_topology *topology __hwloc_a
 }
 
 static int
-hwloc_linux_lookup_net_class(struct hwloc_topology *topology, struct hwloc_obj *pcidev, const char *pcidevpath)
-{
-  return hwloc_linux_class_readdir(topology, pcidev, pcidevpath, HWLOC_OBJ_OSDEV_NETWORK, "net", hwloc_linux_net_class_fillinfos);
-}
-static int
 hwloc_linux_lookup_openfabrics_class(struct hwloc_topology *topology, struct hwloc_obj *pcidev, const char *pcidevpath)
 {
   return hwloc_linux_class_readdir(topology, pcidev, pcidevpath, HWLOC_OBJ_OSDEV_OPENFABRICS, "infiniband", hwloc_linux_infiniband_class_fillinfos);
 }
+
+/* look for dma objects below a pcidev in sysfs */
 static int
 hwloc_linux_lookup_dma_class(struct hwloc_topology *topology, struct hwloc_obj *pcidev, const char *pcidevpath)
 {
   return hwloc_linux_class_readdir(topology, pcidev, pcidevpath, HWLOC_OBJ_OSDEV_DMA, "dma", NULL);
 }
+
+/* look for drm objects below a pcidev in sysfs */
 static int
 hwloc_linux_lookup_drm_class(struct hwloc_topology *topology, struct hwloc_obj *pcidev, const char *pcidevpath)
 {
@@ -3625,6 +3764,10 @@ hwloc_linux_lookup_drm_class(struct hwloc_topology *topology, struct hwloc_obj *
    */
 }
 
+/*
+ * look for block objects below a pcidev in sysfs
+ */
+
 /* block class objects are in
  * host%d/target%d:%d:%d/%d:%d:%d:%d/
  * or
@@ -3704,6 +3847,128 @@ hwloc_linux_lookup_host_block_class(struct hwloc_topology *topology, struct hwlo
   return res;
 }
 
+static void
+hwloc_linux_mic_class_fillinfos(struct hwloc_topology *topology __hwloc_attribute_unused, struct hwloc_obj *obj, const char *osdevpath)
+{
+  FILE *fd;
+  char path[256];
+
+  hwloc_obj_add_info(obj, "CoProcType", "MIC");
+
+  snprintf(path, sizeof(path), "%s/family", osdevpath);
+  fd = fopen(path, "r");
+  if (fd) {
+    char family[64];
+    if (fgets(family, sizeof(family), fd)) {
+      char *eol = strchr(family, '\n');
+      if (eol)
+        *eol = 0;
+      hwloc_obj_add_info(obj, "MICFamily", family);
+    }
+    fclose(fd);
+  }
+
+  snprintf(path, sizeof(path), "%s/sku", osdevpath);
+  fd = fopen(path, "r");
+  if (fd) {
+    char sku[64];
+    if (fgets(sku, sizeof(sku), fd)) {
+      char *eol = strchr(sku, '\n');
+      if (eol)
+        *eol = 0;
+      hwloc_obj_add_info(obj, "MICSKU", sku);
+    }
+    fclose(fd);
+  }
+
+  snprintf(path, sizeof(path), "%s/active_cores", osdevpath);
+  fd = fopen(path, "r");
+  if (fd) {
+    char string[10];
+    if (fgets(string, sizeof(string), fd)) {
+      unsigned long count = strtoul(string, NULL, 16);
+      snprintf(string, sizeof(string), "%lu", count);
+      hwloc_obj_add_info(obj, "MICActiveCores", string);
+    }
+    fclose(fd);
+  }
+
+  snprintf(path, sizeof(path), "%s/memsize", osdevpath);
+  fd = fopen(path, "r");
+  if (fd) {
+    char string[20];
+    if (fgets(string, sizeof(string), fd)) {
+      unsigned long count = strtoul(string, NULL, 16);
+      snprintf(string, sizeof(string), "%lu", count);
+      hwloc_obj_add_info(obj, "MICMemorySize", string);
+    }
+    fclose(fd);
+  }
+}
+
+static int
+hwloc_linux_lookup_mic_class(struct hwloc_topology *topology, struct hwloc_obj *pcidev, const char *pcidevpath)
+{
+  return hwloc_linux_class_readdir(topology, pcidev, pcidevpath, HWLOC_OBJ_OSDEV_COPROC, "mic", hwloc_linux_mic_class_fillinfos);
+}
+
+static int
+hwloc_linux_directlookup_mic_class(struct hwloc_backend *backend, struct hwloc_obj *pcidev)
+{
+  struct hwloc_topology *topology = backend->topology;
+  struct hwloc_linux_backend_data_s *data = backend->private_data;
+  char path[256];
+  struct stat st;
+  hwloc_obj_t obj;
+  unsigned idx;
+  int res = 0;
+
+  if (!data->mic_id_max)
+    /* already tried, nothing to do */
+    return 0;
+
+  if (data->mic_id_max == (unsigned) -1) {
+    /* never tried, find out the max id */
+    DIR *dir;
+    struct dirent *dirent;
+
+    /* make sure we never do this lookup again */
+    data->mic_id_max = 0;
+
+    /* read the entire class and find the max id of mic%u dirents */
+    dir = opendir("/sys/devices/virtual/mic");
+    if (!dir) {
+      dir = opendir("/sys/class/mic");
+      if (!dir)
+	return 0;
+    }
+    while ((dirent = readdir(dir)) != NULL) {
+      if (!strcmp(dirent->d_name, ".") || !strcmp(dirent->d_name, ".."))
+	continue;
+      if (sscanf(dirent->d_name, "mic%u", &idx) != 1)
+	continue;
+      if (idx >= data->mic_id_max)
+	data->mic_id_max = idx+1;
+    }
+    closedir(dir);
+  }
+
+  /* now iterate over the mic ids and see if one matches our pcidev */
+  for(idx=0; idx<data->mic_id_max; idx++) {
+    snprintf(path, sizeof(path), "/sys/class/mic/mic%u/pci_%02x:%02x.%02x",
+	     idx, pcidev->attr->pcidev.bus,  pcidev->attr->pcidev.dev,  pcidev->attr->pcidev.func);
+    if (stat(path, &st) < 0)
+      continue;
+    snprintf(path, sizeof(path), "mic%u", idx);
+    obj = hwloc_linux_add_os_device(topology, pcidev, HWLOC_OBJ_OSDEV_COPROC, path);
+    snprintf(path, sizeof(path), "/sys/class/mic/mic%u", idx);
+    hwloc_linux_mic_class_fillinfos(topology, obj, path);
+    res++;
+  }
+
+  return res;
+}
+
 static int
 hwloc_linux_lookup_block_class(struct hwloc_topology *topology, struct hwloc_obj *pcidev, const char *pcidevpath)
 {
@@ -3789,6 +4054,9 @@ hwloc_linux_lookup_block_class(struct hwloc_topology *topology, struct hwloc_obj
   return res;
 }
 
+/*
+ * backend callback for inserting objects inside a pci device
+ */
 static int
 hwloc_linux_backend_notify_new_object(struct hwloc_backend *backend, struct hwloc_backend *caller __hwloc_attribute_unused,
 				      struct hwloc_obj *obj)
@@ -3796,14 +4064,17 @@ hwloc_linux_backend_notify_new_object(struct hwloc_backend *backend, struct hwlo
   struct hwloc_topology *topology = backend->topology;
   struct hwloc_linux_backend_data_s *data = backend->private_data;
   char pcidevpath[256];
-  int res = 0;
+  int res = 0, mic;
 
   /* this callback is only used in the libpci backend for now */
   assert(obj->type == HWLOC_OBJ_PCI_DEVICE);
 
   /* this should not be called if the backend isn't the real OS one */
 #ifdef HWLOC_DEBUG
-  assert(!strcmp(backend->component->name, "linux"));
+  {
+    int cmp = strcmp(backend->component->name, "linux");
+    assert(!cmp);
+  }
 #endif
   if (data->root_path) {
     assert(strlen(data->root_path) == 1);
@@ -3819,9 +4090,20 @@ hwloc_linux_backend_notify_new_object(struct hwloc_backend *backend, struct hwlo
   res += hwloc_linux_lookup_dma_class(topology, obj, pcidevpath);
   res += hwloc_linux_lookup_drm_class(topology, obj, pcidevpath);
   res += hwloc_linux_lookup_block_class(topology, obj, pcidevpath);
+  res += mic = hwloc_linux_lookup_mic_class(topology, obj, pcidevpath);
+
+  /* hwloc_linux_lookup_mic_class may find nothing because pcidev sysfs directories
+   * do not have mic/mic%u symlinks to mic devices. if so, try from the mic class.
+   */
+  if (!mic)
+    res += hwloc_linux_directlookup_mic_class(backend, obj);
+
   return res;
 }
 
+/*
+ * backend callback for retrieving the location of a pci device
+ */
 static int
 hwloc_linux_backend_get_obj_cpuset(struct hwloc_backend *backend,
 				   struct hwloc_backend *caller __hwloc_attribute_unused,
@@ -3838,7 +4120,10 @@ hwloc_linux_backend_get_obj_cpuset(struct hwloc_backend *backend,
 
   /* this should not be called if the backend isn't the real OS one */
 #ifdef HWLOC_DEBUG
-  assert(!strcmp(backend->component->name, "linux"));
+  {
+    int cmp = strcmp(backend->component->name, "linux");
+    assert(!cmp);
+  }
 #endif
   if (data->root_path) {
     assert(strlen(data->root_path) == 1);
@@ -3858,6 +4143,12 @@ hwloc_linux_backend_get_obj_cpuset(struct hwloc_backend *backend,
   return -1;
 }
 
+
+
+/*******************************
+ ******* Linux component *******
+ *******************************/
+
 static void
 hwloc_linux_backend_disable(struct hwloc_backend *backend)
 {
@@ -3919,6 +4210,8 @@ hwloc_linux_component_instantiate(struct hwloc_disc_component *component,
 #endif
   data->root_fd = root;
 
+  data->mic_id_max = -1; /* not initialized */
+
   return backend;
 
  out_with_data:
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-netbsd.c b/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-netbsd.c
new file mode 100644
index 0000000..c88ba87
--- /dev/null
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-netbsd.c
@@ -0,0 +1,197 @@
+/*
+ * Copyright © 2012 Aleksej Saushev, The NetBSD Foundation
+ * Copyright © 2009-2012 Inria.  All rights reserved.
+ * Copyright © 2009-2010 Université Bordeaux 1
+ * Copyright © 2011 Cisco Systems, Inc.  All rights reserved.
+ * See COPYING in top-level directory.
+ */
+
+#define _NETBSD_SOURCE /* request "_np" functions */
+
+#include <private/autogen/config.h>
+
+#include <sys/types.h>
+#include <stdlib.h>
+#include <inttypes.h>
+#include <sys/param.h>
+#include <pthread.h>
+#include <sched.h>
+
+#include <hwloc.h>
+#include <private/private.h>
+#include <private/debug.h>
+
+static void
+hwloc_netbsd_bsd2hwloc(hwloc_bitmap_t hwloc_cpuset, const cpuset_t *cpuset)
+{
+  unsigned cpu, cpulimit;
+  int found = 0;
+  hwloc_bitmap_zero(hwloc_cpuset);
+  cpulimit = cpuset_size(cpuset) * CHAR_BIT;
+  for (cpu = 0; cpu < cpulimit; cpu++)
+    if (cpuset_isset(cpu, cpuset)) {
+      hwloc_bitmap_set(hwloc_cpuset, cpu);
+      found++;
+    }
+  /* when never bound, it returns an empty set, fill it instead */
+  if (!found)
+    hwloc_bitmap_fill(hwloc_cpuset);
+}
+
+static void
+hwloc_netbsd_hwloc2bsd(hwloc_const_bitmap_t hwloc_cpuset, cpuset_t *cpuset)
+{
+  unsigned cpu, cpulimit;
+  cpuset_zero(cpuset);
+  cpulimit = cpuset_size(cpuset) * CHAR_BIT;
+  for (cpu = 0; cpu < cpulimit; cpu++)
+    if (hwloc_bitmap_isset(hwloc_cpuset, cpu))
+      cpuset_set(cpu, cpuset);
+}
+
+static int
+hwloc_netbsd_set_proc_cpubind(hwloc_topology_t topology __hwloc_attribute_unused, hwloc_pid_t pid, hwloc_const_bitmap_t hwloc_cpuset, int flags __hwloc_attribute_unused)
+{
+  int status;
+  cpuset_t *cpuset = cpuset_create();
+  hwloc_netbsd_hwloc2bsd(hwloc_cpuset, cpuset);
+  status = sched_setaffinity_np(pid, cpuset_size(cpuset), cpuset);
+  cpuset_destroy(cpuset);
+  return status;
+}
+
+static int
+hwloc_netbsd_get_proc_cpubind(hwloc_topology_t topology __hwloc_attribute_unused, hwloc_pid_t pid, hwloc_bitmap_t hwloc_cpuset, int flags __hwloc_attribute_unused)
+{
+  int status;
+  cpuset_t *cpuset = cpuset_create();
+  status = sched_getaffinity_np(pid, cpuset_size(cpuset), cpuset);
+  hwloc_netbsd_bsd2hwloc(hwloc_cpuset, cpuset);
+  cpuset_destroy(cpuset);
+  return status;
+}
+
+
+static int
+hwloc_netbsd_set_thisproc_cpubind(hwloc_topology_t topology, hwloc_const_bitmap_t hwloc_cpuset, int flags)
+{
+  return hwloc_netbsd_set_proc_cpubind(topology, 0, hwloc_cpuset, flags);
+}
+
+static int
+hwloc_netbsd_get_thisproc_cpubind(hwloc_topology_t topology, hwloc_bitmap_t hwloc_cpuset, int flags)
+{
+  return hwloc_netbsd_get_proc_cpubind(topology, 0, hwloc_cpuset, flags);
+}
+
+
+static int
+hwloc_netbsd_set_thread_cpubind(hwloc_topology_t topology __hwloc_attribute_unused, hwloc_thread_t tid, hwloc_const_bitmap_t hwloc_cpuset, int flags __hwloc_attribute_unused)
+{
+  int status;
+  cpuset_t *cpuset = cpuset_create();
+  hwloc_netbsd_hwloc2bsd(hwloc_cpuset, cpuset);
+  status = pthread_setaffinity_np(tid, cpuset_size(cpuset), cpuset);
+  cpuset_destroy(cpuset);
+
+  if (status) {
+    errno = status;
+    return -1;
+  }
+  return 0;
+}
+
+static int
+hwloc_netbsd_get_thread_cpubind(hwloc_topology_t topology __hwloc_attribute_unused, hwloc_thread_t tid, hwloc_bitmap_t hwloc_cpuset, int flags __hwloc_attribute_unused)
+{
+  int status;
+  cpuset_t *cpuset = cpuset_create();
+  status = pthread_getaffinity_np(tid, cpuset_size(cpuset), cpuset);
+  hwloc_netbsd_bsd2hwloc(hwloc_cpuset, cpuset);
+  cpuset_destroy(cpuset);
+
+  if (status) {
+    errno = status;
+    return -1;
+  }
+  return 0;
+}
+
+
+static int
+hwloc_netbsd_set_thisthread_cpubind(hwloc_topology_t topology, hwloc_const_bitmap_t hwloc_cpuset, int flags)
+{
+  return hwloc_netbsd_set_thread_cpubind(topology, pthread_self(), hwloc_cpuset, flags);
+}
+
+static int
+hwloc_netbsd_get_thisthread_cpubind(hwloc_topology_t topology, hwloc_bitmap_t hwloc_cpuset, int flags)
+{
+  return hwloc_netbsd_get_thread_cpubind(topology, pthread_self(), hwloc_cpuset, flags);
+}
+
+static int
+hwloc_look_netbsd(struct hwloc_backend *backend)
+{
+  struct hwloc_topology *topology = backend->topology;
+  unsigned nbprocs = hwloc_fallback_nbprocessors(topology);
+
+  if (!topology->levels[0][0]->cpuset) {
+    /* Nobody (even the x86 backend) created objects yet, setup basic objects */
+    hwloc_alloc_obj_cpusets(topology->levels[0][0]);
+    hwloc_setup_pu_level(topology, nbprocs);
+  }
+
+  /* Add NetBSD specific information */
+
+
+  hwloc_obj_add_info(topology->levels[0][0], "Backend", "NetBSD");
+  if (topology->is_thissystem)
+    hwloc_add_uname_info(topology);
+  return 1;
+}
+
+void
+hwloc_set_netbsd_hooks(struct hwloc_binding_hooks *hooks __hwloc_attribute_unused,
+                        struct hwloc_topology_support *support __hwloc_attribute_unused)
+{
+  hooks->set_proc_cpubind = hwloc_netbsd_set_proc_cpubind;
+  hooks->get_proc_cpubind = hwloc_netbsd_get_proc_cpubind;
+  hooks->set_thisproc_cpubind = hwloc_netbsd_set_thisproc_cpubind;
+  hooks->get_thisproc_cpubind = hwloc_netbsd_get_thisproc_cpubind;
+
+  hooks->set_thread_cpubind = hwloc_netbsd_set_thread_cpubind;
+  hooks->get_thread_cpubind = hwloc_netbsd_get_thread_cpubind;
+  hooks->set_thisthread_cpubind = hwloc_netbsd_set_thisthread_cpubind;
+  hooks->get_thisthread_cpubind = hwloc_netbsd_get_thisthread_cpubind;
+}
+
+static struct hwloc_backend *
+hwloc_netbsd_component_instantiate(struct hwloc_disc_component *component,
+				   const void *_data1 __hwloc_attribute_unused,
+				   const void *_data2 __hwloc_attribute_unused,
+				   const void *_data3 __hwloc_attribute_unused)
+{
+  struct hwloc_backend *backend;
+  backend = hwloc_backend_alloc(component);
+  if (!backend)
+    return NULL;
+  backend->discover = hwloc_look_netbsd;
+  return backend;
+}
+
+static struct hwloc_disc_component hwloc_netbsd_disc_component = {
+  HWLOC_DISC_COMPONENT_TYPE_CPU,
+  "netbsd",
+  HWLOC_DISC_COMPONENT_TYPE_GLOBAL,
+  hwloc_netbsd_component_instantiate,
+  50,
+  NULL
+};
+
+const struct hwloc_component hwloc_netbsd_component = {
+  HWLOC_COMPONENT_ABI,
+  HWLOC_COMPONENT_TYPE_DISC,
+  0,
+  &hwloc_netbsd_disc_component
+};
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-nvml.c b/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-nvml.c
new file mode 100644
index 0000000..aca5b9a
--- /dev/null
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-nvml.c
@@ -0,0 +1,229 @@
+/*
+ * Copyright © 2012 Inria.  All rights reserved.
+ * See COPYING in top-level directory.
+ */
+
+#include <private/autogen/config.h>
+#include <hwloc.h>
+#include <hwloc/plugins.h>
+
+/* private headers allowed for convenience because this plugin is built within hwloc */
+#include <private/misc.h>
+#include <private/debug.h>
+
+#include <nvml.h>
+
+struct hwloc_nvml_backend_data_s {
+  unsigned nr_devices; /* -1 when unknown yet, first callback will setup */
+  struct hwloc_nvml_device_info_s {
+    char name[64];
+    char serial[64];
+    char uuid[64];
+    unsigned pcidomain, pcibus, pcidev, pcifunc;
+    float maxlinkspeed;
+  } * devices;
+};
+
+static void
+hwloc_nvml_query_devices(struct hwloc_nvml_backend_data_s *data)
+{
+  nvmlReturn_t ret;
+  unsigned nb, i;
+
+  /* mark the number of devices as 0 in case we fail below,
+   * so that we don't try again later.
+   */
+  data->nr_devices = 0;
+
+  ret = nvmlInit();
+  if (NVML_SUCCESS != ret)
+    goto out;
+  ret = nvmlDeviceGetCount(&nb);
+  if (NVML_SUCCESS != ret)
+    goto out_with_init;
+
+  /* allocate structs */
+  data->devices = malloc(nb * sizeof(*data->devices));
+  if (!data->devices)
+    goto out_with_init;
+
+  for(i=0; i<nb; i++) {
+    struct hwloc_nvml_device_info_s *info = &data->devices[data->nr_devices];
+    nvmlPciInfo_t pci;
+    nvmlDevice_t device;
+
+    ret = nvmlDeviceGetHandleByIndex(i, &device);
+    assert(ret == NVML_SUCCESS);
+
+    ret = nvmlDeviceGetPciInfo(device, &pci);
+    if (NVML_SUCCESS != ret)
+      continue;
+
+    info->pcidomain = pci.domain;
+    info->pcibus = pci.bus;
+    info->pcidev = pci.device;
+    info->pcifunc = 0;
+
+    info->name[0] = '\0';
+    ret = nvmlDeviceGetName(device, info->name, sizeof(info->name));
+    /* these may fail with NVML_ERROR_NOT_SUPPORTED on old devices */
+    info->serial[0] = '\0';
+    ret = nvmlDeviceGetSerial(device, info->serial, sizeof(info->serial));
+    info->uuid[0] = '\0';
+    ret = nvmlDeviceGetUUID(device, info->uuid, sizeof(info->uuid));
+
+    info->maxlinkspeed = 0.0f;
+#if HAVE_DECL_NVMLDEVICEGETMAXPCIELINKGENERATION
+    {
+      unsigned maxwidth = 0, maxgen = 0;
+      float lanespeed;
+      nvmlDeviceGetMaxPcieLinkWidth(device, &maxwidth);
+      nvmlDeviceGetMaxPcieLinkGeneration(device, &maxgen);
+      /* PCIe Gen1 = 2.5GT/s signal-rate per lane with 8/10 encoding    = 0.25GB/s data-rate per lane
+       * PCIe Gen2 = 5  GT/s signal-rate per lane with 8/10 encoding    = 0.5 GB/s data-rate per lane
+       * PCIe Gen3 = 8  GT/s signal-rate per lane with 128/130 encoding = 1   GB/s data-rate per lane
+       */
+      lanespeed = maxgen <= 2 ? 2.5 * maxgen * 0.8 : 8.0 * 128/130; /* Gbit/s per lane */
+      info->maxlinkspeed = lanespeed * maxwidth / 8; /* GB/s */
+    }
+#endif
+
+    /* validate this device */
+    data->nr_devices++;
+  }
+
+out_with_init:
+  nvmlShutdown();
+out:
+  return;
+}
+
+static int
+hwloc_nvml_backend_notify_new_object(struct hwloc_backend *backend, struct hwloc_backend *caller __hwloc_attribute_unused,
+				     struct hwloc_obj *pcidev)
+{
+  struct hwloc_topology *topology = backend->topology;
+  struct hwloc_nvml_backend_data_s *data = backend->private_data;
+  unsigned i;
+
+  if (!(hwloc_topology_get_flags(topology) & (HWLOC_TOPOLOGY_FLAG_IO_DEVICES|HWLOC_TOPOLOGY_FLAG_WHOLE_IO)))
+    return 0;
+
+  if (!hwloc_topology_is_thissystem(topology)) {
+    hwloc_debug("%s", "\nno NVML detection (not thissystem)\n");
+    return 0;
+  }
+
+  if (HWLOC_OBJ_PCI_DEVICE != pcidev->type)
+    return 0;
+
+  if (data->nr_devices == (unsigned) -1) {
+    /* first call, lookup all devices */
+    hwloc_nvml_query_devices(data);
+    /* if it fails, data->nr_devices = 0 so we won't do anything below and in next callbacks */
+  }
+
+  if (!data->nr_devices)
+    /* found no devices */
+    return 0;
+
+  /* now the devices array is ready to use */
+  for(i=0; i<data->nr_devices; i++) {
+    struct hwloc_nvml_device_info_s *info = &data->devices[i];
+    hwloc_obj_t osdev;
+    char buffer[64];
+
+    if (info->pcidomain != pcidev->attr->pcidev.domain)
+      continue;
+    if (info->pcibus != pcidev->attr->pcidev.bus)
+      continue;
+    if (info->pcidev != pcidev->attr->pcidev.dev)
+      continue;
+    if (info->pcifunc != pcidev->attr->pcidev.func)
+      continue;
+
+    osdev = hwloc_alloc_setup_object(HWLOC_OBJ_OS_DEVICE, -1);
+    snprintf(buffer, sizeof(buffer), "nvml%d", i);
+    osdev->name = strdup(buffer);
+    osdev->depth = (unsigned) HWLOC_TYPE_DEPTH_UNKNOWN;
+    osdev->attr->osdev.type = HWLOC_OBJ_OSDEV_GPU;
+
+    hwloc_obj_add_info(osdev, "Backend", "NVML");
+    hwloc_obj_add_info(osdev, "GPUVendor", "NVIDIA Corporation");
+    hwloc_obj_add_info(osdev, "GPUModel", info->name);
+    if (info->serial[0] != '\0')
+      hwloc_obj_add_info(osdev, "NVIDIASerial", info->serial);
+    if (info->uuid[0] != '\0')
+      hwloc_obj_add_info(osdev, "NVIDIAUUID", info->uuid);
+
+    hwloc_insert_object_by_parent(topology, pcidev, osdev);
+
+    if (info->maxlinkspeed != 0.0f)
+      /* we found the max link speed, replace the current link speed found by pci (or none) */
+      pcidev->attr->pcidev.linkspeed = info->maxlinkspeed;
+
+    return 1;
+  }
+
+  return 0;
+}
+
+static void
+hwloc_nvml_backend_disable(struct hwloc_backend *backend)
+{
+  struct hwloc_nvml_backend_data_s *data = backend->private_data;
+  free(data->devices);
+  free(data);
+}
+
+static struct hwloc_backend *
+hwloc_nvml_component_instantiate(struct hwloc_disc_component *component,
+				 const void *_data1 __hwloc_attribute_unused,
+				 const void *_data2 __hwloc_attribute_unused,
+				 const void *_data3 __hwloc_attribute_unused)
+{
+  struct hwloc_backend *backend;
+  struct hwloc_nvml_backend_data_s *data;
+
+  /* thissystem may not be fully initialized yet, we'll check flags in discover() */
+
+  backend = hwloc_backend_alloc(component);
+  if (!backend)
+    return NULL;
+
+  data = malloc(sizeof(*data));
+  if (!data) {
+    free(backend);
+    return NULL;
+  }
+  /* the first callback will initialize those */
+  data->nr_devices = (unsigned) -1; /* unknown yet */
+  data->devices = NULL;
+
+  backend->private_data = data;
+  backend->disable = hwloc_nvml_backend_disable;
+
+  backend->notify_new_object = hwloc_nvml_backend_notify_new_object;
+  return backend;
+}
+
+static struct hwloc_disc_component hwloc_nvml_disc_component = {
+  HWLOC_DISC_COMPONENT_TYPE_MISC,
+  "nvml",
+  HWLOC_DISC_COMPONENT_TYPE_GLOBAL,
+  hwloc_nvml_component_instantiate,
+  5, /* after pci, and after cuda since likely less useful */
+  NULL
+};
+
+#ifdef HWLOC_INSIDE_PLUGIN
+HWLOC_DECLSPEC extern const struct hwloc_component hwloc_nvml_component;
+#endif
+
+const struct hwloc_component hwloc_nvml_component = {
+  HWLOC_COMPONENT_ABI,
+  HWLOC_COMPONENT_TYPE_DISC,
+  0,
+  &hwloc_nvml_disc_component
+};
+
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-opencl.c b/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-opencl.c
new file mode 100644
index 0000000..abefb59
--- /dev/null
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-opencl.c
@@ -0,0 +1,318 @@
+/*
+ * Copyright © 2012 Inria.  All rights reserved.
+ * Copyright © 2013 Université Bordeaux 1.  All right reserved.
+ * See COPYING in top-level directory.
+ */
+
+#include <private/autogen/config.h>
+#include <hwloc.h>
+#include <hwloc/plugins.h>
+
+/* private headers allowed for convenience because this plugin is built within hwloc */
+#include <private/misc.h>
+#include <private/debug.h>
+
+#include <CL/cl_ext.h>
+
+typedef enum hwloc_opencl_device_type_e {
+  HWLOC_OPENCL_DEVICE_AMD
+} hwloc_opencl_device_type_t;
+
+struct hwloc_opencl_backend_data_s {
+  unsigned nr_devices; /* -1 when unknown yet, first callback will setup */
+  struct hwloc_opencl_device_info_s {
+    hwloc_opencl_device_type_t type;
+
+    unsigned platformidx;
+    char platformname[64];
+    unsigned platformdeviceidx;
+    char devicename[64];
+    char devicevendor[64];
+    char devicetype[64];
+
+    union hwloc_opencl_device_info_u {
+      struct hwloc_opencl_device_info_amd_s {
+        unsigned pcidomain, pcibus, pcidev, pcifunc;
+      } amd;
+    } specific;
+  } * devices;
+};
+
+static void
+hwloc_opencl_query_devices(struct hwloc_opencl_backend_data_s *data)
+{
+  cl_platform_id *platform_ids = NULL;
+  cl_uint nr_platforms;
+  cl_device_id *device_ids = NULL;
+  cl_uint nr_devices, nr_total_devices, tmp;
+  cl_int clret;
+  unsigned curpfidx, curpfdvidx, i;
+
+  /* mark the number of devices as 0 in case we fail below,
+   * so that we don't try again later.
+   */
+  data->nr_devices = 0;
+
+  /* count platforms, allocate and get them */
+  clret = clGetPlatformIDs(0, NULL, &nr_platforms);
+  if (CL_SUCCESS != clret || !nr_platforms)
+    goto out;
+  hwloc_debug("%u OpenCL platforms\n", nr_platforms);
+  platform_ids = malloc(nr_platforms * sizeof(*platform_ids));
+  if (!platform_ids)
+    goto out;
+  clret = clGetPlatformIDs(nr_platforms, platform_ids, &nr_platforms);
+  if (CL_SUCCESS != clret || !nr_platforms)
+    goto out_with_platform_ids;
+
+  /* how many devices, total? */
+  tmp = 0;
+  for(i=0; i<nr_platforms; i++) {
+    clret = clGetDeviceIDs(platform_ids[i], CL_DEVICE_TYPE_ALL, 0, NULL, &nr_devices);
+    if (CL_SUCCESS != clret)
+      goto out_with_platform_ids;
+    tmp += nr_devices;
+  }
+  nr_total_devices = tmp;
+  hwloc_debug("%u OpenCL devices total\n", nr_total_devices);
+  /* allocate structs */
+  device_ids = malloc(nr_total_devices * sizeof(*device_ids));
+  data->devices = malloc(nr_total_devices * sizeof(*data->devices));
+  if (!data->devices || !device_ids)
+    goto out_with_device_ids;
+  /* actually query device ids */
+  tmp = 0;
+  for(i=0; i<nr_platforms; i++) {
+    clret = clGetDeviceIDs(platform_ids[i], CL_DEVICE_TYPE_ALL, nr_total_devices - tmp, device_ids + tmp, &nr_devices);
+    if (CL_SUCCESS != clret)
+      goto out_with_device_ids;
+    tmp += nr_devices;
+  }
+
+  /* query individual devices */
+  curpfidx = 0;
+  curpfdvidx = 0;
+  for(i=0; i<nr_total_devices; i++) {
+    struct hwloc_opencl_device_info_s *info = &data->devices[data->nr_devices];
+    cl_platform_id platform_id = 0;
+    cl_device_type type;
+#ifdef CL_DEVICE_TOPOLOGY_AMD
+    cl_device_topology_amd amdtopo;
+#endif
+
+    hwloc_debug("Looking device %p\n", device_ids[i]);
+
+    info->platformname[0] = '\0';
+    clret = clGetDeviceInfo(device_ids[i], CL_DEVICE_PLATFORM, sizeof(platform_id), &platform_id, NULL);
+    if (CL_SUCCESS != clret)
+      continue;
+    clGetPlatformInfo(platform_id, CL_PLATFORM_NAME, sizeof(info->platformname), info->platformname, NULL);
+
+    info->devicename[0] = '\0';
+#ifdef CL_DEVICE_BOARD_NAME_AMD
+    clGetDeviceInfo(device_ids[i], CL_DEVICE_BOARD_NAME_AMD, sizeof(info->devicename), info->devicename, NULL);
+#else
+    clGetDeviceInfo(device_ids[i], CL_DEVICE_NAME, sizeof(info->devicename), info->devicename, NULL);
+#endif
+    info->devicevendor[0] = '\0';
+    clGetDeviceInfo(device_ids[i], CL_DEVICE_VENDOR, sizeof(info->devicevendor), info->devicevendor, NULL);
+
+    clGetDeviceInfo(device_ids[i], CL_DEVICE_TYPE, sizeof(type), &type, NULL);
+    switch (type) {
+    case CL_DEVICE_TYPE_CPU: /* FIXME: cannot happen in PCI devices? */
+      strcpy(info->devicetype, "CPU");
+      break;
+    case CL_DEVICE_TYPE_GPU:
+      strcpy(info->devicetype, "GPU");
+      break;
+    case CL_DEVICE_TYPE_ACCELERATOR:
+      strcpy(info->devicetype, "Accelerator");
+      break;
+    default:
+      strcpy(info->devicetype, "Unknown");
+      break;
+    }
+
+    hwloc_debug("platform %s device %s vendor %s type %s\n", info->platformname, info->devicename, info->devicevendor, info->devicetype);
+
+    /* find our indexes */
+    while (platform_id != platform_ids[curpfidx]) {
+      curpfidx++;
+      curpfdvidx = 0;
+    }
+    info->platformidx = curpfidx;
+    info->platformdeviceidx = curpfdvidx;
+    curpfdvidx++;
+
+    hwloc_debug("This is opencl%dd%d\n", info->platformidx, info->platformdeviceidx);
+
+#ifdef CL_DEVICE_TOPOLOGY_AMD
+    clret = clGetDeviceInfo(device_ids[i], CL_DEVICE_TOPOLOGY_AMD, sizeof(amdtopo), &amdtopo, NULL);
+    if (CL_SUCCESS != clret) {
+      hwloc_debug("no AMD-specific device information: %d\n", clret);
+      continue;
+    }
+    if (CL_DEVICE_TOPOLOGY_TYPE_PCIE_AMD != amdtopo.raw.type) {
+      hwloc_debug("not a PCIe device: %u\n", amdtopo.raw.type);
+      continue;
+    }
+
+    info->type = HWLOC_OPENCL_DEVICE_AMD;
+    info->specific.amd.pcidomain = 0;
+    info->specific.amd.pcibus = amdtopo.pcie.bus;
+    info->specific.amd.pcidev = amdtopo.pcie.device;
+    info->specific.amd.pcifunc = amdtopo.pcie.function;
+
+    hwloc_debug("OpenCL device on PCI 0000:%02x:%02x.%u\n", amdtopo.pcie.bus, amdtopo.pcie.device, amdtopo.pcie.function);
+
+    /* validate this device */
+    data->nr_devices++;
+#endif /* HAVE_DECL_CL_DEVICE_TOPOLOGY_AMD */
+  }
+  free(device_ids);
+  free(platform_ids);
+  return;
+
+out_with_device_ids:
+  free(device_ids);
+  free(data->devices);
+  data->devices = NULL;
+out_with_platform_ids:
+  free(platform_ids);
+out:
+  return;
+}
+
+static int
+hwloc_opencl_backend_notify_new_object(struct hwloc_backend *backend, struct hwloc_backend *caller __hwloc_attribute_unused,
+				       struct hwloc_obj *pcidev)
+{
+  struct hwloc_topology *topology = backend->topology;
+  struct hwloc_opencl_backend_data_s *data = backend->private_data;
+  unsigned i;
+
+  if (!(hwloc_topology_get_flags(topology) & (HWLOC_TOPOLOGY_FLAG_IO_DEVICES|HWLOC_TOPOLOGY_FLAG_WHOLE_IO)))
+    return 0;
+
+  if (!hwloc_topology_is_thissystem(topology)) {
+    hwloc_debug("%s", "\nno OpenCL detection (not thissystem)\n");
+    return 0;
+  }
+
+  if (HWLOC_OBJ_PCI_DEVICE != pcidev->type)
+    return 0;
+
+  if (data->nr_devices == (unsigned) -1) {
+    /* first call, lookup all devices */
+    hwloc_opencl_query_devices(data);
+    /* if it fails, data->nr_devices = 0 so we won't do anything below and in next callbacks */
+  }
+
+  if (!data->nr_devices)
+    /* found no devices */
+    return 0;
+
+  /* now the devices array is ready to use */
+  for(i=0; i<data->nr_devices; i++) {
+    struct hwloc_opencl_device_info_s *info = &data->devices[i];
+    hwloc_obj_t osdev;
+    char buffer[64];
+
+    assert(info->type == HWLOC_OPENCL_DEVICE_AMD);
+    if (info->specific.amd.pcidomain != pcidev->attr->pcidev.domain)
+      continue;
+    if (info->specific.amd.pcibus != pcidev->attr->pcidev.bus)
+      continue;
+    if (info->specific.amd.pcidev != pcidev->attr->pcidev.dev)
+      continue;
+    if (info->specific.amd.pcifunc != pcidev->attr->pcidev.func)
+      continue;
+
+    osdev = hwloc_alloc_setup_object(HWLOC_OBJ_OS_DEVICE, -1);
+    snprintf(buffer, sizeof(buffer), "opencl%dd%d", info->platformidx, info->platformdeviceidx);
+    osdev->name = strdup(buffer);
+    osdev->depth = (unsigned) HWLOC_TYPE_DEPTH_UNKNOWN;
+    osdev->attr->osdev.type = HWLOC_OBJ_OSDEV_COPROC;
+
+    hwloc_obj_add_info(osdev, "CoProcType", "OpenCL");
+    hwloc_obj_add_info(osdev, "Backend", "OpenCL");
+    hwloc_obj_add_info(osdev, "OpenCLDeviceType", info->devicetype);
+
+    if (info->devicevendor[0] != '\0')
+      hwloc_obj_add_info(osdev, "GPUVendor", info->devicevendor);
+    if (info->devicename[0] != '\0')
+      hwloc_obj_add_info(osdev, "GPUModel", info->devicename);
+
+    snprintf(buffer, sizeof(buffer), "%u", info->platformidx);
+    hwloc_obj_add_info(osdev, "OpenCLPlatformIndex", buffer);
+    if (info->platformname[0] != '\0')
+      hwloc_obj_add_info(osdev, "OpenCLPlatformName", info->platformname);
+
+    snprintf(buffer, sizeof(buffer), "%u", info->platformdeviceidx);
+    hwloc_obj_add_info(osdev, "OpenCLPlatformDeviceIndex", buffer);
+
+    hwloc_insert_object_by_parent(topology, pcidev, osdev);
+    return 1;
+  }
+
+  return 0;
+}
+
+static void
+hwloc_opencl_backend_disable(struct hwloc_backend *backend)
+{
+  struct hwloc_opencl_backend_data_s *data = backend->private_data;
+  free(data->devices);
+  free(data);
+}
+
+static struct hwloc_backend *
+hwloc_opencl_component_instantiate(struct hwloc_disc_component *component,
+				   const void *_data1 __hwloc_attribute_unused,
+				   const void *_data2 __hwloc_attribute_unused,
+				   const void *_data3 __hwloc_attribute_unused)
+{
+  struct hwloc_backend *backend;
+  struct hwloc_opencl_backend_data_s *data;
+
+  /* thissystem may not be fully initialized yet, we'll check flags in discover() */
+
+  backend = hwloc_backend_alloc(component);
+  if (!backend)
+    return NULL;
+
+  data = malloc(sizeof(*data));
+  if (!data) {
+    free(backend);
+    return NULL;
+  }
+  /* the first callback will initialize those */
+  data->nr_devices = (unsigned) -1; /* unknown yet */
+  data->devices = NULL;
+
+  backend->private_data = data;
+  backend->disable = hwloc_opencl_backend_disable;
+
+  backend->notify_new_object = hwloc_opencl_backend_notify_new_object;
+  return backend;
+}
+
+static struct hwloc_disc_component hwloc_opencl_disc_component = {
+  HWLOC_DISC_COMPONENT_TYPE_MISC,
+  "opencl",
+  HWLOC_DISC_COMPONENT_TYPE_GLOBAL,
+  hwloc_opencl_component_instantiate,
+  10, /* after pci */
+  NULL
+};
+
+#ifdef HWLOC_INSIDE_PLUGIN
+HWLOC_DECLSPEC extern const struct hwloc_component hwloc_opencl_component;
+#endif
+
+const struct hwloc_component hwloc_opencl_component = {
+  HWLOC_COMPONENT_ABI,
+  HWLOC_COMPONENT_TYPE_DISC,
+  0,
+  &hwloc_opencl_disc_component
+};
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-libpci.c b/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-pci.c
similarity index 92%
rename from src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-libpci.c
rename to src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-pci.c
index 7766766..b15375b 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-libpci.c
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-pci.c
@@ -8,7 +8,9 @@
 #include <private/autogen/config.h>
 #include <hwloc.h>
 #include <hwloc/helper.h>
-#include <private/private.h>
+#include <hwloc/plugins.h>
+
+/* private headers allowed for convenience because this plugin is built within hwloc */
 #include <private/debug.h>
 #include <private/misc.h>
 
@@ -19,15 +21,15 @@
 #include <stdarg.h>
 #include <setjmp.h>
 
-#if (defined HWLOC_HAVE_LIBPCIACCESS) && (defined HWLOC_HAVE_LIBPCI)
-#error Cannot have both LIBPCI and LIBPCIACCESS enabled simultaneously
-#elif (!defined HWLOC_HAVE_LIBPCIACCESS) && (!defined HWLOC_HAVE_LIBPCI)
-#error Cannot have neither LIBPCI nor LIBPCIACCESS enabled simultaneously
+#if (defined HWLOC_HAVE_LIBPCIACCESS) && (defined HWLOC_HAVE_PCIUTILS)
+#error Cannot have both LIBPCIACCESS and PCIUTILS enabled simultaneously
+#elif (!defined HWLOC_HAVE_LIBPCIACCESS) && (!defined HWLOC_HAVE_PCIUTILS)
+#error Cannot have neither LIBPCIACCESS nor PCIUTILS enabled simultaneously
 #endif
 
 #ifdef HWLOC_HAVE_LIBPCIACCESS
 #include <pciaccess.h>
-#else /* HWLOC_HAVE_LIBPCI */
+#else /* HWLOC_HAVE_PCIUTILS */
 #include <pci/pci.h>
 #endif
 
@@ -313,7 +315,7 @@ hwloc_pci_add_object(struct hwloc_obj *root, struct hwloc_obj *new)
 
 static struct hwloc_obj *
 hwloc_pci_find_hostbridge_parent(struct hwloc_topology *topology, struct hwloc_backend *backend,
-				 struct hwloc_obj *hostbridge, int *created)
+				 struct hwloc_obj *hostbridge)
 {
   hwloc_bitmap_t cpuset = hwloc_bitmap_alloc();
   struct hwloc_obj *parent;
@@ -342,7 +344,7 @@ hwloc_pci_find_hostbridge_parent(struct hwloc_topology *topology, struct hwloc_b
   hwloc_debug_bitmap("Attaching hostbridge to cpuset %s\n", cpuset);
 
   /* restrict to the existing topology cpuset to avoid errors later */
-  hwloc_bitmap_and(cpuset, cpuset, topology->levels[0][0]->cpuset);
+  hwloc_bitmap_and(cpuset, cpuset, hwloc_topology_get_topology_cpuset(topology));
 
   /* if the remaining cpuset is empty, take the root */
   if (hwloc_bitmap_iszero(cpuset))
@@ -360,13 +362,11 @@ hwloc_pci_find_hostbridge_parent(struct hwloc_topology *topology, struct hwloc_b
       parent = parent->parent;
   } else {
     /* the object we found is too large, insert an intermediate group */
-    hwloc_obj_t group_obj = group_obj = hwloc_alloc_setup_object(HWLOC_OBJ_GROUP, -1);
+    hwloc_obj_t group_obj = hwloc_alloc_setup_object(HWLOC_OBJ_GROUP, -1);
     if (group_obj) {
       group_obj->cpuset = hwloc_bitmap_dup(cpuset);
-      group_obj->attr->group.depth = topology->next_group_depth;
-      hwloc__insert_object_by_cpuset(topology, group_obj, hwloc_report_os_error);
-      parent = group_obj;
-      *created = 1;
+      group_obj->attr->group.depth = (unsigned) -1;
+      parent = hwloc__insert_object_by_cpuset(topology, group_obj, hwloc_report_os_error);
     }
   }
 
@@ -375,7 +375,7 @@ hwloc_pci_find_hostbridge_parent(struct hwloc_topology *topology, struct hwloc_b
   return parent;
 }
 
-#ifdef HWLOC_HAVE_LIBPCI
+#ifdef HWLOC_HAVE_PCIUTILS
 /* Avoid letting libpci call exit(1) when no PCI bus is available. */
 static jmp_buf err_buf;
 static void
@@ -433,7 +433,7 @@ hwloc_pci_find_cap(const unsigned char *config, size_t config_size, unsigned cap
 #endif
 
 static int
-hwloc_look_libpci(struct hwloc_backend *backend)
+hwloc_look_pci(struct hwloc_backend *backend)
 {
   struct hwloc_topology *topology = backend->topology;
   struct hwloc_obj fakehostbridge; /* temporary object covering the whole PCI hierarchy until its complete */
@@ -442,16 +442,15 @@ hwloc_look_libpci(struct hwloc_backend *backend)
   int ret;
   struct pci_device_iterator *iter;
   struct pci_device *pcidev;
-#else /* HWLOC_HAVE_LIBPCI */
+#else /* HWLOC_HAVE_PCIUTILS */
   struct pci_access *pciaccess;
   struct pci_dev *pcidev;
 #endif
-  int createdgroups = 0;
 
-  if (!(topology->flags & (HWLOC_TOPOLOGY_FLAG_IO_DEVICES|HWLOC_TOPOLOGY_FLAG_WHOLE_IO)))
+  if (!(hwloc_topology_get_flags(topology) & (HWLOC_TOPOLOGY_FLAG_IO_DEVICES|HWLOC_TOPOLOGY_FLAG_WHOLE_IO)))
     return 0;
 
-  if (!topology->is_thissystem) {
+  if (!hwloc_topology_is_thissystem(topology)) {
     hwloc_debug("%s", "\nno PCI detection (not thissystem)\n");
     return 0;
   }
@@ -470,7 +469,7 @@ hwloc_look_libpci(struct hwloc_backend *backend)
   }
 
   iter = pci_slot_match_iterator_create(NULL);
-#else /* HWLOC_HAVE_LIBPCI */
+#else /* HWLOC_HAVE_PCIUTILS */
   pciaccess = pci_alloc();
   pciaccess->error = hwloc_pci_error;
   pciaccess->warning = hwloc_pci_warning;
@@ -489,7 +488,7 @@ hwloc_look_libpci(struct hwloc_backend *backend)
   for (pcidev = pci_device_next(iter);
        pcidev;
        pcidev = pci_device_next(iter))
-#else /* HWLOC_HAVE_LIBPCI */
+#else /* HWLOC_HAVE_PCIUTILS */
   for (pcidev = pciaccess->devices;
        pcidev;
        pcidev = pcidev->next)
@@ -518,7 +517,7 @@ hwloc_look_libpci(struct hwloc_backend *backend)
     pci_device_probe(pcidev);
     pci_device_cfg_read(pcidev, config_space_cache, 0, CONFIG_SPACE_CACHESIZE_TRY, &got);
     config_space_cachesize = got;
-#else /* HWLOC_HAVE_LIBPCI */
+#else /* HWLOC_HAVE_PCIUTILS */
     pci_read_block(pcidev, 0, config_space_cache, CONFIG_SPACE_CACHESIZE_TRY);
 #endif
 
@@ -532,7 +531,7 @@ hwloc_look_libpci(struct hwloc_backend *backend)
     /* try to read the device_class */
 #ifdef HWLOC_HAVE_LIBPCIACCESS
     device_class = pcidev->device_class >> 8;
-#else /* HWLOC_HAVE_LIBPCI */
+#else /* HWLOC_HAVE_PCIUTILS */
 #ifdef HWLOC_HAVE_PCIDEV_DEVICE_CLASS
     device_class = pcidev->device_class;
 #else
@@ -610,7 +609,7 @@ hwloc_look_libpci(struct hwloc_backend *backend)
 
 #ifdef HWLOC_HAVE_LIBPCIACCESS
     vendorname = pci_device_get_vendor_name(pcidev);
-#else /* HWLOC_HAVE_LIBPCI */
+#else /* HWLOC_HAVE_PCIUTILS */
     vendorname = pci_lookup_name(pciaccess, name, sizeof(name),
 #if HAVE_DECL_PCI_LOOKUP_NO_NUMBERS
 			      PCI_LOOKUP_VENDOR|PCI_LOOKUP_NO_NUMBERS,
@@ -620,13 +619,13 @@ hwloc_look_libpci(struct hwloc_backend *backend)
 			      pcidev->vendor_id, 0, 0, 0
 #endif
 			      );
-#endif /* HWLOC_HAVE_LIBPCI */
+#endif /* HWLOC_HAVE_PCIUTILS */
     if (vendorname)
       hwloc_obj_add_info(obj, "PCIVendor", vendorname);
 
 #ifdef HWLOC_HAVE_LIBPCIACCESS
     devicename = pci_device_get_device_name(pcidev);
-#else /* HWLOC_HAVE_LIBPCI */
+#else /* HWLOC_HAVE_PCIUTILS */
     devicename = pci_lookup_name(pciaccess, name, sizeof(name),
 #if HAVE_DECL_PCI_LOOKUP_NO_NUMBERS
 			      PCI_LOOKUP_DEVICE|PCI_LOOKUP_NO_NUMBERS,
@@ -636,7 +635,7 @@ hwloc_look_libpci(struct hwloc_backend *backend)
 			      pcidev->vendor_id, pcidev->device_id, 0, 0
 #endif
 			      );
-#endif /* HWLOC_HAVE_LIBPCI */
+#endif /* HWLOC_HAVE_PCIUTILS */
     if (devicename)
       hwloc_obj_add_info(obj, "PCIDevice", devicename);
 
@@ -647,7 +646,7 @@ hwloc_look_libpci(struct hwloc_backend *backend)
 	     devicename ? devicename : "");
     fullname = name;
     obj->name = strdup(name);
-#else /* HWLOC_HAVE_LIBPCI */
+#else /* HWLOC_HAVE_PCIUTILS */
     fullname = pci_lookup_name(pciaccess, name, sizeof(name),
 #if HAVE_DECL_PCI_LOOKUP_NO_NUMBERS
 			      PCI_LOOKUP_VENDOR|PCI_LOOKUP_DEVICE|PCI_LOOKUP_NO_NUMBERS,
@@ -661,7 +660,7 @@ hwloc_look_libpci(struct hwloc_backend *backend)
       obj->name = strdup(fullname);
     else
       fullname = "??";
-#endif /* HWLOC_HAVE_LIBPCI */
+#endif /* HWLOC_HAVE_PCIUTILS */
     hwloc_debug("  %04x:%02x:%02x.%01x %04x %04x:%04x %s\n",
 		domain, pcidev->bus, pcidev->dev, pcidev->func,
 		device_class, pcidev->vendor_id, pcidev->device_id,
@@ -674,7 +673,7 @@ hwloc_look_libpci(struct hwloc_backend *backend)
 #ifdef HWLOC_HAVE_LIBPCIACCESS
   pci_iterator_destroy(iter);
   pci_system_cleanup();
-#else /* HWLOC_HAVE_LIBPCI */
+#else /* HWLOC_HAVE_PCIUTILS */
   pci_cleanup(pciaccess);
 #endif
 
@@ -737,18 +736,15 @@ hwloc_look_libpci(struct hwloc_backend *backend)
 		current_domain, current_bus, current_subordinate);
 
     /* attach the hostbridge where it belongs */
-    parent = hwloc_pci_find_hostbridge_parent(topology, backend, hostbridge, &createdgroups);
+    parent = hwloc_pci_find_hostbridge_parent(topology, backend, hostbridge);
     hwloc_insert_object_by_parent(topology, parent, hostbridge);
   }
 
-  if (createdgroups)
-    topology->next_group_depth++;
-
   return 1;
 }
 
 static struct hwloc_backend *
-hwloc_libpci_component_instantiate(struct hwloc_disc_component *component,
+hwloc_pci_component_instantiate(struct hwloc_disc_component *component,
 				   const void *_data1 __hwloc_attribute_unused,
 				   const void *_data2 __hwloc_attribute_unused,
 				   const void *_data3 __hwloc_attribute_unused)
@@ -760,22 +756,26 @@ hwloc_libpci_component_instantiate(struct hwloc_disc_component *component,
   backend = hwloc_backend_alloc(component);
   if (!backend)
     return NULL;
-  backend->discover = hwloc_look_libpci;
+  backend->discover = hwloc_look_pci;
   return backend;
 }
 
-static struct hwloc_disc_component hwloc_libpci_disc_component = {
-  HWLOC_DISC_COMPONENT_TYPE_ADDITIONAL,
-  "libpci",
+static struct hwloc_disc_component hwloc_pci_disc_component = {
+  HWLOC_DISC_COMPONENT_TYPE_MISC,
+  "pci",
   HWLOC_DISC_COMPONENT_TYPE_GLOBAL,
-  hwloc_libpci_component_instantiate,
+  hwloc_pci_component_instantiate,
   20,
   NULL
 };
 
-const struct hwloc_component hwloc_libpci_component = {
+#ifdef HWLOC_INSIDE_PLUGIN
+HWLOC_DECLSPEC extern const struct hwloc_component hwloc_pci_component;
+#endif
+
+const struct hwloc_component hwloc_pci_component = {
   HWLOC_COMPONENT_ABI,
   HWLOC_COMPONENT_TYPE_DISC,
   0,
-  &hwloc_libpci_disc_component
+  &hwloc_pci_disc_component
 };
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-solaris-chiptype.c b/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-solaris-chiptype.c
index 1e1bb52..11bbf5e 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-solaris-chiptype.c
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-solaris-chiptype.c
@@ -1,5 +1,6 @@
 /*
  * Copyright (c) 2009-2010 Oracle and/or its affiliates.  All rights reserved. 
+ * Copyright (c) 2013 Université Bordeaux 1.  All rights reserved.
  *
  * $COPYRIGHT$
  * 
@@ -9,7 +10,9 @@
  */
 
 #include <private/autogen/config.h>
+#include <hwloc/autogen/config.h>
 #include <private/solaris-chiptype.h>
+#include <hwloc.h>
 #include <stdlib.h>
 #include <strings.h>
 
@@ -191,14 +194,14 @@ PICL_WALK_TERMINATE to stop picl_walk_tree_by_class from traversing the tree.
 Note that PICL_PTYPE_UNSIGNED_INT and PICL_PTYPE_INT can either be 4-bytes
 or 8-bytes.
 *****************************************************************************/
-static int probe_cpu(picl_nodehdl_t node_hdl, void* dummy_arg) {
+static int probe_cpu(picl_nodehdl_t node_hdl, void* dummy_arg __hwloc_attribute_unused) {
 
   picl_prophdl_t  p_hdl;
   picl_prophdl_t  table_hdl;
   picl_propinfo_t p_info;
   long long       long_long_val;
   unsigned int    uint_val;
-  int             index;
+  unsigned int    index;
   int             int_val;
   int             val;
   char            string_val[PICL_PROPNAMELEN_MAX];
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-synthetic.c b/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-synthetic.c
index 2a58f45..11c8c33 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-synthetic.c
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-synthetic.c
@@ -430,7 +430,7 @@ hwloc_synthetic_component_instantiate(struct hwloc_disc_component *component,
 static struct hwloc_disc_component hwloc_synthetic_disc_component = {
   HWLOC_DISC_COMPONENT_TYPE_GLOBAL,
   "synthetic",
-  HWLOC_DISC_COMPONENT_TYPE_CPU | HWLOC_DISC_COMPONENT_TYPE_GLOBAL | HWLOC_DISC_COMPONENT_TYPE_ADDITIONAL,
+  ~0,
   hwloc_synthetic_component_instantiate,
   30,
   NULL
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-windows.c b/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-windows.c
index fbd7604..8d811c7 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-windows.c
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-windows.c
@@ -519,6 +519,8 @@ hwloc_look_windows(struct hwloc_backend *backend)
 	procInfo = realloc(procInfo, length);
       }
 
+      assert(!length || procInfo);
+
       for (i = 0; i < length / sizeof(*procInfo); i++) {
 
         /* Ignore unknown caches */
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-xml-libxml.c b/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-xml-libxml.c
index a29976c..8881ce6 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-xml-libxml.c
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-xml-libxml.c
@@ -8,9 +8,10 @@
 
 #include <private/autogen/config.h>
 #include <hwloc.h>
+#include <hwloc/plugins.h>
+
+/* private headers allowed because this plugin is built within hwloc */
 #include <private/xml.h>
-#include <private/private.h>
-#include <private/misc.h>
 #include <private/debug.h>
 
 #include <libxml/parser.h>
@@ -367,6 +368,10 @@ static struct hwloc_xml_component hwloc_libxml_xml_component = {
   &hwloc_xml_libxml_callbacks
 };
 
+#ifdef HWLOC_INSIDE_PLUGIN
+HWLOC_DECLSPEC extern const struct hwloc_component hwloc_xml_libxml_component;
+#endif
+
 const struct hwloc_component hwloc_xml_libxml_component = {
   HWLOC_COMPONENT_ABI,
   HWLOC_COMPONENT_TYPE_XML,
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-xml-nolibxml.c b/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-xml-nolibxml.c
index 8356421..88b576a 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-xml-nolibxml.c
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-xml-nolibxml.c
@@ -1,6 +1,6 @@
 /*
  * Copyright © 2009 CNRS
- * Copyright © 2009-2012 Inria.  All rights reserved.
+ * Copyright © 2009-2013 Inria.  All rights reserved.
  * Copyright © 2009-2011 Université Bordeaux 1
  * Copyright © 2009-2011 Cisco Systems, Inc.  All rights reserved.
  * See COPYING in top-level directory.
@@ -8,18 +8,27 @@
 
 #include <private/autogen/config.h>
 #include <hwloc.h>
+#include <hwloc/plugins.h>
 #include <private/private.h>
 #include <private/xml.h>
-#include <private/misc.h>
 #include <private/debug.h>
 
 #include <string.h>
 #include <assert.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
 
 /*******************
  * Import routines *
  *******************/
 
+struct hwloc__nolibxml_backend_data_s {
+  size_t buflen; /* size of both buffer and copy buffers, set during backend_init() */
+  char *buffer; /* allocated and filled during backend_init() */
+  char *copy; /* allocated during backend_init(), used later during actual parsing */
+};
+
 typedef struct hwloc__nolibxml_import_state_data_s {
   char *tagbuffer; /* buffer containing the next tag */
   char *attrbuffer; /* buffer containing the next attribute of the current node */
@@ -235,10 +244,15 @@ hwloc_nolibxml_look_init(struct hwloc_xml_backend_data_s *bdata,
 			 struct hwloc__xml_import_state_s *state)
 {
   hwloc__nolibxml_import_state_data_t nstate = (void*) state->data;
-  char *buffer = bdata->data;
+  struct hwloc__nolibxml_backend_data_s *nbdata = bdata->data;
+  char *buffer;
 
   assert(sizeof(*nstate) <= sizeof(state->data));
 
+  /* use a copy in the temporary buffer, we may modify during parsing */
+  buffer = nbdata->copy;
+  memcpy(buffer, nbdata->buffer, nbdata->buflen);
+
   /* skip headers */
   while (!strncmp(buffer, "<?xml ", 6) || !strncmp(buffer, "<!DOCTYPE ", 10)) {
     buffer = strchr(buffer, '\n');
@@ -283,20 +297,34 @@ hwloc_nolibxml_look_failed(struct hwloc_xml_backend_data_s *bdata __hwloc_attrib
 static void
 hwloc_nolibxml_backend_exit(struct hwloc_xml_backend_data_s *bdata)
 {
-  free(bdata->data);
+  struct hwloc__nolibxml_backend_data_s *nbdata = bdata->data;
+  free(nbdata->buffer);
+  free(nbdata->copy);
+  free(nbdata);
 }
 
 static int
 hwloc_nolibxml_backend_init(struct hwloc_xml_backend_data_s *bdata,
 			    const char *xmlpath, const char *xmlbuffer, int xmlbuflen)
 {
+  struct hwloc__nolibxml_backend_data_s *nbdata = malloc(sizeof(*nbdata));
+
+  if (!nbdata)
+    goto out;
+  bdata->data = nbdata;
+
   if (xmlbuffer) {
-    bdata->data = malloc(xmlbuflen);
-    memcpy(bdata->data, xmlbuffer, xmlbuflen);
+    nbdata->buffer = malloc(xmlbuflen);
+    if (!nbdata->buffer)
+      goto out_with_nbdata;
+    nbdata->buflen = xmlbuflen;
+    memcpy(nbdata->buffer, xmlbuffer, xmlbuflen);
+
   } else {
     FILE * file;
-    size_t buflen = 4096, offset, readlen;
-    char *buffer = malloc(buflen+1);
+    size_t buflen, offset, readlen;
+    struct stat statbuf;
+    char *buffer;
     size_t ret;
 
     if (!strcmp(xmlpath, "-"))
@@ -304,7 +332,19 @@ hwloc_nolibxml_backend_init(struct hwloc_xml_backend_data_s *bdata,
 
     file = fopen(xmlpath, "r");
     if (!file)
-      return -1;
+      goto out_with_nbdata;
+
+    /* find the required buffer size for regular files, or use 4k when unknown, we'll realloc later if needed */
+    buflen = 4096;
+    if (!stat(xmlpath, &statbuf))
+      if (S_ISREG(statbuf.st_mode))
+	buflen = statbuf.st_size+1; /* one additional byte so that the first fread() gets EOF too */
+
+    buffer = malloc(buflen+1); /* one more byte for the ending \0 */
+    if (!buffer) {
+      fclose(file);
+      goto out_with_nbdata;
+    }
 
     offset = 0; readlen = buflen;
     while (1) {
@@ -318,19 +358,35 @@ hwloc_nolibxml_backend_init(struct hwloc_xml_backend_data_s *bdata,
 
       buflen *= 2;
       buffer = realloc(buffer, buflen+1);
+      if (!buffer) {
+	fclose(file);
+	goto out_with_nbdata;
+      }
       readlen = buflen/2;
     }
 
     fclose(file);
 
-    bdata->data = buffer;
-    /* buflen = offset+1; */
+    nbdata->buffer = buffer;
+    nbdata->buflen = offset+1;
   }
 
+  /* allocate a temporary copy buffer that we may modify during parsing */
+  nbdata->copy = malloc(nbdata->buflen);
+  if (!nbdata->copy)
+    goto out_with_buffer;
+
   bdata->look_init = hwloc_nolibxml_look_init;
   bdata->look_failed = hwloc_nolibxml_look_failed;
   bdata->backend_exit = hwloc_nolibxml_backend_exit;
   return 0;
+
+out_with_buffer:
+  free(nbdata->buffer);
+out_with_nbdata:
+  free(nbdata);
+out:
+  return -1;
 }
 
 /*******************
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-xml.c b/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-xml.c
index a088641..2a2c41a 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-xml.c
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-xml.c
@@ -585,6 +585,7 @@ hwloc__xml_import_object(hwloc_topology_t topology,
     if (!strcmp(tag, "object")) {
       hwloc_obj_t childobj = hwloc_alloc_setup_object(HWLOC_OBJ_TYPE_MAX, -1);
       hwloc_insert_object_by_parent(topology, obj, childobj);
+      /* insert_object_by_parent() doesn't merge during insert, so childobj is still valid */
       ret = hwloc__xml_import_object(topology, data, childobj, &childstate);
     } else if (!strcmp(tag, "page_type")) {
       ret = hwloc__xml_import_pagetype(topology, obj, &childstate);
@@ -610,18 +611,19 @@ hwloc__xml_import_object(hwloc_topology_t topology,
  ********* main XML import *********
  ***********************************/
 
-static void
+static int
 hwloc_xml__handle_distances(struct hwloc_topology *topology,
 			    struct hwloc_xml_backend_data_s *data)
 {
   struct hwloc_xml_imported_distances_s *xmldist, *next = data->first_distances;
 
   if (!next)
-    return;
+    return 0;
 
   /* connect things now because we need levels to check/build, they'll be reconnected properly later anyway */
   hwloc_connect_children(topology->levels[0][0]);
-  hwloc_connect_levels(topology);
+  if (hwloc_connect_levels(topology) < 0)
+    return -1;
 
   while ((xmldist = next) != NULL) {
     hwloc_obj_t root = xmldist->root;
@@ -652,6 +654,8 @@ hwloc_xml__handle_distances(struct hwloc_topology *topology,
     next = xmldist->next;
     free(xmldist);
   }
+
+  return 0;
 }
 
 /* this canNOT be the first XML call */
@@ -691,7 +695,8 @@ hwloc_look_xml(struct hwloc_backend *backend)
   /* we could add "BackendSource=XML" to notify that XML was used between the actual backend and here */
 
   /* if we added some distances, we must check them, and make them groupable */
-  hwloc_xml__handle_distances(topology, data);
+  if (hwloc_xml__handle_distances(topology, data) < 0)
+    goto err;
   data->first_distances = data->last_distances = NULL;
   topology->support.discovery->pu = 1;
 
@@ -701,6 +706,7 @@ hwloc_look_xml(struct hwloc_backend *backend)
  failed:
   if (data->look_failed)
     data->look_failed(data);
+ err:
   hwloc_localeswitch_fini();
   return -1;
 }
@@ -1141,7 +1147,7 @@ hwloc_xml_component_instantiate(struct hwloc_disc_component *component,
 static struct hwloc_disc_component hwloc_xml_disc_component = {
   HWLOC_DISC_COMPONENT_TYPE_GLOBAL,
   "xml",
-  HWLOC_DISC_COMPONENT_TYPE_CPU | HWLOC_DISC_COMPONENT_TYPE_GLOBAL | HWLOC_DISC_COMPONENT_TYPE_ADDITIONAL,
+  ~0,
   hwloc_xml_component_instantiate,
   30,
   NULL
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology.c b/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology.c
index 04df361..708ed83 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology.c
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology.c
@@ -1,6 +1,6 @@
 /*
  * Copyright © 2009 CNRS
- * Copyright © 2009-2013 Inria.  All rights reserved.
+ * Copyright © 2009-2012 Inria.  All rights reserved.
  * Copyright © 2009-2012 Université Bordeaux 1
  * Copyright © 2009-2011 Cisco Systems, Inc.  All rights reserved.
  * See COPYING in top-level directory.
@@ -475,13 +475,20 @@ int hwloc_compare_types (hwloc_obj_type_t type1, hwloc_obj_type_t type2)
 static enum hwloc_type_cmp_e
 hwloc_type_cmp(hwloc_obj_t obj1, hwloc_obj_t obj2)
 {
-  if (hwloc_compare_types(obj1->type, obj2->type) > 0)
+  hwloc_obj_type_t type1 = obj1->type;
+  hwloc_obj_type_t type2 = obj2->type;
+  int compare;
+
+  compare = hwloc_compare_types(type1, type2);
+  if (compare == HWLOC_TYPE_UNORDERED)
+    return HWLOC_TYPE_EQUAL; /* we cannot do better */
+  if (compare > 0)
     return HWLOC_TYPE_DEEPER;
-  if (hwloc_compare_types(obj1->type, obj2->type) < 0)
+  if (compare < 0)
     return HWLOC_TYPE_HIGHER;
 
   /* Caches have the same types but can have different depths.  */
-  if (obj1->type == HWLOC_OBJ_CACHE) {
+  if (type1 == HWLOC_OBJ_CACHE) {
     if (obj1->attr->cache.depth < obj2->attr->cache.depth)
       return HWLOC_TYPE_DEEPER;
     else if (obj1->attr->cache.depth > obj2->attr->cache.depth)
@@ -495,7 +502,10 @@ hwloc_type_cmp(hwloc_obj_t obj1, hwloc_obj_t obj2)
   }
 
   /* Group objects have the same types but can have different depths.  */
-  if (obj1->type == HWLOC_OBJ_GROUP) {
+  if (type1 == HWLOC_OBJ_GROUP) {
+    if (obj1->attr->group.depth == (unsigned) -1
+	|| obj2->attr->group.depth == (unsigned) -1)
+      return HWLOC_TYPE_EQUAL;
     if (obj1->attr->group.depth < obj2->attr->group.depth)
       return HWLOC_TYPE_DEEPER;
     else if (obj1->attr->group.depth > obj2->attr->group.depth)
@@ -503,7 +513,7 @@ hwloc_type_cmp(hwloc_obj_t obj1, hwloc_obj_t obj2)
   }
 
   /* Bridges objects have the same types but can have different depths.  */
-  if (obj1->type == HWLOC_OBJ_BRIDGE) {
+  if (type1 == HWLOC_OBJ_BRIDGE) {
     if (obj1->attr->bridge.depth < obj2->attr->bridge.depth)
       return HWLOC_TYPE_DEEPER;
     else if (obj1->attr->bridge.depth > obj2->attr->bridge.depth)
@@ -635,8 +645,12 @@ hwloc___insert_object_by_cpuset_report_error(hwloc_report_error_t report_error,
 #define check_sizes(new, old, field)
 #endif
 
-/* Try to insert OBJ in CUR, recurse if needed */
-static int
+/* Try to insert OBJ in CUR, recurse if needed.
+ * Returns the object if it was inserted,
+ * the remaining object it was merged,
+ * NULL if failed to insert.
+ */
+static struct hwloc_obj *
 hwloc___insert_object_by_cpuset(struct hwloc_topology *topology, hwloc_obj_t cur, hwloc_obj_t obj,
 			        hwloc_report_error_t report_error)
 {
@@ -646,7 +660,7 @@ hwloc___insert_object_by_cpuset(struct hwloc_topology *topology, hwloc_obj_t cur
   /* Make sure we haven't gone too deep.  */
   if (!hwloc_bitmap_isincluded(obj->cpuset, cur->cpuset)) {
     fprintf(stderr,"recursion has gone too deep?!\n");
-    return -1;
+    return NULL;
   }
 
   /* Check whether OBJ is included in some child.  */
@@ -657,12 +671,12 @@ hwloc___insert_object_by_cpuset(struct hwloc_topology *topology, hwloc_obj_t cur
         merge_index(obj, child, os_level, signed);
 	if (obj->os_level != child->os_level) {
           fprintf(stderr, "Different OS level\n");
-          return -1;
+          return NULL;
         }
         merge_index(obj, child, os_index, unsigned);
 	if (obj->os_index != child->os_index) {
           fprintf(stderr, "Different OS indexes\n");
-          return -1;
+          return NULL;
         }
 	if (obj->distances_count) {
 	  if (child->distances_count) {
@@ -723,13 +737,13 @@ hwloc___insert_object_by_cpuset(struct hwloc_topology *topology, hwloc_obj_t cur
 	    break;
 	}
 	/* Already present, no need to insert.  */
-	return -1;
+	return child;
       case HWLOC_OBJ_INCLUDED:
 	if (container) {
           if (report_error)
 	    hwloc___insert_object_by_cpuset_report_error(report_error, "object (%s) included in several different objects!", obj, __LINE__);
 	  /* We can't handle that.  */
-	  return -1;
+	  return NULL;
 	}
 	/* This child contains OBJ.  */
 	container = child;
@@ -738,7 +752,7 @@ hwloc___insert_object_by_cpuset(struct hwloc_topology *topology, hwloc_obj_t cur
         if (report_error)
           hwloc___insert_object_by_cpuset_report_error(report_error, "object (%s) intersection without inclusion!", obj, __LINE__);
 	/* We can't handle that.  */
-	return -1;
+	return NULL;
       case HWLOC_OBJ_CONTAINS:
 	/* OBJ will be above CHILD.  */
 	break;
@@ -812,32 +826,33 @@ hwloc___insert_object_by_cpuset(struct hwloc_topology *topology, hwloc_obj_t cur
   *obj_children = NULL;
   *cur_children = NULL;
 
-  return 0;
+  return obj;
 }
 
 /* insertion routine that lets you change the error reporting callback */
-int
+struct hwloc_obj *
 hwloc__insert_object_by_cpuset(struct hwloc_topology *topology, hwloc_obj_t obj,
 			       hwloc_report_error_t report_error)
 {
-  int ret;
+  struct hwloc_obj *result;
   /* Start at the top.  */
   /* Add the cpuset to the top */
   hwloc_bitmap_or(topology->levels[0][0]->complete_cpuset, topology->levels[0][0]->complete_cpuset, obj->cpuset);
   if (obj->nodeset)
     hwloc_bitmap_or(topology->levels[0][0]->complete_nodeset, topology->levels[0][0]->complete_nodeset, obj->nodeset);
-  ret = hwloc___insert_object_by_cpuset(topology, topology->levels[0][0], obj, report_error);
-  if (ret < 0)
+  result = hwloc___insert_object_by_cpuset(topology, topology->levels[0][0], obj, report_error);
+  if (result != obj)
+    /* either failed to insert, or got merged, free the original object */
     hwloc_free_unlinked_object(obj);
-  return ret;
+  return result;
 }
 
 /* the default insertion routine warns in case of error.
  * it's used by most backends */
-void
+struct hwloc_obj *
 hwloc_insert_object_by_cpuset(struct hwloc_topology *topology, hwloc_obj_t obj)
 {
-  hwloc__insert_object_by_cpuset(topology, obj, hwloc_report_os_error);
+  return hwloc__insert_object_by_cpuset(topology, obj, hwloc_report_os_error);
 }
 
 void
@@ -869,7 +884,6 @@ hwloc_obj_t
 hwloc_topology_insert_misc_object_by_cpuset(struct hwloc_topology *topology, hwloc_const_bitmap_t cpuset, const char *name)
 {
   hwloc_obj_t obj, child;
-  int err;
 
   if (!topology->is_loaded) {
     errno = EINVAL;
@@ -894,8 +908,8 @@ hwloc_topology_insert_misc_object_by_cpuset(struct hwloc_topology *topology, hwl
   obj->allowed_cpuset = hwloc_bitmap_dup(cpuset);
   obj->online_cpuset = hwloc_bitmap_dup(cpuset);
 
-  err = hwloc__insert_object_by_cpuset(topology, obj, NULL /* do not show errors on stdout */);
-  if (err < 0)
+  obj = hwloc__insert_object_by_cpuset(topology, obj, NULL /* do not show errors on stdout */);
+  if (!obj)
     return NULL;
 
   hwloc_connect_children(topology->levels[0][0]);
@@ -1984,10 +1998,15 @@ hwloc_connect_levels(hwloc_topology_t topology)
     /* New level.  */
     taken_objs = malloc((n_taken_objs + 1) * sizeof(taken_objs[0]));
     /* New list of pending objects.  */
-    if (n_objs - n_taken_objs + n_new_objs)
+    if (n_objs - n_taken_objs + n_new_objs) {
       new_objs = malloc((n_objs - n_taken_objs + n_new_objs) * sizeof(new_objs[0]));
-    else
+    } else {
+#ifdef HWLOC_DEBUG
+      assert(!n_new_objs);
+      assert(n_objs == n_taken_objs);
+#endif
       new_objs = NULL;
+    }
 
     n_new_objs = hwloc_level_take_objects(top_obj,
 					  objs, n_objs,
@@ -2236,7 +2255,7 @@ next_cpubackend:
   propagate_total_memory(topology->levels[0][0]);
 
   /*
-   * Discovery with additional backends
+   * Additional discovery with other backends
    */
   backend = topology->backends;
   while (NULL != backend) {
@@ -2451,6 +2470,12 @@ hwloc_topology_set_flags (struct hwloc_topology *topology, unsigned long flags)
   return 0;
 }
 
+unsigned long
+hwloc_topology_get_flags (struct hwloc_topology *topology)
+{
+  return topology->flags;
+}
+
 int
 hwloc_topology_ignore_type(struct hwloc_topology *topology, hwloc_obj_type_t type)
 {
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/src/traversal.c b/src/pm/hydra/tools/topo/hwloc/hwloc/src/traversal.c
index e61c0f7..452462b 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/src/traversal.c
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/src/traversal.c
@@ -402,7 +402,10 @@ hwloc_obj_type_snprintf(char * __hwloc_restrict string, size_t size, hwloc_obj_t
 			  verbose ? hwloc_obj_type_string(type): "");
   case HWLOC_OBJ_GROUP:
 	  /* TODO: more pretty presentation? */
-    return hwloc_snprintf(string, size, "%s%u", hwloc_obj_type_string(type), obj->attr->group.depth);
+    if (obj->attr->group.depth != (unsigned) -1)
+      return hwloc_snprintf(string, size, "%s%u", hwloc_obj_type_string(type), obj->attr->group.depth);
+    else
+      return hwloc_snprintf(string, size, "%s", hwloc_obj_type_string(type));
   case HWLOC_OBJ_BRIDGE:
     if (verbose)
       return snprintf(string, size, "Bridge %s->%s",
@@ -416,10 +419,11 @@ hwloc_obj_type_snprintf(char * __hwloc_restrict string, size_t size, hwloc_obj_t
   case HWLOC_OBJ_OS_DEVICE:
     switch (obj->attr->osdev.type) {
     case HWLOC_OBJ_OSDEV_BLOCK: return hwloc_snprintf(string, size, "Block");
-    case HWLOC_OBJ_OSDEV_NETWORK: return hwloc_snprintf(string, size, "Net");
+    case HWLOC_OBJ_OSDEV_NETWORK: return hwloc_snprintf(string, size, verbose ? "Network" : "Net");
     case HWLOC_OBJ_OSDEV_OPENFABRICS: return hwloc_snprintf(string, size, "OpenFabrics");
     case HWLOC_OBJ_OSDEV_DMA: return hwloc_snprintf(string, size, "DMA");
     case HWLOC_OBJ_OSDEV_GPU: return hwloc_snprintf(string, size, "GPU");
+    case HWLOC_OBJ_OSDEV_COPROC: return hwloc_snprintf(string, size, verbose ? "Co-Processor" : "CoProc");
     default:
       *string = '\0';
       return 0;
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/Makefile.am b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/Makefile.am
index 5d185b2..623c83c 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/Makefile.am
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/Makefile.am
@@ -1,4 +1,4 @@
-# Copyright © 2009-2012 Inria.  All rights reserved.
+# Copyright © 2009-2013 Inria.  All rights reserved.
 # Copyright © 2009-2012 Université Bordeaux 1
 # Copyright © 2009-2010 Cisco Systems, Inc.  All rights reserved.
 # See COPYING in top-level directory.
@@ -16,7 +16,7 @@ endif HWLOC_HAVE_LINUX
 
 LDADD =
 
-TESTS_ENVIRONMENT = $(builddir)/wrapper.sh
+LOG_COMPILER = $(builddir)/wrapper.sh
 
 check_PROGRAMS = hwloc_list_components \
 	hwloc_bitmap \
@@ -47,7 +47,9 @@ check_PROGRAMS = hwloc_list_components \
 	hwloc_topology_restrict \
 	hwloc_obj_infos \
 	hwloc_iodevs \
-	xmlbuffer
+	xmlbuffer \
+	gl \
+	intel-mic
 
 if HWLOC_HAVE_LINUX_LIBNUMA
 check_PROGRAMS += linux-libnuma
@@ -65,6 +67,10 @@ if HWLOC_HAVE_MYRIEXPRESS
 check_PROGRAMS += myriexpress
 endif HWLOC_HAVE_MYRIEXPRESS
 
+if HWLOC_HAVE_OPENCL
+check_PROGRAMS += opencl
+endif HWLOC_HAVE_OPENCL
+
 if HWLOC_HAVE_CUDA
 check_PROGRAMS += cuda
 endif HWLOC_HAVE_CUDA
@@ -73,6 +79,10 @@ if HWLOC_HAVE_CUDART
 check_PROGRAMS += cudart
 endif HWLOC_HAVE_CUDART
 
+if HWLOC_HAVE_NVML
+check_PROGRAMS += nvml
+endif HWLOC_HAVE_NVML
+
 TESTS = $(check_PROGRAMS)
 
 # The library has a different name depending on whether we are
@@ -88,10 +98,10 @@ LDADD += $(HWLOC_top_builddir)/src/$(hwloc_lib)
 linux_libnuma_LDADD = $(LDADD) -lnuma
 openfabrics_verbs_LDADD = $(LDADD) -libverbs
 myriexpress_LDADD = $(LDADD) -lmyriexpress
+opencl_LDADD = $(LDADD) -lOpenCL
 cuda_LDADD = $(LDADD) -lcuda
 cudart_LDADD = $(LDADD) -lcuda -lcudart
-xmlbuffer_LDADD = $(LDADD) $(HWLOC_LIBXML2_LIBS)
-hwloc_backends_LDADD = $(LDADD) $(HWLOC_LIBXML2_LIBS)
+nvml_LDADD = $(LDADD) -lnvidia-ml
 hwloc_bind_LDADD = $(LDADD)
 if HWLOC_HAVE_PTHREAD
 hwloc_bind_LDADD += -lpthread
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/cuda.c b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/cuda.c
index 849a311..acb864d 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/cuda.c
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/cuda.c
@@ -1,5 +1,5 @@
 /*
- * Copyright © 2010 inria.  All rights reserved.
+ * Copyright © 2010-2012 Inria.  All rights reserved.
  * Copyright © 2011 Cisco Systems, Inc.  All rights reserved.
  * See COPYING in top-level directory.
  */
@@ -34,10 +34,13 @@ int main(void)
   printf("cuDeviceGetCount found %d devices\n", count);
 
   hwloc_topology_init(&topology);
+  hwloc_topology_set_flags(topology, HWLOC_TOPOLOGY_FLAG_IO_DEVICES);
   hwloc_topology_load(topology);
 
   for(i=0; i<count; i++) {
     hwloc_bitmap_t set;
+    hwloc_obj_t osdev, osdev2, ancestor;
+    const char *value;
 
     cres = cuDeviceGet(&device, i);
     if (cres != CUDA_SUCCESS) {
@@ -45,6 +48,31 @@ int main(void)
       continue;
     }
 
+    osdev = hwloc_cuda_get_device_osdev(topology, device);
+    assert(osdev);
+    osdev2 = hwloc_cuda_get_device_osdev_by_index(topology, i);
+    assert(osdev == osdev2);
+
+    ancestor = hwloc_get_non_io_ancestor_obj(topology, osdev);
+
+    printf("found OSDev %s\n", osdev->name);
+    err = strncmp(osdev->name, "cuda", 4);
+    assert(!err);
+    assert(atoi(osdev->name+4) == (int) i);
+
+    value = hwloc_obj_get_info_by_name(osdev, "Backend");
+    err = strcmp(value, "CUDA");
+    assert(!err);
+
+    assert(osdev->attr->osdev.type == HWLOC_OBJ_OSDEV_COPROC);
+
+    value = hwloc_obj_get_info_by_name(osdev, "CoProcType");
+    err = strcmp(value, "CUDA");
+    assert(!err);
+    
+    value = hwloc_obj_get_info_by_name(osdev, "GPUModel");
+    printf("found OSDev model %s\n", value);
+
     set = hwloc_bitmap_alloc();
     err = hwloc_cuda_get_device_cpuset(topology, device, set);
     if (err < 0) {
@@ -53,6 +81,7 @@ int main(void)
       char *cpuset_string = NULL;
       hwloc_bitmap_asprintf(&cpuset_string, set);
       printf("got cpuset %s for device %d\n", cpuset_string, i);
+      assert(hwloc_bitmap_isequal(set, ancestor->cpuset));
       free(cpuset_string);
     }
     hwloc_bitmap_free(set);
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/cudart.c b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/cudart.c
index 036738f..ec122a4 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/cudart.c
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/cudart.c
@@ -1,5 +1,5 @@
 /*
- * Copyright © 2010 inria.  All rights reserved.
+ * Copyright © 2010-2012 Inria.  All rights reserved.
  * Copyright © 2011 Cisco Systems, Inc.  All rights reserved.
  * See COPYING in top-level directory.
  */
@@ -22,15 +22,41 @@ int main(void)
   cerr = cudaGetDeviceCount(&count);
   if (cerr) {
     printf("cudaGetDeviceCount failed %d\n", cerr);
-    return -1;
+    return 0;
   }
   printf("cudaGetDeviceCount found %d devices\n", count);
 
   hwloc_topology_init(&topology);
+  hwloc_topology_set_flags(topology, HWLOC_TOPOLOGY_FLAG_IO_DEVICES);
   hwloc_topology_load(topology);
 
   for(i=0; i<count; i++) {
     hwloc_bitmap_t set;
+    hwloc_obj_t osdev, ancestor;
+    const char *value;
+
+    osdev = hwloc_cudart_get_device_osdev_by_index(topology, i);
+    assert(osdev);
+
+    ancestor = hwloc_get_non_io_ancestor_obj(topology, osdev);
+
+    printf("found OSDev %s\n", osdev->name);
+    err = strncmp(osdev->name, "cuda", 4);
+    assert(!err);
+    assert(atoi(osdev->name+4) == (int) i);
+
+    value = hwloc_obj_get_info_by_name(osdev, "Backend");
+    err = strcmp(value, "CUDA");
+    assert(!err);
+
+    assert(osdev->attr->osdev.type == HWLOC_OBJ_OSDEV_COPROC);
+
+    value = hwloc_obj_get_info_by_name(osdev, "CoProcType");
+    err = strcmp(value, "CUDA");
+    assert(!err);
+    
+    value = hwloc_obj_get_info_by_name(osdev, "GPUModel");
+    printf("found OSDev model %s\n", value);
 
     set = hwloc_bitmap_alloc();
     err = hwloc_cudart_get_device_cpuset(topology, i, set);
@@ -40,6 +66,7 @@ int main(void)
       char *cpuset_string = NULL;
       hwloc_bitmap_asprintf(&cpuset_string, set);
       printf("got cpuset %s for device %d\n", cpuset_string, i);
+      assert(hwloc_bitmap_isequal(set, ancestor->cpuset));
       free(cpuset_string);
     }
     hwloc_bitmap_free(set);
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/gl.c b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/gl.c
new file mode 100644
index 0000000..c097c94
--- /dev/null
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/gl.c
@@ -0,0 +1,116 @@
+/*
+ * Copyright © 2012 Blue Brain Project, BBP/EPFL. All rights reserved.
+ * Copyright © 2012-2013 Inria.  All rights reserved.
+ * See COPYING in top-level directory.
+ */
+
+#include <hwloc.h>
+#include <hwloc/gl.h>
+#include <hwloc/helper.h>
+
+#include <errno.h>
+#include <stdio.h>
+#include <string.h>
+#include "stdlib.h"
+
+int main(void)
+{
+  hwloc_topology_t topology;
+  unsigned long loading_flags;
+  hwloc_obj_t pcidev, osdev, parent;
+  hwloc_obj_t firstgpu = NULL, lastgpu = NULL;
+  unsigned port, device;
+  char* cpuset_string;
+  unsigned nr_pcidev;
+  unsigned nr_osdev;
+  unsigned nr_gpus;
+  unsigned i;
+  int err;
+
+  hwloc_topology_init(&topology); /* Topology initialization */
+
+  /* Flags used for loading the I/O devices, bridges and their relevant info */
+  loading_flags = HWLOC_TOPOLOGY_FLAG_IO_BRIDGES | HWLOC_TOPOLOGY_FLAG_IO_DEVICES;
+
+  /* Set discovery flags */
+  err = hwloc_topology_set_flags(topology, loading_flags);
+  /* If flags not set */
+  if (err < 0)
+    printf("hwloc_topology_set_flags() failed, PCI devices will not be loaded in the topology \n");
+
+  /* Perform topology detection */
+  hwloc_topology_load(topology);
+
+  /* Case 1: Get the cpusets of the sockets connecting the PCI devices in the topology */
+  nr_pcidev = hwloc_get_nbobjs_by_type(topology, HWLOC_OBJ_PCI_DEVICE);
+  for (i = 0; i < nr_pcidev; ++i) {
+      pcidev = hwloc_get_obj_by_type(topology, HWLOC_OBJ_PCI_DEVICE, i);
+      parent = hwloc_get_non_io_ancestor_obj(topology, pcidev);
+      /* Print the cpuset corresponding to each pci device */
+      hwloc_bitmap_asprintf(&cpuset_string, parent->cpuset);
+      printf(" %s | %s \n", cpuset_string, pcidev->name);
+      free(cpuset_string);
+    }
+
+  /* Case 2: Get the number of connected GPUs in the topology and their attached displays */
+  nr_gpus = 0;
+  nr_osdev = hwloc_get_nbobjs_by_type(topology, HWLOC_OBJ_OS_DEVICE);
+  for (i = 0; i < nr_osdev; ++i) {
+      const char *model, *backend;
+      osdev = hwloc_get_obj_by_type(topology, HWLOC_OBJ_OS_DEVICE, i);
+
+      backend = hwloc_obj_get_info_by_name(osdev, "Backend");
+      model = hwloc_obj_get_info_by_name(osdev, "GPUModel");
+
+      err = hwloc_gl_get_display_by_osdev(topology, osdev, &port, &device);
+      if (!err) {
+	err = strcmp(backend, "GL");
+	assert(!err);
+
+	assert(osdev->attr->osdev.type == HWLOC_OBJ_OSDEV_GPU);
+
+	if (!firstgpu)
+	  firstgpu = osdev;
+	lastgpu = osdev;
+	printf("GPU #%u (%s) is connected to DISPLAY:%u.%u \n", nr_gpus, model, port, device);
+	nr_gpus++;
+      } else {
+	if (backend) {
+	  err = strcmp(backend, "GL");
+	  assert(err);
+	}
+      }
+    }
+
+  /* Case 3: Get the first GPU connected to a valid display, specified by its port and device */
+  if (firstgpu) {
+    assert(sscanf(firstgpu->name, ":%u.%u", &port, &device) == 2);
+    osdev = hwloc_gl_get_display_osdev_by_port_device(topology, port, device);
+    assert(osdev == firstgpu);
+    pcidev = osdev->parent;
+    parent = hwloc_get_non_io_ancestor_obj(topology, pcidev);
+    hwloc_bitmap_asprintf(&cpuset_string, parent->cpuset);
+    printf("GPU %s (PCI %04x:%02x:%02x.%01x) is connected to DISPLAY:%u.%u close to %s\n",
+	   osdev->name,
+	   pcidev->attr->pcidev.domain, pcidev->attr->pcidev.bus, pcidev->attr->pcidev.dev, pcidev->attr->pcidev.func,
+	   port, device, cpuset_string);
+    free(cpuset_string);
+  }
+
+  /* Case 4: Get the last GPU connected to a valid display, specified by its name */
+  if (lastgpu) {
+    assert(sscanf(lastgpu->name, ":%u.%u", &port, &device) == 2);
+    osdev = hwloc_gl_get_display_osdev_by_name(topology, lastgpu->name);
+    assert(osdev == lastgpu);
+    pcidev = osdev->parent;
+    parent = hwloc_get_non_io_ancestor_obj(topology, pcidev);
+    hwloc_bitmap_asprintf(&cpuset_string, parent->cpuset);
+    printf("GPU %s (PCI %04x:%02x:%02x.%01x) is connected to DISPLAY:%u.%u close to %s\n",
+	   osdev->name,
+	   pcidev->attr->pcidev.domain, pcidev->attr->pcidev.bus, pcidev->attr->pcidev.dev, pcidev->attr->pcidev.func,
+	   port, device, cpuset_string);
+    free(cpuset_string);
+  }
+
+  return 0;
+}
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/hwloc_topology_restrict.c b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/hwloc_topology_restrict.c
index 5c6cd65..07c3da3 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/hwloc_topology_restrict.c
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/hwloc_topology_restrict.c
@@ -102,7 +102,7 @@ int main(void)
   check_distances(3, 6);
 
   /* restrict to everything, will do nothing */
-  printf("restricting to nothing, does nothing\n");
+  printf("restricting to everything, does nothing\n");
   hwloc_bitmap_fill(cpuset);
   err = hwloc_topology_restrict(topology, cpuset, HWLOC_RESTRICT_FLAG_ADAPT_DISTANCES);
   assert(!err);
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/intel-mic.c b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/intel-mic.c
new file mode 100644
index 0000000..c5b4cfb
--- /dev/null
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/intel-mic.c
@@ -0,0 +1,70 @@
+/*
+ * Copyright © 2013 Inria.  All rights reserved.
+ * See COPYING in top-level directory.
+ */
+
+#include <stdio.h>
+#include <assert.h>
+#include <hwloc.h>
+#include <hwloc/intel-mic.h>
+
+int main(void)
+{
+  hwloc_topology_t topology;
+  int i;
+  int err;
+
+  hwloc_topology_init(&topology);
+  hwloc_topology_set_flags(topology, HWLOC_TOPOLOGY_FLAG_IO_DEVICES);
+  hwloc_topology_load(topology);
+
+  for(i=0; ; i++) {
+    hwloc_bitmap_t set;
+    hwloc_obj_t osdev, ancestor;
+    const char *value;
+
+    osdev = hwloc_intel_mic_get_device_osdev_by_index(topology, i);
+    if (!osdev)
+      break;
+    assert(osdev);
+
+    ancestor = hwloc_get_non_io_ancestor_obj(topology, osdev);
+
+    printf("found OSDev %s\n", osdev->name);
+    err = strncmp(osdev->name, "mic", 3);
+    assert(!err);
+    assert(atoi(osdev->name+3) == (int) i);
+
+    assert(osdev->attr->osdev.type == HWLOC_OBJ_OSDEV_COPROC);
+
+    value = hwloc_obj_get_info_by_name(osdev, "CoProcType");
+    err = strcmp(value, "MIC");
+    assert(!err);
+    
+    value = hwloc_obj_get_info_by_name(osdev, "MICFamily");
+    printf("found MICFamily %s\n", value);
+    value = hwloc_obj_get_info_by_name(osdev, "MICSKU");
+    printf("found MICSKU %s\n", value);
+    value = hwloc_obj_get_info_by_name(osdev, "MICActiveCores");
+    printf("found MICActiveCores %s\n", value);
+    value = hwloc_obj_get_info_by_name(osdev, "MICMemorySize");
+    printf("found MICMemorySize %s\n", value);
+
+    set = hwloc_bitmap_alloc();
+    err = hwloc_intel_mic_get_device_cpuset(topology, i, set);
+    if (err < 0) {
+      printf("failed to get cpuset for device %d\n", i);
+    } else {
+      char *cpuset_string = NULL;
+      hwloc_bitmap_asprintf(&cpuset_string, set);
+      printf("got cpuset %s for device %d\n", cpuset_string, i);
+      assert(hwloc_bitmap_isequal(set, ancestor->cpuset));
+      free(cpuset_string);
+    }
+    hwloc_bitmap_free(set);
+  }
+
+  hwloc_topology_destroy(topology);
+
+  return 0;
+}
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/linux-libnuma.c b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/linux-libnuma.c
index 727e027..a67113a 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/linux-libnuma.c
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/linux-libnuma.c
@@ -174,7 +174,7 @@ int main(void)
       assert(!maxnode);
       assert(!mask);
     } else {
-      assert(maxnode = node->os_index + 1);
+      assert(maxnode == node->os_index + 1);
       assert(mask == (1UL << node->os_index));
     }
 
@@ -211,7 +211,7 @@ int main(void)
       assert(!maxnode);
       assert(!mask);
     } else {
-      assert(maxnode = node->os_index + 1);
+      assert(maxnode == node->os_index + 1);
       assert(mask == (1UL << node->os_index));
     }
 
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/linux/32amd64-4s2n4c-cgroup.output b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/linux/32amd64-4s2n4c-cgroup.output
index 857f8ca..87f700f 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/linux/32amd64-4s2n4c-cgroup.output
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/linux/32amd64-4s2n4c-cgroup.output
@@ -3,7 +3,7 @@ Machine (P#0 total=100661164KB DMIProductName=H8QG6 DMIProductVersion=1234567890
     Socket L#0 (P#0 total=33552300KB CPUModel="AMD Opteron(tm) Processor 6134")
       NUMANode L#0 (P#0 local=16775084KB total=16775084KB)
         L3Cache L#0 (size=5118KB linesize=64 ways=48)
-          Group3 L#0
+          Group2 L#0
             L2Cache L#0 (size=512KB linesize=64 ways=16)
               L1dCache L#0 (size=64KB linesize=64 ways=2)
                 L1iCache L#0 (size=64KB linesize=64 ways=2)
@@ -14,7 +14,7 @@ Machine (P#0 total=100661164KB DMIProductName=H8QG6 DMIProductVersion=1234567890
                 L1iCache L#1 (size=64KB linesize=64 ways=2)
                   Core L#1 (P#1)
                     PU L#1 (P#1)
-          Group3 L#1
+          Group2 L#1
             L2Cache L#2 (size=512KB linesize=64 ways=16)
               L1dCache L#2 (size=64KB linesize=64 ways=2)
                 L1iCache L#2 (size=64KB linesize=64 ways=2)
@@ -52,7 +52,7 @@ depth 0:	1 Machine (type #1)
   depth 2:	4 Socket (type #3)
    depth 3:	8 NUMANode (type #2)
     depth 4:	2 L3Cache (type #4)
-     depth 5:	2 Group3 (type #7)
+     depth 5:	2 Group2 (type #7)
       depth 6:	6 L2Cache (type #4)
        depth 7:	6 L1dCache (type #4)
         depth 8:	6 L1iCache (type #4)
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/linux/32amd64-4s2n4c-cgroup.xml.output b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/linux/32amd64-4s2n4c-cgroup.xml.output
index dfd8c5f..7afcb9e 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/linux/32amd64-4s2n4c-cgroup.xml.output
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/linux/32amd64-4s2n4c-cgroup.xml.output
@@ -127,7 +127,7 @@
         </distances>
         <object type="NUMANode" os_index="0" cpuset="0x0000000f" complete_cpuset="0x0000000f" online_cpuset="0x0000000f" allowed_cpuset="0x0000000f" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001" local_memory="17177686016">
           <object type="Cache" cpuset="0x0000000f" complete_cpuset="0x0000000f" online_cpuset="0x0000000f" allowed_cpuset="0x0000000f" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001" cache_size="5240832" depth="3" cache_linesize="64" cache_associativity="48" cache_type="0">
-            <object type="Group" cpuset="0x00000003" complete_cpuset="0x00000003" online_cpuset="0x00000003" allowed_cpuset="0x00000003" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001" depth="3">
+            <object type="Group" cpuset="0x00000003" complete_cpuset="0x00000003" online_cpuset="0x00000003" allowed_cpuset="0x00000003" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001" depth="2">
               <object type="Cache" cpuset="0x00000001" complete_cpuset="0x00000001" online_cpuset="0x00000001" allowed_cpuset="0x00000001" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001" cache_size="524288" depth="2" cache_linesize="64" cache_associativity="16" cache_type="0">
                 <object type="Cache" cpuset="0x00000001" complete_cpuset="0x00000001" online_cpuset="0x00000001" allowed_cpuset="0x00000001" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001" cache_size="65536" depth="1" cache_linesize="64" cache_associativity="2" cache_type="1">
                   <object type="Core" os_index="0" cpuset="0x00000001" complete_cpuset="0x00000001" online_cpuset="0x00000001" allowed_cpuset="0x00000001" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001">
@@ -143,7 +143,7 @@
                 </object>
               </object>
             </object>
-            <object type="Group" cpuset="0x0000000c" complete_cpuset="0x0000000c" online_cpuset="0x0000000c" allowed_cpuset="0x0000000c" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001" depth="3">
+            <object type="Group" cpuset="0x0000000c" complete_cpuset="0x0000000c" online_cpuset="0x0000000c" allowed_cpuset="0x0000000c" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001" depth="2">
               <object type="Cache" cpuset="0x00000004" complete_cpuset="0x00000004" online_cpuset="0x00000004" allowed_cpuset="0x00000004" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001" cache_size="524288" depth="2" cache_linesize="64" cache_associativity="16" cache_type="0">
                 <object type="Cache" cpuset="0x00000004" complete_cpuset="0x00000004" online_cpuset="0x00000004" allowed_cpuset="0x00000004" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001" cache_size="65536" depth="1" cache_linesize="64" cache_associativity="2" cache_type="1">
                   <object type="Core" os_index="2" cpuset="0x00000004" complete_cpuset="0x00000004" online_cpuset="0x00000004" allowed_cpuset="0x00000004" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001">
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/linux/Makefile.am b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/linux/Makefile.am
index 8c8fddd..2ceb1ae 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/linux/Makefile.am
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/linux/Makefile.am
@@ -1,4 +1,4 @@
-# Copyright © 2009-2012 inria.  All rights reserved.
+# Copyright © 2009-2013 Inria.  All rights reserved.
 # Copyright © 2009-2011 Université Bordeaux 1
 # Copyright © 2009-2010 Cisco Systems, Inc.  All rights reserved.
 # See COPYING in top-level directory.
@@ -148,13 +148,13 @@ endif HWLOC_HAVE_OPENAT
 
 EXTRA_DIST = $(sysfs_outputs) $(sysfs_tarballs) $(sysfs_excludes) $(sysfs_options) $(sysfs_envs)
 
-TESTS_ENVIRONMENT = $(builddir)/test-topology.sh
+LOG_COMPILER = $(builddir)/test-topology.sh
 
 
 bin_SCRIPTS = hwloc-gather-topology
 
 install-exec-hook:
-	$(SED) -e 's/abs_top_builddir\/utils/bindir/' -e '/abs_top_builddir/d' $(DESTDIR)$(bindir)/hwloc-gather-topology > $(DESTDIR)$(bindir)/hwloc-gather-topology.tmp && mv -f $(DESTDIR)$(bindir)/hwloc-gather-topology.tmp $(DESTDIR)$(bindir)/hwloc-gather-topology
+	$(SED) -e 's/HWLOC_top_builddir\/utils/bindir/' -e '/HWLOC_top_builddir/d' $(DESTDIR)$(bindir)/hwloc-gather-topology > $(DESTDIR)$(bindir)/hwloc-gather-topology.tmp && mv -f $(DESTDIR)$(bindir)/hwloc-gather-topology.tmp $(DESTDIR)$(bindir)/hwloc-gather-topology
 	chmod +x $(DESTDIR)$(bindir)/hwloc-gather-topology
 
 SUBDIRS = gather
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/linux/gather/test-gather-topology.sh.in b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/linux/gather/test-gather-topology.sh.in
index 851f485..4301691 100755
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/linux/gather/test-gather-topology.sh.in
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/linux/gather/test-gather-topology.sh.in
@@ -2,15 +2,15 @@
 #-*-sh-*-
 
 #
-# Copyright © 2012 Inria.  All rights reserved.
+# Copyright © 2012-2013 Inria.  All rights reserved.
 # Copyright © 2010 Cisco Systems, Inc.  All rights reserved.
 # Copyright © 2011 Université Bordeaux 1
 # See COPYING in top-level directory.
 #
 
-abs_top_builddir="@abs_top_builddir@"
-lstopo="$abs_top_builddir/utils/lstopo-no-graphics"
-gather="$abs_top_builddir/tests/linux/hwloc-gather-topology"
+HWLOC_top_builddir="@HWLOC_top_builddir@"
+lstopo="$HWLOC_top_builddir/utils/lstopo-no-graphics"
+gather="$HWLOC_top_builddir/tests/linux/hwloc-gather-topology"
 
 # make sure we use default numeric formats
 LANG=C
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/linux/hwloc-gather-topology.in b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/linux/hwloc-gather-topology.in
index 82f8419..54f5295 100755
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/linux/hwloc-gather-topology.in
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/linux/hwloc-gather-topology.in
@@ -3,17 +3,17 @@
 
 #
 # Copyright © 2009 CNRS
-# Copyright © 2009-2012 Inria.  All rights reserved.
+# Copyright © 2009-2013 Inria.  All rights reserved.
 # Copyright © 2009-2012 Université Bordeaux 1
 # See COPYING in top-level directory.
 #
 
-abs_top_builddir="@abs_top_builddir@"
+HWLOC_top_builddir="@HWLOC_top_builddir@"
 prefix="@prefix@"
 exec_prefix="@exec_prefix@"
 bindir="@bindir@"
 # this will be changed into $bindir/lstopo during make install
-lstopo="$abs_top_builddir/utils/lstopo-no-graphics"
+lstopo="$HWLOC_top_builddir/utils/lstopo-no-graphics"
 
 # make sure we use default numeric formats
 LANG=C
@@ -109,6 +109,7 @@ cat << EOF | while read -r path ; do savedir "$destdir/$basename" "$path" ; done
 /sys/bus/cpu/devices/
 /sys/bus/node/devices/
 /sys/class/dmi/id/
+/sys/devices/virtual/dmi/id/
 /sys/kernel/mm/hugepages/
 /proc/device-tree/cpus/
 EOF
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/linux/test-topology.sh.in b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/linux/test-topology.sh.in
index ddf3c14..3349991 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/linux/test-topology.sh.in
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/linux/test-topology.sh.in
@@ -3,7 +3,7 @@
 
 #
 # Copyright © 2009 CNRS
-# Copyright © 2009-2012 Inria.  All rights reserved.
+# Copyright © 2009-2013 Inria.  All rights reserved.
 # Copyright © 2009-2011 Université Bordeaux 1
 # Copyright © 2009 Cisco Systems, Inc.  All rights reserved.
 # See COPYING in top-level directory.
@@ -16,7 +16,7 @@ HWLOC_top_srcdir="@HWLOC_top_srcdir@"
 HWLOC_top_builddir="@HWLOC_top_builddir@"
 lstopo="$HWLOC_top_builddir/utils/lstopo-no-graphics"
 
-HWLOC_PLUGINS_PATH=${abs_top_builddir}/src
+HWLOC_PLUGINS_PATH=${HWLOC_top_builddir}/src
 export HWLOC_PLUGINS_PATH
 
 actual_output="$1"
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/nvml.c b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/nvml.c
new file mode 100644
index 0000000..9cfec27
--- /dev/null
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/nvml.c
@@ -0,0 +1,90 @@
+/*
+ * Copyright © 2012 Inria.  All rights reserved.
+ * See COPYING in top-level directory.
+ */
+
+#include <stdio.h>
+#include <assert.h>
+#include <nvml.h>
+#include <hwloc.h>
+#include <hwloc/nvml.h>
+
+/* check the NVML helpers */
+
+int main(void)
+{
+  hwloc_topology_t topology;
+  nvmlReturn_t nvres;
+  nvmlDevice_t device;
+  unsigned count, i;
+  int err;
+
+  nvres = nvmlInit();
+  if (nvres != NVML_SUCCESS) {
+    printf("nvmlInit failed %d\n", nvres);
+    return 0;
+  }
+
+  nvres = nvmlDeviceGetCount(&count);
+  if (nvres != NVML_SUCCESS) {
+    printf("nvmlDeviceGetCount failed %d\n", nvres);
+    return 0;
+  }
+  printf("nvmlDeviceGetCount found %d devices\n", count);
+
+  hwloc_topology_init(&topology);
+  hwloc_topology_set_flags(topology, HWLOC_TOPOLOGY_FLAG_IO_DEVICES);
+  hwloc_topology_load(topology);
+
+  for(i=0; i<count; i++) {
+    hwloc_bitmap_t set;
+    hwloc_obj_t osdev, osdev2, ancestor;
+    const char *value;
+
+    nvres = nvmlDeviceGetHandleByIndex(i, &device);
+    if (nvres != NVML_SUCCESS) {
+      printf("nvmlDeviceGetHandleByIndex failed %d\n", nvres);
+      continue;
+    }
+
+    osdev = hwloc_nvml_get_device_osdev(topology, device);
+    assert(osdev);
+    osdev2 = hwloc_nvml_get_device_osdev_by_index(topology, i);
+    assert(osdev2 == osdev);
+
+    ancestor = hwloc_get_non_io_ancestor_obj(topology, osdev);
+
+    printf("found OSDev %s\n", osdev->name);
+    err = strncmp(osdev->name, "nvml", 4);
+    assert(!err);
+    assert(atoi(osdev->name+4) == (int) i);
+
+    value = hwloc_obj_get_info_by_name(osdev, "Backend");
+    err = strcmp(value, "NVML");
+    assert(!err);
+
+    assert(osdev->attr->osdev.type == HWLOC_OBJ_OSDEV_GPU);
+   
+    value = hwloc_obj_get_info_by_name(osdev, "GPUModel");
+    printf("found OSDev model %s\n", value);
+
+    set = hwloc_bitmap_alloc();
+    err = hwloc_nvml_get_device_cpuset(topology, device, set);
+    if (err < 0) {
+      printf("failed to get cpuset for device %d\n", i);
+    } else {
+      char *cpuset_string = NULL;
+      hwloc_bitmap_asprintf(&cpuset_string, set);
+      printf("got cpuset %s for device %d\n", cpuset_string, i);
+      free(cpuset_string);
+      assert(hwloc_bitmap_isequal(set, ancestor->cpuset));
+    }
+    hwloc_bitmap_free(set);
+  }
+
+  hwloc_topology_destroy(topology);
+
+  nvmlShutdown();
+
+  return 0;
+}
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/opencl.c b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/opencl.c
new file mode 100644
index 0000000..0b8dcef
--- /dev/null
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/opencl.c
@@ -0,0 +1,105 @@
+/*
+ * Copyright © 2012 Inria.  All rights reserved.
+ * See COPYING in top-level directory.
+ */
+
+#include <stdio.h>
+#include <assert.h>
+#include <CL/cl.h>
+#include <hwloc.h>
+#include <hwloc/opencl.h>
+
+/* check the OpenCL helpers */
+
+int main(void)
+{
+  hwloc_topology_t topology;
+  cl_int clret;
+  cl_platform_id *platform_ids;
+  unsigned nrp, nrd, count, i, j;
+  int err;
+
+  hwloc_topology_init(&topology);
+  hwloc_topology_set_flags(topology, HWLOC_TOPOLOGY_FLAG_IO_DEVICES);
+  hwloc_topology_load(topology);
+
+  clret = clGetPlatformIDs(0, NULL, &nrp);
+  if (CL_SUCCESS != clret || !nrp)
+    return 0;
+  platform_ids = malloc(nrp * sizeof(*platform_ids));
+  if (!platform_ids)
+    return 0;
+  clret = clGetPlatformIDs(nrp, platform_ids, &nrp);
+  if (CL_SUCCESS != clret || !nrp)
+    return 0;
+
+  count = 0;
+  for(i=0; i<nrp; i++) {
+    cl_device_id *device_ids;
+
+    clret = clGetDeviceIDs(platform_ids[i], CL_DEVICE_TYPE_ALL, 0, NULL, &nrd);
+    if (CL_SUCCESS != clret || !nrd)
+      continue;
+    device_ids = malloc(nrd * sizeof(*device_ids));
+    if (!device_ids)
+      continue;
+    clret = clGetDeviceIDs(platform_ids[i], CL_DEVICE_TYPE_ALL, nrd, device_ids, &nrd);
+    if (CL_SUCCESS != clret || !nrd)
+      continue;
+
+    for(j=0; j<nrd; j++) {
+      hwloc_bitmap_t set;
+      hwloc_obj_t osdev, osdev2, ancestor;
+      const char *value;
+      unsigned p, d;
+
+      osdev = hwloc_opencl_get_device_osdev(topology, device_ids[j]);
+      osdev2 = hwloc_opencl_get_device_osdev_by_index(topology, i, j);
+      assert(osdev == osdev2);
+      if (!osdev) {
+	printf("no osdev for platform %d device %d\n", i, j);
+	continue;
+      }
+
+      ancestor = hwloc_get_non_io_ancestor_obj(topology, osdev);
+
+      set = hwloc_bitmap_alloc();
+      err = hwloc_opencl_get_device_cpuset(topology, device_ids[j], set);
+      if (err < 0) {
+	printf("no cpuset for platform %d device %d\n", i, j);
+      } else {
+	char *cpuset_string = NULL;
+	hwloc_bitmap_asprintf(&cpuset_string, set);
+	printf("got cpuset %s for platform %d device %d\n", cpuset_string, i, j);
+	free(cpuset_string);
+	assert(hwloc_bitmap_isequal(set, ancestor->cpuset));
+      }
+      hwloc_bitmap_free(set);
+
+      printf("found OSDev %s\n", osdev->name);
+      err = sscanf(osdev->name, "opencl%ud%u", &p, &d);
+      assert(err == 2);
+      assert(p == i);
+      assert(d == j);
+
+      value = hwloc_obj_get_info_by_name(osdev, "Backend");
+      err = strcmp(value, "OpenCL");
+      assert(!err);
+
+      assert(osdev->attr->osdev.type == HWLOC_OBJ_OSDEV_COPROC);
+
+      value = hwloc_obj_get_info_by_name(osdev, "CoProcType");
+      err = strcmp(value, "OpenCL");
+      assert(!err);
+
+      value = hwloc_obj_get_info_by_name(osdev, "GPUModel");
+      printf("found OSDev model %s\n", value);
+
+      count++;
+    }
+  }
+
+  hwloc_topology_destroy(topology);
+
+  return 0;
+}
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/openfabrics-verbs.c b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/openfabrics-verbs.c
index 3ae6eb1..3f61324 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/openfabrics-verbs.c
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/openfabrics-verbs.c
@@ -50,7 +50,7 @@ int main(void)
 	     cpuset_string, i, ibv_get_device_name(dev));
       free(cpuset_string);
 
-      os = hwloc_ibv_get_device_osdev_by_name(topology, ibv_get_device_name(dev));
+      os = hwloc_ibv_get_device_osdev(topology, dev);
       if (os) {
 	assert(os->type == HWLOC_OBJ_OS_DEVICE);
 	printf("found OS object subtype %u lindex %u name %s\n",
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/Makefile.am b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/Makefile.am
index df34b73..cbc2f36 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/Makefile.am
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/Makefile.am
@@ -1,4 +1,4 @@
-# Copyright © 2009-2010 inria.  All rights reserved.
+# Copyright © 2009-2012 Inria.  All rights reserved.
 # Copyright © 2009, 2011-2012 Université Bordeaux 1
 # Copyright © 2009-2010 Cisco Systems, Inc.  All rights reserved.
 # See COPYING in top-level directory.
@@ -10,7 +10,20 @@ AM_LDFLAGS = $(HWLOC_LDFLAGS)
 SRC = $(HWLOC_top_srcdir)/src
 
 if HWLOC_HAVE_LINUX
-check_LTLIBRARIES = libhwloc-ports.la
+check_LTLIBRARIES = \
+	libhwloc-port-aix.la \
+	libhwloc-port-bgq.la \
+	libhwloc-port-darwin.la \
+	libhwloc-port-freebsd.la \
+	libhwloc-port-hpux.la \
+	libhwloc-port-netbsd.la \
+	libhwloc-port-osf.la \
+	libhwloc-port-solaris.la \
+	libhwloc-port-windows.la \
+	libhwloc-port-opencl.la \
+	libhwloc-port-cuda.la \
+	libhwloc-port-nvml.la \
+	libhwloc-port-gl.la
 endif HWLOC_HAVE_LINUX
 
 # Note that AC_CONFIG_LINKS sets up the sym links for the files in
@@ -20,47 +33,132 @@ endif HWLOC_HAVE_LINUX
 # referencing the files via $HWLOC_top_srcdir/src/foo.c because of
 # dependencies issues when using the Automake option "subdir-objects".
 # We nodist these because they're created by configure.
-nodist_libhwloc_ports_la_SOURCES = \
-        topology-solaris.c \
-        topology-solaris-chiptype.c \
-        topology-aix.c \
-        topology-osf.c \
-        topology-windows.c \
-        topology-darwin.c \
-        topology-freebsd.c \
-        topology-hpux.c
-
-libhwloc_ports_la_SOURCES = \
-        include/windows.h \
-        include/kstat.h \
-        include/picl.h \
-        include/sys/rset.h \
-        include/sys/lgrp_user.h \
-        include/sys/sysctl.h \
-        include/sys/procset.h \
-        include/sys/processor.h \
-        include/sys/thread.h \
-        include/sys/mpctl.h \
-        include/sys/cpuset.h \
-        include/sys/systemcfg.h \
-        include/sys/systeminfo.h \
-        include/radset.h \
-        include/cpuset.h \
-        include/numa.h \
-        include/procinfo.h \
-        include/pthread_np.h
-
-libhwloc_ports_la_CPPFLAGS = \
-        $(HWLOC_CPPFLAGS) \
-        -I$(HWLOC_top_srcdir)/include \
-        -I$(HWLOC_top_srcdir)/tests/ports/include \
-        -DHWLOC_COMPILE_PORTS \
-        -DHWLOC_SOLARIS_SYS -DHAVE_LIBLGRP -DHAVE_LIBKSTAT -DHAVE_LGRP_LATENCY_COOKIE \
-        -DHWLOC_AIX_SYS \
-        -DHWLOC_OSF_SYS \
-        -DHWLOC_WIN_SYS \
-        -DHWLOC_DARWIN_SYS \
-        -DHWLOC_FREEBSD_SYS -DHAVE_SYS_CPUSET_H -DHAVE_CPUSET_SETID \
-        -DHWLOC_HPUX_SYS \
-        -DHWLOC_INSIDE_LIBHWLOC
 
+common_CPPFLAGS = \
+	$(HWLOC_CPPFLAGS) \
+	-I$(HWLOC_top_srcdir)/include \
+	-DHWLOC_COMPILE_PORTS \
+	-DHWLOC_INSIDE_LIBHWLOC
+
+nodist_libhwloc_port_aix_la_SOURCES = topology-aix.c
+libhwloc_port_aix_la_SOURCES = \
+	include/aix/procinfo.h \
+	include/aix/sys/processor.h \
+	include/aix/sys/rset.h \
+	include/aix/sys/systemcfg.h \
+	include/aix/sys/thread.h
+libhwloc_port_aix_la_CPPFLAGS = $(common_CPPFLAGS) \
+	-I$(HWLOC_top_srcdir)/tests/ports/include/aix \
+	-DHWLOC_AIX_SYS \
+	-DHWLOC_HAVE_PTHREAD_GETTHRDS_NP \
+	-DHAVE__SC_LARGE_PAGESIZE -D_SC_LARGE_PAGESIZE=33
+
+nodist_libhwloc_port_bgq_la_SOURCES = topology-bgq.c
+libhwloc_port_bgq_la_SOURCES = \
+	include/bgq/spi/include/kernel/location.h \
+	include/bgq/spi/include/kernel/process.h
+libhwloc_port_bgq_la_CPPFLAGS = $(common_CPPFLAGS) \
+	-I$(HWLOC_top_srcdir)/tests/ports/include/bgq \
+	-DHWLOC_BGQ_SYS
+
+nodist_libhwloc_port_darwin_la_SOURCES = topology-darwin.c
+libhwloc_port_darwin_la_SOURCES = \
+	include/darwin/sys/sysctl.h
+libhwloc_port_darwin_la_CPPFLAGS = $(common_CPPFLAGS) \
+	-I$(HWLOC_top_srcdir)/tests/ports/include/darwin \
+	-DHWLOC_DARWIN_SYS \
+	-DHAVE__SC_LARGE_PAGESIZE -D_SC_LARGE_PAGESIZE=33
+
+nodist_libhwloc_port_freebsd_la_SOURCES = topology-freebsd.c
+libhwloc_port_freebsd_la_SOURCES = \
+	include/freebsd/pthread.h \
+	include/freebsd/pthread_np.h \
+	include/freebsd/sys/cpuset.h \
+	include/freebsd/sys/sysctl.h
+libhwloc_port_freebsd_la_CPPFLAGS = $(common_CPPFLAGS) \
+	-I$(HWLOC_top_srcdir)/tests/ports/include/freebsd \
+	-DHWLOC_FREEBSD_SYS \
+	-DHAVE_PTHREAD_NP_H \
+	-DHAVE_SYS_CPUSET_H \
+	-DHAVE_SYSCTL \
+	-DHAVE_CPUSET_SETAFFINITY \
+	-Dhwloc_thread_t=pthread_t \
+	-DHAVE_DECL_PTHREAD_SETAFFINITY_NP=1 \
+	-DHAVE_DECL_PTHREAD_GETAFFINITY_NP=1 \
+	-DHAVE_CPUSET_SETID
+
+nodist_libhwloc_port_hpux_la_SOURCES = topology-hpux.c
+libhwloc_port_hpux_la_SOURCES = \
+	include/hpux/sys/mpctl.h
+libhwloc_port_hpux_la_CPPFLAGS = $(common_CPPFLAGS) \
+	-I$(HWLOC_top_srcdir)/tests/ports/include/hpux \
+	-DHWLOC_HPUX_SYS
+
+nodist_libhwloc_port_netbsd_la_SOURCES = topology-netbsd.c
+libhwloc_port_netbsd_la_SOURCES = \
+	include/netbsd/pthread.h \
+	include/netbsd/sched.h
+libhwloc_port_netbsd_la_CPPFLAGS = $(common_CPPFLAGS) \
+	-I$(HWLOC_top_srcdir)/tests/ports/include/netbsd \
+	-DHWLOC_NETBSD_SYS
+
+nodist_libhwloc_port_osf_la_SOURCES = topology-osf.c
+libhwloc_port_osf_la_SOURCES = \
+	include/osf/cpuset.h \
+	include/osf/numa.h \
+	include/osf/radset.h
+libhwloc_port_osf_la_CPPFLAGS = $(common_CPPFLAGS) \
+	-I$(HWLOC_top_srcdir)/tests/ports/include/osf \
+	-DHWLOC_OSF_SYS \
+	-DHAVE__SC_LARGE_PAGESIZE -D_SC_LARGE_PAGESIZE=33
+
+nodist_libhwloc_port_solaris_la_SOURCES = topology-solaris.c topology-solaris-chiptype.c
+libhwloc_port_solaris_la_SOURCES = \
+	include/solaris/kstat.h \
+	include/solaris/picl.h \
+	include/solaris/sys/lgrp_user.h \
+	include/solaris/sys/processor.h \
+	include/solaris/sys/procset.h \
+	include/solaris/sys/systeminfo.h
+libhwloc_port_solaris_la_CPPFLAGS = $(common_CPPFLAGS) \
+	-I$(HWLOC_top_srcdir)/tests/ports/include/solaris \
+	-DHWLOC_SOLARIS_SYS \
+	-DHAVE_LIBLGRP \
+	-DHAVE__SC_LARGE_PAGESIZE -D_SC_LARGE_PAGESIZE=33 \
+	-DHAVE_LGRP_LATENCY_COOKIE \
+	-DHAVE_LIBKSTAT \
+	-DHAVE_PICL_H
+
+nodist_libhwloc_port_windows_la_SOURCES = topology-windows.c
+libhwloc_port_windows_la_SOURCES = \
+	include/windows/windows.h
+libhwloc_port_windows_la_CPPFLAGS = $(common_CPPFLAGS) \
+	-I$(HWLOC_top_srcdir)/tests/ports/include/windows \
+	-DHWLOC_WIN_SYS \
+	-DHAVE__SC_LARGE_PAGESIZE -D_SC_LARGE_PAGESIZE=33
+
+nodist_libhwloc_port_opencl_la_SOURCES = topology-opencl.c
+libhwloc_port_opencl_la_SOURCES = \
+	include/opencl/CL/cl_ext.h
+libhwloc_port_opencl_la_CPPFLAGS = $(common_CPPFLAGS) \
+	-I$(HWLOC_top_srcdir)/tests/ports/include/opencl
+
+nodist_libhwloc_port_cuda_la_SOURCES = topology-cuda.c
+libhwloc_port_cuda_la_SOURCES = \
+	include/cuda/cuda_runtime_api.h
+libhwloc_port_cuda_la_CPPFLAGS = $(common_CPPFLAGS) \
+	-I$(HWLOC_top_srcdir)/tests/ports/include/cuda
+
+nodist_libhwloc_port_nvml_la_SOURCES = topology-nvml.c
+libhwloc_port_nvml_la_SOURCES = \
+	include/nvml/nvml.h
+libhwloc_port_nvml_la_CPPFLAGS = $(common_CPPFLAGS) \
+	-I$(HWLOC_top_srcdir)/tests/ports/include/nvml
+
+nodist_libhwloc_port_gl_la_SOURCES = topology-gl.c
+libhwloc_port_gl_la_SOURCES = \
+	include/gl/X11/Xlib.h \
+	include/gl/NVCtrl/NVCtrl.h \
+	include/gl/NVCtrl/NVCtrlLib.h
+libhwloc_port_gl_la_CPPFLAGS = $(common_CPPFLAGS) \
+	-I$(HWLOC_top_srcdir)/tests/ports/include/gl
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/procinfo.h b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/aix/procinfo.h
similarity index 93%
rename from src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/procinfo.h
rename to src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/aix/procinfo.h
index 564da27..a482d3e 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/procinfo.h
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/aix/procinfo.h
@@ -4,6 +4,7 @@
  */
 
 #ifndef HWLOC_PORT_AIX_PROCINFO_H
+#define HWLOC_PORT_AIX_PROCINFO_H
 
 #include <sys/thread.h>
 #include <sys/processor.h>
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/aix/sys/processor.h b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/aix/sys/processor.h
new file mode 100644
index 0000000..e400d54
--- /dev/null
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/aix/sys/processor.h
@@ -0,0 +1,18 @@
+/*
+ * Copyright © 2009 inria.  All rights reserved.
+ * Copyright © 2009 Université Bordeaux 1
+ * See COPYING in top-level directory.
+ */
+
+#ifndef HWLOC_PORT_AIX_SYS_PROCESSOR_H
+#define HWLOC_PORT_AIX_SYS_PROCESSOR_H
+
+typedef short cpu_t;
+#define BINDPROCESS 1
+#define BINDTHREAD 2
+#define PROCESSOR_CLASS_ANY ((cpu_t)(-1))
+extern int bindprocessor(int What, int Who, cpu_t Where);
+
+extern cpu_t mycpu(void);
+
+#endif /* HWLOC_PORT_AIX_SYS_PROCESSOR_H */
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/sys/rset.h b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/aix/sys/rset.h
similarity index 95%
rename from src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/sys/rset.h
rename to src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/aix/sys/rset.h
index adbf5c0..65bb0c7 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/sys/rset.h
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/aix/sys/rset.h
@@ -4,8 +4,8 @@
  * See COPYING in top-level directory.
  */
 
-#ifndef HWLOC_PORT_SYS_RSET_H
-#define HWLOC_PORT_SYS_RSET_H
+#ifndef HWLOC_PORT_AIX_SYS_RSET_H
+#define HWLOC_PORT_AIX_SYS_RSET_H
 
 #include <stdint.h>
 
@@ -92,4 +92,4 @@ int ra_getrset (rstype_t rstype, rsid_t rsid, unsigned int flags, rsethandle_t r
 void * ra_mmap(void *addr, off64_t len, int prot, int flags, int fildes, off64_t off, rstype_t rstype, rsid_t rsid, unsigned int att_flags);
 
 
-#endif /* HWLOC_PORT_SYS_RSET_H */
+#endif /* HWLOC_PORT_AIX_SYS_RSET_H */
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/sys/systemcfg.h b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/aix/sys/systemcfg.h
similarity index 56%
rename from src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/sys/systemcfg.h
rename to src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/aix/sys/systemcfg.h
index b8ecc7e..93a8d6e 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/sys/systemcfg.h
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/aix/sys/systemcfg.h
@@ -3,8 +3,8 @@
  * See COPYING in top-level directory.
  */
 
-#ifndef HWLOC_PORT_SYS_SYSTEMCFG_H
-#define HWLOC_PORT_SYS_SYSTEMCFG_H
+#ifndef HWLOC_PORT_AIX_SYS_SYSTEMCFG_H
+#define HWLOC_PORT_AIX_SYS_SYSTEMCFG_H
 
 struct {
   int dcache_size;
@@ -18,4 +18,10 @@ struct {
   int cache_attrib;
 } _system_configuration;
 
-#endif /* HWLOC_PORT_SYS_SYSTEMCFG_H */
+#define __power_pc() 1
+#define __power_4() 1
+#define __power_5() 1
+#define __power_6() 1
+#define __power_7() 1
+
+#endif /* HWLOC_PORT_AIX_SYS_SYSTEMCFG_H */
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/sys/thread.h b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/aix/sys/thread.h
similarity index 78%
rename from src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/sys/thread.h
rename to src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/aix/sys/thread.h
index 0285c4b..01ac3db 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/sys/thread.h
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/aix/sys/thread.h
@@ -4,8 +4,8 @@
  * See COPYING in top-level directory.
  */
 
-#ifndef HWLOC_PORT_SYS_THREAD_H
-#define HWLOC_PORT_SYS_THREAD_H
+#ifndef HWLOC_PORT_AIX_SYS_THREAD_H
+#define HWLOC_PORT_AIX_SYS_THREAD_H
 
 typedef long tid_t;
 typedef uint64_t tid64_t;
@@ -17,4 +17,4 @@ struct __pthrdsinfo {
 #define PTHRDSINFO_QUERY_TID 0x10
 int pthread_getthrds_np (pthread_t * thread, int mode, struct __pthrdsinfo * buf, int bufsize, void * regbuf, int * regbufsize);
 
-#endif /* HWLOC_PORT_SYS_THREAD_H */
+#endif /* HWLOC_PORT_AIX_SYS_THREAD_H */
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/bgq/spi/include/kernel/location.h b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/bgq/spi/include/kernel/location.h
new file mode 100644
index 0000000..4b67abb
--- /dev/null
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/bgq/spi/include/kernel/location.h
@@ -0,0 +1,14 @@
+/*
+ * Copyright © 2013 Inria.  All rights reserved.
+ * See COPYING in top-level directory.
+ */
+
+#ifndef HWLOC_PORT_BGQ_KERNEL_LOCATION_H
+#define HWLOC_PORT_BGQ_KERNEL_LOCATION_H
+
+#include <stdint.h>
+
+uint32_t Kernel_ProcessorID( void );
+uint32_t Kernel_MyTcoord( void );
+
+#endif /* HWLOC_PORT_BGQ_KERNEL_LOCATION_H */
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/bgq/spi/include/kernel/process.h b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/bgq/spi/include/kernel/process.h
new file mode 100644
index 0000000..a2c2720
--- /dev/null
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/bgq/spi/include/kernel/process.h
@@ -0,0 +1,13 @@
+/*
+ * Copyright © 2013 Inria.  All rights reserved.
+ * See COPYING in top-level directory.
+ */
+
+#ifndef HWLOC_PORT_BGQ_KERNEL_PROCESS_H
+#define HWLOC_PORT_BGQ_KERNEL_PROCESS_H
+
+#include <stdint.h>
+
+uint64_t Kernel_ThreadMask(uint32_t t);
+
+#endif /* HWLOC_PORT_BGQ_KERNEL_PROCESS_H */
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/cuda/cuda_runtime_api.h b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/cuda/cuda_runtime_api.h
new file mode 100644
index 0000000..fcf8bb9
--- /dev/null
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/cuda/cuda_runtime_api.h
@@ -0,0 +1,20 @@
+/*
+ * Copyright © 2013 Inria.  All rights reserved.
+ * See COPYING in top-level directory.
+ */
+
+#ifndef HWLOC_PORT_CUDA_CUDA_RUNTIME_API_H
+#define HWLOC_PORT_CUDA_CUDA_RUNTIME_API_H
+
+typedef unsigned cudaError_t;
+
+struct cudaDeviceProp {
+  char * name;
+  int pciBusID;
+  int pciDeviceID;
+};
+
+cudaError_t cudaGetDeviceProperties(struct cudaDeviceProp *, int);
+cudaError_t cudaGetDeviceCount(int *);
+
+#endif /* HWLOC_PORT_CUDA_CUDA_RUNTIME_API_H */
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/sys/sysctl.h b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/darwin/sys/sysctl.h
similarity index 75%
copy from src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/sys/sysctl.h
copy to src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/darwin/sys/sysctl.h
index 661d288..03f6032 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/sys/sysctl.h
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/darwin/sys/sysctl.h
@@ -4,8 +4,8 @@
  * See COPYING in top-level directory.
  */
 
-#ifndef HWLOC_PORT_SYS_SYSCTL_H
-#define HWLOC_PORT_SYS_SYSCTL_H
+#ifndef HWLOC_PORT_DARWIN_SYS_SYSCTL_H
+#define HWLOC_PORT_DARWIN_SYS_SYSCTL_H
 
 extern int sysctl(int *name, int name_len, void *oldp, size_t *oldlenp, void *newp, size_t newlen);
 extern int sysctlbyname(const char *name, void *oldp, size_t *oldlenp, void *newp, size_t newlen);
@@ -13,4 +13,4 @@ extern int sysctlbyname(const char *name, void *oldp, size_t *oldlenp, void *new
 #define CTL_HW 6
 #define HW_PHYSMEM 5
 
-#endif /* HWLOC_PORT_SYS_SYSCTL_H */
+#endif /* HWLOC_PORT_DARWIN_SYS_SYSCTL_H */
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/freebsd/pthread.h b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/freebsd/pthread.h
new file mode 100644
index 0000000..901aa59
--- /dev/null
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/freebsd/pthread.h
@@ -0,0 +1,10 @@
+/*
+ * Copyright © 2012 Inria.  All rights reserved.
+ * See COPYING in top-level directory.
+ */
+
+#ifndef HWLOC_PORT_FREEBSD_PTHREAD_H
+#define HWLOC_PORT_FREEBSD_PTHREAD_H
+
+#endif /* HWLOC_PORT_FREEBSD_PTHREAD_H */
+
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/pthread_np.h b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/freebsd/pthread_np.h
similarity index 59%
rename from src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/pthread_np.h
rename to src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/freebsd/pthread_np.h
index d071449..0584536 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/pthread_np.h
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/freebsd/pthread_np.h
@@ -3,13 +3,12 @@
  * See COPYING in top-level directory.
  */
 
-#ifndef HWLOC_PORT_PTHREAD_NP_H
-#define HWLOC_PORT_PTHREAD_NP_H
+#ifndef HWLOC_PORT_FREEBSD_PTHREAD_NP_H
+#define HWLOC_PORT_FREEBSD_PTHREAD_NP_H
+
+#include <sys/cpuset.h>
 
-#if 0
-/* Conflict with Linux' */
 int pthread_getaffinity_np(pthread_t, size_t, cpuset_t *);
 int pthread_setaffinity_np(pthread_t, size_t, const cpuset_t *);
-#endif
 
-#endif /* HWLOC_PORT_PTHREAD_NP_H */
+#endif /* HWLOC_PORT_FREEBSD_PTHREAD_NP_H */
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/sys/cpuset.h b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/freebsd/sys/cpuset.h
similarity index 88%
rename from src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/sys/cpuset.h
rename to src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/freebsd/sys/cpuset.h
index fd67238..02c947f 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/sys/cpuset.h
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/freebsd/sys/cpuset.h
@@ -3,8 +3,8 @@
  * See COPYING in top-level directory.
  */
 
-#ifndef HWLOC_PORT_SYS_CPUSET_H
-#define HWLOC_PORT_SYS_CPUSET_H
+#ifndef HWLOC_PORT_FREEBSD_SYS_CPUSET_H
+#define HWLOC_PORT_FREEBSD_SYS_CPUSET_H
 
 #include <limits.h>
 
@@ -33,4 +33,4 @@ int cpuset_getid(cpulevel_t level, cpuwhich_t which, id_t id, cpusetid_t *setid)
 int cpuset_getaffinity(cpulevel_t level, cpuwhich_t which, id_t id, size_t size, cpuset_t *cpuset);
 int cpuset_setaffinity(cpulevel_t level, cpuwhich_t which, id_t id, size_t size, const cpuset_t *cpuset);
 
-#endif /* HWLOC_PORT_SYS_CPUSET_H */
+#endif /* HWLOC_PORT_FREEBSD_SYS_CPUSET_H */
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/sys/sysctl.h b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/freebsd/sys/sysctl.h
similarity index 58%
rename from src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/sys/sysctl.h
rename to src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/freebsd/sys/sysctl.h
index 661d288..7d8b2d0 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/sys/sysctl.h
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/freebsd/sys/sysctl.h
@@ -4,13 +4,12 @@
  * See COPYING in top-level directory.
  */
 
-#ifndef HWLOC_PORT_SYS_SYSCTL_H
-#define HWLOC_PORT_SYS_SYSCTL_H
+#ifndef HWLOC_PORT_FREEBSD_SYS_SYSCTL_H
+#define HWLOC_PORT_FREEBSD_SYS_SYSCTL_H
 
 extern int sysctl(int *name, int name_len, void *oldp, size_t *oldlenp, void *newp, size_t newlen);
-extern int sysctlbyname(const char *name, void *oldp, size_t *oldlenp, void *newp, size_t newlen);
 
 #define CTL_HW 6
 #define HW_PHYSMEM 5
 
-#endif /* HWLOC_PORT_SYS_SYSCTL_H */
+#endif /* HWLOC_PORT_FREEBSD_SYS_SYSCTL_H */
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/gl/NVCtrl/NVCtrl.h b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/gl/NVCtrl/NVCtrl.h
new file mode 100644
index 0000000..20fd940
--- /dev/null
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/gl/NVCtrl/NVCtrl.h
@@ -0,0 +1,18 @@
+/*
+ * Copyright © 2013 Inria.  All rights reserved.
+ * See COPYING in top-level directory.
+ */
+
+#ifndef HWLOC_PORT_GL_NVCTRL_NVCTRL_H
+#define HWLOC_PORT_GL_NVCTRL_NVCTRL_H
+
+#define NV_CTRL_TARGET_TYPE_X_SCREEN 0
+#define NV_CTRL_BINARY_DATA_GPUS_USED_BY_XSCREEN 4
+#define NV_CTRL_TARGET_TYPE_GPU 1
+#define NV_CTRL_PCI_DOMAIN 306
+#define NV_CTRL_PCI_BUS 239
+#define NV_CTRL_PCI_DEVICE 240
+#define NV_CTRL_PCI_FUNCTION 241
+#define NV_CTRL_STRING_PRODUCT_NAME 0
+
+#endif /* HWLOC_PORT_GL_NVCTRL_NVCTRL_H */
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/gl/NVCtrl/NVCtrlLib.h b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/gl/NVCtrl/NVCtrlLib.h
new file mode 100644
index 0000000..01f81dc
--- /dev/null
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/gl/NVCtrl/NVCtrlLib.h
@@ -0,0 +1,14 @@
+/*
+ * Copyright © 2013 Inria.  All rights reserved.
+ * See COPYING in top-level directory.
+ */
+
+#ifndef HWLOC_PORT_GL_NVCTRL_NVCTRLLIB_H
+#define HWLOC_PORT_GL_NVCTRL_NVCTRLLIB_H
+
+int XNVCTRLIsNvScreen(Display *, int);
+int XNVCTRLQueryTargetBinaryData(Display *, int, int, unsigned int, unsigned int, unsigned char **, int *);
+int XNVCTRLQueryTargetAttribute(Display *, int, int, unsigned int, unsigned int, int *);
+int XNVCTRLQueryTargetStringAttribute(Display *, int, int, unsigned int, unsigned int, char **ptr);
+
+#endif /* HWLOC_PORT_GL_NVCTRL_NVCTRLLIB_H */
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/gl/X11/Xlib.h b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/gl/X11/Xlib.h
new file mode 100644
index 0000000..ce7f8f6
--- /dev/null
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/gl/X11/Xlib.h
@@ -0,0 +1,16 @@
+/*
+ * Copyright © 2013 Inria.  All rights reserved.
+ * See COPYING in top-level directory.
+ */
+
+#ifndef HWLOC_PORT_GL_X11_XLIB_H
+#define HWLOC_PORT_GL_X11_XLIB_H
+
+typedef struct _XDisplay Display;
+
+Display *XOpenDisplay(const char*);
+int XQueryExtension(Display*, const char*, int*, int*, int*);
+int XCloseDisplay(Display*);
+int ScreenCount(Display*);
+
+#endif /* HWLOC_PORT_GL_X11_XLIB_H */
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/sys/mpctl.h b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/hpux/sys/mpctl.h
similarity index 92%
rename from src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/sys/mpctl.h
rename to src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/hpux/sys/mpctl.h
index 0f0d3e9..d0a9e2a 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/sys/mpctl.h
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/hpux/sys/mpctl.h
@@ -4,8 +4,8 @@
  * See COPYING in top-level directory.
  */
 
-#ifndef HWLOC_PORT_SYS_MPCTL_H
-#define HWLOC_PORT_SYS_MPCTL_H
+#ifndef HWLOC_PORT_HPUX_SYS_MPCTL_H
+#define HWLOC_PORT_HPUX_SYS_MPCTL_H
 
 typedef int spu_t, ldom_t, pthread_spu_t, pthread_ldom_t;
 
@@ -64,4 +64,4 @@ int pthread_ldom_bind_np(pthread_ldom_t *answer, pthread_ldom_t ldom, pthread_t
 #define PTHREAD_BIND_ADVISORY_NP 0
 #define PTHREAD_BIND_FORCED_NP 1
 
-#endif /* HWLOC_PORT_SYS_MPCTL_H */
+#endif /* HWLOC_PORT_HPUX_SYS_MPCTL_H */
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/netbsd/pthread.h b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/netbsd/pthread.h
new file mode 100644
index 0000000..ee6f26c
--- /dev/null
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/netbsd/pthread.h
@@ -0,0 +1,16 @@
+/*
+ * Copyright © 2012 Inria.  All rights reserved.
+ * See COPYING in top-level directory.
+ */
+
+#ifndef HWLOC_PORT_NETBSD_PTHREAD_H
+#define HWLOC_PORT_NETBSD_PTHREAD_H
+
+#include <sched.h>
+
+pthread_t       pthread_self(void);
+
+int     pthread_getaffinity_np(pthread_t, size_t, cpuset_t *);
+int     pthread_setaffinity_np(pthread_t, size_t, cpuset_t *);
+
+#endif /* HWLOC_PORT_NETBSD_PTHREAD_H */
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/netbsd/sched.h b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/netbsd/sched.h
new file mode 100644
index 0000000..536905f
--- /dev/null
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/netbsd/sched.h
@@ -0,0 +1,22 @@
+/*
+ * Copyright © 2012 Inria.  All rights reserved.
+ * See COPYING in top-level directory.
+ */
+
+#ifndef HWLOC_PORT_NETBSD_SCHED_H
+#define HWLOC_PORT_NETBSD_SCHED_H
+
+typedef struct _cpuset cpuset_t;
+typedef unsigned long cpuid_t;
+
+cpuset_t *cpuset_create(void);
+void    cpuset_destroy(cpuset_t *);
+void    cpuset_zero(cpuset_t *);
+int     cpuset_set(cpuid_t, cpuset_t *);
+int     cpuset_isset(cpuid_t, const cpuset_t *);
+size_t  cpuset_size(const cpuset_t *);
+
+int     sched_getaffinity_np(pid_t, size_t, cpuset_t *);
+int     sched_setaffinity_np(pid_t, size_t, cpuset_t *);
+
+#endif /* HWLOC_PORT_NETBSD_SCHED_H */
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/nvml/nvml.h b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/nvml/nvml.h
new file mode 100644
index 0000000..de7afe0
--- /dev/null
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/nvml/nvml.h
@@ -0,0 +1,40 @@
+/*
+ * Copyright © 2013 Inria.  All rights reserved.
+ * See COPYING in top-level directory.
+ */
+
+#ifndef HWLOC_PORT_NVML_NVML_H
+#define HWLOC_PORT_NVML_NVML_H
+
+/* we need to replace any NVML-related #define that configure may have put in private/autogen/config.h */
+#ifndef HWLOC_CONFIGURE_H
+#error nvml.h must be included after private/autogen/config.h
+#endif
+#undef HAVE_DECL_NVMLDEVICEGETMAXPCIELINKGENERATION
+#define HAVE_DECL_NVMLDEVICEGETMAXPCIELINKGENERATION 1
+
+
+typedef int nvmlReturn_t;
+#define NVML_SUCCESS 0
+
+typedef struct nvmlPciInfo_st {
+  unsigned int domain;
+  unsigned int bus;
+  unsigned int device;
+} nvmlPciInfo_t;
+
+struct nvmlDevice_st;
+typedef struct nvmlDevice_st* nvmlDevice_t;
+
+nvmlReturn_t nvmlInit(void);
+nvmlReturn_t nvmlShutdown(void);
+nvmlReturn_t nvmlDeviceGetCount(unsigned int *deviceCount);
+nvmlReturn_t nvmlDeviceGetHandleByIndex(unsigned int index, nvmlDevice_t *device);
+nvmlReturn_t nvmlDeviceGetPciInfo(nvmlDevice_t device, nvmlPciInfo_t *pci);
+nvmlReturn_t nvmlDeviceGetName(nvmlDevice_t device, char *name, unsigned int length);
+nvmlReturn_t nvmlDeviceGetSerial(nvmlDevice_t device, char *serial, unsigned int length);
+nvmlReturn_t nvmlDeviceGetUUID(nvmlDevice_t device, char *uuid, unsigned int length);
+nvmlReturn_t nvmlDeviceGetMaxPcieLinkGeneration(nvmlDevice_t device, unsigned int *maxLinkGen);
+nvmlReturn_t nvmlDeviceGetMaxPcieLinkWidth(nvmlDevice_t device, unsigned int *maxLinkGen);
+
+#endif /* HWLOC_PORT_NVML_NVML_H */
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/opencl/CL/cl_ext.h b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/opencl/CL/cl_ext.h
new file mode 100644
index 0000000..8a347cb
--- /dev/null
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/opencl/CL/cl_ext.h
@@ -0,0 +1,49 @@
+/*
+ * Copyright © 2013 Inria.  All rights reserved.
+ * See COPYING in top-level directory.
+ */
+
+#ifndef HWLOC_PORT_OPENCL_CL_CL_EXT_H
+#define HWLOC_PORT_OPENCL_CL_CL_EXT_H
+
+typedef char cl_char;
+typedef unsigned int cl_uint;
+typedef unsigned int cl_int;
+typedef unsigned int cl_device_type;
+typedef unsigned int cl_platform_info;
+typedef unsigned int cl_device_info;
+
+struct _cl_platform_id;
+typedef struct _cl_platform_id * cl_platform_id;
+struct _cl_device_id;
+typedef struct _cl_device_id * cl_device_id;
+
+#define CL_SUCCESS 0
+
+cl_int clGetPlatformIDs(cl_uint, cl_platform_id *, cl_uint *);
+cl_int clGetDeviceIDs(cl_platform_id, cl_device_type, cl_uint, cl_device_id *, cl_uint *);
+cl_int clGetDeviceInfo(cl_device_id, cl_device_info, size_t, void *, size_t *);
+cl_int clGetPlatformInfo(cl_platform_id, cl_platform_info, size_t, void *, size_t *);
+
+#define CL_DEVICE_TYPE_CPU                          (1 << 1)
+#define CL_DEVICE_TYPE_GPU                          (1 << 2)
+#define CL_DEVICE_TYPE_ACCELERATOR                  (1 << 3)
+#define CL_DEVICE_TYPE_CUSTOM                       (1 << 4)
+#define CL_DEVICE_TYPE_ALL                          0xFFFFFFFF
+
+#define CL_PLATFORM_NAME                            0x0902
+#define CL_DEVICE_TYPE                              0x1000
+#define CL_DEVICE_NAME                              0x102B
+#define CL_DEVICE_VENDOR                            0x102C
+#define CL_DEVICE_PLATFORM                          0x1031
+
+#define CL_DEVICE_TOPOLOGY_AMD                      0x4037
+typedef union {
+  struct { cl_uint type; cl_uint data[5]; } raw;
+  struct { cl_uint type; cl_char unused[17]; cl_char bus; cl_char device; cl_char function; } pcie;
+} cl_device_topology_amd;
+#define CL_DEVICE_TOPOLOGY_TYPE_PCIE_AMD            1
+
+#define CL_DEVICE_BOARD_NAME_AMD                    0x4038
+
+#endif /* HWLOC_PORT_OPENCL_CL_CL_EXT_H */
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/cpuset.h b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/osf/cpuset.h
similarity index 84%
rename from src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/cpuset.h
rename to src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/osf/cpuset.h
index 2e0333f..1563577 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/cpuset.h
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/osf/cpuset.h
@@ -4,8 +4,8 @@
  * See COPYING in top-level directory.
  */
 
-#ifndef HWLOC_PORT_CPUSET_H
-#define HWLOC_PORT_CPUSET_H
+#ifndef HWLOC_PORT_OSF_CPUSET_H
+#define HWLOC_PORT_OSF_CPUSET_H
 
 typedef int cpu_cursor_t;
 #define SET_CURSOR_INIT -1
@@ -21,4 +21,4 @@ int cpuaddset(cpuset_t set, cpuid_t cpuid );
 cpuid_t cpu_foreach(cpuset_t cpuset, int flags, cpu_cursor_t *cursor);
 int cpusetdestroy(cpuset_t *set);
 
-#endif /* HWLOC_PORT_CPUSET_H */
+#endif /* HWLOC_PORT_OSF_CPUSET_H */
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/numa.h b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/osf/numa.h
similarity index 86%
rename from src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/numa.h
rename to src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/osf/numa.h
index a1e5a22..7ed5800 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/numa.h
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/osf/numa.h
@@ -4,8 +4,8 @@
  * See COPYING in top-level directory.
  */
 
-#ifndef HWLOC_PORT_NUMA_H
-#define HWLOC_PORT_NUMA_H
+#ifndef HWLOC_PORT_OSF_NUMA_H
+#define HWLOC_PORT_OSF_NUMA_H
 
 #include "sys/types.h"
 #include "radset.h"
@@ -24,6 +24,4 @@ typedef struct {
 void *nmmap(void *addr, size_t len, int prot, unsigned long flags, int filedes, off_t off, memalloc_attr_t *attr );
 int nmadvise(const void *addr, long len, int behavior, memalloc_attr_t *attr);
 
-
-
-#endif /* HWLOC_PORT_NUMA_H */
+#endif /* HWLOC_PORT_OSF_NUMA_H */
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/radset.h b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/osf/radset.h
similarity index 94%
rename from src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/radset.h
rename to src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/osf/radset.h
index 3e24be1..0efd64f 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/radset.h
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/osf/radset.h
@@ -4,8 +4,8 @@
  * See COPYING in top-level directory.
  */
 
-#ifndef HWLOC_PORT_RADSET_H
-#define HWLOC_PORT_RADSET_H
+#ifndef HWLOC_PORT_OSF_RADSET_H
+#define HWLOC_PORT_OSF_RADSET_H
 
 #include <limits.h>
 
@@ -78,4 +78,4 @@ typedef enum memalloc_policy {
 
 int nloc(numa_attr_t *numa_attr, radset_t radset);
 
-#endif /* HWLOC_PORT_RADSET_H */
+#endif /* HWLOC_PORT_OSF_RADSET_H */
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/kstat.h b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/solaris/kstat.h
similarity index 88%
rename from src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/kstat.h
rename to src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/solaris/kstat.h
index 0c1d4fc..da98482 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/kstat.h
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/solaris/kstat.h
@@ -4,8 +4,8 @@
  * See COPYING in top-level directory.
  */
 
-#ifndef HWLOC_PORT_KSTAT_H
-#define HWLOC_PORT_KSTAT_H
+#ifndef HWLOC_PORT_SOLARIS_KSTAT_H
+#define HWLOC_PORT_SOLARIS_KSTAT_H
 
 #include <inttypes.h>
 
@@ -43,4 +43,4 @@ kid_t kstat_read(kstat_ctl_t *, kstat_t *, void *);
 void *kstat_data_lookup(kstat_t *, char *);
 int kstat_close(kstat_ctl_t *);
 
-#endif /* HWLOC_PORT_KSTAT_H */
+#endif /* HWLOC_PORT_SOLARIS_KSTAT_H */
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/picl.h b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/solaris/picl.h
similarity index 92%
rename from src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/picl.h
rename to src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/solaris/picl.h
index 9269957..094cdd7 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/picl.h
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/solaris/picl.h
@@ -3,8 +3,8 @@
  * See COPYING in top-level directory.
  */
 
-#ifndef HWLOC_PORT_PICL_H
-#define HWLOC_PORT_PICL_H
+#ifndef HWLOC_PORT_SOLARIS_PICL_H
+#define HWLOC_PORT_SOLARIS_PICL_H
 
 #include <stdint.h>
 #include <string.h>
@@ -45,5 +45,4 @@ extern int picl_get_next_by_row(picl_prophdl_t thish, picl_prophdl_t *proph);
 extern int picl_get_next_by_col(picl_prophdl_t thish, picl_prophdl_t *proph);
 extern int picl_walk_tree_by_class(picl_nodehdl_t rooth, const char *classname, void *c_args, int (*callback_fn)(picl_nodehdl_t hdl, void *args));
 
-#endif /* HWLOC_PORT_PICL_H */
-
+#endif /* HWLOC_PORT_SOLARIS_PICL_H */
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/sys/lgrp_user.h b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/solaris/sys/lgrp_user.h
similarity index 92%
rename from src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/sys/lgrp_user.h
rename to src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/solaris/sys/lgrp_user.h
index b8b8892..4c3004d 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/sys/lgrp_user.h
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/solaris/sys/lgrp_user.h
@@ -4,8 +4,8 @@
  * See COPYING in top-level directory.
  */
 
-#ifndef HWLOC_PORT_SYS_LGRP_USER_H
-#define HWLOC_PORT_SYS_LGRP_USER_H
+#ifndef HWLOC_PORT_SOLARIS_SYS_LGRP_USER_H
+#define HWLOC_PORT_SOLARIS_SYS_LGRP_USER_H
 
 #include <sys/processor.h>
 
@@ -58,4 +58,4 @@ int lgrp_fini(lgrp_cookie_t cookie);
 #define MADV_ACCESS_LWP     7
 #define MADV_ACCESS_MANY    8
 
-#endif /* HWLOC_PORT_SYS_LGRP_USER_H */
+#endif /* HWLOC_PORT_SOLARIS_SYS_LGRP_USER_H */
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/sys/processor.h b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/solaris/sys/processor.h
similarity index 51%
rename from src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/sys/processor.h
rename to src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/solaris/sys/processor.h
index 19877bc..6c49b53 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/sys/processor.h
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/solaris/sys/processor.h
@@ -4,10 +4,9 @@
  * See COPYING in top-level directory.
  */
 
-#ifndef HWLOC_PORT_SYS_PROCESSOR_H
-#define HWLOC_PORT_SYS_PROCESSOR_H
+#ifndef HWLOC_PORT_SOLARIS_SYS_PROCESSOR_H
+#define HWLOC_PORT_SOLARIS_SYS_PROCESSOR_H
 
-/* Solaris */
 #include <sys/procset.h>
 typedef int processorid_t;
 #define PBIND_NONE -1
@@ -15,13 +14,4 @@ typedef int processorid_t;
 
 extern int processor_bind(idtype_t idtype, id_t id, processorid_t processorid, processorid_t *obind);
 
-/* AIX */
-typedef short cpu_t;
-#define BINDPROCESS 1
-#define BINDTHREAD 2
-#define PROCESSOR_CLASS_ANY ((cpu_t)(-1))
-extern int bindprocessor(int What, int Who, cpu_t Where); 
-
-extern cpu_t mycpu(void);
-
-#endif /* HWLOC_PORT_SYS_PROCESSOR_H */
+#endif /* HWLOC_PORT_SOLARIS_SYS_PROCESSOR_H */
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/sys/procset.h b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/solaris/sys/procset.h
similarity index 61%
rename from src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/sys/procset.h
rename to src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/solaris/sys/procset.h
index eb24eac..ab42eb2 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/sys/procset.h
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/solaris/sys/procset.h
@@ -4,8 +4,8 @@
  * See COPYING in top-level directory.
  */
 
-#ifndef HWLOC_PORT_SYS_PROCSET_H
-#define HWLOC_PORT_SYS_PROCSET_H
+#ifndef HWLOC_PORT_SOLARIS_SYS_PROCSET_H
+#define HWLOC_PORT_SOLARIS_SYS_PROCSET_H
 
 typedef enum idtype {
   P_PID,
@@ -13,4 +13,4 @@ typedef enum idtype {
   P_MYID
 } idtype_t;
 
-#endif /* HWLOC_PORT_SYS_PROCSET_H */
+#endif /* HWLOC_PORT_SOLARIS_SYS_PROCSET_H */
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/sys/systeminfo.h b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/solaris/sys/systeminfo.h
similarity index 57%
rename from src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/sys/systeminfo.h
rename to src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/solaris/sys/systeminfo.h
index ee65eb7..eb1dda8 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/sys/systeminfo.h
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/solaris/sys/systeminfo.h
@@ -3,12 +3,12 @@
  * See COPYING in top-level directory.
  */
 
-#ifndef HWLOC_PORT_SYS_SYSTEMINFO_H
-#define HWLOC_PORT_SYS_SYSTEMINFO_H
+#ifndef HWLOC_PORT_SOLARIS_SYS_SYSTEMINFO_H
+#define HWLOC_PORT_SOLARIS_SYS_SYSTEMINFO_H
 
 #define SI_HW_PROVIDER 8
 #define SI_PLATFORM 513
 
 extern int sysinfo(int, char *, long);
 
-#endif /* HWLOC_PORT_SYS_SYSTEMINFO_H */
+#endif /* HWLOC_PORT_SOLARIS_SYS_SYSTEMINFO_H */
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/windows.h b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/windows/windows.h
similarity index 94%
rename from src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/windows.h
rename to src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/windows/windows.h
index 9086dcd..b08e5d1 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/windows.h
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/windows/windows.h
@@ -4,8 +4,8 @@
  * See COPYING in top-level directory.
  */
 
-#ifndef HWLOC_PORT_WINDOWS_H
-#define HWLOC_PORT_WINDOWS_H
+#ifndef HWLOC_PORT_WINDOWS_WINDOWS_H
+#define HWLOC_PORT_WINDOWS_WINDOWS_H
 
 #include <inttypes.h>
 
@@ -69,4 +69,4 @@ typedef struct _SYSTEM_INFO {
 
 void WINAPI GetSystemInfo(LPSYSTEM_INFO lpSystemInfo);
 
-#endif /* HWLOC_PORT_WINDOWS_H */
+#endif /* HWLOC_PORT_WINDOWS_WINDOWS_H */
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/rename/Makefile.am b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/rename/Makefile.am
index ac7fc7e..fd0d7c1 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/rename/Makefile.am
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/rename/Makefile.am
@@ -1,46 +1,71 @@
-all-local:
-	@echo Existing targets: 'needed' and 'useless' (and 'restore' once done)
+all-local: prepare _needed _useless restore
+
+TEST_CPPFLAGS =
+if HWLOC_HAVE_LINUX
+TEST_CPPFLAGS += -DHWLOC_TEST_RENAME_LINUX=1
+endif HWLOC_HAVE_LINUX
+if HWLOC_HAVE_LINUX_LIBNUMA
+TEST_CPPFLAGS += -DHWLOC_TEST_RENAME_LINUX_LIBNUMA=1
+endif HWLOC_HAVE_LINUX_LIBNUMA
+if HWLOC_HAVE_SCHED_SETAFFINITY
+TEST_CPPFLAGS += -DHWLOC_TEST_RENAME_GLIBC_SCHED=1
+endif HWLOC_HAVE_SCHED_SETAFFINITY
+if HWLOC_HAVE_LIBIBVERBS
+TEST_CPPFLAGS += -DHWLOC_TEST_RENAME_OPENFABRICS_VERBS=1
+endif HWLOC_HAVE_LIBIBVERBS
+if HWLOC_HAVE_MYRIEXPRESS
+TEST_CPPFLAGS += -DHWLOC_TEST_RENAME_MYRIEXPRESS=1
+endif HWLOC_HAVE_MYRIEXPRESS
+if HWLOC_HAVE_OPENCL
+TEST_CPPFLAGS += -DHWLOC_TEST_RENAME_OPENCL=1
+endif HWLOC_HAVE_OPENCL
+if HWLOC_HAVE_CUDA
+TEST_CPPFLAGS += -DHWLOC_TEST_RENAME_CUDA=1
+endif HWLOC_HAVE_CUDA
+if HWLOC_HAVE_CUDART
+TEST_CPPFLAGS += -DHWLOC_TEST_RENAME_CUDART=1
+endif HWLOC_HAVE_CUDART
+if HWLOC_HAVE_NVML
+TEST_CPPFLAGS += -DHWLOC_TEST_RENAME_NVML=1
+endif HWLOC_HAVE_NVML
 
 prepare:
-	@echo
-	@echo "###############################"
-	@echo Enabling renaming in headers...
-	@echo
-	sed	-e '/^#define HWLOC_SYM_TRANSFORM 0/s/0/1/'			\
+	@echo "# Enabling renaming in headers"
+	@sed	-e '/^#define HWLOC_SYM_TRANSFORM 0/s/0/1/'			\
 		-e '/^#define HWLOC_SYM_PREFIX hwloc_/s/hwloc_/foobar_/1'	\
 		-e '/^#define HWLOC_SYM_PREFIX_CAPS HWLOC_/s/HWLOC_/FOOBAR_/2'	\
-		-i $(abs_top_builddir)/include/hwloc/autogen/config.h $(abs_top_builddir)/include/private/autogen/config.h
+		-i $(HWLOC_top_builddir)/include/hwloc/autogen/config.h $(HWLOC_top_builddir)/include/private/autogen/config.h
+	@echo "# done"
 
 restore:
-	@echo
-	@echo "###############################"
-	@echo Restoring original headers...
-	@echo
-	sed	-e '/^#define HWLOC_SYM_TRANSFORM 1/s/1/0/'			\
+	@echo "# Restoring original headers"
+	@sed	-e '/^#define HWLOC_SYM_TRANSFORM 1/s/1/0/'			\
 		-e '/^#define HWLOC_SYM_PREFIX foobar_/s/foobar_/hwloc_/1'	\
 		-e '/^#define HWLOC_SYM_PREFIX_CAPS FOOBAR_/s/FOOBAR_/HWLOC_/2'	\
-		-i $(abs_top_builddir)/include/hwloc/autogen/config.h $(abs_top_builddir)/include/private/autogen/config.h
-
-needed: prepare
-	@echo
-	@echo "###########################"
-	@echo Finding missing renaming...
-	@echo
-	cpp $(CPPFLAGS) $(srcdir)/main.c -I $(abs_top_srcdir)/include -I $(abs_top_builddir)/include \
-		| egrep -i '(^| |\*)hwloc_'
+		-i $(HWLOC_top_builddir)/include/hwloc/autogen/config.h $(HWLOC_top_builddir)/include/private/autogen/config.h
+	@echo "# done"
 
-useless: prepare
-	@echo
-	@echo "###########################"
-	@echo Finding useless renaming...
-	@echo
-	grep '^#define' $(abs_top_srcdir)/include/hwloc/rename.h \
+_useless:
+	@echo "# Finding useless renaming"
+	@grep '^#define' $(HWLOC_top_srcdir)/include/hwloc/rename.h \
 		| awk '{print $$2}' \
 		| egrep -v '(HWLOC_RENAME_H|HWLOC_MUNGE_NAME|HWLOC_NAME)' \
 		| while read name ; do \
-			grep $$name -rwH $(abs_top_srcdir)/include/ \
+			grep $$name -rwH $(HWLOC_top_srcdir)/include/ \
 			| grep -v rename.h: | grep -v .svn >/dev/null \
 			|| echo $$name; \
 			done
+	@echo "# done"
+
+useless: prepare _useless restore
+
+_needed:
+	@echo "# Finding needed renaming"
+	@echo "# using $(TEST_CPPFLAGS)"
+	@cpp $(CPPFLAGS) $(TEST_CPPFLAGS) $(srcdir)/main.c -I $(HWLOC_top_srcdir)/include -I $(HWLOC_top_builddir)/include \
+		| egrep -i '(^| |\*)hwloc_'
+	@echo "# done"
+
+needed: prepare _needed restore
 
 EXTRA_DIST	=	main.c
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/rename/main.c b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/rename/main.c
index bbda8f5..edc19ce 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/rename/main.c
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/rename/main.c
@@ -1,20 +1,47 @@
 #define _GNU_SOURCE 1
 #include "sched.h"
 
+/* all headers should be included */
 #include "hwloc.h"
+#include "hwloc/bitmap.h"
+#include "hwloc/helper.h"
+#include "hwloc/plugins.h"
 
-/* enable those that have the right dependencies on your machine */
-#include "hwloc/glibc-sched.h"
-#include "hwloc/linux-libnuma.h"
+#if HWLOC_TEST_RENAME_LINUX
 #include "hwloc/linux.h"
-//#include "hwloc/cuda.h"
-//#include "hwloc/cudart.h"
-//#include "hwloc/myriexpress.h"
+#endif
+#if HWLOC_TEST_RENAME_LINUX_LIBNUMA
+#include "hwloc/linux-libnuma.h"
+#endif
+#if HWLOC_TEST_RENAME_GLIBC_SCHED
+#include "hwloc/glibc-sched.h"
+#endif
+#if HWLOC_TEST_RENAME_MYRIEXPRESS
+#include "hwloc/myriexpress.h"
+#endif
+#if HWLOC_TEST_RENAME_OPENFABRICS_VERBS
 #include "hwloc/openfabrics-verbs.h"
+#endif
+#if HWLOC_TEST_RENAME_OPENCL
+#include "hwloc/opencl.h"
+#endif
+#if HWLOC_TEST_RENAME_CUDA
+#include "hwloc/cuda.h"
+#endif
+#if HWLOC_TEST_RENAME_CUDART
+#include "hwloc/cudart.h"
+#endif
+#if HWLOC_TEST_RENAME_NVML
+#include "hwloc/nvml.h"
+#endif
+#include "hwloc/gl.h"
+#include "hwloc/intel-mic.h"
 
 #include "private/autogen/config.h"
+#include "private/components.h"
 #include "private/cpuid.h"
 #include "private/debug.h"
 #include "private/misc.h"
 #include "private/private.h"
+#include "private/solaris-chiptype.h"
 #include "private/xml.h"
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/wrapper.sh.in b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/wrapper.sh.in
index 45802d6..6d4ab9c 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/wrapper.sh.in
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/wrapper.sh.in
@@ -2,13 +2,13 @@
 #-*-sh-*-
 
 #
-# Copyright © 2012 Inria.  All rights reserved.
+# Copyright © 2012-2013 Inria.  All rights reserved.
 # See COPYING in top-level directory.
 #
 
-abs_top_builddir="@abs_top_builddir@"
+HWLOC_top_builddir="@HWLOC_top_builddir@"
 
-HWLOC_PLUGINS_PATH=${abs_top_builddir}/src
+HWLOC_PLUGINS_PATH=${HWLOC_top_builddir}/src
 export HWLOC_PLUGINS_PATH
 
 "$@"
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/xml/32em64t-2n8c2t-pci-noio.options b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/xml/32em64t-2n8c2t-pci-noio.options
new file mode 100644
index 0000000..deee383
--- /dev/null
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/xml/32em64t-2n8c2t-pci-noio.options
@@ -0,0 +1 @@
+--no-io
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/xml/32em64t-2n8c2t-pci-noio.source b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/xml/32em64t-2n8c2t-pci-noio.source
new file mode 100644
index 0000000..263a78c
--- /dev/null
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/xml/32em64t-2n8c2t-pci-noio.source
@@ -0,0 +1 @@
+32em64t-2n8c2t-pci-wholeio.xml
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/xml/32em64t-2n8c2t-pci-noio.xml b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/xml/32em64t-2n8c2t-pci-noio.xml
new file mode 100644
index 0000000..c1a6879
--- /dev/null
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/xml/32em64t-2n8c2t-pci-noio.xml
@@ -0,0 +1,184 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE topology SYSTEM "hwloc.dtd">
+<topology>
+  <object type="Machine" os_index="0" cpuset="0xffffffff" complete_cpuset="0xffffffff" online_cpuset="0xffffffff" allowed_cpuset="0xffffffff" nodeset="0x00000003" complete_nodeset="0x00000003" allowed_nodeset="0x00000003">
+    <page_type size="4096" count="0"/>
+    <page_type size="2097152" count="0"/>
+    <info name="DMIProductName" value="X9DRG-HF"/>
+    <info name="DMIProductVersion" value="0123456789"/>
+    <info name="DMIBoardVendor" value="Supermicro"/>
+    <info name="DMIBoardName" value="X9DRG-HF"/>
+    <info name="DMIBoardVersion" value="0123456789"/>
+    <info name="DMIBoardAssetTag" value="To be filled by O.E.M."/>
+    <info name="DMIChassisVendor" value="Supermicro"/>
+    <info name="DMIChassisType" value="3"/>
+    <info name="DMIChassisVersion" value="0123456789"/>
+    <info name="DMIChassisAssetTag" value="To Be Filled By O.E.M."/>
+    <info name="DMIBIOSVendor" value="American Megatrends Inc."/>
+    <info name="DMIBIOSVersion" value="1.0c"/>
+    <info name="DMIBIOSDate" value="08/22/2012"/>
+    <info name="DMISysVendor" value="Supermicro"/>
+    <info name="Backend" value="Linux"/>
+    <info name="OSName" value="Linux"/>
+    <info name="OSRelease" value="3.2.0-4-amd64"/>
+    <info name="OSVersion" value="#1 SMP Debian 3.2.32-1"/>
+    <info name="HostName" value="conan"/>
+    <info name="Architecture" value="x86_64"/>
+    <object type="Group" cpuset="0xffffffff" complete_cpuset="0xffffffff" online_cpuset="0xffffffff" allowed_cpuset="0xffffffff" nodeset="0x00000003" complete_nodeset="0x00000003" allowed_nodeset="0x00000003" depth="0">
+      <distances nbobjs="2" relative_depth="1" latency_base="10.000000">
+        <latency value="1.000000"/>
+        <latency value="2.000000"/>
+        <latency value="2.000000"/>
+        <latency value="1.000000"/>
+      </distances>
+      <object type="NUMANode" os_index="0" cpuset="0x00ff00ff" complete_cpuset="0x00ff00ff" online_cpuset="0x00ff00ff" allowed_cpuset="0x00ff00ff" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001" local_memory="34330173440">
+        <page_type size="4096" count="8381390"/>
+        <page_type size="2097152" count="0"/>
+        <object type="Socket" os_index="0" cpuset="0x00ff00ff" complete_cpuset="0x00ff00ff" online_cpuset="0x00ff00ff" allowed_cpuset="0x00ff00ff" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001">
+          <info name="CPUModel" value="Intel(R) Xeon(R) CPU E5-2650 0 @ 2.00GHz"/>
+          <info name="CPUType" value="x86_64"/>
+          <object type="Cache" cpuset="0x00ff00ff" complete_cpuset="0x00ff00ff" online_cpuset="0x00ff00ff" allowed_cpuset="0x00ff00ff" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001" cache_size="20971520" depth="3" cache_linesize="64" cache_associativity="20" cache_type="0">
+            <object type="Cache" cpuset="0x00010001" complete_cpuset="0x00010001" online_cpuset="0x00010001" allowed_cpuset="0x00010001" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001" cache_size="262144" depth="2" cache_linesize="64" cache_associativity="8" cache_type="0">
+              <object type="Cache" cpuset="0x00010001" complete_cpuset="0x00010001" online_cpuset="0x00010001" allowed_cpuset="0x00010001" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001" cache_size="32768" depth="1" cache_linesize="64" cache_associativity="8" cache_type="0">
+                <object type="Core" os_index="0" cpuset="0x00010001" complete_cpuset="0x00010001" online_cpuset="0x00010001" allowed_cpuset="0x00010001" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001">
+                  <object type="PU" os_index="0" cpuset="0x00000001" complete_cpuset="0x00000001" online_cpuset="0x00000001" allowed_cpuset="0x00000001" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001"/>
+                  <object type="PU" os_index="16" cpuset="0x00010000" complete_cpuset="0x00010000" online_cpuset="0x00010000" allowed_cpuset="0x00010000" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001"/>
+                </object>
+              </object>
+            </object>
+            <object type="Cache" cpuset="0x00020002" complete_cpuset="0x00020002" online_cpuset="0x00020002" allowed_cpuset="0x00020002" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001" cache_size="262144" depth="2" cache_linesize="64" cache_associativity="8" cache_type="0">
+              <object type="Cache" cpuset="0x00020002" complete_cpuset="0x00020002" online_cpuset="0x00020002" allowed_cpuset="0x00020002" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001" cache_size="32768" depth="1" cache_linesize="64" cache_associativity="8" cache_type="0">
+                <object type="Core" os_index="1" cpuset="0x00020002" complete_cpuset="0x00020002" online_cpuset="0x00020002" allowed_cpuset="0x00020002" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001">
+                  <object type="PU" os_index="1" cpuset="0x00000002" complete_cpuset="0x00000002" online_cpuset="0x00000002" allowed_cpuset="0x00000002" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001"/>
+                  <object type="PU" os_index="17" cpuset="0x00020000" complete_cpuset="0x00020000" online_cpuset="0x00020000" allowed_cpuset="0x00020000" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001"/>
+                </object>
+              </object>
+            </object>
+            <object type="Cache" cpuset="0x00040004" complete_cpuset="0x00040004" online_cpuset="0x00040004" allowed_cpuset="0x00040004" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001" cache_size="262144" depth="2" cache_linesize="64" cache_associativity="8" cache_type="0">
+              <object type="Cache" cpuset="0x00040004" complete_cpuset="0x00040004" online_cpuset="0x00040004" allowed_cpuset="0x00040004" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001" cache_size="32768" depth="1" cache_linesize="64" cache_associativity="8" cache_type="0">
+                <object type="Core" os_index="2" cpuset="0x00040004" complete_cpuset="0x00040004" online_cpuset="0x00040004" allowed_cpuset="0x00040004" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001">
+                  <object type="PU" os_index="2" cpuset="0x00000004" complete_cpuset="0x00000004" online_cpuset="0x00000004" allowed_cpuset="0x00000004" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001"/>
+                  <object type="PU" os_index="18" cpuset="0x00040000" complete_cpuset="0x00040000" online_cpuset="0x00040000" allowed_cpuset="0x00040000" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001"/>
+                </object>
+              </object>
+            </object>
+            <object type="Cache" cpuset="0x00080008" complete_cpuset="0x00080008" online_cpuset="0x00080008" allowed_cpuset="0x00080008" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001" cache_size="262144" depth="2" cache_linesize="64" cache_associativity="8" cache_type="0">
+              <object type="Cache" cpuset="0x00080008" complete_cpuset="0x00080008" online_cpuset="0x00080008" allowed_cpuset="0x00080008" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001" cache_size="32768" depth="1" cache_linesize="64" cache_associativity="8" cache_type="0">
+                <object type="Core" os_index="3" cpuset="0x00080008" complete_cpuset="0x00080008" online_cpuset="0x00080008" allowed_cpuset="0x00080008" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001">
+                  <object type="PU" os_index="3" cpuset="0x00000008" complete_cpuset="0x00000008" online_cpuset="0x00000008" allowed_cpuset="0x00000008" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001"/>
+                  <object type="PU" os_index="19" cpuset="0x00080000" complete_cpuset="0x00080000" online_cpuset="0x00080000" allowed_cpuset="0x00080000" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001"/>
+                </object>
+              </object>
+            </object>
+            <object type="Cache" cpuset="0x00100010" complete_cpuset="0x00100010" online_cpuset="0x00100010" allowed_cpuset="0x00100010" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001" cache_size="262144" depth="2" cache_linesize="64" cache_associativity="8" cache_type="0">
+              <object type="Cache" cpuset="0x00100010" complete_cpuset="0x00100010" online_cpuset="0x00100010" allowed_cpuset="0x00100010" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001" cache_size="32768" depth="1" cache_linesize="64" cache_associativity="8" cache_type="0">
+                <object type="Core" os_index="4" cpuset="0x00100010" complete_cpuset="0x00100010" online_cpuset="0x00100010" allowed_cpuset="0x00100010" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001">
+                  <object type="PU" os_index="4" cpuset="0x00000010" complete_cpuset="0x00000010" online_cpuset="0x00000010" allowed_cpuset="0x00000010" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001"/>
+                  <object type="PU" os_index="20" cpuset="0x00100000" complete_cpuset="0x00100000" online_cpuset="0x00100000" allowed_cpuset="0x00100000" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001"/>
+                </object>
+              </object>
+            </object>
+            <object type="Cache" cpuset="0x00200020" complete_cpuset="0x00200020" online_cpuset="0x00200020" allowed_cpuset="0x00200020" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001" cache_size="262144" depth="2" cache_linesize="64" cache_associativity="8" cache_type="0">
+              <object type="Cache" cpuset="0x00200020" complete_cpuset="0x00200020" online_cpuset="0x00200020" allowed_cpuset="0x00200020" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001" cache_size="32768" depth="1" cache_linesize="64" cache_associativity="8" cache_type="0">
+                <object type="Core" os_index="5" cpuset="0x00200020" complete_cpuset="0x00200020" online_cpuset="0x00200020" allowed_cpuset="0x00200020" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001">
+                  <object type="PU" os_index="5" cpuset="0x00000020" complete_cpuset="0x00000020" online_cpuset="0x00000020" allowed_cpuset="0x00000020" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001"/>
+                  <object type="PU" os_index="21" cpuset="0x00200000" complete_cpuset="0x00200000" online_cpuset="0x00200000" allowed_cpuset="0x00200000" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001"/>
+                </object>
+              </object>
+            </object>
+            <object type="Cache" cpuset="0x00400040" complete_cpuset="0x00400040" online_cpuset="0x00400040" allowed_cpuset="0x00400040" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001" cache_size="262144" depth="2" cache_linesize="64" cache_associativity="8" cache_type="0">
+              <object type="Cache" cpuset="0x00400040" complete_cpuset="0x00400040" online_cpuset="0x00400040" allowed_cpuset="0x00400040" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001" cache_size="32768" depth="1" cache_linesize="64" cache_associativity="8" cache_type="0">
+                <object type="Core" os_index="6" cpuset="0x00400040" complete_cpuset="0x00400040" online_cpuset="0x00400040" allowed_cpuset="0x00400040" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001">
+                  <object type="PU" os_index="6" cpuset="0x00000040" complete_cpuset="0x00000040" online_cpuset="0x00000040" allowed_cpuset="0x00000040" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001"/>
+                  <object type="PU" os_index="22" cpuset="0x00400000" complete_cpuset="0x00400000" online_cpuset="0x00400000" allowed_cpuset="0x00400000" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001"/>
+                </object>
+              </object>
+            </object>
+            <object type="Cache" cpuset="0x00800080" complete_cpuset="0x00800080" online_cpuset="0x00800080" allowed_cpuset="0x00800080" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001" cache_size="262144" depth="2" cache_linesize="64" cache_associativity="8" cache_type="0">
+              <object type="Cache" cpuset="0x00800080" complete_cpuset="0x00800080" online_cpuset="0x00800080" allowed_cpuset="0x00800080" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001" cache_size="32768" depth="1" cache_linesize="64" cache_associativity="8" cache_type="0">
+                <object type="Core" os_index="7" cpuset="0x00800080" complete_cpuset="0x00800080" online_cpuset="0x00800080" allowed_cpuset="0x00800080" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001">
+                  <object type="PU" os_index="7" cpuset="0x00000080" complete_cpuset="0x00000080" online_cpuset="0x00000080" allowed_cpuset="0x00000080" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001"/>
+                  <object type="PU" os_index="23" cpuset="0x00800000" complete_cpuset="0x00800000" online_cpuset="0x00800000" allowed_cpuset="0x00800000" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001"/>
+                </object>
+              </object>
+            </object>
+          </object>
+        </object>
+      </object>
+      <object type="NUMANode" os_index="1" cpuset="0xff00ff00" complete_cpuset="0xff00ff00" online_cpuset="0xff00ff00" allowed_cpuset="0xff00ff00" nodeset="0x00000002" complete_nodeset="0x00000002" allowed_nodeset="0x00000002" local_memory="34359738368">
+        <page_type size="4096" count="8388608"/>
+        <page_type size="2097152" count="0"/>
+        <object type="Socket" os_index="1" cpuset="0xff00ff00" complete_cpuset="0xff00ff00" online_cpuset="0xff00ff00" allowed_cpuset="0xff00ff00" nodeset="0x00000002" complete_nodeset="0x00000002" allowed_nodeset="0x00000002">
+          <info name="CPUModel" value="Intel(R) Xeon(R) CPU E5-2650 0 @ 2.00GHz"/>
+          <info name="CPUType" value="x86_64"/>
+          <object type="Cache" cpuset="0xff00ff00" complete_cpuset="0xff00ff00" online_cpuset="0xff00ff00" allowed_cpuset="0xff00ff00" nodeset="0x00000002" complete_nodeset="0x00000002" allowed_nodeset="0x00000002" cache_size="20971520" depth="3" cache_linesize="64" cache_associativity="20" cache_type="0">
+            <object type="Cache" cpuset="0x01000100" complete_cpuset="0x01000100" online_cpuset="0x01000100" allowed_cpuset="0x01000100" nodeset="0x00000002" complete_nodeset="0x00000002" allowed_nodeset="0x00000002" cache_size="262144" depth="2" cache_linesize="64" cache_associativity="8" cache_type="0">
+              <object type="Cache" cpuset="0x01000100" complete_cpuset="0x01000100" online_cpuset="0x01000100" allowed_cpuset="0x01000100" nodeset="0x00000002" complete_nodeset="0x00000002" allowed_nodeset="0x00000002" cache_size="32768" depth="1" cache_linesize="64" cache_associativity="8" cache_type="0">
+                <object type="Core" os_index="0" cpuset="0x01000100" complete_cpuset="0x01000100" online_cpuset="0x01000100" allowed_cpuset="0x01000100" nodeset="0x00000002" complete_nodeset="0x00000002" allowed_nodeset="0x00000002">
+                  <object type="PU" os_index="8" cpuset="0x00000100" complete_cpuset="0x00000100" online_cpuset="0x00000100" allowed_cpuset="0x00000100" nodeset="0x00000002" complete_nodeset="0x00000002" allowed_nodeset="0x00000002"/>
+                  <object type="PU" os_index="24" cpuset="0x01000000" complete_cpuset="0x01000000" online_cpuset="0x01000000" allowed_cpuset="0x01000000" nodeset="0x00000002" complete_nodeset="0x00000002" allowed_nodeset="0x00000002"/>
+                </object>
+              </object>
+            </object>
+            <object type="Cache" cpuset="0x02000200" complete_cpuset="0x02000200" online_cpuset="0x02000200" allowed_cpuset="0x02000200" nodeset="0x00000002" complete_nodeset="0x00000002" allowed_nodeset="0x00000002" cache_size="262144" depth="2" cache_linesize="64" cache_associativity="8" cache_type="0">
+              <object type="Cache" cpuset="0x02000200" complete_cpuset="0x02000200" online_cpuset="0x02000200" allowed_cpuset="0x02000200" nodeset="0x00000002" complete_nodeset="0x00000002" allowed_nodeset="0x00000002" cache_size="32768" depth="1" cache_linesize="64" cache_associativity="8" cache_type="0">
+                <object type="Core" os_index="1" cpuset="0x02000200" complete_cpuset="0x02000200" online_cpuset="0x02000200" allowed_cpuset="0x02000200" nodeset="0x00000002" complete_nodeset="0x00000002" allowed_nodeset="0x00000002">
+                  <object type="PU" os_index="9" cpuset="0x00000200" complete_cpuset="0x00000200" online_cpuset="0x00000200" allowed_cpuset="0x00000200" nodeset="0x00000002" complete_nodeset="0x00000002" allowed_nodeset="0x00000002"/>
+                  <object type="PU" os_index="25" cpuset="0x02000000" complete_cpuset="0x02000000" online_cpuset="0x02000000" allowed_cpuset="0x02000000" nodeset="0x00000002" complete_nodeset="0x00000002" allowed_nodeset="0x00000002"/>
+                </object>
+              </object>
+            </object>
+            <object type="Cache" cpuset="0x04000400" complete_cpuset="0x04000400" online_cpuset="0x04000400" allowed_cpuset="0x04000400" nodeset="0x00000002" complete_nodeset="0x00000002" allowed_nodeset="0x00000002" cache_size="262144" depth="2" cache_linesize="64" cache_associativity="8" cache_type="0">
+              <object type="Cache" cpuset="0x04000400" complete_cpuset="0x04000400" online_cpuset="0x04000400" allowed_cpuset="0x04000400" nodeset="0x00000002" complete_nodeset="0x00000002" allowed_nodeset="0x00000002" cache_size="32768" depth="1" cache_linesize="64" cache_associativity="8" cache_type="0">
+                <object type="Core" os_index="2" cpuset="0x04000400" complete_cpuset="0x04000400" online_cpuset="0x04000400" allowed_cpuset="0x04000400" nodeset="0x00000002" complete_nodeset="0x00000002" allowed_nodeset="0x00000002">
+                  <object type="PU" os_index="10" cpuset="0x00000400" complete_cpuset="0x00000400" online_cpuset="0x00000400" allowed_cpuset="0x00000400" nodeset="0x00000002" complete_nodeset="0x00000002" allowed_nodeset="0x00000002"/>
+                  <object type="PU" os_index="26" cpuset="0x04000000" complete_cpuset="0x04000000" online_cpuset="0x04000000" allowed_cpuset="0x04000000" nodeset="0x00000002" complete_nodeset="0x00000002" allowed_nodeset="0x00000002"/>
+                </object>
+              </object>
+            </object>
+            <object type="Cache" cpuset="0x08000800" complete_cpuset="0x08000800" online_cpuset="0x08000800" allowed_cpuset="0x08000800" nodeset="0x00000002" complete_nodeset="0x00000002" allowed_nodeset="0x00000002" cache_size="262144" depth="2" cache_linesize="64" cache_associativity="8" cache_type="0">
+              <object type="Cache" cpuset="0x08000800" complete_cpuset="0x08000800" online_cpuset="0x08000800" allowed_cpuset="0x08000800" nodeset="0x00000002" complete_nodeset="0x00000002" allowed_nodeset="0x00000002" cache_size="32768" depth="1" cache_linesize="64" cache_associativity="8" cache_type="0">
+                <object type="Core" os_index="3" cpuset="0x08000800" complete_cpuset="0x08000800" online_cpuset="0x08000800" allowed_cpuset="0x08000800" nodeset="0x00000002" complete_nodeset="0x00000002" allowed_nodeset="0x00000002">
+                  <object type="PU" os_index="11" cpuset="0x00000800" complete_cpuset="0x00000800" online_cpuset="0x00000800" allowed_cpuset="0x00000800" nodeset="0x00000002" complete_nodeset="0x00000002" allowed_nodeset="0x00000002"/>
+                  <object type="PU" os_index="27" cpuset="0x08000000" complete_cpuset="0x08000000" online_cpuset="0x08000000" allowed_cpuset="0x08000000" nodeset="0x00000002" complete_nodeset="0x00000002" allowed_nodeset="0x00000002"/>
+                </object>
+              </object>
+            </object>
+            <object type="Cache" cpuset="0x10001000" complete_cpuset="0x10001000" online_cpuset="0x10001000" allowed_cpuset="0x10001000" nodeset="0x00000002" complete_nodeset="0x00000002" allowed_nodeset="0x00000002" cache_size="262144" depth="2" cache_linesize="64" cache_associativity="8" cache_type="0">
+              <object type="Cache" cpuset="0x10001000" complete_cpuset="0x10001000" online_cpuset="0x10001000" allowed_cpuset="0x10001000" nodeset="0x00000002" complete_nodeset="0x00000002" allowed_nodeset="0x00000002" cache_size="32768" depth="1" cache_linesize="64" cache_associativity="8" cache_type="0">
+                <object type="Core" os_index="4" cpuset="0x10001000" complete_cpuset="0x10001000" online_cpuset="0x10001000" allowed_cpuset="0x10001000" nodeset="0x00000002" complete_nodeset="0x00000002" allowed_nodeset="0x00000002">
+                  <object type="PU" os_index="12" cpuset="0x00001000" complete_cpuset="0x00001000" online_cpuset="0x00001000" allowed_cpuset="0x00001000" nodeset="0x00000002" complete_nodeset="0x00000002" allowed_nodeset="0x00000002"/>
+                  <object type="PU" os_index="28" cpuset="0x10000000" complete_cpuset="0x10000000" online_cpuset="0x10000000" allowed_cpuset="0x10000000" nodeset="0x00000002" complete_nodeset="0x00000002" allowed_nodeset="0x00000002"/>
+                </object>
+              </object>
+            </object>
+            <object type="Cache" cpuset="0x20002000" complete_cpuset="0x20002000" online_cpuset="0x20002000" allowed_cpuset="0x20002000" nodeset="0x00000002" complete_nodeset="0x00000002" allowed_nodeset="0x00000002" cache_size="262144" depth="2" cache_linesize="64" cache_associativity="8" cache_type="0">
+              <object type="Cache" cpuset="0x20002000" complete_cpuset="0x20002000" online_cpuset="0x20002000" allowed_cpuset="0x20002000" nodeset="0x00000002" complete_nodeset="0x00000002" allowed_nodeset="0x00000002" cache_size="32768" depth="1" cache_linesize="64" cache_associativity="8" cache_type="0">
+                <object type="Core" os_index="5" cpuset="0x20002000" complete_cpuset="0x20002000" online_cpuset="0x20002000" allowed_cpuset="0x20002000" nodeset="0x00000002" complete_nodeset="0x00000002" allowed_nodeset="0x00000002">
+                  <object type="PU" os_index="13" cpuset="0x00002000" complete_cpuset="0x00002000" online_cpuset="0x00002000" allowed_cpuset="0x00002000" nodeset="0x00000002" complete_nodeset="0x00000002" allowed_nodeset="0x00000002"/>
+                  <object type="PU" os_index="29" cpuset="0x20000000" complete_cpuset="0x20000000" online_cpuset="0x20000000" allowed_cpuset="0x20000000" nodeset="0x00000002" complete_nodeset="0x00000002" allowed_nodeset="0x00000002"/>
+                </object>
+              </object>
+            </object>
+            <object type="Cache" cpuset="0x40004000" complete_cpuset="0x40004000" online_cpuset="0x40004000" allowed_cpuset="0x40004000" nodeset="0x00000002" complete_nodeset="0x00000002" allowed_nodeset="0x00000002" cache_size="262144" depth="2" cache_linesize="64" cache_associativity="8" cache_type="0">
+              <object type="Cache" cpuset="0x40004000" complete_cpuset="0x40004000" online_cpuset="0x40004000" allowed_cpuset="0x40004000" nodeset="0x00000002" complete_nodeset="0x00000002" allowed_nodeset="0x00000002" cache_size="32768" depth="1" cache_linesize="64" cache_associativity="8" cache_type="0">
+                <object type="Core" os_index="6" cpuset="0x40004000" complete_cpuset="0x40004000" online_cpuset="0x40004000" allowed_cpuset="0x40004000" nodeset="0x00000002" complete_nodeset="0x00000002" allowed_nodeset="0x00000002">
+                  <object type="PU" os_index="14" cpuset="0x00004000" complete_cpuset="0x00004000" online_cpuset="0x00004000" allowed_cpuset="0x00004000" nodeset="0x00000002" complete_nodeset="0x00000002" allowed_nodeset="0x00000002"/>
+                  <object type="PU" os_index="30" cpuset="0x40000000" complete_cpuset="0x40000000" online_cpuset="0x40000000" allowed_cpuset="0x40000000" nodeset="0x00000002" complete_nodeset="0x00000002" allowed_nodeset="0x00000002"/>
+                </object>
+              </object>
+            </object>
+            <object type="Cache" cpuset="0x80008000" complete_cpuset="0x80008000" online_cpuset="0x80008000" allowed_cpuset="0x80008000" nodeset="0x00000002" complete_nodeset="0x00000002" allowed_nodeset="0x00000002" cache_size="262144" depth="2" cache_linesize="64" cache_associativity="8" cache_type="0">
+              <object type="Cache" cpuset="0x80008000" complete_cpuset="0x80008000" online_cpuset="0x80008000" allowed_cpuset="0x80008000" nodeset="0x00000002" complete_nodeset="0x00000002" allowed_nodeset="0x00000002" cache_size="32768" depth="1" cache_linesize="64" cache_associativity="8" cache_type="0">
+                <object type="Core" os_index="7" cpuset="0x80008000" complete_cpuset="0x80008000" online_cpuset="0x80008000" allowed_cpuset="0x80008000" nodeset="0x00000002" complete_nodeset="0x00000002" allowed_nodeset="0x00000002">
+                  <object type="PU" os_index="15" cpuset="0x00008000" complete_cpuset="0x00008000" online_cpuset="0x00008000" allowed_cpuset="0x00008000" nodeset="0x00000002" complete_nodeset="0x00000002" allowed_nodeset="0x00000002"/>
+                  <object type="PU" os_index="31" cpuset="0x80000000" complete_cpuset="0x80000000" online_cpuset="0x80000000" allowed_cpuset="0x80000000" nodeset="0x00000002" complete_nodeset="0x00000002" allowed_nodeset="0x00000002"/>
+                </object>
+              </object>
+            </object>
+          </object>
+        </object>
+      </object>
+    </object>
+  </object>
+</topology>
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/xml/32em64t-2n8c2t-pci-normalio.source b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/xml/32em64t-2n8c2t-pci-normalio.source
new file mode 100644
index 0000000..263a78c
--- /dev/null
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/xml/32em64t-2n8c2t-pci-normalio.source
@@ -0,0 +1 @@
+32em64t-2n8c2t-pci-wholeio.xml
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/xml/32em64t-2n8c2t-pci-normalio.xml b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/xml/32em64t-2n8c2t-pci-normalio.xml
new file mode 100644
index 0000000..a0d2830
--- /dev/null
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/xml/32em64t-2n8c2t-pci-normalio.xml
@@ -0,0 +1,251 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE topology SYSTEM "hwloc.dtd">
+<topology>
+  <object type="Machine" os_index="0" cpuset="0xffffffff" complete_cpuset="0xffffffff" online_cpuset="0xffffffff" allowed_cpuset="0xffffffff" nodeset="0x00000003" complete_nodeset="0x00000003" allowed_nodeset="0x00000003">
+    <page_type size="4096" count="0"/>
+    <page_type size="2097152" count="0"/>
+    <info name="DMIProductName" value="X9DRG-HF"/>
+    <info name="DMIProductVersion" value="0123456789"/>
+    <info name="DMIBoardVendor" value="Supermicro"/>
+    <info name="DMIBoardName" value="X9DRG-HF"/>
+    <info name="DMIBoardVersion" value="0123456789"/>
+    <info name="DMIBoardAssetTag" value="To be filled by O.E.M."/>
+    <info name="DMIChassisVendor" value="Supermicro"/>
+    <info name="DMIChassisType" value="3"/>
+    <info name="DMIChassisVersion" value="0123456789"/>
+    <info name="DMIChassisAssetTag" value="To Be Filled By O.E.M."/>
+    <info name="DMIBIOSVendor" value="American Megatrends Inc."/>
+    <info name="DMIBIOSVersion" value="1.0c"/>
+    <info name="DMIBIOSDate" value="08/22/2012"/>
+    <info name="DMISysVendor" value="Supermicro"/>
+    <info name="Backend" value="Linux"/>
+    <info name="OSName" value="Linux"/>
+    <info name="OSRelease" value="3.2.0-4-amd64"/>
+    <info name="OSVersion" value="#1 SMP Debian 3.2.32-1"/>
+    <info name="HostName" value="conan"/>
+    <info name="Architecture" value="x86_64"/>
+    <object type="Group" cpuset="0xffffffff" complete_cpuset="0xffffffff" online_cpuset="0xffffffff" allowed_cpuset="0xffffffff" nodeset="0x00000003" complete_nodeset="0x00000003" allowed_nodeset="0x00000003" depth="0">
+      <distances nbobjs="2" relative_depth="1" latency_base="10.000000">
+        <latency value="1.000000"/>
+        <latency value="2.000000"/>
+        <latency value="2.000000"/>
+        <latency value="1.000000"/>
+      </distances>
+      <object type="NUMANode" os_index="0" cpuset="0x00ff00ff" complete_cpuset="0x00ff00ff" online_cpuset="0x00ff00ff" allowed_cpuset="0x00ff00ff" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001" local_memory="34330173440">
+        <page_type size="4096" count="8381390"/>
+        <page_type size="2097152" count="0"/>
+        <object type="Socket" os_index="0" cpuset="0x00ff00ff" complete_cpuset="0x00ff00ff" online_cpuset="0x00ff00ff" allowed_cpuset="0x00ff00ff" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001">
+          <info name="CPUModel" value="Intel(R) Xeon(R) CPU E5-2650 0 @ 2.00GHz"/>
+          <info name="CPUType" value="x86_64"/>
+          <object type="Cache" cpuset="0x00ff00ff" complete_cpuset="0x00ff00ff" online_cpuset="0x00ff00ff" allowed_cpuset="0x00ff00ff" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001" cache_size="20971520" depth="3" cache_linesize="64" cache_associativity="20" cache_type="0">
+            <object type="Cache" cpuset="0x00010001" complete_cpuset="0x00010001" online_cpuset="0x00010001" allowed_cpuset="0x00010001" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001" cache_size="262144" depth="2" cache_linesize="64" cache_associativity="8" cache_type="0">
+              <object type="Cache" cpuset="0x00010001" complete_cpuset="0x00010001" online_cpuset="0x00010001" allowed_cpuset="0x00010001" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001" cache_size="32768" depth="1" cache_linesize="64" cache_associativity="8" cache_type="0">
+                <object type="Core" os_index="0" cpuset="0x00010001" complete_cpuset="0x00010001" online_cpuset="0x00010001" allowed_cpuset="0x00010001" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001">
+                  <object type="PU" os_index="0" cpuset="0x00000001" complete_cpuset="0x00000001" online_cpuset="0x00000001" allowed_cpuset="0x00000001" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001"/>
+                  <object type="PU" os_index="16" cpuset="0x00010000" complete_cpuset="0x00010000" online_cpuset="0x00010000" allowed_cpuset="0x00010000" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001"/>
+                </object>
+              </object>
+            </object>
+            <object type="Cache" cpuset="0x00020002" complete_cpuset="0x00020002" online_cpuset="0x00020002" allowed_cpuset="0x00020002" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001" cache_size="262144" depth="2" cache_linesize="64" cache_associativity="8" cache_type="0">
+              <object type="Cache" cpuset="0x00020002" complete_cpuset="0x00020002" online_cpuset="0x00020002" allowed_cpuset="0x00020002" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001" cache_size="32768" depth="1" cache_linesize="64" cache_associativity="8" cache_type="0">
+                <object type="Core" os_index="1" cpuset="0x00020002" complete_cpuset="0x00020002" online_cpuset="0x00020002" allowed_cpuset="0x00020002" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001">
+                  <object type="PU" os_index="1" cpuset="0x00000002" complete_cpuset="0x00000002" online_cpuset="0x00000002" allowed_cpuset="0x00000002" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001"/>
+                  <object type="PU" os_index="17" cpuset="0x00020000" complete_cpuset="0x00020000" online_cpuset="0x00020000" allowed_cpuset="0x00020000" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001"/>
+                </object>
+              </object>
+            </object>
+            <object type="Cache" cpuset="0x00040004" complete_cpuset="0x00040004" online_cpuset="0x00040004" allowed_cpuset="0x00040004" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001" cache_size="262144" depth="2" cache_linesize="64" cache_associativity="8" cache_type="0">
+              <object type="Cache" cpuset="0x00040004" complete_cpuset="0x00040004" online_cpuset="0x00040004" allowed_cpuset="0x00040004" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001" cache_size="32768" depth="1" cache_linesize="64" cache_associativity="8" cache_type="0">
+                <object type="Core" os_index="2" cpuset="0x00040004" complete_cpuset="0x00040004" online_cpuset="0x00040004" allowed_cpuset="0x00040004" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001">
+                  <object type="PU" os_index="2" cpuset="0x00000004" complete_cpuset="0x00000004" online_cpuset="0x00000004" allowed_cpuset="0x00000004" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001"/>
+                  <object type="PU" os_index="18" cpuset="0x00040000" complete_cpuset="0x00040000" online_cpuset="0x00040000" allowed_cpuset="0x00040000" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001"/>
+                </object>
+              </object>
+            </object>
+            <object type="Cache" cpuset="0x00080008" complete_cpuset="0x00080008" online_cpuset="0x00080008" allowed_cpuset="0x00080008" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001" cache_size="262144" depth="2" cache_linesize="64" cache_associativity="8" cache_type="0">
+              <object type="Cache" cpuset="0x00080008" complete_cpuset="0x00080008" online_cpuset="0x00080008" allowed_cpuset="0x00080008" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001" cache_size="32768" depth="1" cache_linesize="64" cache_associativity="8" cache_type="0">
+                <object type="Core" os_index="3" cpuset="0x00080008" complete_cpuset="0x00080008" online_cpuset="0x00080008" allowed_cpuset="0x00080008" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001">
+                  <object type="PU" os_index="3" cpuset="0x00000008" complete_cpuset="0x00000008" online_cpuset="0x00000008" allowed_cpuset="0x00000008" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001"/>
+                  <object type="PU" os_index="19" cpuset="0x00080000" complete_cpuset="0x00080000" online_cpuset="0x00080000" allowed_cpuset="0x00080000" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001"/>
+                </object>
+              </object>
+            </object>
+            <object type="Cache" cpuset="0x00100010" complete_cpuset="0x00100010" online_cpuset="0x00100010" allowed_cpuset="0x00100010" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001" cache_size="262144" depth="2" cache_linesize="64" cache_associativity="8" cache_type="0">
+              <object type="Cache" cpuset="0x00100010" complete_cpuset="0x00100010" online_cpuset="0x00100010" allowed_cpuset="0x00100010" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001" cache_size="32768" depth="1" cache_linesize="64" cache_associativity="8" cache_type="0">
+                <object type="Core" os_index="4" cpuset="0x00100010" complete_cpuset="0x00100010" online_cpuset="0x00100010" allowed_cpuset="0x00100010" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001">
+                  <object type="PU" os_index="4" cpuset="0x00000010" complete_cpuset="0x00000010" online_cpuset="0x00000010" allowed_cpuset="0x00000010" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001"/>
+                  <object type="PU" os_index="20" cpuset="0x00100000" complete_cpuset="0x00100000" online_cpuset="0x00100000" allowed_cpuset="0x00100000" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001"/>
+                </object>
+              </object>
+            </object>
+            <object type="Cache" cpuset="0x00200020" complete_cpuset="0x00200020" online_cpuset="0x00200020" allowed_cpuset="0x00200020" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001" cache_size="262144" depth="2" cache_linesize="64" cache_associativity="8" cache_type="0">
+              <object type="Cache" cpuset="0x00200020" complete_cpuset="0x00200020" online_cpuset="0x00200020" allowed_cpuset="0x00200020" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001" cache_size="32768" depth="1" cache_linesize="64" cache_associativity="8" cache_type="0">
+                <object type="Core" os_index="5" cpuset="0x00200020" complete_cpuset="0x00200020" online_cpuset="0x00200020" allowed_cpuset="0x00200020" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001">
+                  <object type="PU" os_index="5" cpuset="0x00000020" complete_cpuset="0x00000020" online_cpuset="0x00000020" allowed_cpuset="0x00000020" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001"/>
+                  <object type="PU" os_index="21" cpuset="0x00200000" complete_cpuset="0x00200000" online_cpuset="0x00200000" allowed_cpuset="0x00200000" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001"/>
+                </object>
+              </object>
+            </object>
+            <object type="Cache" cpuset="0x00400040" complete_cpuset="0x00400040" online_cpuset="0x00400040" allowed_cpuset="0x00400040" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001" cache_size="262144" depth="2" cache_linesize="64" cache_associativity="8" cache_type="0">
+              <object type="Cache" cpuset="0x00400040" complete_cpuset="0x00400040" online_cpuset="0x00400040" allowed_cpuset="0x00400040" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001" cache_size="32768" depth="1" cache_linesize="64" cache_associativity="8" cache_type="0">
+                <object type="Core" os_index="6" cpuset="0x00400040" complete_cpuset="0x00400040" online_cpuset="0x00400040" allowed_cpuset="0x00400040" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001">
+                  <object type="PU" os_index="6" cpuset="0x00000040" complete_cpuset="0x00000040" online_cpuset="0x00000040" allowed_cpuset="0x00000040" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001"/>
+                  <object type="PU" os_index="22" cpuset="0x00400000" complete_cpuset="0x00400000" online_cpuset="0x00400000" allowed_cpuset="0x00400000" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001"/>
+                </object>
+              </object>
+            </object>
+            <object type="Cache" cpuset="0x00800080" complete_cpuset="0x00800080" online_cpuset="0x00800080" allowed_cpuset="0x00800080" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001" cache_size="262144" depth="2" cache_linesize="64" cache_associativity="8" cache_type="0">
+              <object type="Cache" cpuset="0x00800080" complete_cpuset="0x00800080" online_cpuset="0x00800080" allowed_cpuset="0x00800080" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001" cache_size="32768" depth="1" cache_linesize="64" cache_associativity="8" cache_type="0">
+                <object type="Core" os_index="7" cpuset="0x00800080" complete_cpuset="0x00800080" online_cpuset="0x00800080" allowed_cpuset="0x00800080" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001">
+                  <object type="PU" os_index="7" cpuset="0x00000080" complete_cpuset="0x00000080" online_cpuset="0x00000080" allowed_cpuset="0x00000080" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001"/>
+                  <object type="PU" os_index="23" cpuset="0x00800000" complete_cpuset="0x00800000" online_cpuset="0x00800000" allowed_cpuset="0x00800000" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001"/>
+                </object>
+              </object>
+            </object>
+          </object>
+        </object>
+        <object type="Bridge" os_index="0" bridge_type="0-1" depth="0" bridge_pci="0000:[00-05]">
+          <object type="Bridge" os_index="48" name="Intel Corporation Xeon E5/Core i7 IIO PCI Express Root Port 3a in PCI Express Mode" bridge_type="1-1" depth="0" bridge_pci="0000:[03-03]" pci_busid="0000:00:03.0" pci_type="0604 [8086:3c08] [000f:0000] 07" pci_link_speed="0.000000">
+            <info name="PCIVendor" value="Intel Corporation"/>
+            <info name="PCIDevice" value="Xeon E5/Core i7 IIO PCI Express Root Port 3a in PCI Express Mode"/>
+            <object type="PCIDev" os_index="12288" name="NVIDIA Corporation Tesla M2075 Dual-Slot Computing Processor Module" pci_busid="0000:03:00.0" pci_type="0302 [10de:1094] [00de:0088] a1" pci_link_speed="0.000000">
+              <info name="PCIVendor" value="NVIDIA Corporation"/>
+              <info name="PCIDevice" value="Tesla M2075 Dual-Slot Computing Processor Module"/>
+            </object>
+          </object>
+          <object type="Bridge" os_index="272" name="Intel Corporation C600/X79 series chipset PCI Express Virtual Root Port" bridge_type="1-1" depth="0" bridge_pci="0000:[04-04]" pci_busid="0000:00:11.0" pci_type="0604 [8086:1d3e] [000f:0000] 06" pci_link_speed="0.000000">
+            <info name="PCIVendor" value="Intel Corporation"/>
+            <info name="PCIDevice" value="C600/X79 series chipset PCI Express Virtual Root Port"/>
+            <object type="PCIDev" os_index="16384" name="Intel Corporation C602 chipset 4-Port SATA Storage Control Unit" pci_busid="0000:04:00.0" pci_type="0107 [8086:1d6b] [00d9:0062] 06" pci_link_speed="0.000000">
+              <info name="PCIVendor" value="Intel Corporation"/>
+              <info name="PCIDevice" value="C602 chipset 4-Port SATA Storage Control Unit"/>
+            </object>
+          </object>
+          <object type="Bridge" os_index="480" name="Intel Corporation 82801 PCI Bridge" bridge_type="1-1" depth="0" bridge_pci="0000:[05-05]" pci_busid="0000:00:1e.0" pci_type="0604 [8086:244e] [0000:0000] a6" pci_link_speed="0.000000">
+            <info name="PCIVendor" value="Intel Corporation"/>
+            <info name="PCIDevice" value="82801 PCI Bridge"/>
+            <object type="PCIDev" os_index="20528" name="Matrox Electronics Systems Ltd. MGA G200eW WPCM450" pci_busid="0000:05:03.0" pci_type="0300 [102b:0532] [00d9:0062] 0a" pci_link_speed="0.000000">
+              <info name="PCIVendor" value="Matrox Electronics Systems Ltd."/>
+              <info name="PCIDevice" value="MGA G200eW WPCM450"/>
+            </object>
+          </object>
+          <object type="PCIDev" os_index="498" name="Intel Corporation C600/X79 series chipset 6-Port SATA AHCI Controller" pci_busid="0000:00:1f.2" pci_type="0106 [8086:1d02] [00d9:0062] 06" pci_link_speed="0.000000">
+            <info name="PCIVendor" value="Intel Corporation"/>
+            <info name="PCIDevice" value="C600/X79 series chipset 6-Port SATA AHCI Controller"/>
+            <object type="OSDev" name="sda" osdev_type="0"/>
+          </object>
+        </object>
+      </object>
+      <object type="NUMANode" os_index="1" cpuset="0xff00ff00" complete_cpuset="0xff00ff00" online_cpuset="0xff00ff00" allowed_cpuset="0xff00ff00" nodeset="0x00000002" complete_nodeset="0x00000002" allowed_nodeset="0x00000002" local_memory="34359738368">
+        <page_type size="4096" count="8388608"/>
+        <page_type size="2097152" count="0"/>
+        <object type="Socket" os_index="1" cpuset="0xff00ff00" complete_cpuset="0xff00ff00" online_cpuset="0xff00ff00" allowed_cpuset="0xff00ff00" nodeset="0x00000002" complete_nodeset="0x00000002" allowed_nodeset="0x00000002">
+          <info name="CPUModel" value="Intel(R) Xeon(R) CPU E5-2650 0 @ 2.00GHz"/>
+          <info name="CPUType" value="x86_64"/>
+          <object type="Cache" cpuset="0xff00ff00" complete_cpuset="0xff00ff00" online_cpuset="0xff00ff00" allowed_cpuset="0xff00ff00" nodeset="0x00000002" complete_nodeset="0x00000002" allowed_nodeset="0x00000002" cache_size="20971520" depth="3" cache_linesize="64" cache_associativity="20" cache_type="0">
+            <object type="Cache" cpuset="0x01000100" complete_cpuset="0x01000100" online_cpuset="0x01000100" allowed_cpuset="0x01000100" nodeset="0x00000002" complete_nodeset="0x00000002" allowed_nodeset="0x00000002" cache_size="262144" depth="2" cache_linesize="64" cache_associativity="8" cache_type="0">
+              <object type="Cache" cpuset="0x01000100" complete_cpuset="0x01000100" online_cpuset="0x01000100" allowed_cpuset="0x01000100" nodeset="0x00000002" complete_nodeset="0x00000002" allowed_nodeset="0x00000002" cache_size="32768" depth="1" cache_linesize="64" cache_associativity="8" cache_type="0">
+                <object type="Core" os_index="0" cpuset="0x01000100" complete_cpuset="0x01000100" online_cpuset="0x01000100" allowed_cpuset="0x01000100" nodeset="0x00000002" complete_nodeset="0x00000002" allowed_nodeset="0x00000002">
+                  <object type="PU" os_index="8" cpuset="0x00000100" complete_cpuset="0x00000100" online_cpuset="0x00000100" allowed_cpuset="0x00000100" nodeset="0x00000002" complete_nodeset="0x00000002" allowed_nodeset="0x00000002"/>
+                  <object type="PU" os_index="24" cpuset="0x01000000" complete_cpuset="0x01000000" online_cpuset="0x01000000" allowed_cpuset="0x01000000" nodeset="0x00000002" complete_nodeset="0x00000002" allowed_nodeset="0x00000002"/>
+                </object>
+              </object>
+            </object>
+            <object type="Cache" cpuset="0x02000200" complete_cpuset="0x02000200" online_cpuset="0x02000200" allowed_cpuset="0x02000200" nodeset="0x00000002" complete_nodeset="0x00000002" allowed_nodeset="0x00000002" cache_size="262144" depth="2" cache_linesize="64" cache_associativity="8" cache_type="0">
+              <object type="Cache" cpuset="0x02000200" complete_cpuset="0x02000200" online_cpuset="0x02000200" allowed_cpuset="0x02000200" nodeset="0x00000002" complete_nodeset="0x00000002" allowed_nodeset="0x00000002" cache_size="32768" depth="1" cache_linesize="64" cache_associativity="8" cache_type="0">
+                <object type="Core" os_index="1" cpuset="0x02000200" complete_cpuset="0x02000200" online_cpuset="0x02000200" allowed_cpuset="0x02000200" nodeset="0x00000002" complete_nodeset="0x00000002" allowed_nodeset="0x00000002">
+                  <object type="PU" os_index="9" cpuset="0x00000200" complete_cpuset="0x00000200" online_cpuset="0x00000200" allowed_cpuset="0x00000200" nodeset="0x00000002" complete_nodeset="0x00000002" allowed_nodeset="0x00000002"/>
+                  <object type="PU" os_index="25" cpuset="0x02000000" complete_cpuset="0x02000000" online_cpuset="0x02000000" allowed_cpuset="0x02000000" nodeset="0x00000002" complete_nodeset="0x00000002" allowed_nodeset="0x00000002"/>
+                </object>
+              </object>
+            </object>
+            <object type="Cache" cpuset="0x04000400" complete_cpuset="0x04000400" online_cpuset="0x04000400" allowed_cpuset="0x04000400" nodeset="0x00000002" complete_nodeset="0x00000002" allowed_nodeset="0x00000002" cache_size="262144" depth="2" cache_linesize="64" cache_associativity="8" cache_type="0">
+              <object type="Cache" cpuset="0x04000400" complete_cpuset="0x04000400" online_cpuset="0x04000400" allowed_cpuset="0x04000400" nodeset="0x00000002" complete_nodeset="0x00000002" allowed_nodeset="0x00000002" cache_size="32768" depth="1" cache_linesize="64" cache_associativity="8" cache_type="0">
+                <object type="Core" os_index="2" cpuset="0x04000400" complete_cpuset="0x04000400" online_cpuset="0x04000400" allowed_cpuset="0x04000400" nodeset="0x00000002" complete_nodeset="0x00000002" allowed_nodeset="0x00000002">
+                  <object type="PU" os_index="10" cpuset="0x00000400" complete_cpuset="0x00000400" online_cpuset="0x00000400" allowed_cpuset="0x00000400" nodeset="0x00000002" complete_nodeset="0x00000002" allowed_nodeset="0x00000002"/>
+                  <object type="PU" os_index="26" cpuset="0x04000000" complete_cpuset="0x04000000" online_cpuset="0x04000000" allowed_cpuset="0x04000000" nodeset="0x00000002" complete_nodeset="0x00000002" allowed_nodeset="0x00000002"/>
+                </object>
+              </object>
+            </object>
+            <object type="Cache" cpuset="0x08000800" complete_cpuset="0x08000800" online_cpuset="0x08000800" allowed_cpuset="0x08000800" nodeset="0x00000002" complete_nodeset="0x00000002" allowed_nodeset="0x00000002" cache_size="262144" depth="2" cache_linesize="64" cache_associativity="8" cache_type="0">
+              <object type="Cache" cpuset="0x08000800" complete_cpuset="0x08000800" online_cpuset="0x08000800" allowed_cpuset="0x08000800" nodeset="0x00000002" complete_nodeset="0x00000002" allowed_nodeset="0x00000002" cache_size="32768" depth="1" cache_linesize="64" cache_associativity="8" cache_type="0">
+                <object type="Core" os_index="3" cpuset="0x08000800" complete_cpuset="0x08000800" online_cpuset="0x08000800" allowed_cpuset="0x08000800" nodeset="0x00000002" complete_nodeset="0x00000002" allowed_nodeset="0x00000002">
+                  <object type="PU" os_index="11" cpuset="0x00000800" complete_cpuset="0x00000800" online_cpuset="0x00000800" allowed_cpuset="0x00000800" nodeset="0x00000002" complete_nodeset="0x00000002" allowed_nodeset="0x00000002"/>
+                  <object type="PU" os_index="27" cpuset="0x08000000" complete_cpuset="0x08000000" online_cpuset="0x08000000" allowed_cpuset="0x08000000" nodeset="0x00000002" complete_nodeset="0x00000002" allowed_nodeset="0x00000002"/>
+                </object>
+              </object>
+            </object>
+            <object type="Cache" cpuset="0x10001000" complete_cpuset="0x10001000" online_cpuset="0x10001000" allowed_cpuset="0x10001000" nodeset="0x00000002" complete_nodeset="0x00000002" allowed_nodeset="0x00000002" cache_size="262144" depth="2" cache_linesize="64" cache_associativity="8" cache_type="0">
+              <object type="Cache" cpuset="0x10001000" complete_cpuset="0x10001000" online_cpuset="0x10001000" allowed_cpuset="0x10001000" nodeset="0x00000002" complete_nodeset="0x00000002" allowed_nodeset="0x00000002" cache_size="32768" depth="1" cache_linesize="64" cache_associativity="8" cache_type="0">
+                <object type="Core" os_index="4" cpuset="0x10001000" complete_cpuset="0x10001000" online_cpuset="0x10001000" allowed_cpuset="0x10001000" nodeset="0x00000002" complete_nodeset="0x00000002" allowed_nodeset="0x00000002">
+                  <object type="PU" os_index="12" cpuset="0x00001000" complete_cpuset="0x00001000" online_cpuset="0x00001000" allowed_cpuset="0x00001000" nodeset="0x00000002" complete_nodeset="0x00000002" allowed_nodeset="0x00000002"/>
+                  <object type="PU" os_index="28" cpuset="0x10000000" complete_cpuset="0x10000000" online_cpuset="0x10000000" allowed_cpuset="0x10000000" nodeset="0x00000002" complete_nodeset="0x00000002" allowed_nodeset="0x00000002"/>
+                </object>
+              </object>
+            </object>
+            <object type="Cache" cpuset="0x20002000" complete_cpuset="0x20002000" online_cpuset="0x20002000" allowed_cpuset="0x20002000" nodeset="0x00000002" complete_nodeset="0x00000002" allowed_nodeset="0x00000002" cache_size="262144" depth="2" cache_linesize="64" cache_associativity="8" cache_type="0">
+              <object type="Cache" cpuset="0x20002000" complete_cpuset="0x20002000" online_cpuset="0x20002000" allowed_cpuset="0x20002000" nodeset="0x00000002" complete_nodeset="0x00000002" allowed_nodeset="0x00000002" cache_size="32768" depth="1" cache_linesize="64" cache_associativity="8" cache_type="0">
+                <object type="Core" os_index="5" cpuset="0x20002000" complete_cpuset="0x20002000" online_cpuset="0x20002000" allowed_cpuset="0x20002000" nodeset="0x00000002" complete_nodeset="0x00000002" allowed_nodeset="0x00000002">
+                  <object type="PU" os_index="13" cpuset="0x00002000" complete_cpuset="0x00002000" online_cpuset="0x00002000" allowed_cpuset="0x00002000" nodeset="0x00000002" complete_nodeset="0x00000002" allowed_nodeset="0x00000002"/>
+                  <object type="PU" os_index="29" cpuset="0x20000000" complete_cpuset="0x20000000" online_cpuset="0x20000000" allowed_cpuset="0x20000000" nodeset="0x00000002" complete_nodeset="0x00000002" allowed_nodeset="0x00000002"/>
+                </object>
+              </object>
+            </object>
+            <object type="Cache" cpuset="0x40004000" complete_cpuset="0x40004000" online_cpuset="0x40004000" allowed_cpuset="0x40004000" nodeset="0x00000002" complete_nodeset="0x00000002" allowed_nodeset="0x00000002" cache_size="262144" depth="2" cache_linesize="64" cache_associativity="8" cache_type="0">
+              <object type="Cache" cpuset="0x40004000" complete_cpuset="0x40004000" online_cpuset="0x40004000" allowed_cpuset="0x40004000" nodeset="0x00000002" complete_nodeset="0x00000002" allowed_nodeset="0x00000002" cache_size="32768" depth="1" cache_linesize="64" cache_associativity="8" cache_type="0">
+                <object type="Core" os_index="6" cpuset="0x40004000" complete_cpuset="0x40004000" online_cpuset="0x40004000" allowed_cpuset="0x40004000" nodeset="0x00000002" complete_nodeset="0x00000002" allowed_nodeset="0x00000002">
+                  <object type="PU" os_index="14" cpuset="0x00004000" complete_cpuset="0x00004000" online_cpuset="0x00004000" allowed_cpuset="0x00004000" nodeset="0x00000002" complete_nodeset="0x00000002" allowed_nodeset="0x00000002"/>
+                  <object type="PU" os_index="30" cpuset="0x40000000" complete_cpuset="0x40000000" online_cpuset="0x40000000" allowed_cpuset="0x40000000" nodeset="0x00000002" complete_nodeset="0x00000002" allowed_nodeset="0x00000002"/>
+                </object>
+              </object>
+            </object>
+            <object type="Cache" cpuset="0x80008000" complete_cpuset="0x80008000" online_cpuset="0x80008000" allowed_cpuset="0x80008000" nodeset="0x00000002" complete_nodeset="0x00000002" allowed_nodeset="0x00000002" cache_size="262144" depth="2" cache_linesize="64" cache_associativity="8" cache_type="0">
+              <object type="Cache" cpuset="0x80008000" complete_cpuset="0x80008000" online_cpuset="0x80008000" allowed_cpuset="0x80008000" nodeset="0x00000002" complete_nodeset="0x00000002" allowed_nodeset="0x00000002" cache_size="32768" depth="1" cache_linesize="64" cache_associativity="8" cache_type="0">
+                <object type="Core" os_index="7" cpuset="0x80008000" complete_cpuset="0x80008000" online_cpuset="0x80008000" allowed_cpuset="0x80008000" nodeset="0x00000002" complete_nodeset="0x00000002" allowed_nodeset="0x00000002">
+                  <object type="PU" os_index="15" cpuset="0x00008000" complete_cpuset="0x00008000" online_cpuset="0x00008000" allowed_cpuset="0x00008000" nodeset="0x00000002" complete_nodeset="0x00000002" allowed_nodeset="0x00000002"/>
+                  <object type="PU" os_index="31" cpuset="0x80000000" complete_cpuset="0x80000000" online_cpuset="0x80000000" allowed_cpuset="0x80000000" nodeset="0x00000002" complete_nodeset="0x00000002" allowed_nodeset="0x00000002"/>
+                </object>
+              </object>
+            </object>
+          </object>
+        </object>
+        <object type="Bridge" os_index="2" bridge_type="0-1" depth="0" bridge_pci="0000:[80-84]">
+          <object type="Bridge" os_index="524304" name="Intel Corporation Xeon E5/Core i7 IIO PCI Express Root Port 1a" bridge_type="1-1" depth="0" bridge_pci="0000:[81-82]" pci_busid="0000:80:01.0" pci_type="0604 [8086:3c02] [0000:0000] 07" pci_link_speed="0.000000">
+            <info name="PCIVendor" value="Intel Corporation"/>
+            <info name="PCIDevice" value="Xeon E5/Core i7 IIO PCI Express Root Port 1a"/>
+            <object type="PCIDev" os_index="528384" name="Intel Corporation I350 Gigabit Network Connection" pci_busid="0000:81:00.0" pci_type="0200 [8086:1521] [00d9:0021] 01" pci_link_speed="0.000000">
+              <info name="PCIVendor" value="Intel Corporation"/>
+              <info name="PCIDevice" value="I350 Gigabit Network Connection"/>
+              <object type="OSDev" name="eth0" osdev_type="2">
+                <info name="Address" value="00:25:90:95:71:12"/>
+              </object>
+            </object>
+            <object type="PCIDev" os_index="528385" name="Intel Corporation I350 Gigabit Network Connection" pci_busid="0000:81:00.1" pci_type="0200 [8086:1521] [00d9:0021] 01" pci_link_speed="0.000000">
+              <info name="PCIVendor" value="Intel Corporation"/>
+              <info name="PCIDevice" value="I350 Gigabit Network Connection"/>
+              <object type="OSDev" name="eth1" osdev_type="2">
+                <info name="Address" value="00:25:90:95:71:13"/>
+              </object>
+            </object>
+          </object>
+          <object type="Bridge" os_index="524320" name="Intel Corporation Xeon E5/Core i7 IIO PCI Express Root Port 2a" bridge_type="1-1" depth="0" bridge_pci="0000:[83-83]" pci_busid="0000:80:02.0" pci_type="0604 [8086:3c04] [001f:0000] 07" pci_link_speed="0.000000">
+            <info name="PCIVendor" value="Intel Corporation"/>
+            <info name="PCIDevice" value="Xeon E5/Core i7 IIO PCI Express Root Port 2a"/>
+            <object type="PCIDev" os_index="536576" name="NVIDIA Corporation Tesla M2075 Dual-Slot Computing Processor Module" pci_busid="0000:83:00.0" pci_type="0302 [10de:1094] [00de:0088] a1" pci_link_speed="0.000000">
+              <info name="PCIVendor" value="NVIDIA Corporation"/>
+              <info name="PCIDevice" value="Tesla M2075 Dual-Slot Computing Processor Module"/>
+            </object>
+          </object>
+          <object type="Bridge" os_index="524336" name="Intel Corporation Xeon E5/Core i7 IIO PCI Express Root Port 3a in PCI Express Mode" bridge_type="1-1" depth="0" bridge_pci="0000:[84-84]" pci_busid="0000:80:03.0" pci_type="0604 [8086:3c08] [001f:0000] 07" pci_link_speed="0.000000">
+            <info name="PCIVendor" value="Intel Corporation"/>
+            <info name="PCIDevice" value="Xeon E5/Core i7 IIO PCI Express Root Port 3a in PCI Express Mode"/>
+            <object type="PCIDev" os_index="540672" name="NVIDIA Corporation Tesla M2075 Dual-Slot Computing Processor Module" pci_busid="0000:84:00.0" pci_type="0302 [10de:1094] [00de:0088] a1" pci_link_speed="0.000000">
+              <info name="PCIVendor" value="NVIDIA Corporation"/>
+              <info name="PCIDevice" value="Tesla M2075 Dual-Slot Computing Processor Module"/>
+            </object>
+          </object>
+        </object>
+      </object>
+    </object>
+  </object>
+</topology>
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/xml/32em64t-2n8c2t-pci-wholeio.options b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/xml/32em64t-2n8c2t-pci-wholeio.options
new file mode 100644
index 0000000..92298e4
--- /dev/null
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/xml/32em64t-2n8c2t-pci-wholeio.options
@@ -0,0 +1 @@
+--whole-io
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/xml/32em64t-2n8c2t-pci-wholeio.xml b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/xml/32em64t-2n8c2t-pci-wholeio.xml
new file mode 100644
index 0000000..3e5b154
--- /dev/null
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/xml/32em64t-2n8c2t-pci-wholeio.xml
@@ -0,0 +1,767 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE topology SYSTEM "hwloc.dtd">
+<topology>
+  <object type="Machine" os_index="0" cpuset="0xffffffff" complete_cpuset="0xffffffff" online_cpuset="0xffffffff" allowed_cpuset="0xffffffff" nodeset="0x00000003" complete_nodeset="0x00000003" allowed_nodeset="0x00000003">
+    <page_type size="4096" count="0"/>
+    <page_type size="2097152" count="0"/>
+    <info name="DMIProductName" value="X9DRG-HF"/>
+    <info name="DMIProductVersion" value="0123456789"/>
+    <info name="DMIBoardVendor" value="Supermicro"/>
+    <info name="DMIBoardName" value="X9DRG-HF"/>
+    <info name="DMIBoardVersion" value="0123456789"/>
+    <info name="DMIBoardAssetTag" value="To be filled by O.E.M."/>
+    <info name="DMIChassisVendor" value="Supermicro"/>
+    <info name="DMIChassisType" value="3"/>
+    <info name="DMIChassisVersion" value="0123456789"/>
+    <info name="DMIChassisAssetTag" value="To Be Filled By O.E.M."/>
+    <info name="DMIBIOSVendor" value="American Megatrends Inc."/>
+    <info name="DMIBIOSVersion" value="1.0c"/>
+    <info name="DMIBIOSDate" value="08/22/2012"/>
+    <info name="DMISysVendor" value="Supermicro"/>
+    <info name="Backend" value="Linux"/>
+    <info name="OSName" value="Linux"/>
+    <info name="OSRelease" value="3.2.0-4-amd64"/>
+    <info name="OSVersion" value="#1 SMP Debian 3.2.32-1"/>
+    <info name="HostName" value="conan"/>
+    <info name="Architecture" value="x86_64"/>
+    <object type="Group" cpuset="0xffffffff" complete_cpuset="0xffffffff" online_cpuset="0xffffffff" allowed_cpuset="0xffffffff" nodeset="0x00000003" complete_nodeset="0x00000003" allowed_nodeset="0x00000003" depth="0">
+      <distances nbobjs="2" relative_depth="1" latency_base="10.000000">
+        <latency value="1.000000"/>
+        <latency value="2.000000"/>
+        <latency value="2.000000"/>
+        <latency value="1.000000"/>
+      </distances>
+      <object type="NUMANode" os_index="0" cpuset="0x00ff00ff" complete_cpuset="0x00ff00ff" online_cpuset="0x00ff00ff" allowed_cpuset="0x00ff00ff" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001" local_memory="34330173440">
+        <page_type size="4096" count="8381390"/>
+        <page_type size="2097152" count="0"/>
+        <object type="Socket" os_index="0" cpuset="0x00ff00ff" complete_cpuset="0x00ff00ff" online_cpuset="0x00ff00ff" allowed_cpuset="0x00ff00ff" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001">
+          <info name="CPUModel" value="Intel(R) Xeon(R) CPU E5-2650 0 @ 2.00GHz"/>
+          <info name="CPUType" value="x86_64"/>
+          <object type="Cache" cpuset="0x00ff00ff" complete_cpuset="0x00ff00ff" online_cpuset="0x00ff00ff" allowed_cpuset="0x00ff00ff" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001" cache_size="20971520" depth="3" cache_linesize="64" cache_associativity="20" cache_type="0">
+            <object type="Cache" cpuset="0x00010001" complete_cpuset="0x00010001" online_cpuset="0x00010001" allowed_cpuset="0x00010001" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001" cache_size="262144" depth="2" cache_linesize="64" cache_associativity="8" cache_type="0">
+              <object type="Cache" cpuset="0x00010001" complete_cpuset="0x00010001" online_cpuset="0x00010001" allowed_cpuset="0x00010001" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001" cache_size="32768" depth="1" cache_linesize="64" cache_associativity="8" cache_type="0">
+                <object type="Core" os_index="0" cpuset="0x00010001" complete_cpuset="0x00010001" online_cpuset="0x00010001" allowed_cpuset="0x00010001" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001">
+                  <object type="PU" os_index="0" cpuset="0x00000001" complete_cpuset="0x00000001" online_cpuset="0x00000001" allowed_cpuset="0x00000001" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001"/>
+                  <object type="PU" os_index="16" cpuset="0x00010000" complete_cpuset="0x00010000" online_cpuset="0x00010000" allowed_cpuset="0x00010000" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001"/>
+                </object>
+              </object>
+            </object>
+            <object type="Cache" cpuset="0x00020002" complete_cpuset="0x00020002" online_cpuset="0x00020002" allowed_cpuset="0x00020002" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001" cache_size="262144" depth="2" cache_linesize="64" cache_associativity="8" cache_type="0">
+              <object type="Cache" cpuset="0x00020002" complete_cpuset="0x00020002" online_cpuset="0x00020002" allowed_cpuset="0x00020002" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001" cache_size="32768" depth="1" cache_linesize="64" cache_associativity="8" cache_type="0">
+                <object type="Core" os_index="1" cpuset="0x00020002" complete_cpuset="0x00020002" online_cpuset="0x00020002" allowed_cpuset="0x00020002" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001">
+                  <object type="PU" os_index="1" cpuset="0x00000002" complete_cpuset="0x00000002" online_cpuset="0x00000002" allowed_cpuset="0x00000002" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001"/>
+                  <object type="PU" os_index="17" cpuset="0x00020000" complete_cpuset="0x00020000" online_cpuset="0x00020000" allowed_cpuset="0x00020000" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001"/>
+                </object>
+              </object>
+            </object>
+            <object type="Cache" cpuset="0x00040004" complete_cpuset="0x00040004" online_cpuset="0x00040004" allowed_cpuset="0x00040004" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001" cache_size="262144" depth="2" cache_linesize="64" cache_associativity="8" cache_type="0">
+              <object type="Cache" cpuset="0x00040004" complete_cpuset="0x00040004" online_cpuset="0x00040004" allowed_cpuset="0x00040004" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001" cache_size="32768" depth="1" cache_linesize="64" cache_associativity="8" cache_type="0">
+                <object type="Core" os_index="2" cpuset="0x00040004" complete_cpuset="0x00040004" online_cpuset="0x00040004" allowed_cpuset="0x00040004" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001">
+                  <object type="PU" os_index="2" cpuset="0x00000004" complete_cpuset="0x00000004" online_cpuset="0x00000004" allowed_cpuset="0x00000004" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001"/>
+                  <object type="PU" os_index="18" cpuset="0x00040000" complete_cpuset="0x00040000" online_cpuset="0x00040000" allowed_cpuset="0x00040000" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001"/>
+                </object>
+              </object>
+            </object>
+            <object type="Cache" cpuset="0x00080008" complete_cpuset="0x00080008" online_cpuset="0x00080008" allowed_cpuset="0x00080008" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001" cache_size="262144" depth="2" cache_linesize="64" cache_associativity="8" cache_type="0">
+              <object type="Cache" cpuset="0x00080008" complete_cpuset="0x00080008" online_cpuset="0x00080008" allowed_cpuset="0x00080008" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001" cache_size="32768" depth="1" cache_linesize="64" cache_associativity="8" cache_type="0">
+                <object type="Core" os_index="3" cpuset="0x00080008" complete_cpuset="0x00080008" online_cpuset="0x00080008" allowed_cpuset="0x00080008" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001">
+                  <object type="PU" os_index="3" cpuset="0x00000008" complete_cpuset="0x00000008" online_cpuset="0x00000008" allowed_cpuset="0x00000008" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001"/>
+                  <object type="PU" os_index="19" cpuset="0x00080000" complete_cpuset="0x00080000" online_cpuset="0x00080000" allowed_cpuset="0x00080000" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001"/>
+                </object>
+              </object>
+            </object>
+            <object type="Cache" cpuset="0x00100010" complete_cpuset="0x00100010" online_cpuset="0x00100010" allowed_cpuset="0x00100010" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001" cache_size="262144" depth="2" cache_linesize="64" cache_associativity="8" cache_type="0">
+              <object type="Cache" cpuset="0x00100010" complete_cpuset="0x00100010" online_cpuset="0x00100010" allowed_cpuset="0x00100010" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001" cache_size="32768" depth="1" cache_linesize="64" cache_associativity="8" cache_type="0">
+                <object type="Core" os_index="4" cpuset="0x00100010" complete_cpuset="0x00100010" online_cpuset="0x00100010" allowed_cpuset="0x00100010" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001">
+                  <object type="PU" os_index="4" cpuset="0x00000010" complete_cpuset="0x00000010" online_cpuset="0x00000010" allowed_cpuset="0x00000010" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001"/>
+                  <object type="PU" os_index="20" cpuset="0x00100000" complete_cpuset="0x00100000" online_cpuset="0x00100000" allowed_cpuset="0x00100000" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001"/>
+                </object>
+              </object>
+            </object>
+            <object type="Cache" cpuset="0x00200020" complete_cpuset="0x00200020" online_cpuset="0x00200020" allowed_cpuset="0x00200020" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001" cache_size="262144" depth="2" cache_linesize="64" cache_associativity="8" cache_type="0">
+              <object type="Cache" cpuset="0x00200020" complete_cpuset="0x00200020" online_cpuset="0x00200020" allowed_cpuset="0x00200020" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001" cache_size="32768" depth="1" cache_linesize="64" cache_associativity="8" cache_type="0">
+                <object type="Core" os_index="5" cpuset="0x00200020" complete_cpuset="0x00200020" online_cpuset="0x00200020" allowed_cpuset="0x00200020" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001">
+                  <object type="PU" os_index="5" cpuset="0x00000020" complete_cpuset="0x00000020" online_cpuset="0x00000020" allowed_cpuset="0x00000020" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001"/>
+                  <object type="PU" os_index="21" cpuset="0x00200000" complete_cpuset="0x00200000" online_cpuset="0x00200000" allowed_cpuset="0x00200000" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001"/>
+                </object>
+              </object>
+            </object>
+            <object type="Cache" cpuset="0x00400040" complete_cpuset="0x00400040" online_cpuset="0x00400040" allowed_cpuset="0x00400040" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001" cache_size="262144" depth="2" cache_linesize="64" cache_associativity="8" cache_type="0">
+              <object type="Cache" cpuset="0x00400040" complete_cpuset="0x00400040" online_cpuset="0x00400040" allowed_cpuset="0x00400040" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001" cache_size="32768" depth="1" cache_linesize="64" cache_associativity="8" cache_type="0">
+                <object type="Core" os_index="6" cpuset="0x00400040" complete_cpuset="0x00400040" online_cpuset="0x00400040" allowed_cpuset="0x00400040" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001">
+                  <object type="PU" os_index="6" cpuset="0x00000040" complete_cpuset="0x00000040" online_cpuset="0x00000040" allowed_cpuset="0x00000040" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001"/>
+                  <object type="PU" os_index="22" cpuset="0x00400000" complete_cpuset="0x00400000" online_cpuset="0x00400000" allowed_cpuset="0x00400000" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001"/>
+                </object>
+              </object>
+            </object>
+            <object type="Cache" cpuset="0x00800080" complete_cpuset="0x00800080" online_cpuset="0x00800080" allowed_cpuset="0x00800080" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001" cache_size="262144" depth="2" cache_linesize="64" cache_associativity="8" cache_type="0">
+              <object type="Cache" cpuset="0x00800080" complete_cpuset="0x00800080" online_cpuset="0x00800080" allowed_cpuset="0x00800080" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001" cache_size="32768" depth="1" cache_linesize="64" cache_associativity="8" cache_type="0">
+                <object type="Core" os_index="7" cpuset="0x00800080" complete_cpuset="0x00800080" online_cpuset="0x00800080" allowed_cpuset="0x00800080" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001">
+                  <object type="PU" os_index="7" cpuset="0x00000080" complete_cpuset="0x00000080" online_cpuset="0x00000080" allowed_cpuset="0x00000080" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001"/>
+                  <object type="PU" os_index="23" cpuset="0x00800000" complete_cpuset="0x00800000" online_cpuset="0x00800000" allowed_cpuset="0x00800000" nodeset="0x00000001" complete_nodeset="0x00000001" allowed_nodeset="0x00000001"/>
+                </object>
+              </object>
+            </object>
+          </object>
+        </object>
+        <object type="Bridge" os_index="0" bridge_type="0-1" depth="0" bridge_pci="0000:[00-05]">
+          <object type="PCIDev" os_index="0" name="Intel Corporation Xeon E5/Core i7 DMI2" pci_busid="0000:00:00.0" pci_type="0600 [8086:3c00] [00d9:0062] 07" pci_link_speed="0.000000">
+            <info name="PCIVendor" value="Intel Corporation"/>
+            <info name="PCIDevice" value="Xeon E5/Core i7 DMI2"/>
+          </object>
+          <object type="Bridge" os_index="16" name="Intel Corporation Xeon E5/Core i7 IIO PCI Express Root Port 1a" bridge_type="1-1" depth="0" bridge_pci="0000:[01-01]" pci_busid="0000:00:01.0" pci_type="0604 [8086:3c02] [0000:0000] 07" pci_link_speed="0.000000">
+            <info name="PCIVendor" value="Intel Corporation"/>
+            <info name="PCIDevice" value="Xeon E5/Core i7 IIO PCI Express Root Port 1a"/>
+          </object>
+          <object type="Bridge" os_index="32" name="Intel Corporation Xeon E5/Core i7 IIO PCI Express Root Port 2a" bridge_type="1-1" depth="0" bridge_pci="0000:[02-02]" pci_busid="0000:00:02.0" pci_type="0604 [8086:3c04] [0000:0000] 07" pci_link_speed="0.000000">
+            <info name="PCIVendor" value="Intel Corporation"/>
+            <info name="PCIDevice" value="Xeon E5/Core i7 IIO PCI Express Root Port 2a"/>
+          </object>
+          <object type="Bridge" os_index="48" name="Intel Corporation Xeon E5/Core i7 IIO PCI Express Root Port 3a in PCI Express Mode" bridge_type="1-1" depth="0" bridge_pci="0000:[03-03]" pci_busid="0000:00:03.0" pci_type="0604 [8086:3c08] [000f:0000] 07" pci_link_speed="0.000000">
+            <info name="PCIVendor" value="Intel Corporation"/>
+            <info name="PCIDevice" value="Xeon E5/Core i7 IIO PCI Express Root Port 3a in PCI Express Mode"/>
+            <object type="PCIDev" os_index="12288" name="NVIDIA Corporation Tesla M2075 Dual-Slot Computing Processor Module" pci_busid="0000:03:00.0" pci_type="0302 [10de:1094] [00de:0088] a1" pci_link_speed="0.000000">
+              <info name="PCIVendor" value="NVIDIA Corporation"/>
+              <info name="PCIDevice" value="Tesla M2075 Dual-Slot Computing Processor Module"/>
+            </object>
+          </object>
+          <object type="PCIDev" os_index="64" name="Intel Corporation Xeon E5/Core i7 DMA Channel 0" pci_busid="0000:00:04.0" pci_type="0880 [8086:3c20] [00d9:0062] 07" pci_link_speed="0.000000">
+            <info name="PCIVendor" value="Intel Corporation"/>
+            <info name="PCIDevice" value="Xeon E5/Core i7 DMA Channel 0"/>
+            <object type="OSDev" name="dma0chan0" osdev_type="4"/>
+          </object>
+          <object type="PCIDev" os_index="65" name="Intel Corporation Xeon E5/Core i7 DMA Channel 1" pci_busid="0000:00:04.1" pci_type="0880 [8086:3c21] [00d9:0062] 07" pci_link_speed="0.000000">
+            <info name="PCIVendor" value="Intel Corporation"/>
+            <info name="PCIDevice" value="Xeon E5/Core i7 DMA Channel 1"/>
+            <object type="OSDev" name="dma1chan0" osdev_type="4"/>
+          </object>
+          <object type="PCIDev" os_index="66" name="Intel Corporation Xeon E5/Core i7 DMA Channel 2" pci_busid="0000:00:04.2" pci_type="0880 [8086:3c22] [00d9:0062] 07" pci_link_speed="0.000000">
+            <info name="PCIVendor" value="Intel Corporation"/>
+            <info name="PCIDevice" value="Xeon E5/Core i7 DMA Channel 2"/>
+            <object type="OSDev" name="dma2chan0" osdev_type="4"/>
+          </object>
+          <object type="PCIDev" os_index="67" name="Intel Corporation Xeon E5/Core i7 DMA Channel 3" pci_busid="0000:00:04.3" pci_type="0880 [8086:3c23] [00d9:0062] 07" pci_link_speed="0.000000">
+            <info name="PCIVendor" value="Intel Corporation"/>
+            <info name="PCIDevice" value="Xeon E5/Core i7 DMA Channel 3"/>
+            <object type="OSDev" name="dma3chan0" osdev_type="4"/>
+          </object>
+          <object type="PCIDev" os_index="68" name="Intel Corporation Xeon E5/Core i7 DMA Channel 4" pci_busid="0000:00:04.4" pci_type="0880 [8086:3c24] [00d9:0062] 07" pci_link_speed="0.000000">
+            <info name="PCIVendor" value="Intel Corporation"/>
+            <info name="PCIDevice" value="Xeon E5/Core i7 DMA Channel 4"/>
+            <object type="OSDev" name="dma4chan0" osdev_type="4"/>
+          </object>
+          <object type="PCIDev" os_index="69" name="Intel Corporation Xeon E5/Core i7 DMA Channel 5" pci_busid="0000:00:04.5" pci_type="0880 [8086:3c25] [00d9:0062] 07" pci_link_speed="0.000000">
+            <info name="PCIVendor" value="Intel Corporation"/>
+            <info name="PCIDevice" value="Xeon E5/Core i7 DMA Channel 5"/>
+            <object type="OSDev" name="dma5chan0" osdev_type="4"/>
+          </object>
+          <object type="PCIDev" os_index="70" name="Intel Corporation Xeon E5/Core i7 DMA Channel 6" pci_busid="0000:00:04.6" pci_type="0880 [8086:3c26] [00d9:0062] 07" pci_link_speed="0.000000">
+            <info name="PCIVendor" value="Intel Corporation"/>
+            <info name="PCIDevice" value="Xeon E5/Core i7 DMA Channel 6"/>
+            <object type="OSDev" name="dma6chan0" osdev_type="4"/>
+          </object>
+          <object type="PCIDev" os_index="71" name="Intel Corporation Xeon E5/Core i7 DMA Channel 7" pci_busid="0000:00:04.7" pci_type="0880 [8086:3c27] [00d9:0062] 07" pci_link_speed="0.000000">
+            <info name="PCIVendor" value="Intel Corporation"/>
+            <info name="PCIDevice" value="Xeon E5/Core i7 DMA Channel 7"/>
+            <object type="OSDev" name="dma7chan0" osdev_type="4"/>
+          </object>
+          <object type="PCIDev" os_index="80" name="Intel Corporation Xeon E5/Core i7 Address Map, VTd_Misc, System Management" pci_busid="0000:00:05.0" pci_type="0880 [8086:3c28] [00d9:0062] 07" pci_link_speed="0.000000">
+            <info name="PCIVendor" value="Intel Corporation"/>
+            <info name="PCIDevice" value="Xeon E5/Core i7 Address Map, VTd_Misc, System Management"/>
+          </object>
+          <object type="PCIDev" os_index="82" name="Intel Corporation Xeon E5/Core i7 Control Status and Global Errors" pci_busid="0000:00:05.2" pci_type="0880 [8086:3c2a] [00d9:0062] 07" pci_link_speed="0.000000">
+            <info name="PCIVendor" value="Intel Corporation"/>
+            <info name="PCIDevice" value="Xeon E5/Core i7 Control Status and Global Errors"/>
+          </object>
+          <object type="PCIDev" os_index="84" name="Intel Corporation Xeon E5/Core i7 I/O APIC" pci_busid="0000:00:05.4" pci_type="0800 [8086:3c2c] [00d9:0062] 07" pci_link_speed="0.000000">
+            <info name="PCIVendor" value="Intel Corporation"/>
+            <info name="PCIDevice" value="Xeon E5/Core i7 I/O APIC"/>
+          </object>
+          <object type="Bridge" os_index="272" name="Intel Corporation C600/X79 series chipset PCI Express Virtual Root Port" bridge_type="1-1" depth="0" bridge_pci="0000:[04-04]" pci_busid="0000:00:11.0" pci_type="0604 [8086:1d3e] [000f:0000] 06" pci_link_speed="0.000000">
+            <info name="PCIVendor" value="Intel Corporation"/>
+            <info name="PCIDevice" value="C600/X79 series chipset PCI Express Virtual Root Port"/>
+            <object type="PCIDev" os_index="16384" name="Intel Corporation C602 chipset 4-Port SATA Storage Control Unit" pci_busid="0000:04:00.0" pci_type="0107 [8086:1d6b] [00d9:0062] 06" pci_link_speed="0.000000">
+              <info name="PCIVendor" value="Intel Corporation"/>
+              <info name="PCIDevice" value="C602 chipset 4-Port SATA Storage Control Unit"/>
+            </object>
+          </object>
+          <object type="PCIDev" os_index="352" name="Intel Corporation C600/X79 series chipset MEI Controller #1" pci_busid="0000:00:16.0" pci_type="0780 [8086:1d3a] [00d9:0062] 05" pci_link_speed="0.000000">
+            <info name="PCIVendor" value="Intel Corporation"/>
+            <info name="PCIDevice" value="C600/X79 series chipset MEI Controller #1"/>
+          </object>
+          <object type="PCIDev" os_index="353" name="Intel Corporation C600/X79 series chipset MEI Controller #2" pci_busid="0000:00:16.1" pci_type="0780 [8086:1d3b] [00d9:0062] 05" pci_link_speed="0.000000">
+            <info name="PCIVendor" value="Intel Corporation"/>
+            <info name="PCIDevice" value="C600/X79 series chipset MEI Controller #2"/>
+          </object>
+          <object type="PCIDev" os_index="416" name="Intel Corporation C600/X79 series chipset USB2 Enhanced Host Controller #2" pci_busid="0000:00:1a.0" pci_type="0c03 [8086:1d2d] [00d9:0062] 06" pci_link_speed="0.000000">
+            <info name="PCIVendor" value="Intel Corporation"/>
+            <info name="PCIDevice" value="C600/X79 series chipset USB2 Enhanced Host Controller #2"/>
+          </object>
+          <object type="PCIDev" os_index="464" name="Intel Corporation C600/X79 series chipset USB2 Enhanced Host Controller #1" pci_busid="0000:00:1d.0" pci_type="0c03 [8086:1d26] [00d9:0062] 06" pci_link_speed="0.000000">
+            <info name="PCIVendor" value="Intel Corporation"/>
+            <info name="PCIDevice" value="C600/X79 series chipset USB2 Enhanced Host Controller #1"/>
+          </object>
+          <object type="Bridge" os_index="480" name="Intel Corporation 82801 PCI Bridge" bridge_type="1-1" depth="0" bridge_pci="0000:[05-05]" pci_busid="0000:00:1e.0" pci_type="0604 [8086:244e] [0000:0000] a6" pci_link_speed="0.000000">
+            <info name="PCIVendor" value="Intel Corporation"/>
+            <info name="PCIDevice" value="82801 PCI Bridge"/>
+            <object type="PCIDev" os_index="20528" name="Matrox Electronics Systems Ltd. MGA G200eW WPCM450" pci_busid="0000:05:03.0" pci_type="0300 [102b:0532] [00d9:0062] 0a" pci_link_speed="0.000000">
+              <info name="PCIVendor" value="Matrox Electronics Systems Ltd."/>
+              <info name="PCIDevice" value="MGA G200eW WPCM450"/>
+            </object>
+          </object>
+          <object type="PCIDev" os_index="496" name="Intel Corporation C600/X79 series chipset LPC Controller" pci_busid="0000:00:1f.0" pci_type="0601 [8086:1d41] [00d9:0062] 06" pci_link_speed="0.000000">
+            <info name="PCIVendor" value="Intel Corporation"/>
+            <info name="PCIDevice" value="C600/X79 series chipset LPC Controller"/>
+          </object>
+          <object type="PCIDev" os_index="498" name="Intel Corporation C600/X79 series chipset 6-Port SATA AHCI Controller" pci_busid="0000:00:1f.2" pci_type="0106 [8086:1d02] [00d9:0062] 06" pci_link_speed="0.000000">
+            <info name="PCIVendor" value="Intel Corporation"/>
+            <info name="PCIDevice" value="C600/X79 series chipset 6-Port SATA AHCI Controller"/>
+            <object type="OSDev" name="sda" osdev_type="0"/>
+          </object>
+          <object type="PCIDev" os_index="499" name="Intel Corporation C600/X79 series chipset SMBus Host Controller" pci_busid="0000:00:1f.3" pci_type="0c05 [8086:1d22] [00d9:0062] 06" pci_link_speed="0.000000">
+            <info name="PCIVendor" value="Intel Corporation"/>
+            <info name="PCIDevice" value="C600/X79 series chipset SMBus Host Controller"/>
+          </object>
+          <object type="PCIDev" os_index="502" name="Intel Corporation C600/X79 series chipset Thermal Management Controller" pci_busid="0000:00:1f.6" pci_type="1180 [8086:1d24] [00d9:0062] 06" pci_link_speed="0.000000">
+            <info name="PCIVendor" value="Intel Corporation"/>
+            <info name="PCIDevice" value="C600/X79 series chipset Thermal Management Controller"/>
+          </object>
+        </object>
+      </object>
+      <object type="NUMANode" os_index="1" cpuset="0xff00ff00" complete_cpuset="0xff00ff00" online_cpuset="0xff00ff00" allowed_cpuset="0xff00ff00" nodeset="0x00000002" complete_nodeset="0x00000002" allowed_nodeset="0x00000002" local_memory="34359738368">
+        <page_type size="4096" count="8388608"/>
+        <page_type size="2097152" count="0"/>
+        <object type="Socket" os_index="1" cpuset="0xff00ff00" complete_cpuset="0xff00ff00" online_cpuset="0xff00ff00" allowed_cpuset="0xff00ff00" nodeset="0x00000002" complete_nodeset="0x00000002" allowed_nodeset="0x00000002">
+          <info name="CPUModel" value="Intel(R) Xeon(R) CPU E5-2650 0 @ 2.00GHz"/>
+          <info name="CPUType" value="x86_64"/>
+          <object type="Cache" cpuset="0xff00ff00" complete_cpuset="0xff00ff00" online_cpuset="0xff00ff00" allowed_cpuset="0xff00ff00" nodeset="0x00000002" complete_nodeset="0x00000002" allowed_nodeset="0x00000002" cache_size="20971520" depth="3" cache_linesize="64" cache_associativity="20" cache_type="0">
+            <object type="Cache" cpuset="0x01000100" complete_cpuset="0x01000100" online_cpuset="0x01000100" allowed_cpuset="0x01000100" nodeset="0x00000002" complete_nodeset="0x00000002" allowed_nodeset="0x00000002" cache_size="262144" depth="2" cache_linesize="64" cache_associativity="8" cache_type="0">
+              <object type="Cache" cpuset="0x01000100" complete_cpuset="0x01000100" online_cpuset="0x01000100" allowed_cpuset="0x01000100" nodeset="0x00000002" complete_nodeset="0x00000002" allowed_nodeset="0x00000002" cache_size="32768" depth="1" cache_linesize="64" cache_associativity="8" cache_type="0">
+                <object type="Core" os_index="0" cpuset="0x01000100" complete_cpuset="0x01000100" online_cpuset="0x01000100" allowed_cpuset="0x01000100" nodeset="0x00000002" complete_nodeset="0x00000002" allowed_nodeset="0x00000002">
+                  <object type="PU" os_index="8" cpuset="0x00000100" complete_cpuset="0x00000100" online_cpuset="0x00000100" allowed_cpuset="0x00000100" nodeset="0x00000002" complete_nodeset="0x00000002" allowed_nodeset="0x00000002"/>
+                  <object type="PU" os_index="24" cpuset="0x01000000" complete_cpuset="0x01000000" online_cpuset="0x01000000" allowed_cpuset="0x01000000" nodeset="0x00000002" complete_nodeset="0x00000002" allowed_nodeset="0x00000002"/>
+                </object>
+              </object>
+            </object>
+            <object type="Cache" cpuset="0x02000200" complete_cpuset="0x02000200" online_cpuset="0x02000200" allowed_cpuset="0x02000200" nodeset="0x00000002" complete_nodeset="0x00000002" allowed_nodeset="0x00000002" cache_size="262144" depth="2" cache_linesize="64" cache_associativity="8" cache_type="0">
+              <object type="Cache" cpuset="0x02000200" complete_cpuset="0x02000200" online_cpuset="0x02000200" allowed_cpuset="0x02000200" nodeset="0x00000002" complete_nodeset="0x00000002" allowed_nodeset="0x00000002" cache_size="32768" depth="1" cache_linesize="64" cache_associativity="8" cache_type="0">
+                <object type="Core" os_index="1" cpuset="0x02000200" complete_cpuset="0x02000200" online_cpuset="0x02000200" allowed_cpuset="0x02000200" nodeset="0x00000002" complete_nodeset="0x00000002" allowed_nodeset="0x00000002">
+                  <object type="PU" os_index="9" cpuset="0x00000200" complete_cpuset="0x00000200" online_cpuset="0x00000200" allowed_cpuset="0x00000200" nodeset="0x00000002" complete_nodeset="0x00000002" allowed_nodeset="0x00000002"/>
+                  <object type="PU" os_index="25" cpuset="0x02000000" complete_cpuset="0x02000000" online_cpuset="0x02000000" allowed_cpuset="0x02000000" nodeset="0x00000002" complete_nodeset="0x00000002" allowed_nodeset="0x00000002"/>
+                </object>
+              </object>
+            </object>
+            <object type="Cache" cpuset="0x04000400" complete_cpuset="0x04000400" online_cpuset="0x04000400" allowed_cpuset="0x04000400" nodeset="0x00000002" complete_nodeset="0x00000002" allowed_nodeset="0x00000002" cache_size="262144" depth="2" cache_linesize="64" cache_associativity="8" cache_type="0">
+              <object type="Cache" cpuset="0x04000400" complete_cpuset="0x04000400" online_cpuset="0x04000400" allowed_cpuset="0x04000400" nodeset="0x00000002" complete_nodeset="0x00000002" allowed_nodeset="0x00000002" cache_size="32768" depth="1" cache_linesize="64" cache_associativity="8" cache_type="0">
+                <object type="Core" os_index="2" cpuset="0x04000400" complete_cpuset="0x04000400" online_cpuset="0x04000400" allowed_cpuset="0x04000400" nodeset="0x00000002" complete_nodeset="0x00000002" allowed_nodeset="0x00000002">
+                  <object type="PU" os_index="10" cpuset="0x00000400" complete_cpuset="0x00000400" online_cpuset="0x00000400" allowed_cpuset="0x00000400" nodeset="0x00000002" complete_nodeset="0x00000002" allowed_nodeset="0x00000002"/>
+                  <object type="PU" os_index="26" cpuset="0x04000000" complete_cpuset="0x04000000" online_cpuset="0x04000000" allowed_cpuset="0x04000000" nodeset="0x00000002" complete_nodeset="0x00000002" allowed_nodeset="0x00000002"/>
+                </object>
+              </object>
+            </object>
+            <object type="Cache" cpuset="0x08000800" complete_cpuset="0x08000800" online_cpuset="0x08000800" allowed_cpuset="0x08000800" nodeset="0x00000002" complete_nodeset="0x00000002" allowed_nodeset="0x00000002" cache_size="262144" depth="2" cache_linesize="64" cache_associativity="8" cache_type="0">
+              <object type="Cache" cpuset="0x08000800" complete_cpuset="0x08000800" online_cpuset="0x08000800" allowed_cpuset="0x08000800" nodeset="0x00000002" complete_nodeset="0x00000002" allowed_nodeset="0x00000002" cache_size="32768" depth="1" cache_linesize="64" cache_associativity="8" cache_type="0">
+                <object type="Core" os_index="3" cpuset="0x08000800" complete_cpuset="0x08000800" online_cpuset="0x08000800" allowed_cpuset="0x08000800" nodeset="0x00000002" complete_nodeset="0x00000002" allowed_nodeset="0x00000002">
+                  <object type="PU" os_index="11" cpuset="0x00000800" complete_cpuset="0x00000800" online_cpuset="0x00000800" allowed_cpuset="0x00000800" nodeset="0x00000002" complete_nodeset="0x00000002" allowed_nodeset="0x00000002"/>
+                  <object type="PU" os_index="27" cpuset="0x08000000" complete_cpuset="0x08000000" online_cpuset="0x08000000" allowed_cpuset="0x08000000" nodeset="0x00000002" complete_nodeset="0x00000002" allowed_nodeset="0x00000002"/>
+                </object>
+              </object>
+            </object>
+            <object type="Cache" cpuset="0x10001000" complete_cpuset="0x10001000" online_cpuset="0x10001000" allowed_cpuset="0x10001000" nodeset="0x00000002" complete_nodeset="0x00000002" allowed_nodeset="0x00000002" cache_size="262144" depth="2" cache_linesize="64" cache_associativity="8" cache_type="0">
+              <object type="Cache" cpuset="0x10001000" complete_cpuset="0x10001000" online_cpuset="0x10001000" allowed_cpuset="0x10001000" nodeset="0x00000002" complete_nodeset="0x00000002" allowed_nodeset="0x00000002" cache_size="32768" depth="1" cache_linesize="64" cache_associativity="8" cache_type="0">
+                <object type="Core" os_index="4" cpuset="0x10001000" complete_cpuset="0x10001000" online_cpuset="0x10001000" allowed_cpuset="0x10001000" nodeset="0x00000002" complete_nodeset="0x00000002" allowed_nodeset="0x00000002">
+                  <object type="PU" os_index="12" cpuset="0x00001000" complete_cpuset="0x00001000" online_cpuset="0x00001000" allowed_cpuset="0x00001000" nodeset="0x00000002" complete_nodeset="0x00000002" allowed_nodeset="0x00000002"/>
+                  <object type="PU" os_index="28" cpuset="0x10000000" complete_cpuset="0x10000000" online_cpuset="0x10000000" allowed_cpuset="0x10000000" nodeset="0x00000002" complete_nodeset="0x00000002" allowed_nodeset="0x00000002"/>
+                </object>
+              </object>
+            </object>
+            <object type="Cache" cpuset="0x20002000" complete_cpuset="0x20002000" online_cpuset="0x20002000" allowed_cpuset="0x20002000" nodeset="0x00000002" complete_nodeset="0x00000002" allowed_nodeset="0x00000002" cache_size="262144" depth="2" cache_linesize="64" cache_associativity="8" cache_type="0">
+              <object type="Cache" cpuset="0x20002000" complete_cpuset="0x20002000" online_cpuset="0x20002000" allowed_cpuset="0x20002000" nodeset="0x00000002" complete_nodeset="0x00000002" allowed_nodeset="0x00000002" cache_size="32768" depth="1" cache_linesize="64" cache_associativity="8" cache_type="0">
+                <object type="Core" os_index="5" cpuset="0x20002000" complete_cpuset="0x20002000" online_cpuset="0x20002000" allowed_cpuset="0x20002000" nodeset="0x00000002" complete_nodeset="0x00000002" allowed_nodeset="0x00000002">
+                  <object type="PU" os_index="13" cpuset="0x00002000" complete_cpuset="0x00002000" online_cpuset="0x00002000" allowed_cpuset="0x00002000" nodeset="0x00000002" complete_nodeset="0x00000002" allowed_nodeset="0x00000002"/>
+                  <object type="PU" os_index="29" cpuset="0x20000000" complete_cpuset="0x20000000" online_cpuset="0x20000000" allowed_cpuset="0x20000000" nodeset="0x00000002" complete_nodeset="0x00000002" allowed_nodeset="0x00000002"/>
+                </object>
+              </object>
+            </object>
+            <object type="Cache" cpuset="0x40004000" complete_cpuset="0x40004000" online_cpuset="0x40004000" allowed_cpuset="0x40004000" nodeset="0x00000002" complete_nodeset="0x00000002" allowed_nodeset="0x00000002" cache_size="262144" depth="2" cache_linesize="64" cache_associativity="8" cache_type="0">
+              <object type="Cache" cpuset="0x40004000" complete_cpuset="0x40004000" online_cpuset="0x40004000" allowed_cpuset="0x40004000" nodeset="0x00000002" complete_nodeset="0x00000002" allowed_nodeset="0x00000002" cache_size="32768" depth="1" cache_linesize="64" cache_associativity="8" cache_type="0">
+                <object type="Core" os_index="6" cpuset="0x40004000" complete_cpuset="0x40004000" online_cpuset="0x40004000" allowed_cpuset="0x40004000" nodeset="0x00000002" complete_nodeset="0x00000002" allowed_nodeset="0x00000002">
+                  <object type="PU" os_index="14" cpuset="0x00004000" complete_cpuset="0x00004000" online_cpuset="0x00004000" allowed_cpuset="0x00004000" nodeset="0x00000002" complete_nodeset="0x00000002" allowed_nodeset="0x00000002"/>
+                  <object type="PU" os_index="30" cpuset="0x40000000" complete_cpuset="0x40000000" online_cpuset="0x40000000" allowed_cpuset="0x40000000" nodeset="0x00000002" complete_nodeset="0x00000002" allowed_nodeset="0x00000002"/>
+                </object>
+              </object>
+            </object>
+            <object type="Cache" cpuset="0x80008000" complete_cpuset="0x80008000" online_cpuset="0x80008000" allowed_cpuset="0x80008000" nodeset="0x00000002" complete_nodeset="0x00000002" allowed_nodeset="0x00000002" cache_size="262144" depth="2" cache_linesize="64" cache_associativity="8" cache_type="0">
+              <object type="Cache" cpuset="0x80008000" complete_cpuset="0x80008000" online_cpuset="0x80008000" allowed_cpuset="0x80008000" nodeset="0x00000002" complete_nodeset="0x00000002" allowed_nodeset="0x00000002" cache_size="32768" depth="1" cache_linesize="64" cache_associativity="8" cache_type="0">
+                <object type="Core" os_index="7" cpuset="0x80008000" complete_cpuset="0x80008000" online_cpuset="0x80008000" allowed_cpuset="0x80008000" nodeset="0x00000002" complete_nodeset="0x00000002" allowed_nodeset="0x00000002">
+                  <object type="PU" os_index="15" cpuset="0x00008000" complete_cpuset="0x00008000" online_cpuset="0x00008000" allowed_cpuset="0x00008000" nodeset="0x00000002" complete_nodeset="0x00000002" allowed_nodeset="0x00000002"/>
+                  <object type="PU" os_index="31" cpuset="0x80000000" complete_cpuset="0x80000000" online_cpuset="0x80000000" allowed_cpuset="0x80000000" nodeset="0x00000002" complete_nodeset="0x00000002" allowed_nodeset="0x00000002"/>
+                </object>
+              </object>
+            </object>
+          </object>
+        </object>
+        <object type="Bridge" os_index="2" bridge_type="0-1" depth="0" bridge_pci="0000:[80-84]">
+          <object type="Bridge" os_index="524304" name="Intel Corporation Xeon E5/Core i7 IIO PCI Express Root Port 1a" bridge_type="1-1" depth="0" bridge_pci="0000:[81-82]" pci_busid="0000:80:01.0" pci_type="0604 [8086:3c02] [0000:0000] 07" pci_link_speed="0.000000">
+            <info name="PCIVendor" value="Intel Corporation"/>
+            <info name="PCIDevice" value="Xeon E5/Core i7 IIO PCI Express Root Port 1a"/>
+            <object type="PCIDev" os_index="528384" name="Intel Corporation I350 Gigabit Network Connection" pci_busid="0000:81:00.0" pci_type="0200 [8086:1521] [00d9:0021] 01" pci_link_speed="0.000000">
+              <info name="PCIVendor" value="Intel Corporation"/>
+              <info name="PCIDevice" value="I350 Gigabit Network Connection"/>
+              <object type="OSDev" name="eth0" osdev_type="2">
+                <info name="Address" value="00:25:90:95:71:12"/>
+              </object>
+            </object>
+            <object type="PCIDev" os_index="528385" name="Intel Corporation I350 Gigabit Network Connection" pci_busid="0000:81:00.1" pci_type="0200 [8086:1521] [00d9:0021] 01" pci_link_speed="0.000000">
+              <info name="PCIVendor" value="Intel Corporation"/>
+              <info name="PCIDevice" value="I350 Gigabit Network Connection"/>
+              <object type="OSDev" name="eth1" osdev_type="2">
+                <info name="Address" value="00:25:90:95:71:13"/>
+              </object>
+            </object>
+          </object>
+          <object type="Bridge" os_index="524320" name="Intel Corporation Xeon E5/Core i7 IIO PCI Express Root Port 2a" bridge_type="1-1" depth="0" bridge_pci="0000:[83-83]" pci_busid="0000:80:02.0" pci_type="0604 [8086:3c04] [001f:0000] 07" pci_link_speed="0.000000">
+            <info name="PCIVendor" value="Intel Corporation"/>
+            <info name="PCIDevice" value="Xeon E5/Core i7 IIO PCI Express Root Port 2a"/>
+            <object type="PCIDev" os_index="536576" name="NVIDIA Corporation Tesla M2075 Dual-Slot Computing Processor Module" pci_busid="0000:83:00.0" pci_type="0302 [10de:1094] [00de:0088] a1" pci_link_speed="0.000000">
+              <info name="PCIVendor" value="NVIDIA Corporation"/>
+              <info name="PCIDevice" value="Tesla M2075 Dual-Slot Computing Processor Module"/>
+            </object>
+          </object>
+          <object type="Bridge" os_index="524336" name="Intel Corporation Xeon E5/Core i7 IIO PCI Express Root Port 3a in PCI Express Mode" bridge_type="1-1" depth="0" bridge_pci="0000:[84-84]" pci_busid="0000:80:03.0" pci_type="0604 [8086:3c08] [001f:0000] 07" pci_link_speed="0.000000">
+            <info name="PCIVendor" value="Intel Corporation"/>
+            <info name="PCIDevice" value="Xeon E5/Core i7 IIO PCI Express Root Port 3a in PCI Express Mode"/>
+            <object type="PCIDev" os_index="540672" name="NVIDIA Corporation Tesla M2075 Dual-Slot Computing Processor Module" pci_busid="0000:84:00.0" pci_type="0302 [10de:1094] [00de:0088] a1" pci_link_speed="0.000000">
+              <info name="PCIVendor" value="NVIDIA Corporation"/>
+              <info name="PCIDevice" value="Tesla M2075 Dual-Slot Computing Processor Module"/>
+            </object>
+          </object>
+          <object type="PCIDev" os_index="524352" name="Intel Corporation Xeon E5/Core i7 DMA Channel 0" pci_busid="0000:80:04.0" pci_type="0880 [8086:3c20] [00d9:0062] 07" pci_link_speed="0.000000">
+            <info name="PCIVendor" value="Intel Corporation"/>
+            <info name="PCIDevice" value="Xeon E5/Core i7 DMA Channel 0"/>
+            <object type="OSDev" name="dma8chan0" osdev_type="4"/>
+          </object>
+          <object type="PCIDev" os_index="524353" name="Intel Corporation Xeon E5/Core i7 DMA Channel 1" pci_busid="0000:80:04.1" pci_type="0880 [8086:3c21] [00d9:0062] 07" pci_link_speed="0.000000">
+            <info name="PCIVendor" value="Intel Corporation"/>
+            <info name="PCIDevice" value="Xeon E5/Core i7 DMA Channel 1"/>
+            <object type="OSDev" name="dma9chan0" osdev_type="4"/>
+          </object>
+          <object type="PCIDev" os_index="524354" name="Intel Corporation Xeon E5/Core i7 DMA Channel 2" pci_busid="0000:80:04.2" pci_type="0880 [8086:3c22] [00d9:0062] 07" pci_link_speed="0.000000">
+            <info name="PCIVendor" value="Intel Corporation"/>
+            <info name="PCIDevice" value="Xeon E5/Core i7 DMA Channel 2"/>
+            <object type="OSDev" name="dma10chan0" osdev_type="4"/>
+          </object>
+          <object type="PCIDev" os_index="524355" name="Intel Corporation Xeon E5/Core i7 DMA Channel 3" pci_busid="0000:80:04.3" pci_type="0880 [8086:3c23] [00d9:0062] 07" pci_link_speed="0.000000">
+            <info name="PCIVendor" value="Intel Corporation"/>
+            <info name="PCIDevice" value="Xeon E5/Core i7 DMA Channel 3"/>
+            <object type="OSDev" name="dma11chan0" osdev_type="4"/>
+          </object>
+          <object type="PCIDev" os_index="524356" name="Intel Corporation Xeon E5/Core i7 DMA Channel 4" pci_busid="0000:80:04.4" pci_type="0880 [8086:3c24] [00d9:0062] 07" pci_link_speed="0.000000">
+            <info name="PCIVendor" value="Intel Corporation"/>
+            <info name="PCIDevice" value="Xeon E5/Core i7 DMA Channel 4"/>
+            <object type="OSDev" name="dma12chan0" osdev_type="4"/>
+          </object>
+          <object type="PCIDev" os_index="524357" name="Intel Corporation Xeon E5/Core i7 DMA Channel 5" pci_busid="0000:80:04.5" pci_type="0880 [8086:3c25] [00d9:0062] 07" pci_link_speed="0.000000">
+            <info name="PCIVendor" value="Intel Corporation"/>
+            <info name="PCIDevice" value="Xeon E5/Core i7 DMA Channel 5"/>
+            <object type="OSDev" name="dma13chan0" osdev_type="4"/>
+          </object>
+          <object type="PCIDev" os_index="524358" name="Intel Corporation Xeon E5/Core i7 DMA Channel 6" pci_busid="0000:80:04.6" pci_type="0880 [8086:3c26] [00d9:0062] 07" pci_link_speed="0.000000">
+            <info name="PCIVendor" value="Intel Corporation"/>
+            <info name="PCIDevice" value="Xeon E5/Core i7 DMA Channel 6"/>
+            <object type="OSDev" name="dma14chan0" osdev_type="4"/>
+          </object>
+          <object type="PCIDev" os_index="524359" name="Intel Corporation Xeon E5/Core i7 DMA Channel 7" pci_busid="0000:80:04.7" pci_type="0880 [8086:3c27] [00d9:0062] 07" pci_link_speed="0.000000">
+            <info name="PCIVendor" value="Intel Corporation"/>
+            <info name="PCIDevice" value="Xeon E5/Core i7 DMA Channel 7"/>
+            <object type="OSDev" name="dma15chan0" osdev_type="4"/>
+          </object>
+          <object type="PCIDev" os_index="524368" name="Intel Corporation Xeon E5/Core i7 Address Map, VTd_Misc, System Management" pci_busid="0000:80:05.0" pci_type="0880 [8086:3c28] [00d9:0062] 07" pci_link_speed="0.000000">
+            <info name="PCIVendor" value="Intel Corporation"/>
+            <info name="PCIDevice" value="Xeon E5/Core i7 Address Map, VTd_Misc, System Management"/>
+          </object>
+          <object type="PCIDev" os_index="524370" name="Intel Corporation Xeon E5/Core i7 Control Status and Global Errors" pci_busid="0000:80:05.2" pci_type="0880 [8086:3c2a] [00d9:0062] 07" pci_link_speed="0.000000">
+            <info name="PCIVendor" value="Intel Corporation"/>
+            <info name="PCIDevice" value="Xeon E5/Core i7 Control Status and Global Errors"/>
+          </object>
+          <object type="PCIDev" os_index="524372" name="Intel Corporation Xeon E5/Core i7 I/O APIC" pci_busid="0000:80:05.4" pci_type="0800 [8086:3c2c] [00d9:0062] 07" pci_link_speed="0.000000">
+            <info name="PCIVendor" value="Intel Corporation"/>
+            <info name="PCIDevice" value="Xeon E5/Core i7 I/O APIC"/>
+          </object>
+        </object>
+      </object>
+    </object>
+    <object type="Bridge" os_index="1" bridge_type="0-1" depth="0" bridge_pci="0000:[7f-7f]">
+      <object type="PCIDev" os_index="520320" name="Intel Corporation Xeon E5/Core i7 QPI Link 0" pci_busid="0000:7f:08.0" pci_type="0880 [8086:3c80] [00d9:0062] 07" pci_link_speed="0.000000">
+        <info name="PCIVendor" value="Intel Corporation"/>
+        <info name="PCIDevice" value="Xeon E5/Core i7 QPI Link 0"/>
+      </object>
+      <object type="PCIDev" os_index="520323" name="Intel Corporation Xeon E5/Core i7 QPI Link Reut 0" pci_busid="0000:7f:08.3" pci_type="0880 [8086:3c83] [00d9:0062] 07" pci_link_speed="0.000000">
+        <info name="PCIVendor" value="Intel Corporation"/>
+        <info name="PCIDevice" value="Xeon E5/Core i7 QPI Link Reut 0"/>
+      </object>
+      <object type="PCIDev" os_index="520324" name="Intel Corporation Xeon E5/Core i7 QPI Link Reut 0" pci_busid="0000:7f:08.4" pci_type="0880 [8086:3c84] [00d9:0062] 07" pci_link_speed="0.000000">
+        <info name="PCIVendor" value="Intel Corporation"/>
+        <info name="PCIDevice" value="Xeon E5/Core i7 QPI Link Reut 0"/>
+      </object>
+      <object type="PCIDev" os_index="520336" name="Intel Corporation Xeon E5/Core i7 QPI Link 1" pci_busid="0000:7f:09.0" pci_type="0880 [8086:3c90] [00d9:0062] 07" pci_link_speed="0.000000">
+        <info name="PCIVendor" value="Intel Corporation"/>
+        <info name="PCIDevice" value="Xeon E5/Core i7 QPI Link 1"/>
+      </object>
+      <object type="PCIDev" os_index="520339" name="Intel Corporation Xeon E5/Core i7 QPI Link Reut 1" pci_busid="0000:7f:09.3" pci_type="0880 [8086:3c93] [00d9:0062] 07" pci_link_speed="0.000000">
+        <info name="PCIVendor" value="Intel Corporation"/>
+        <info name="PCIDevice" value="Xeon E5/Core i7 QPI Link Reut 1"/>
+      </object>
+      <object type="PCIDev" os_index="520340" name="Intel Corporation Xeon E5/Core i7 QPI Link Reut 1" pci_busid="0000:7f:09.4" pci_type="0880 [8086:3c94] [00d9:0062] 07" pci_link_speed="0.000000">
+        <info name="PCIVendor" value="Intel Corporation"/>
+        <info name="PCIDevice" value="Xeon E5/Core i7 QPI Link Reut 1"/>
+      </object>
+      <object type="PCIDev" os_index="520352" name="Intel Corporation Xeon E5/Core i7 Power Control Unit 0" pci_busid="0000:7f:0a.0" pci_type="0880 [8086:3cc0] [00d9:0062] 07" pci_link_speed="0.000000">
+        <info name="PCIVendor" value="Intel Corporation"/>
+        <info name="PCIDevice" value="Xeon E5/Core i7 Power Control Unit 0"/>
+      </object>
+      <object type="PCIDev" os_index="520353" name="Intel Corporation Xeon E5/Core i7 Power Control Unit 1" pci_busid="0000:7f:0a.1" pci_type="0880 [8086:3cc1] [00d9:0062] 07" pci_link_speed="0.000000">
+        <info name="PCIVendor" value="Intel Corporation"/>
+        <info name="PCIDevice" value="Xeon E5/Core i7 Power Control Unit 1"/>
+      </object>
+      <object type="PCIDev" os_index="520354" name="Intel Corporation Xeon E5/Core i7 Power Control Unit 2" pci_busid="0000:7f:0a.2" pci_type="0880 [8086:3cc2] [00d9:0062] 07" pci_link_speed="0.000000">
+        <info name="PCIVendor" value="Intel Corporation"/>
+        <info name="PCIDevice" value="Xeon E5/Core i7 Power Control Unit 2"/>
+      </object>
+      <object type="PCIDev" os_index="520355" name="Intel Corporation Xeon E5/Core i7 Power Control Unit 3" pci_busid="0000:7f:0a.3" pci_type="0880 [8086:3cd0] [00d9:0062] 07" pci_link_speed="0.000000">
+        <info name="PCIVendor" value="Intel Corporation"/>
+        <info name="PCIDevice" value="Xeon E5/Core i7 Power Control Unit 3"/>
+      </object>
+      <object type="PCIDev" os_index="520368" name="Intel Corporation Xeon E5/Core i7 Interrupt Control Registers" pci_busid="0000:7f:0b.0" pci_type="0880 [8086:3ce0] [00d9:0062] 07" pci_link_speed="0.000000">
+        <info name="PCIVendor" value="Intel Corporation"/>
+        <info name="PCIDevice" value="Xeon E5/Core i7 Interrupt Control Registers"/>
+      </object>
+      <object type="PCIDev" os_index="520371" name="Intel Corporation Xeon E5/Core i7 Semaphore and Scratchpad Configuration Registers" pci_busid="0000:7f:0b.3" pci_type="0880 [8086:3ce3] [00d9:0062] 07" pci_link_speed="0.000000">
+        <info name="PCIVendor" value="Intel Corporation"/>
+        <info name="PCIDevice" value="Xeon E5/Core i7 Semaphore and Scratchpad Configuration Registers"/>
+      </object>
+      <object type="PCIDev" os_index="520384" name="Intel Corporation Xeon E5/Core i7 Unicast Register 0" pci_busid="0000:7f:0c.0" pci_type="0880 [8086:3ce8] [00d9:0062] 07" pci_link_speed="0.000000">
+        <info name="PCIVendor" value="Intel Corporation"/>
+        <info name="PCIDevice" value="Xeon E5/Core i7 Unicast Register 0"/>
+      </object>
+      <object type="PCIDev" os_index="520385" name="Intel Corporation Xeon E5/Core i7 Unicast Register 0" pci_busid="0000:7f:0c.1" pci_type="0880 [8086:3ce8] [00d9:0062] 07" pci_link_speed="0.000000">
+        <info name="PCIVendor" value="Intel Corporation"/>
+        <info name="PCIDevice" value="Xeon E5/Core i7 Unicast Register 0"/>
+      </object>
+      <object type="PCIDev" os_index="520386" name="Intel Corporation Xeon E5/Core i7 Unicast Register 0" pci_busid="0000:7f:0c.2" pci_type="0880 [8086:3ce8] [00d9:0062] 07" pci_link_speed="0.000000">
+        <info name="PCIVendor" value="Intel Corporation"/>
+        <info name="PCIDevice" value="Xeon E5/Core i7 Unicast Register 0"/>
+      </object>
+      <object type="PCIDev" os_index="520387" name="Intel Corporation Xeon E5/Core i7 Unicast Register 0" pci_busid="0000:7f:0c.3" pci_type="0880 [8086:3ce8] [00d9:0062] 07" pci_link_speed="0.000000">
+        <info name="PCIVendor" value="Intel Corporation"/>
+        <info name="PCIDevice" value="Xeon E5/Core i7 Unicast Register 0"/>
+      </object>
+      <object type="PCIDev" os_index="520390" name="Intel Corporation Xeon E5/Core i7 Integrated Memory Controller System Address Decoder 0" pci_busid="0000:7f:0c.6" pci_type="0880 [8086:3cf4] [00d9:0062] 07" pci_link_speed="0.000000">
+        <info name="PCIVendor" value="Intel Corporation"/>
+        <info name="PCIDevice" value="Xeon E5/Core i7 Integrated Memory Controller System Address Decoder 0"/>
+      </object>
+      <object type="PCIDev" os_index="520391" name="Intel Corporation Xeon E5/Core i7 System Address Decoder" pci_busid="0000:7f:0c.7" pci_type="0880 [8086:3cf6] [00d9:0062] 07" pci_link_speed="0.000000">
+        <info name="PCIVendor" value="Intel Corporation"/>
+        <info name="PCIDevice" value="Xeon E5/Core i7 System Address Decoder"/>
+      </object>
+      <object type="PCIDev" os_index="520400" name="Intel Corporation Xeon E5/Core i7 Unicast Register 0" pci_busid="0000:7f:0d.0" pci_type="0880 [8086:3ce8] [00d9:0062] 07" pci_link_speed="0.000000">
+        <info name="PCIVendor" value="Intel Corporation"/>
+        <info name="PCIDevice" value="Xeon E5/Core i7 Unicast Register 0"/>
+      </object>
+      <object type="PCIDev" os_index="520401" name="Intel Corporation Xeon E5/Core i7 Unicast Register 0" pci_busid="0000:7f:0d.1" pci_type="0880 [8086:3ce8] [00d9:0062] 07" pci_link_speed="0.000000">
+        <info name="PCIVendor" value="Intel Corporation"/>
+        <info name="PCIDevice" value="Xeon E5/Core i7 Unicast Register 0"/>
+      </object>
+      <object type="PCIDev" os_index="520402" name="Intel Corporation Xeon E5/Core i7 Unicast Register 0" pci_busid="0000:7f:0d.2" pci_type="0880 [8086:3ce8] [00d9:0062] 07" pci_link_speed="0.000000">
+        <info name="PCIVendor" value="Intel Corporation"/>
+        <info name="PCIDevice" value="Xeon E5/Core i7 Unicast Register 0"/>
+      </object>
+      <object type="PCIDev" os_index="520403" name="Intel Corporation Xeon E5/Core i7 Unicast Register 0" pci_busid="0000:7f:0d.3" pci_type="0880 [8086:3ce8] [00d9:0062] 07" pci_link_speed="0.000000">
+        <info name="PCIVendor" value="Intel Corporation"/>
+        <info name="PCIDevice" value="Xeon E5/Core i7 Unicast Register 0"/>
+      </object>
+      <object type="PCIDev" os_index="520406" name="Intel Corporation Xeon E5/Core i7 Integrated Memory Controller System Address Decoder 1" pci_busid="0000:7f:0d.6" pci_type="0880 [8086:3cf5] [00d9:0062] 07" pci_link_speed="0.000000">
+        <info name="PCIVendor" value="Intel Corporation"/>
+        <info name="PCIDevice" value="Xeon E5/Core i7 Integrated Memory Controller System Address Decoder 1"/>
+      </object>
+      <object type="PCIDev" os_index="520416" name="Intel Corporation Xeon E5/Core i7 Processor Home Agent" pci_busid="0000:7f:0e.0" pci_type="0880 [8086:3ca0] [00d9:0062] 07" pci_link_speed="0.000000">
+        <info name="PCIVendor" value="Intel Corporation"/>
+        <info name="PCIDevice" value="Xeon E5/Core i7 Processor Home Agent"/>
+      </object>
+      <object type="PCIDev" os_index="520417" name="Intel Corporation Xeon E5/Core i7 Processor Home Agent Performance Monitoring" pci_busid="0000:7f:0e.1" pci_type="1101 [8086:3c46] [00d9:0062] 07" pci_link_speed="0.000000">
+        <info name="PCIVendor" value="Intel Corporation"/>
+        <info name="PCIDevice" value="Xeon E5/Core i7 Processor Home Agent Performance Monitoring"/>
+      </object>
+      <object type="PCIDev" os_index="520432" name="Intel Corporation Xeon E5/Core i7 Integrated Memory Controller Registers" pci_busid="0000:7f:0f.0" pci_type="0880 [8086:3ca8] [00d9:0062] 07" pci_link_speed="0.000000">
+        <info name="PCIVendor" value="Intel Corporation"/>
+        <info name="PCIDevice" value="Xeon E5/Core i7 Integrated Memory Controller Registers"/>
+      </object>
+      <object type="PCIDev" os_index="520433" name="Intel Corporation Xeon E5/Core i7 Integrated Memory Controller RAS Registers" pci_busid="0000:7f:0f.1" pci_type="0880 [8086:3c71] [00d9:0062] 07" pci_link_speed="0.000000">
+        <info name="PCIVendor" value="Intel Corporation"/>
+        <info name="PCIDevice" value="Xeon E5/Core i7 Integrated Memory Controller RAS Registers"/>
+      </object>
+      <object type="PCIDev" os_index="520434" name="Intel Corporation Xeon E5/Core i7 Integrated Memory Controller Target Address Decoder 0" pci_busid="0000:7f:0f.2" pci_type="0880 [8086:3caa] [00d9:0062] 07" pci_link_speed="0.000000">
+        <info name="PCIVendor" value="Intel Corporation"/>
+        <info name="PCIDevice" value="Xeon E5/Core i7 Integrated Memory Controller Target Address Decoder 0"/>
+      </object>
+      <object type="PCIDev" os_index="520435" name="Intel Corporation Xeon E5/Core i7 Integrated Memory Controller Target Address Decoder 1" pci_busid="0000:7f:0f.3" pci_type="0880 [8086:3cab] [00d9:0062] 07" pci_link_speed="0.000000">
+        <info name="PCIVendor" value="Intel Corporation"/>
+        <info name="PCIDevice" value="Xeon E5/Core i7 Integrated Memory Controller Target Address Decoder 1"/>
+      </object>
+      <object type="PCIDev" os_index="520436" name="Intel Corporation Xeon E5/Core i7 Integrated Memory Controller Target Address Decoder 2" pci_busid="0000:7f:0f.4" pci_type="0880 [8086:3cac] [00d9:0062] 07" pci_link_speed="0.000000">
+        <info name="PCIVendor" value="Intel Corporation"/>
+        <info name="PCIDevice" value="Xeon E5/Core i7 Integrated Memory Controller Target Address Decoder 2"/>
+      </object>
+      <object type="PCIDev" os_index="520437" name="Intel Corporation Xeon E5/Core i7 Integrated Memory Controller Target Address Decoder 3" pci_busid="0000:7f:0f.5" pci_type="0880 [8086:3cad] [00d9:0062] 07" pci_link_speed="0.000000">
+        <info name="PCIVendor" value="Intel Corporation"/>
+        <info name="PCIDevice" value="Xeon E5/Core i7 Integrated Memory Controller Target Address Decoder 3"/>
+      </object>
+      <object type="PCIDev" os_index="520438" name="Intel Corporation Xeon E5/Core i7 Integrated Memory Controller Target Address Decoder 4" pci_busid="0000:7f:0f.6" pci_type="0880 [8086:3cae] [00d9:0062] 07" pci_link_speed="0.000000">
+        <info name="PCIVendor" value="Intel Corporation"/>
+        <info name="PCIDevice" value="Xeon E5/Core i7 Integrated Memory Controller Target Address Decoder 4"/>
+      </object>
+      <object type="PCIDev" os_index="520448" name="Intel Corporation Xeon E5/Core i7 Integrated Memory Controller Channel 0-3 Thermal Control 0" pci_busid="0000:7f:10.0" pci_type="0880 [8086:3cb0] [00d9:0062] 07" pci_link_speed="0.000000">
+        <info name="PCIVendor" value="Intel Corporation"/>
+        <info name="PCIDevice" value="Xeon E5/Core i7 Integrated Memory Controller Channel 0-3 Thermal Control 0"/>
+      </object>
+      <object type="PCIDev" os_index="520449" name="Intel Corporation Xeon E5/Core i7 Integrated Memory Controller Channel 0-3 Thermal Control 1" pci_busid="0000:7f:10.1" pci_type="0880 [8086:3cb1] [00d9:0062] 07" pci_link_speed="0.000000">
+        <info name="PCIVendor" value="Intel Corporation"/>
+        <info name="PCIDevice" value="Xeon E5/Core i7 Integrated Memory Controller Channel 0-3 Thermal Control 1"/>
+      </object>
+      <object type="PCIDev" os_index="520450" name="Intel Corporation Xeon E5/Core i7 Integrated Memory Controller ERROR Registers 0" pci_busid="0000:7f:10.2" pci_type="0880 [8086:3cb2] [00d9:0062] 07" pci_link_speed="0.000000">
+        <info name="PCIVendor" value="Intel Corporation"/>
+        <info name="PCIDevice" value="Xeon E5/Core i7 Integrated Memory Controller ERROR Registers 0"/>
+      </object>
+      <object type="PCIDev" os_index="520451" name="Intel Corporation Xeon E5/Core i7 Integrated Memory Controller ERROR Registers 1" pci_busid="0000:7f:10.3" pci_type="0880 [8086:3cb3] [00d9:0062] 07" pci_link_speed="0.000000">
+        <info name="PCIVendor" value="Intel Corporation"/>
+        <info name="PCIDevice" value="Xeon E5/Core i7 Integrated Memory Controller ERROR Registers 1"/>
+      </object>
+      <object type="PCIDev" os_index="520452" name="Intel Corporation Xeon E5/Core i7 Integrated Memory Controller Channel 0-3 Thermal Control 2" pci_busid="0000:7f:10.4" pci_type="0880 [8086:3cb4] [00d9:0062] 07" pci_link_speed="0.000000">
+        <info name="PCIVendor" value="Intel Corporation"/>
+        <info name="PCIDevice" value="Xeon E5/Core i7 Integrated Memory Controller Channel 0-3 Thermal Control 2"/>
+      </object>
+      <object type="PCIDev" os_index="520453" name="Intel Corporation Xeon E5/Core i7 Integrated Memory Controller Channel 0-3 Thermal Control 3" pci_busid="0000:7f:10.5" pci_type="0880 [8086:3cb5] [00d9:0062] 07" pci_link_speed="0.000000">
+        <info name="PCIVendor" value="Intel Corporation"/>
+        <info name="PCIDevice" value="Xeon E5/Core i7 Integrated Memory Controller Channel 0-3 Thermal Control 3"/>
+      </object>
+      <object type="PCIDev" os_index="520454" name="Intel Corporation Xeon E5/Core i7 Integrated Memory Controller ERROR Registers 2" pci_busid="0000:7f:10.6" pci_type="0880 [8086:3cb6] [00d9:0062] 07" pci_link_speed="0.000000">
+        <info name="PCIVendor" value="Intel Corporation"/>
+        <info name="PCIDevice" value="Xeon E5/Core i7 Integrated Memory Controller ERROR Registers 2"/>
+      </object>
+      <object type="PCIDev" os_index="520455" name="Intel Corporation Xeon E5/Core i7 Integrated Memory Controller ERROR Registers 3" pci_busid="0000:7f:10.7" pci_type="0880 [8086:3cb7] [00d9:0062] 07" pci_link_speed="0.000000">
+        <info name="PCIVendor" value="Intel Corporation"/>
+        <info name="PCIDevice" value="Xeon E5/Core i7 Integrated Memory Controller ERROR Registers 3"/>
+      </object>
+      <object type="PCIDev" os_index="520464" name="Intel Corporation Xeon E5/Core i7 DDRIO" pci_busid="0000:7f:11.0" pci_type="0880 [8086:3cb8] [00d9:0062] 07" pci_link_speed="0.000000">
+        <info name="PCIVendor" value="Intel Corporation"/>
+        <info name="PCIDevice" value="Xeon E5/Core i7 DDRIO"/>
+      </object>
+      <object type="PCIDev" os_index="520496" name="Intel Corporation Xeon E5/Core i7 R2PCIe" pci_busid="0000:7f:13.0" pci_type="0880 [8086:3ce4] [00d9:0062] 07" pci_link_speed="0.000000">
+        <info name="PCIVendor" value="Intel Corporation"/>
+        <info name="PCIDevice" value="Xeon E5/Core i7 R2PCIe"/>
+      </object>
+      <object type="PCIDev" os_index="520497" name="Intel Corporation Xeon E5/Core i7 Ring to PCI Express Performance Monitor" pci_busid="0000:7f:13.1" pci_type="1101 [8086:3c43] [00d9:0062] 07" pci_link_speed="0.000000">
+        <info name="PCIVendor" value="Intel Corporation"/>
+        <info name="PCIDevice" value="Xeon E5/Core i7 Ring to PCI Express Performance Monitor"/>
+      </object>
+      <object type="PCIDev" os_index="520500" name="Intel Corporation Xeon E5/Core i7 QuickPath Interconnect Agent Ring Registers" pci_busid="0000:7f:13.4" pci_type="1101 [8086:3ce6] [00d9:0062] 07" pci_link_speed="0.000000">
+        <info name="PCIVendor" value="Intel Corporation"/>
+        <info name="PCIDevice" value="Xeon E5/Core i7 QuickPath Interconnect Agent Ring Registers"/>
+      </object>
+      <object type="PCIDev" os_index="520501" name="Intel Corporation Xeon E5/Core i7 Ring to QuickPath Interconnect Link 0 Performance Monitor" pci_busid="0000:7f:13.5" pci_type="1101 [8086:3c44] [00d9:0062] 07" pci_link_speed="0.000000">
+        <info name="PCIVendor" value="Intel Corporation"/>
+        <info name="PCIDevice" value="Xeon E5/Core i7 Ring to QuickPath Interconnect Link 0 Performance Monitor"/>
+      </object>
+      <object type="PCIDev" os_index="520502" name="Intel Corporation Xeon E5/Core i7 Ring to QuickPath Interconnect Link 1 Performance Monitor" pci_busid="0000:7f:13.6" pci_type="0880 [8086:3c45] [00d9:0062] 07" pci_link_speed="0.000000">
+        <info name="PCIVendor" value="Intel Corporation"/>
+        <info name="PCIDevice" value="Xeon E5/Core i7 Ring to QuickPath Interconnect Link 1 Performance Monitor"/>
+      </object>
+    </object>
+    <object type="Bridge" os_index="3" bridge_type="0-1" depth="0" bridge_pci="0000:[ff-ff]">
+      <object type="PCIDev" os_index="1044608" name="Intel Corporation Xeon E5/Core i7 QPI Link 0" pci_busid="0000:ff:08.0" pci_type="0880 [8086:3c80] [00d9:0062] 07" pci_link_speed="0.000000">
+        <info name="PCIVendor" value="Intel Corporation"/>
+        <info name="PCIDevice" value="Xeon E5/Core i7 QPI Link 0"/>
+      </object>
+      <object type="PCIDev" os_index="1044611" name="Intel Corporation Xeon E5/Core i7 QPI Link Reut 0" pci_busid="0000:ff:08.3" pci_type="0880 [8086:3c83] [00d9:0062] 07" pci_link_speed="0.000000">
+        <info name="PCIVendor" value="Intel Corporation"/>
+        <info name="PCIDevice" value="Xeon E5/Core i7 QPI Link Reut 0"/>
+      </object>
+      <object type="PCIDev" os_index="1044612" name="Intel Corporation Xeon E5/Core i7 QPI Link Reut 0" pci_busid="0000:ff:08.4" pci_type="0880 [8086:3c84] [00d9:0062] 07" pci_link_speed="0.000000">
+        <info name="PCIVendor" value="Intel Corporation"/>
+        <info name="PCIDevice" value="Xeon E5/Core i7 QPI Link Reut 0"/>
+      </object>
+      <object type="PCIDev" os_index="1044624" name="Intel Corporation Xeon E5/Core i7 QPI Link 1" pci_busid="0000:ff:09.0" pci_type="0880 [8086:3c90] [00d9:0062] 07" pci_link_speed="0.000000">
+        <info name="PCIVendor" value="Intel Corporation"/>
+        <info name="PCIDevice" value="Xeon E5/Core i7 QPI Link 1"/>
+      </object>
+      <object type="PCIDev" os_index="1044627" name="Intel Corporation Xeon E5/Core i7 QPI Link Reut 1" pci_busid="0000:ff:09.3" pci_type="0880 [8086:3c93] [00d9:0062] 07" pci_link_speed="0.000000">
+        <info name="PCIVendor" value="Intel Corporation"/>
+        <info name="PCIDevice" value="Xeon E5/Core i7 QPI Link Reut 1"/>
+      </object>
+      <object type="PCIDev" os_index="1044628" name="Intel Corporation Xeon E5/Core i7 QPI Link Reut 1" pci_busid="0000:ff:09.4" pci_type="0880 [8086:3c94] [00d9:0062] 07" pci_link_speed="0.000000">
+        <info name="PCIVendor" value="Intel Corporation"/>
+        <info name="PCIDevice" value="Xeon E5/Core i7 QPI Link Reut 1"/>
+      </object>
+      <object type="PCIDev" os_index="1044640" name="Intel Corporation Xeon E5/Core i7 Power Control Unit 0" pci_busid="0000:ff:0a.0" pci_type="0880 [8086:3cc0] [00d9:0062] 07" pci_link_speed="0.000000">
+        <info name="PCIVendor" value="Intel Corporation"/>
+        <info name="PCIDevice" value="Xeon E5/Core i7 Power Control Unit 0"/>
+      </object>
+      <object type="PCIDev" os_index="1044641" name="Intel Corporation Xeon E5/Core i7 Power Control Unit 1" pci_busid="0000:ff:0a.1" pci_type="0880 [8086:3cc1] [00d9:0062] 07" pci_link_speed="0.000000">
+        <info name="PCIVendor" value="Intel Corporation"/>
+        <info name="PCIDevice" value="Xeon E5/Core i7 Power Control Unit 1"/>
+      </object>
+      <object type="PCIDev" os_index="1044642" name="Intel Corporation Xeon E5/Core i7 Power Control Unit 2" pci_busid="0000:ff:0a.2" pci_type="0880 [8086:3cc2] [00d9:0062] 07" pci_link_speed="0.000000">
+        <info name="PCIVendor" value="Intel Corporation"/>
+        <info name="PCIDevice" value="Xeon E5/Core i7 Power Control Unit 2"/>
+      </object>
+      <object type="PCIDev" os_index="1044643" name="Intel Corporation Xeon E5/Core i7 Power Control Unit 3" pci_busid="0000:ff:0a.3" pci_type="0880 [8086:3cd0] [00d9:0062] 07" pci_link_speed="0.000000">
+        <info name="PCIVendor" value="Intel Corporation"/>
+        <info name="PCIDevice" value="Xeon E5/Core i7 Power Control Unit 3"/>
+      </object>
+      <object type="PCIDev" os_index="1044656" name="Intel Corporation Xeon E5/Core i7 Interrupt Control Registers" pci_busid="0000:ff:0b.0" pci_type="0880 [8086:3ce0] [00d9:0062] 07" pci_link_speed="0.000000">
+        <info name="PCIVendor" value="Intel Corporation"/>
+        <info name="PCIDevice" value="Xeon E5/Core i7 Interrupt Control Registers"/>
+      </object>
+      <object type="PCIDev" os_index="1044659" name="Intel Corporation Xeon E5/Core i7 Semaphore and Scratchpad Configuration Registers" pci_busid="0000:ff:0b.3" pci_type="0880 [8086:3ce3] [00d9:0062] 07" pci_link_speed="0.000000">
+        <info name="PCIVendor" value="Intel Corporation"/>
+        <info name="PCIDevice" value="Xeon E5/Core i7 Semaphore and Scratchpad Configuration Registers"/>
+      </object>
+      <object type="PCIDev" os_index="1044672" name="Intel Corporation Xeon E5/Core i7 Unicast Register 0" pci_busid="0000:ff:0c.0" pci_type="0880 [8086:3ce8] [00d9:0062] 07" pci_link_speed="0.000000">
+        <info name="PCIVendor" value="Intel Corporation"/>
+        <info name="PCIDevice" value="Xeon E5/Core i7 Unicast Register 0"/>
+      </object>
+      <object type="PCIDev" os_index="1044673" name="Intel Corporation Xeon E5/Core i7 Unicast Register 0" pci_busid="0000:ff:0c.1" pci_type="0880 [8086:3ce8] [00d9:0062] 07" pci_link_speed="0.000000">
+        <info name="PCIVendor" value="Intel Corporation"/>
+        <info name="PCIDevice" value="Xeon E5/Core i7 Unicast Register 0"/>
+      </object>
+      <object type="PCIDev" os_index="1044674" name="Intel Corporation Xeon E5/Core i7 Unicast Register 0" pci_busid="0000:ff:0c.2" pci_type="0880 [8086:3ce8] [00d9:0062] 07" pci_link_speed="0.000000">
+        <info name="PCIVendor" value="Intel Corporation"/>
+        <info name="PCIDevice" value="Xeon E5/Core i7 Unicast Register 0"/>
+      </object>
+      <object type="PCIDev" os_index="1044675" name="Intel Corporation Xeon E5/Core i7 Unicast Register 0" pci_busid="0000:ff:0c.3" pci_type="0880 [8086:3ce8] [00d9:0062] 07" pci_link_speed="0.000000">
+        <info name="PCIVendor" value="Intel Corporation"/>
+        <info name="PCIDevice" value="Xeon E5/Core i7 Unicast Register 0"/>
+      </object>
+      <object type="PCIDev" os_index="1044678" name="Intel Corporation Xeon E5/Core i7 Integrated Memory Controller System Address Decoder 0" pci_busid="0000:ff:0c.6" pci_type="0880 [8086:3cf4] [00d9:0062] 07" pci_link_speed="0.000000">
+        <info name="PCIVendor" value="Intel Corporation"/>
+        <info name="PCIDevice" value="Xeon E5/Core i7 Integrated Memory Controller System Address Decoder 0"/>
+      </object>
+      <object type="PCIDev" os_index="1044679" name="Intel Corporation Xeon E5/Core i7 System Address Decoder" pci_busid="0000:ff:0c.7" pci_type="0880 [8086:3cf6] [00d9:0062] 07" pci_link_speed="0.000000">
+        <info name="PCIVendor" value="Intel Corporation"/>
+        <info name="PCIDevice" value="Xeon E5/Core i7 System Address Decoder"/>
+      </object>
+      <object type="PCIDev" os_index="1044688" name="Intel Corporation Xeon E5/Core i7 Unicast Register 0" pci_busid="0000:ff:0d.0" pci_type="0880 [8086:3ce8] [00d9:0062] 07" pci_link_speed="0.000000">
+        <info name="PCIVendor" value="Intel Corporation"/>
+        <info name="PCIDevice" value="Xeon E5/Core i7 Unicast Register 0"/>
+      </object>
+      <object type="PCIDev" os_index="1044689" name="Intel Corporation Xeon E5/Core i7 Unicast Register 0" pci_busid="0000:ff:0d.1" pci_type="0880 [8086:3ce8] [00d9:0062] 07" pci_link_speed="0.000000">
+        <info name="PCIVendor" value="Intel Corporation"/>
+        <info name="PCIDevice" value="Xeon E5/Core i7 Unicast Register 0"/>
+      </object>
+      <object type="PCIDev" os_index="1044690" name="Intel Corporation Xeon E5/Core i7 Unicast Register 0" pci_busid="0000:ff:0d.2" pci_type="0880 [8086:3ce8] [00d9:0062] 07" pci_link_speed="0.000000">
+        <info name="PCIVendor" value="Intel Corporation"/>
+        <info name="PCIDevice" value="Xeon E5/Core i7 Unicast Register 0"/>
+      </object>
+      <object type="PCIDev" os_index="1044691" name="Intel Corporation Xeon E5/Core i7 Unicast Register 0" pci_busid="0000:ff:0d.3" pci_type="0880 [8086:3ce8] [00d9:0062] 07" pci_link_speed="0.000000">
+        <info name="PCIVendor" value="Intel Corporation"/>
+        <info name="PCIDevice" value="Xeon E5/Core i7 Unicast Register 0"/>
+      </object>
+      <object type="PCIDev" os_index="1044694" name="Intel Corporation Xeon E5/Core i7 Integrated Memory Controller System Address Decoder 1" pci_busid="0000:ff:0d.6" pci_type="0880 [8086:3cf5] [00d9:0062] 07" pci_link_speed="0.000000">
+        <info name="PCIVendor" value="Intel Corporation"/>
+        <info name="PCIDevice" value="Xeon E5/Core i7 Integrated Memory Controller System Address Decoder 1"/>
+      </object>
+      <object type="PCIDev" os_index="1044704" name="Intel Corporation Xeon E5/Core i7 Processor Home Agent" pci_busid="0000:ff:0e.0" pci_type="0880 [8086:3ca0] [00d9:0062] 07" pci_link_speed="0.000000">
+        <info name="PCIVendor" value="Intel Corporation"/>
+        <info name="PCIDevice" value="Xeon E5/Core i7 Processor Home Agent"/>
+      </object>
+      <object type="PCIDev" os_index="1044705" name="Intel Corporation Xeon E5/Core i7 Processor Home Agent Performance Monitoring" pci_busid="0000:ff:0e.1" pci_type="1101 [8086:3c46] [00d9:0062] 07" pci_link_speed="0.000000">
+        <info name="PCIVendor" value="Intel Corporation"/>
+        <info name="PCIDevice" value="Xeon E5/Core i7 Processor Home Agent Performance Monitoring"/>
+      </object>
+      <object type="PCIDev" os_index="1044720" name="Intel Corporation Xeon E5/Core i7 Integrated Memory Controller Registers" pci_busid="0000:ff:0f.0" pci_type="0880 [8086:3ca8] [00d9:0062] 07" pci_link_speed="0.000000">
+        <info name="PCIVendor" value="Intel Corporation"/>
+        <info name="PCIDevice" value="Xeon E5/Core i7 Integrated Memory Controller Registers"/>
+      </object>
+      <object type="PCIDev" os_index="1044721" name="Intel Corporation Xeon E5/Core i7 Integrated Memory Controller RAS Registers" pci_busid="0000:ff:0f.1" pci_type="0880 [8086:3c71] [00d9:0062] 07" pci_link_speed="0.000000">
+        <info name="PCIVendor" value="Intel Corporation"/>
+        <info name="PCIDevice" value="Xeon E5/Core i7 Integrated Memory Controller RAS Registers"/>
+      </object>
+      <object type="PCIDev" os_index="1044722" name="Intel Corporation Xeon E5/Core i7 Integrated Memory Controller Target Address Decoder 0" pci_busid="0000:ff:0f.2" pci_type="0880 [8086:3caa] [00d9:0062] 07" pci_link_speed="0.000000">
+        <info name="PCIVendor" value="Intel Corporation"/>
+        <info name="PCIDevice" value="Xeon E5/Core i7 Integrated Memory Controller Target Address Decoder 0"/>
+      </object>
+      <object type="PCIDev" os_index="1044723" name="Intel Corporation Xeon E5/Core i7 Integrated Memory Controller Target Address Decoder 1" pci_busid="0000:ff:0f.3" pci_type="0880 [8086:3cab] [00d9:0062] 07" pci_link_speed="0.000000">
+        <info name="PCIVendor" value="Intel Corporation"/>
+        <info name="PCIDevice" value="Xeon E5/Core i7 Integrated Memory Controller Target Address Decoder 1"/>
+      </object>
+      <object type="PCIDev" os_index="1044724" name="Intel Corporation Xeon E5/Core i7 Integrated Memory Controller Target Address Decoder 2" pci_busid="0000:ff:0f.4" pci_type="0880 [8086:3cac] [00d9:0062] 07" pci_link_speed="0.000000">
+        <info name="PCIVendor" value="Intel Corporation"/>
+        <info name="PCIDevice" value="Xeon E5/Core i7 Integrated Memory Controller Target Address Decoder 2"/>
+      </object>
+      <object type="PCIDev" os_index="1044725" name="Intel Corporation Xeon E5/Core i7 Integrated Memory Controller Target Address Decoder 3" pci_busid="0000:ff:0f.5" pci_type="0880 [8086:3cad] [00d9:0062] 07" pci_link_speed="0.000000">
+        <info name="PCIVendor" value="Intel Corporation"/>
+        <info name="PCIDevice" value="Xeon E5/Core i7 Integrated Memory Controller Target Address Decoder 3"/>
+      </object>
+      <object type="PCIDev" os_index="1044726" name="Intel Corporation Xeon E5/Core i7 Integrated Memory Controller Target Address Decoder 4" pci_busid="0000:ff:0f.6" pci_type="0880 [8086:3cae] [00d9:0062] 07" pci_link_speed="0.000000">
+        <info name="PCIVendor" value="Intel Corporation"/>
+        <info name="PCIDevice" value="Xeon E5/Core i7 Integrated Memory Controller Target Address Decoder 4"/>
+      </object>
+      <object type="PCIDev" os_index="1044736" name="Intel Corporation Xeon E5/Core i7 Integrated Memory Controller Channel 0-3 Thermal Control 0" pci_busid="0000:ff:10.0" pci_type="0880 [8086:3cb0] [00d9:0062] 07" pci_link_speed="0.000000">
+        <info name="PCIVendor" value="Intel Corporation"/>
+        <info name="PCIDevice" value="Xeon E5/Core i7 Integrated Memory Controller Channel 0-3 Thermal Control 0"/>
+      </object>
+      <object type="PCIDev" os_index="1044737" name="Intel Corporation Xeon E5/Core i7 Integrated Memory Controller Channel 0-3 Thermal Control 1" pci_busid="0000:ff:10.1" pci_type="0880 [8086:3cb1] [00d9:0062] 07" pci_link_speed="0.000000">
+        <info name="PCIVendor" value="Intel Corporation"/>
+        <info name="PCIDevice" value="Xeon E5/Core i7 Integrated Memory Controller Channel 0-3 Thermal Control 1"/>
+      </object>
+      <object type="PCIDev" os_index="1044738" name="Intel Corporation Xeon E5/Core i7 Integrated Memory Controller ERROR Registers 0" pci_busid="0000:ff:10.2" pci_type="0880 [8086:3cb2] [00d9:0062] 07" pci_link_speed="0.000000">
+        <info name="PCIVendor" value="Intel Corporation"/>
+        <info name="PCIDevice" value="Xeon E5/Core i7 Integrated Memory Controller ERROR Registers 0"/>
+      </object>
+      <object type="PCIDev" os_index="1044739" name="Intel Corporation Xeon E5/Core i7 Integrated Memory Controller ERROR Registers 1" pci_busid="0000:ff:10.3" pci_type="0880 [8086:3cb3] [00d9:0062] 07" pci_link_speed="0.000000">
+        <info name="PCIVendor" value="Intel Corporation"/>
+        <info name="PCIDevice" value="Xeon E5/Core i7 Integrated Memory Controller ERROR Registers 1"/>
+      </object>
+      <object type="PCIDev" os_index="1044740" name="Intel Corporation Xeon E5/Core i7 Integrated Memory Controller Channel 0-3 Thermal Control 2" pci_busid="0000:ff:10.4" pci_type="0880 [8086:3cb4] [00d9:0062] 07" pci_link_speed="0.000000">
+        <info name="PCIVendor" value="Intel Corporation"/>
+        <info name="PCIDevice" value="Xeon E5/Core i7 Integrated Memory Controller Channel 0-3 Thermal Control 2"/>
+      </object>
+      <object type="PCIDev" os_index="1044741" name="Intel Corporation Xeon E5/Core i7 Integrated Memory Controller Channel 0-3 Thermal Control 3" pci_busid="0000:ff:10.5" pci_type="0880 [8086:3cb5] [00d9:0062] 07" pci_link_speed="0.000000">
+        <info name="PCIVendor" value="Intel Corporation"/>
+        <info name="PCIDevice" value="Xeon E5/Core i7 Integrated Memory Controller Channel 0-3 Thermal Control 3"/>
+      </object>
+      <object type="PCIDev" os_index="1044742" name="Intel Corporation Xeon E5/Core i7 Integrated Memory Controller ERROR Registers 2" pci_busid="0000:ff:10.6" pci_type="0880 [8086:3cb6] [00d9:0062] 07" pci_link_speed="0.000000">
+        <info name="PCIVendor" value="Intel Corporation"/>
+        <info name="PCIDevice" value="Xeon E5/Core i7 Integrated Memory Controller ERROR Registers 2"/>
+      </object>
+      <object type="PCIDev" os_index="1044743" name="Intel Corporation Xeon E5/Core i7 Integrated Memory Controller ERROR Registers 3" pci_busid="0000:ff:10.7" pci_type="0880 [8086:3cb7] [00d9:0062] 07" pci_link_speed="0.000000">
+        <info name="PCIVendor" value="Intel Corporation"/>
+        <info name="PCIDevice" value="Xeon E5/Core i7 Integrated Memory Controller ERROR Registers 3"/>
+      </object>
+      <object type="PCIDev" os_index="1044752" name="Intel Corporation Xeon E5/Core i7 DDRIO" pci_busid="0000:ff:11.0" pci_type="0880 [8086:3cb8] [00d9:0062] 07" pci_link_speed="0.000000">
+        <info name="PCIVendor" value="Intel Corporation"/>
+        <info name="PCIDevice" value="Xeon E5/Core i7 DDRIO"/>
+      </object>
+      <object type="PCIDev" os_index="1044784" name="Intel Corporation Xeon E5/Core i7 R2PCIe" pci_busid="0000:ff:13.0" pci_type="0880 [8086:3ce4] [00d9:0062] 07" pci_link_speed="0.000000">
+        <info name="PCIVendor" value="Intel Corporation"/>
+        <info name="PCIDevice" value="Xeon E5/Core i7 R2PCIe"/>
+      </object>
+      <object type="PCIDev" os_index="1044785" name="Intel Corporation Xeon E5/Core i7 Ring to PCI Express Performance Monitor" pci_busid="0000:ff:13.1" pci_type="1101 [8086:3c43] [00d9:0062] 07" pci_link_speed="0.000000">
+        <info name="PCIVendor" value="Intel Corporation"/>
+        <info name="PCIDevice" value="Xeon E5/Core i7 Ring to PCI Express Performance Monitor"/>
+      </object>
+      <object type="PCIDev" os_index="1044788" name="Intel Corporation Xeon E5/Core i7 QuickPath Interconnect Agent Ring Registers" pci_busid="0000:ff:13.4" pci_type="1101 [8086:3ce6] [00d9:0062] 07" pci_link_speed="0.000000">
+        <info name="PCIVendor" value="Intel Corporation"/>
+        <info name="PCIDevice" value="Xeon E5/Core i7 QuickPath Interconnect Agent Ring Registers"/>
+      </object>
+      <object type="PCIDev" os_index="1044789" name="Intel Corporation Xeon E5/Core i7 Ring to QuickPath Interconnect Link 0 Performance Monitor" pci_busid="0000:ff:13.5" pci_type="1101 [8086:3c44] [00d9:0062] 07" pci_link_speed="0.000000">
+        <info name="PCIVendor" value="Intel Corporation"/>
+        <info name="PCIDevice" value="Xeon E5/Core i7 Ring to QuickPath Interconnect Link 0 Performance Monitor"/>
+      </object>
+      <object type="PCIDev" os_index="1044790" name="Intel Corporation Xeon E5/Core i7 Ring to QuickPath Interconnect Link 1 Performance Monitor" pci_busid="0000:ff:13.6" pci_type="0880 [8086:3c45] [00d9:0062] 07" pci_link_speed="0.000000">
+        <info name="PCIVendor" value="Intel Corporation"/>
+        <info name="PCIDevice" value="Xeon E5/Core i7 Ring to QuickPath Interconnect Link 1 Performance Monitor"/>
+      </object>
+    </object>
+  </object>
+</topology>
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/xml/Makefile.am b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/xml/Makefile.am
index 8ac7fec..caaa1d7 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/xml/Makefile.am
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/xml/Makefile.am
@@ -1,4 +1,4 @@
-# Copyright © 2009 inria.  All rights reserved.
+# Copyright © 2009-2013 Inria.  All rights reserved.
 # Copyright © 2009-2010 Université Bordeaux 1
 # Copyright © 2009-2010 Cisco Systems, Inc.  All rights reserved.
 # See COPYING in top-level directory.
@@ -14,12 +14,27 @@ xml_inputs = \
 	16em64t-4s2c2t-offlines.xml \
 	24em64t-2n6c2t-pci.xml \
 	8em64t-2mi2ma2c.xml \
+	32em64t-2n8c2t-pci-noio.xml \
+	32em64t-2n8c2t-pci-normalio.xml \
+	32em64t-2n8c2t-pci-wholeio.xml \
 	96em64t-4n4d3ca2co-pci.xml
 
+# Each output `xyz.source' may have a corresponding `xyz.source'
+# file modifying its source file
+xml_source = \
+	32em64t-2n8c2t-pci-noio.source \
+	32em64t-2n8c2t-pci-normalio.source
+
+# Each output `xyz.xml' may have a corresponding `xyz.options'
+# file modifying the behavior of lstopo
+xml_options = \
+	32em64t-2n8c2t-pci-noio.options \
+	32em64t-2n8c2t-pci-wholeio.options
+
 # Only run the tests if we're building standalone, because the tests
 # call hwloc executables.
 TESTS = $(xml_inputs)
 
-EXTRA_DIST = $(xml_inputs)
+EXTRA_DIST = $(xml_inputs) $(xml_source) $(xml_options)
 
-TESTS_ENVIRONMENT = $(HWLOC_top_builddir)/tests/xml/test-topology.sh
+LOG_COMPILER = $(HWLOC_top_builddir)/tests/xml/test-topology.sh
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/xml/test-topology.sh.in b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/xml/test-topology.sh.in
index ba8d509..4b81764 100755
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/xml/test-topology.sh.in
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/xml/test-topology.sh.in
@@ -3,7 +3,7 @@
 
 #
 # Copyright © 2009 CNRS
-# Copyright © 2009-2012 Inria.  All rights reserved.
+# Copyright © 2009-2013 Inria.  All rights reserved.
 # Copyright © 2009-2012 Université Bordeaux 1
 # Copyright © 2010 Cisco Systems, Inc.  All rights reserved.
 # See COPYING in top-level directory.
@@ -16,7 +16,7 @@ HWLOC_top_builddir="@HWLOC_top_builddir@"
 HWLOC_top_srcdir="@HWLOC_top_srcdir@"
 lstopo="@HWLOC_top_builddir@/utils/lstopo-no-graphics"
 
-HWLOC_PLUGINS_PATH=${abs_top_builddir}/src
+HWLOC_PLUGINS_PATH=${HWLOC_top_builddir}/src
 export HWLOC_PLUGINS_PATH
 
 if test x at HWLOC_XML_LOCALIZED@ = x1; then
@@ -54,7 +54,17 @@ set -e
 
 do_run()
 {
-  $lstopo --if xml --input "$1" --of xml "$file"
+  dirname=`dirname $1`
+  basename="${dirname}/"`basename $1 .xml`
+
+  source="$1"
+  source_file="${basename}.source"
+  test -f "$source_file" && source="${dirname}/"`cat $source_file`
+
+  options_file="${basename}.options"
+  test -f "$options_file" && opts=`cat $options_file`
+
+  $lstopo --if xml --input "$source" --of xml "$file" $opts
 
   if [ "$HWLOC_UPDATE_TEST_TOPOLOGY_OUTPUT" != 1 ]
   then
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/Makefile.am b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/Makefile.am
index d625bbc..6e150ab 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/Makefile.am
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/Makefile.am
@@ -1,4 +1,4 @@
-# Copyright © 2009-2012 Inria.  All rights reserved.
+# Copyright © 2009-2013 Inria.  All rights reserved.
 # Copyright © 2009-2012 Université Bordeaux 1
 # Copyright © 2009-2011 Cisco Systems, Inc.  All rights reserved.
 #
@@ -12,14 +12,14 @@ AM_LDFLAGS = $(HWLOC_LDFLAGS)
 
 LDADD = $(HWLOC_top_builddir)/src/libhwloc.la
 
-EXTRA_DIST = test-hwloc-annotate.input test-hwloc-annotate.output test-hwloc-assembler.input1 test-hwloc-assembler.input2 test-hwloc-assembler.output test-hwloc-calc.output test-hwloc-distances.output test-hwloc-distrib.output test-hwloc-ls.output
+EXTRA_DIST = test-hwloc-annotate.input test-hwloc-annotate.output test-hwloc-assembler.input1 test-hwloc-assembler.input2 test-hwloc-assembler.output test-hwloc-calc.output test-hwloc-distances.output test-hwloc-distrib.output test-hwloc-info.output test-hwloc-ls.output
 
 noinst_HEADERS = misc.h
 
-bin_PROGRAMS = lstopo-no-graphics hwloc-annotate hwloc-assembler hwloc-calc hwloc-bind hwloc-distances hwloc-distrib hwloc-ps
+bin_PROGRAMS = lstopo-no-graphics hwloc-annotate hwloc-assembler hwloc-calc hwloc-bind hwloc-distances hwloc-distrib hwloc-info hwloc-ps
 
 lstopo_no_graphics_SOURCES = lstopo.h lstopo.c lstopo-color.c lstopo-text.c lstopo-draw.c lstopo-fig.c lstopo-xml.c
-lstopo_no_graphics_CFLAGS = $(HWLOC_LIBXML2_CFLAGS) $(HWLOC_PCI_CFLAGS)
+lstopo_no_graphics_CFLAGS = 
 lstopo_no_graphics_LDADD = $(LDADD) -lm $(HWLOC_TERMCAP_LIBS)
 lstopo_SOURCES = $(lstopo_no_graphics_SOURCES)
 lstopo_CPPFLAGS = $(AM_CPPFLAGS)
@@ -46,7 +46,7 @@ hwloc_calc_SOURCES = hwloc-calc.c hwloc-calc.h
 bin_SCRIPTS = hwloc-assembler-remote
 
 if !HWLOC_HAVE_MINGW32
-TESTS = test-hwloc-annotate.sh test-hwloc-assembler.sh test-hwloc-calc.sh test-hwloc-distances.sh test-hwloc-distrib.sh test-hwloc-ls.sh
+TESTS = test-hwloc-annotate.sh test-hwloc-assembler.sh test-hwloc-calc.sh test-hwloc-distances.sh test-hwloc-distrib.sh test-hwloc-info.sh test-hwloc-ls.sh
 if HWLOC_HAVE_PLUGINS
 TESTS += test-fake-plugin.sh
 endif HWLOC_HAVE_PLUGINS
@@ -57,7 +57,7 @@ man7_pages = hwloc.7
 EXTRA_DIST += $(man7_pages:.7=.7in)
 nodist_man_MANS = $(man7_pages)
 
-man1_pages = lstopo.1 hwloc-annotate.1 hwloc-bind.1 hwloc-calc.1 hwloc-distances.1 hwloc-distrib.1 hwloc-ps.1 hwloc-assembler.1 hwloc-assembler-remote.1
+man1_pages = lstopo.1 hwloc-annotate.1 hwloc-bind.1 hwloc-calc.1 hwloc-distances.1 hwloc-distrib.1 hwloc-info.1 hwloc-ps.1 hwloc-assembler.1 hwloc-assembler-remote.1
 EXTRA_DIST += $(man1_pages:.1=.1in)
 nodist_man_MANS += $(man1_pages)
 
@@ -92,29 +92,29 @@ endif HWLOC_HAVE_LINUX
 	  > $@ < $<
 
 install-exec-hook: install-man
-	rm -f $(DESTDIR)$(bindir)/hwloc-ls$(EXEEXT) $(DESTDIR)$(bindir)/hwloc-info$(EXEEXT)
-	cd $(DESTDIR)$(bindir) && $(LN_S) lstopo-no-graphics$(EXEEXT) hwloc-ls$(EXEEXT) && $(LN_S) lstopo-no-graphics$(EXEEXT) hwloc-info$(EXEEXT)
+	rm -f $(DESTDIR)$(bindir)/hwloc-ls$(EXEEXT)
+	cd $(DESTDIR)$(bindir) && $(LN_S) lstopo-no-graphics$(EXEEXT) hwloc-ls$(EXEEXT)
 if !HWLOC_HAVE_WINDOWS
 if !HWLOC_HAVE_CAIRO
 	rm -f $(DESTDIR)$(bindir)/lstopo
 	cd $(DESTDIR)$(bindir) && $(LN_S) lstopo-no-graphics$(EXEEXT) lstopo$(EXEEXT) || true
 endif
 endif
-	rm -f $(DESTDIR)$(man1dir)/hwloc-ls.1 $(DESTDIR)$(man1dir)/hwloc-info.1
-	cd $(DESTDIR)$(man1dir) && $(LN_S) lstopo.1 hwloc-ls.1 && $(LN_S) lstopo.1 hwloc-info.1
+	rm -f $(DESTDIR)$(man1dir)/hwloc-ls.1
+	cd $(DESTDIR)$(man1dir) && $(LN_S) lstopo.1 hwloc-ls.1
 	rm -f $(DESTDIR)$(man1dir)/lstopo-no-graphics.1
 	cd $(DESTDIR)$(man1dir) && $(LN_S) lstopo.1 lstopo-no-graphics.1
-	$(SED) -e 's/abs_top_builddir\/utils/bindir/' -e '/abs_top_builddir/d' $(DESTDIR)$(bindir)/hwloc-assembler-remote > $(DESTDIR)$(bindir)/hwloc-assembler-remote.tmp && mv -f $(DESTDIR)$(bindir)/hwloc-assembler-remote.tmp $(DESTDIR)$(bindir)/hwloc-assembler-remote
+	$(SED) -e 's/HWLOC_top_builddir\/utils/bindir/' -e '/HWLOC_top_builddir/d' $(DESTDIR)$(bindir)/hwloc-assembler-remote > $(DESTDIR)$(bindir)/hwloc-assembler-remote.tmp && mv -f $(DESTDIR)$(bindir)/hwloc-assembler-remote.tmp $(DESTDIR)$(bindir)/hwloc-assembler-remote
 	chmod +x $(DESTDIR)$(bindir)/hwloc-assembler-remote
 
 uninstall-local:
-	rm -f $(DESTDIR)$(bindir)/hwloc-ls$(EXEEXT) $(DESTDIR)$(bindir)/hwloc-info$(EXEEXT)
+	rm -f $(DESTDIR)$(bindir)/hwloc-ls$(EXEEXT)
 if !HWLOC_HAVE_WINDOWS
 if !HWLOC_HAVE_CAIRO
 	rm -f $(DESTDIR)$(bindir)/lstopo$(EXEEXT)
 endif
 endif
-	rm -f $(DESTDIR)$(man1dir)/hwloc-ls.1 $(DESTDIR)$(man1dir)/hwloc-info.1 $(DESTDIR)$(man1dir)/lstopo-no-graphics.1
+	rm -f $(DESTDIR)$(man1dir)/hwloc-ls.1 $(DESTDIR)$(man1dir)/lstopo-no-graphics.1
 
 distclean-local:
 	rm -f $(nodist_man_MANS)
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc-annotate.1in b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc-annotate.1in
index ad650b4..a2195d7 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc-annotate.1in
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc-annotate.1in
@@ -1,5 +1,5 @@
 .\" -*- nroff -*-
-.\" Copyright © 2012 inria.  All rights reserved.
+.\" Copyright © 2013 inria.  All rights reserved.
 .\" See COPYING in top-level directory.
 .TH HWLOC-ANNOTATE "1" "#HWLOC_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#"
 .SH NAME
@@ -67,6 +67,9 @@ The index is logical.
 .
 .PP
 .B NOTE:
+The existing annotations may be listed with hwloc-info.
+.PP
+.B 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-annotate utility.
@@ -106,5 +109,5 @@ hwloc-annotate will return nonzero if any kind of error occurs, such as
 .SH SEE ALSO
 .
 .ft R
-hwloc(7), lstopo(1)
+hwloc(7), lstopo(1), hwloc-info(1)
 .sp
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc-assembler-remote.1in b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc-assembler-remote.1in
index f330664..b2a33a4 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc-assembler-remote.1in
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc-assembler-remote.1in
@@ -33,8 +33,8 @@ Pass the given lstopo options when gathering remote topologies.
 \fB\-\-show\fR
 Display the resulting topology before exit.
 .TP
-\fB\-v \-\-verbose\fR
-Verbose messages.
+\fB\-f \-\-force\fR
+Ignore failure to load a remote host topology.
 .
 .\" **************************
 .\"    Description Section
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc-assembler-remote.in b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc-assembler-remote.in
index 9efed27..53e0f04 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc-assembler-remote.in
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc-assembler-remote.in
@@ -2,17 +2,17 @@
 #-*-sh-*-
 
 #
-# Copyright © 2011 inria.  All rights reserved.
+# Copyright © 2011-2013 Inria.  All rights reserved.
 # See COPYING in top-level directory.
 #
 
-abs_top_builddir="@abs_top_builddir@"
+HWLOC_top_builddir="@HWLOC_top_builddir@"
 prefix="@prefix@"
 exec_prefix="@exec_prefix@"
 bindir="@bindir@"
 # this will be changed into $bindir/lstopo during make install
-locallstopo="$abs_top_builddir/utils/lstopo"
-assembler="$abs_top_builddir/utils/hwloc-assembler"
+locallstopo="$HWLOC_top_builddir/utils/lstopo"
+assembler="$HWLOC_top_builddir/utils/hwloc-assembler"
 
 force=0
 show=0
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc-bind.1in b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc-bind.1in
index 372a21d..28edb3d 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc-bind.1in
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc-bind.1in
@@ -6,7 +6,7 @@
 .TH HWLOC-BIND "1" "#HWLOC_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#"
 .SH NAME
 hwloc-bind \- Launch a command that is bound to specific processors
-and/or memory.
+and/or memory, or consult the binding of an existing program
 .
 .\" **************************
 .\"    Synopsis Section
@@ -20,7 +20,6 @@ and/or memory.
 Note that hwloc(7) provides a detailed explanation of the hwloc system
 and of valid <location> formats;
 it should be read before reading this man page.
-.
 .\" **************************
 .\"    Options Section
 .\" **************************
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc-calc.1in b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc-calc.1in
index 1ba0c24..f137cbb 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc-calc.1in
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc-calc.1in
@@ -1,5 +1,5 @@
 .\" -*- nroff -*-
-.\" Copyright © 2010-2012 Inria.  All rights reserved.
+.\" Copyright © 2010-2013 Inria.  All rights reserved.
 .\" Copyright © 2009 Cisco Systems, Inc.  All rights reserved.
 .\" See COPYING in top-level directory.
 .TH HWLOC-CALC "1" "#HWLOC_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#"
@@ -37,7 +37,7 @@ Use OS/physical indexes instead of logical indexes for input.
 \fB\-\-li\fR \fB\-\-logical\-input\fR
 Use logical indexes instead of physical/OS indexes for input (default).
 .TP
-\fB\-\-po\fR \fB\-\-physical\-input\fR
+\fB\-\-po\fR \fB\-\-physical\-output\fR
 Use OS/physical indexes instead of logical indexes for output.
 .TP
 \fB\-\-lo\fR \fB\-\-logical\-output\fR
@@ -192,9 +192,9 @@ socket:
 To bind GNU OpenMP threads logically over the whole machine, we need to use
 physical number output instead:
 
-    $ export GOMP_CPU_AFFINITY=`hwloc-calc --physical --intersect PU machine:0`
+    $ export GOMP_CPU_AFFINITY=`hwloc-calc --physical-output --intersect PU machine:0`
     $ echo $GOMP_CPU_AFFINITY
-    0,2,1,3
+    0,4,1,5,2,6,3,7
 
 To display the list of NUMA nodes, by physical indexes, that intersect a given (physical) CPU mask:
 
@@ -250,6 +250,16 @@ To get the set of first threads of all cores:
 
     $ hwloc-calc core:all.pu:0
 
+This can also be very useful in order to make GNU OpenMP use exactly one thread
+per core, and in logical core order:
+
+    $ export OMP_NUM_THREADS=`hwloc-calc --number-of core machine:0`
+    $ echo $OMP_NUM_THREADS
+    4
+    $ export GOMP_CPU_AFFINITY=`hwloc-calc --physical-output --intersect PU core:all.pu:0`
+    $ echo $GOMP_CPU_AFFINITY
+    0,2,1,3
+
 .
 .\" **************************
 .\"    Return value section
@@ -270,5 +280,5 @@ hwloc-calc will return nonzero if any kind of error occurs, such as
 .SH SEE ALSO
 .
 .ft R
-hwloc(7), hwloc-gather-topology(1)
+hwloc(7), lstopo(1), hwloc-info(1), hwloc-gather-topology(1)
 .sp
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc-calc.c b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc-calc.c
index 54a63a0..c13695e 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc-calc.c
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc-calc.c
@@ -109,6 +109,7 @@ hwloc_calc_output(hwloc_topology_t topology, const char *sep, hwloc_bitmap_t set
       unsigned idx;
       hwloc_obj_t obj = hwloc_get_first_largest_obj_inside_cpuset(topology, remaining);
       if (!obj) {
+        hwloc_bitmap_free(remaining);
         fprintf(stderr, "No object included in this cpuset\n");
         return EXIT_FAILURE;
       }
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc-calc.h b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc-calc.h
index 7742831..109f5d0 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc-calc.h
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc-calc.h
@@ -1,6 +1,6 @@
 /*
  * Copyright © 2009 CNRS
- * Copyright © 2009-2012 inria.  All rights reserved.
+ * Copyright © 2009-2013 Inria.  All rights reserved.
  * Copyright © 2009-2012 Université Bordeaux 1
  * Copyright © 2011 Cisco Systems, Inc.  All rights reserved.
  * See COPYING in top-level directory.
@@ -315,7 +315,9 @@ static __hwloc_inline int
 hwloc_calc_append_object_range(hwloc_topology_t topology, unsigned topodepth,
 			       hwloc_const_bitmap_t rootset, int depth,
 			       const char *string, /* starts with indexes following the colon */
-			       int logical, hwloc_bitmap_t set, int verbose)
+			       int logical,
+			       void (*cbfunc)(void *, hwloc_obj_t, int), void *cbdata,
+			       int verbose)
 {
   hwloc_obj_t obj;
   unsigned width;
@@ -372,12 +374,12 @@ hwloc_calc_append_object_range(hwloc_topology_t topology, unsigned topodepth,
     }
     if (obj) {
       if (dot) {
-	hwloc_calc_append_object_range(topology, topodepth, obj->cpuset, nextdepth, nextsep+1, logical, set, verbose);
+	hwloc_calc_append_object_range(topology, topodepth, obj->cpuset, nextdepth, nextsep+1, logical, cbfunc, cbdata, verbose);
       } else {
 	/* add to the temporary cpuset
 	 * and let the caller add/clear/and/xor for the actual final cpuset depending on cmdline options
 	 */
-        hwloc_calc_append_cpuset(set, obj->cpuset, HWLOC_CALC_APPEND_ADD, verbose);
+        cbfunc(cbdata, obj, verbose);
       }
     }
   }
@@ -386,15 +388,11 @@ hwloc_calc_append_object_range(hwloc_topology_t topology, unsigned topodepth,
 }
 
 static __hwloc_inline int
-hwloc_calc_append_iodev(hwloc_bitmap_t set, hwloc_obj_t obj,
-			hwloc_calc_append_mode_t mode, int verbose)
+hwloc_calc_append_iodev(void (*cbfunc)(void *, hwloc_obj_t, int), void *cbdata,
+			hwloc_obj_t obj,
+			int verbose)
 {
-  while (obj && !obj->cpuset)
-    obj = obj->parent;
-  if (!obj)
-    /* do nothing */
-    return 0;
-  hwloc_calc_append_cpuset(set, obj->cpuset, mode, verbose);
+  cbfunc(cbdata, obj, verbose);
   return 0;
 }
 
@@ -425,7 +423,9 @@ hwloc_calc_find_next_pci_object(hwloc_topology_t topology, int vendor, int devic
 }
 
 static __hwloc_inline int
-hwloc_calc_append_pci_object_range(hwloc_topology_t topology, const char *string, hwloc_bitmap_t set, int verbose)
+hwloc_calc_append_pci_object_range(hwloc_topology_t topology, const char *string,
+				   void (*cbfunc)(void *, hwloc_obj_t, int), void *cbdata,
+				   int verbose)
 {
   hwloc_obj_t obj;
   int vendor, device;
@@ -472,7 +472,7 @@ hwloc_calc_append_pci_object_range(hwloc_topology_t topology, const char *string
       if (verbose > 0)
 	printf("using matching PCI object #%d bus id %04x:%02x:%02x.%01x\n", i,
 	       obj->attr->pcidev.domain, obj->attr->pcidev.bus, obj->attr->pcidev.dev, obj->attr->pcidev.func);
-      hwloc_calc_append_iodev(set, obj, HWLOC_CALC_APPEND_ADD, verbose);
+      hwloc_calc_append_iodev(cbfunc, cbdata, obj, verbose);
     } else {
       if (amount != -1)
 	if (verbose >= 0)
@@ -493,6 +493,67 @@ hwloc_calc_append_pci_object_range(hwloc_topology_t topology, const char *string
 }
 
 static __hwloc_inline int
+hwloc_calc_process_type_arg(hwloc_topology_t topology, unsigned topodepth,
+			    const char *arg, size_t typelen,
+			    int logical,
+			    void (*cbfunc)(void *, hwloc_obj_t, int), void *cbdata,
+			    int verbose)
+{
+  const char *sep = &arg[typelen];
+  hwloc_obj_type_t type = (hwloc_obj_type_t) -1;
+  int depth;
+
+  depth = hwloc_calc_parse_depth_prefix(topology, topodepth,
+					arg, typelen,
+					&type,
+					verbose);
+  if (depth < 0) {
+    /* if we didn't find a depth but found a type, handle special cases */
+    hwloc_obj_t obj = NULL;
+    if (*sep == ':' && type == HWLOC_OBJ_PCI_DEVICE) {
+      /* FIXME: change to another syntax? */
+      return hwloc_calc_append_pci_object_range(topology, sep+1, cbfunc, cbdata, verbose);
+
+    } else if (*sep == '=' && type == HWLOC_OBJ_PCI_DEVICE) {
+      /* try to match a busid */
+      obj = hwloc_get_pcidev_by_busidstring(topology, sep+1);
+      if (obj)
+	return hwloc_calc_append_iodev(cbfunc, cbdata, obj, verbose);
+      if (verbose >= 0)
+	fprintf(stderr, "invalid PCI device %s\n", sep+1);
+      return -1;
+
+    } else if (*sep == '=' && type == HWLOC_OBJ_OS_DEVICE) {
+      /* try to match a OS device name */
+      while ((obj = hwloc_get_next_osdev(topology, obj)) != NULL) {
+	if (!strcmp(obj->name, sep+1))
+	  return hwloc_calc_append_iodev(cbfunc, cbdata, obj, verbose);
+      }
+      if (verbose >= 0)
+	fprintf(stderr, "invalid OS device %s\n", sep+1);
+      return -1;
+    } else
+      return -1;
+  }
+
+  /* look at indexes following this type/depth */
+  return hwloc_calc_append_object_range(topology, topodepth, hwloc_topology_get_complete_cpuset(topology), depth, sep+1, logical, cbfunc, cbdata, verbose);
+}
+
+static __hwloc_inline void
+hwloc_calc_process_arg_cpuset_cb(void *_data, hwloc_obj_t obj, int verbose)
+{
+  hwloc_bitmap_t set = _data;
+  /* walk up out of I/O objects */
+  while (obj && !obj->cpuset)
+    obj = obj->parent;
+  if (!obj)
+    /* do nothing */
+    return;
+  hwloc_calc_append_cpuset(set, obj->cpuset, HWLOC_CALC_APPEND_ADD, verbose);
+}
+
+static __hwloc_inline int
 hwloc_calc_process_arg(hwloc_topology_t topology, unsigned topodepth,
 		       const char *arg, int logical, hwloc_bitmap_t set,
 		       int verbose)
@@ -518,52 +579,11 @@ hwloc_calc_process_arg(hwloc_topology_t topology, unsigned topodepth,
   /* try to match a type/depth followed by a special character */
   typelen = strspn(arg, "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789");
   if (typelen && (arg[typelen] == ':' || arg[typelen] == '=')) {
-    const char *sep = &arg[typelen];
-    hwloc_obj_type_t type = (hwloc_obj_type_t) -1;
-    int depth;
-    hwloc_bitmap_t newset;
-
-    depth = hwloc_calc_parse_depth_prefix(topology, topodepth,
-					  arg, typelen,
-					  &type,
-					  verbose);
-    if (depth < 0) {
-      /* if we didn't find a depth but found a type, handle special cases */
-      hwloc_obj_t obj = NULL;
-      if (*sep == ':' && type == HWLOC_OBJ_PCI_DEVICE) {
-	/* FIXME: change to another syntax? */
-	/* agregate the whole range in newset before applying it to set */
-	newset = hwloc_bitmap_alloc();
-	err = hwloc_calc_append_pci_object_range(topology, sep+1, newset, verbose);
-	if (!err)
-	  err = hwloc_calc_append_cpuset(set, newset, mode, verbose);
-	hwloc_bitmap_free(newset);
-	return err;
-      } else if (*sep == '=' && type == HWLOC_OBJ_PCI_DEVICE) {
-	/* try to match a busid */
-	obj = hwloc_get_pcidev_by_busidstring(topology, sep+1);
-	if (obj)
-	  return hwloc_calc_append_iodev(set, obj, mode, verbose);
-	if (verbose >= 0)
-	  fprintf(stderr, "invalid PCI device %s\n", sep+1);
-	return -1;
-      } else if (*sep == '=' && type == HWLOC_OBJ_OS_DEVICE) {
-	/* try to match a OS device name */
-	while ((obj = hwloc_get_next_osdev(topology, obj)) != NULL) {
-	  if (!strcmp(obj->name, sep+1))
-	    return hwloc_calc_append_iodev(set, obj, mode, verbose);
-	}
-	if (verbose >= 0)
-	  fprintf(stderr, "invalid OS device %s\n", sep+1);
-	return -1;
-      } else
-	return -1;
-    }
-
-    /* look at indexes following this type/depth */
-    /* agregate the whole range in newset before applying it to set */
-    newset = hwloc_bitmap_alloc();
-    err = hwloc_calc_append_object_range(topology, topodepth, hwloc_topology_get_complete_cpuset(topology), depth, sep+1, logical, newset, verbose);
+    /* process type/depth */
+    hwloc_bitmap_t newset = hwloc_bitmap_alloc();
+    err = hwloc_calc_process_type_arg(topology, topodepth, arg, typelen, logical,
+				      hwloc_calc_process_arg_cpuset_cb, newset,
+				      verbose);
     if (!err)
       err = hwloc_calc_append_cpuset(set, newset, mode, verbose);
     hwloc_bitmap_free(newset);
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc-distrib.1in b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc-distrib.1in
index f6e4291..46e8e70 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc-distrib.1in
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc-distrib.1in
@@ -58,7 +58,7 @@ Distribute starting from objects of the given type instead of from
 the top of the topology hierarchy, i.e. ignoring the structure given by objects
 above.
 .TP
-\fB\-\-top\fR <type>
+\fB\-\-to\fR <type>
 Distribute down to objects of the given type instead of down to the bottom of
 the topology hierarchy, i.e. ignoring the structure given by objects below.
 This may be useful if some latitude is desired for the binding, e.g. just bind
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc-distrib.c b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc-distrib.c
index f06aad1..bda82c7 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc-distrib.c
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc-distrib.c
@@ -92,11 +92,16 @@ int main(int argc, char *argv[])
 	goto next;
       }
       else if (!strcmp (argv[0], "--ignore")) {
+	hwloc_obj_type_t type;
 	if (argc < 2) {
 	  usage(callname, stdout);
 	  exit(EXIT_FAILURE);
 	}
-	hwloc_topology_ignore_type(topology, hwloc_obj_type_of_string(argv[1]));
+	type = hwloc_obj_type_of_string(argv[1]);
+	if (type != (hwloc_obj_type_t) -1)
+	  hwloc_topology_ignore_type(topology, type);
+	else
+	  fprintf(stderr, "Unsupported type `%s' passed to --ignore, ignoring.\n", argv[1]);
 	argc--;
 	argv++;
 	goto next;
@@ -107,6 +112,8 @@ int main(int argc, char *argv[])
 	  exit(EXIT_FAILURE);
 	}
 	from_type = hwloc_obj_type_of_string(argv[1]);
+	if (from_type == (hwloc_obj_type_t) -1)
+	  fprintf(stderr, "Unsupported type `%s' passed to --from, ignoring.\n", argv[1]);
 	argc--;
 	argv++;
 	goto next;
@@ -117,6 +124,8 @@ int main(int argc, char *argv[])
 	  exit(EXIT_FAILURE);
 	}
 	to_type = hwloc_obj_type_of_string(argv[1]);
+	if (to_type == (hwloc_obj_type_t) -1)
+	  fprintf(stderr, "Unsupported type `%s' passed to --to, ignoring.\n", argv[1]);
 	argc--;
 	argv++;
 	goto next;
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc-gather-topology.1in b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc-gather-topology.1in
index 6b763b9..90f6188 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc-gather-topology.1in
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc-gather-topology.1in
@@ -5,7 +5,7 @@
 .TH HWLOC-GATHER-TOPOLOGY "1" "#HWLOC_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#"
 .SH NAME
 hwloc-gather-topology \- Saves the relevant Linux topology files
-and the lstopo output for later (possibly offline) usage.
+and the lstopo output for later (possibly offline) usage
 .
 .\" **************************
 .\"    Synopsis Section
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc-info.1in b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc-info.1in
new file mode 100644
index 0000000..9906e67
--- /dev/null
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc-info.1in
@@ -0,0 +1,178 @@
+.\" -*- nroff -*-
+.\" Copyright © 2009-2013 Inria.  All rights reserved.
+.\" Copyright © 2009-2010 Université of Bordeaux
+.\" Copyright © 2009-2010 Cisco Systems, Inc.  All rights reserved.
+.\" See COPYING in top-level directory.
+.TH HWLOC-INFO "1" "#HWLOC_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#"
+.SH NAME
+hwloc-info \- Show some information about some objects or about a topology
+.
+.\" **************************
+.\"    Synopsis Section
+.\" **************************
+.SH SYNOPSIS
+.
+.PP
+.B hwloc-info
+[ \fIoptions \fR]...
+\fI<object>\fR...
+.
+.B hwloc-info
+[ \fIoptions \fR]...
+.
+.PP
+Note that hwloc(7) provides a detailed explanation of the hwloc system
+and of valid <object> formats;
+it should be read before reading this man page.
+.
+.\" **************************
+.\"    Options Section
+.\" **************************
+.SH OPTIONS
+.
+.TP
+\fB\-i\fR <file>, \fB\-\-input\fR <file>
+Read topology from XML file <file> (instead of discovering the
+topology on the local machine).  If <file> is "\-", the standard input
+is used.  XML support must have been compiled in to hwloc for this
+option to be usable.
+.TP
+\fB\-i\fR <directory>, \fB\-\-input\fR <directory>
+Read topology from the chroot specified by <directory> (instead of
+discovering the topology on the local machine).  This option is
+generally only available on Linux.  The chroot was usually created
+by gathering another machine topology with hwloc-gather-topology.
+.TP
+\fB\-i\fR <specification>, \fB\-\-input\fR <specification>
+Simulate a fake hierarchy (instead of discovering the topology on the
+local machine). If <specification> is "node:2 pu:3", the topology will
+contain two NUMA nodes with 3 processing units in each of them.
+The <specification> string must end with a number of PUs.
+.TP
+\fB\-\-if\fR <format>, \fB\-\-input\-format\fR <format>
+Enforce the input in the given format, among \fBxml\fR, \fBfsroot\fR
+and \fBsynthetic\fR.
+.TP
+\fB\-v\fR \fB\-\-verbose\fR
+Include additional detail.
+.TP
+\fB\-s\fR \fB\-\-silent\fR
+Reduce the amount of details to show.
+A single summary line per object is displayed.
+.TP
+\fB\-\-ancestors\fR
+Display information about the object as well as
+about all its ancestors up to the root of the topology.
+.TP
+\fB\-\-ancestor\fR <type>
+Only display the object ancestors that match the given type.
+.TP
+\fB\-n\fR
+When outputting object information, prefix each line with the index
+of the considered object within the input.
+For instance, if three cores were given in input, the output
+lines will be prefixed with "0: ", "1: " or "2: ".
+If \fB\-\-ancestor\fR is also used, the prefix will be "X.Y: "
+where X is the index of the considered object within the input,
+and Y is the parent index (0 for the object itself, increasing
+towards the root of the topology).
+.TP
+\fB\-\-whole\-system\fR
+Do not consider administration limitations.
+.TP
+\fB\-\-restrict\fR <cpuset>
+Restrict the topology to the given cpuset.
+.TP
+\fB\-\-restrict\fR binding
+Restrict the topology to the current process binding.
+This option requires the use of the actual current machine topology
+(or any other topology with \fB\-\-thissystem\fR or with
+HWLOC_THISSYSTEM set to 1 in the environment).
+.TP
+\fB\-\-no\-io\fB
+Do not show any I/O device or bridge.
+By default, common devices (GPUs, NICs, block devices, ...) and
+interesting bridges are shown.
+.TP
+\fB\-\-no\-bridges\fB
+Do not show any I/O bridge except hostbridges.
+By default, common devices (GPUs, NICs, block devices, ...) and
+interesting bridges are shown.
+.TP
+\fB\-\-whole\-io\fB
+Show all I/O devices and bridges.
+By default, only common devices (GPUs, NICs, block devices, ...) and
+interesting bridges are shown.
+.TP
+\fB\-\-thissystem\fR
+Assume that the selected backend provides the topology for the
+system on which we are running. 
+This is useful when using \fB\-\-restrict\fR binding and loading
+a custom topology such as an XML file.
+.TP
+\fB\-\-pid\fR <pid>
+Detect topology as seen by process <pid>, i.e. as if process <pid> did the
+discovery itself.
+Note that this can for instance change the set of allowed processors.
+Also show this process current CPU binding by marking the corresponding
+PUs (in Green in the graphical output, see the COLORS section below,
+or by appending \fI(binding)\fR to the verbose text output).
+If 0 is given as pid, the current binding for the lstopo process will be shown.
+.TP
+\fB\-p\fR \fB\-\-physical\fR
+Use OS/physical indexes instead of logical indexes for input.
+.TP
+\fB\-l\fR \fB\-\-logical\fR
+Use logical indexes instead of physical/OS indexes for input (default).
+.TP
+\fB\-\-version\fR
+Report version and exit.
+.
+.\" **************************
+.\"    Description Section
+.\" **************************
+.SH DESCRIPTION
+.
+hwloc-info displays information about the specified object.
+It is intended to be used with tools such as grep for filtering
+certain attribute lines.
+When no object is specified, hwloc-info prints a summary of the topology.
+.
+Objects may be specified as location tuples, as explained in hwloc(7).
+However hexadecimal bitmasks are not accepted since they may correspond
+to multiple objects.
+.
+.PP
+.B 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-calc utility.
+.
+..\" **************************
+.\"    Examples Section
+.\" **************************
+.SH EXAMPLES
+.PP
+To display information about each socket:
+
+    $ hwloc-info socket:all
+    Socket L#0
+     logical index = 0
+    ...
+
+To display information about the core whose physical index is 2:
+
+    $ utils/hwloc-info -p core:2
+    Core L#1
+     logical index = 1
+     os index = 2
+   ...
+.
+.\" **************************
+.\"    See also section
+.\" **************************
+.SH SEE ALSO
+.
+.ft R
+hwloc(7), lstopo(1), hwloc-calc(1), hwloc-bind(1), hwloc-ps(1), hwloc-gather-topology(1)
+.sp
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc-info.c b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc-info.c
new file mode 100644
index 0000000..4955b61
--- /dev/null
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc-info.c
@@ -0,0 +1,429 @@
+/*
+ * Copyright © 2009 CNRS
+ * Copyright © 2009-2013 Inria.  All rights reserved.
+ * Copyright © 2009-2012 Université Bordeaux 1
+ * Copyright © 2009-2011 Cisco Systems, Inc.  All rights reserved.
+ * See COPYING in top-level directory.
+ */
+
+#include <private/autogen/config.h>
+#include <hwloc.h>
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <fcntl.h>
+#include <assert.h>
+
+#include "misc.h"
+#include "hwloc-calc.h"
+
+static int pid_number = -1;
+static hwloc_pid_t pid;
+static int verbose_mode = 0;
+static int logical = 1;
+static int show_ancestors = 0;
+static hwloc_obj_type_t show_ancestor_type = (hwloc_obj_type_t) -1;
+static int show_ancestor_attrdepth = -1;
+static hwloc_obj_cache_type_t show_ancestor_attrcachetype = (hwloc_obj_cache_type_t) -1;
+static int show_index_prefix = 0;
+static int current_obj;
+
+void usage(const char *name, FILE *where)
+{
+  fprintf (where, "Usage: %s [ options ] [ locations ]\n", name);
+  fprintf (where, "\nOutput options:\n");
+  fprintf (where, "  -v --verbose          Include additional details\n");
+  fprintf (where, "  -s --silent           Reduce the amount of details to show\n");
+  fprintf (where, "  --ancestors           Display the chain of ancestor objects up to the root\n");
+  fprintf (where, "  --ancestor <type>     Only display the ancestor of the given type\n");
+  fprintf (where, "  -n                    Prefix each line with the index of the considered object\n");
+  fprintf (where, "Object filtering options:\n");
+  fprintf (where, "  --restrict <cpuset>   Restrict the topology to processors listed in <cpuset>\n");
+  fprintf (where, "  --restrict binding    Restrict the topology to the current process binding\n");
+  fprintf (where, "  --no-io               Do not show any I/O device or bridge\n");
+  fprintf (where, "  --no-bridges          Do not any I/O bridge except hostbridges\n");
+  fprintf (where, "  --whole-io            Show all I/O devices and bridges\n");
+  fprintf (where, "Input options:\n");
+  hwloc_utils_input_format_usage(where, 6);
+  fprintf (where, "  --thissystem          Assume that the input topology provides the topology\n"
+		  "                        for the system on which we are running\n");
+  fprintf (where, "  --pid <pid>           Detect topology as seen by process <pid>\n");
+  fprintf (where, "  --whole-system        Do not consider administration limitations\n");
+  fprintf (where, "  -l --logical          Use logical object indexes for input (default)\n");
+  fprintf (where, "  -p --physical         Use physical object indexes for input\n");
+  fprintf (where, "Miscellaneous options:\n");
+  fprintf (where, "  --version             Report version and exit\n");
+}
+
+static void
+hwloc_info_show_obj(hwloc_obj_t obj, const char *type, const char *prefix, int verbose)
+{
+  char s[128];
+  unsigned i;
+  if (verbose < 0)
+    return;
+  printf("%s type = %s\n", prefix, hwloc_obj_type_string(obj->type));
+  printf("%s full type = %s\n", prefix, type);
+  printf("%s logical index = %u\n", prefix, obj->logical_index);
+  if (obj->os_index != (unsigned) -1)
+    printf("%s os index = %u\n", prefix, obj->os_index);
+  if (obj->name)
+    printf("%s name = %s\n", prefix, obj->name);
+  if (obj->depth != (unsigned) -1)
+    printf("%s depth = %u\n", prefix, obj->depth);
+  printf("%s sibling rank = %u\n", prefix, obj->sibling_rank);
+  printf("%s children = %u\n", prefix, obj->arity);
+  if (obj->memory.local_memory)
+    printf("%s local memory = %llu\n", prefix, (unsigned long long) obj->memory.local_memory);
+  if (obj->memory.total_memory)
+    printf("%s total memory = %llu\n", prefix, (unsigned long long) obj->memory.total_memory);
+
+  if (obj->cpuset) {
+    hwloc_bitmap_snprintf(s, sizeof(s), obj->cpuset);
+    printf("%s cpuset = %s\n", prefix, s);
+  }
+  if (obj->complete_cpuset) {
+    hwloc_bitmap_snprintf(s, sizeof(s), obj->complete_cpuset);
+    printf("%s complete cpuset = %s\n", prefix, s);
+  }
+  if (obj->online_cpuset) {
+    hwloc_bitmap_snprintf(s, sizeof(s), obj->online_cpuset);
+    printf("%s online cpuset = %s\n", prefix, s);
+  }
+  if (obj->allowed_cpuset) {
+    hwloc_bitmap_snprintf(s, sizeof(s), obj->allowed_cpuset);
+    printf("%s allowed cpuset = %s\n", prefix, s);
+  }
+
+  if (obj->nodeset) {
+    hwloc_bitmap_snprintf(s, sizeof(s), obj->nodeset);
+    printf("%s nodeset = %s\n", prefix, s);
+  }
+  if (obj->complete_nodeset) {
+    hwloc_bitmap_snprintf(s, sizeof(s), obj->complete_nodeset);
+    printf("%s complete nodeset = %s\n", prefix, s);
+  }
+  if (obj->allowed_nodeset) {
+    hwloc_bitmap_snprintf(s, sizeof(s), obj->allowed_nodeset);
+    printf("%s allowed nodeset = %s\n", prefix, s);
+  }
+
+  switch (obj->type) {
+  case HWLOC_OBJ_CACHE:
+    printf("%s attr cache depth = %u\n", prefix, obj->attr->cache.depth);
+    switch (obj->attr->cache.type) {
+    case HWLOC_OBJ_CACHE_UNIFIED: printf("%s attr cache type = Unified\n", prefix); break;
+    case HWLOC_OBJ_CACHE_DATA: printf("%s attr cache type = Data\n", prefix); break;
+    case HWLOC_OBJ_CACHE_INSTRUCTION: printf("%s attr cache type = Instruction\n", prefix); break;
+    }
+    printf("%s attr cache size = %llu\n", prefix, (unsigned long long) obj->attr->cache.size);
+    printf("%s attr cache line size = %u\n", prefix, obj->attr->cache.linesize);
+    if (obj->attr->cache.associativity == -1)
+      printf("%s attr cache ways = Fully-associative\n", prefix);
+    else if (obj->attr->cache.associativity != 0)
+      printf("%s attr cache ways = %d\n", prefix, obj->attr->cache.associativity);
+    break;
+  case HWLOC_OBJ_GROUP:
+    printf("%s attr group depth = %u\n", prefix, obj->attr->group.depth);
+    break;
+  case HWLOC_OBJ_BRIDGE:
+    switch (obj->attr->bridge.upstream_type) {
+    case HWLOC_OBJ_BRIDGE_HOST:
+      printf("%s attr bridge upstream type = Host\n", prefix);
+      break;
+    case HWLOC_OBJ_BRIDGE_PCI:
+      printf("%s attr bridge upstream type = PCI\n", prefix);
+      printf("%s attr PCI bus id = %04x:%02x:%02x.%01x\n",
+	     prefix, obj->attr->pcidev.domain, obj->attr->pcidev.bus, obj->attr->pcidev.dev, obj->attr->pcidev.func);
+      printf("%s attr PCI class = %04x\n",
+	     prefix, obj->attr->pcidev.class_id);
+      printf("%s attr PCI id = %04x:%04x\n",
+	     prefix, obj->attr->pcidev.vendor_id, obj->attr->pcidev.device_id);
+      if (obj->attr->pcidev.linkspeed)
+	printf("%s attr PCI linkspeed = %f GB/s\n", prefix, obj->attr->pcidev.linkspeed);
+      break;
+    }
+    switch (obj->attr->bridge.downstream_type) {
+    case HWLOC_OBJ_BRIDGE_HOST:
+      assert(0);
+    case HWLOC_OBJ_BRIDGE_PCI:
+      printf("%s attr bridge downstream type = PCI\n", prefix);
+      printf("%s attr PCI secondary bus = %02x\n",
+	     prefix, obj->attr->bridge.downstream.pci.secondary_bus);
+      printf("%s attr PCI subordinate bus = %02x\n",
+	     prefix, obj->attr->bridge.downstream.pci.subordinate_bus);
+      break;
+    }
+    break;
+  case HWLOC_OBJ_PCI_DEVICE:
+    printf("%s attr PCI bus id = %04x:%02x:%02x.%01x\n",
+	   prefix, obj->attr->pcidev.domain, obj->attr->pcidev.bus, obj->attr->pcidev.dev, obj->attr->pcidev.func);
+    printf("%s attr PCI class = %04x\n",
+	   prefix, obj->attr->pcidev.class_id);
+    printf("%s attr PCI id = %04x:%04x\n",
+	   prefix, obj->attr->pcidev.vendor_id, obj->attr->pcidev.device_id);
+    if (obj->attr->pcidev.linkspeed)
+      printf("%s attr PCI linkspeed = %f GB/s\n", prefix, obj->attr->pcidev.linkspeed);
+    break;
+  case HWLOC_OBJ_OS_DEVICE:
+    printf("%s attr osdev type = %s\n", prefix, type);
+    break;
+  default:
+    /* nothing to show */
+    break;
+  }
+  for(i=0; i<obj->infos_count; i++) {
+    printf("%s info %s = %s\n", prefix, obj->infos[i].name, obj->infos[i].value);
+  }
+}
+
+static void
+hwloc_calc_process_arg_info_cb(void *_data __hwloc_attribute_unused,
+			       hwloc_obj_t obj,
+			       int verbose)
+{
+  char prefix[32];
+  char objs[128];
+
+  prefix[0] = '\0';
+  if (show_index_prefix)
+    snprintf(prefix, sizeof(prefix), "%u: ", current_obj);
+
+  hwloc_obj_type_snprintf(objs, sizeof(objs), obj, 1);
+
+  if (show_ancestors) {
+    char parents[128];
+    unsigned level = 0;
+    hwloc_obj_t parent = obj;
+    while (parent) {
+      if (show_index_prefix)
+	snprintf(prefix, sizeof(prefix), "%u.%u: ", current_obj, level);
+      hwloc_obj_type_snprintf(parents, sizeof(parents), parent, 1);
+      if (verbose < 0)
+	printf("%s%s:%u\n", prefix, parents, parent->logical_index);
+      else if (level)
+	printf("%s%s L#%u = parent #%u of %s L#%u\n",
+	       prefix, parents, parent->logical_index, level, objs, obj->logical_index);
+      else
+	printf("%s%s L#%u\n", prefix, parents, parent->logical_index);
+      hwloc_info_show_obj(parent, parents, prefix, verbose);
+      parent = parent->parent;
+      level++;
+    }
+  } else if (show_ancestor_type != (hwloc_obj_type_t) -1) {
+    char parents[128];
+    hwloc_obj_t parent = obj;
+    while (parent) {
+      if (parent->type == show_ancestor_type) {
+	if (parent->type == HWLOC_OBJ_GROUP
+	    && show_ancestor_attrdepth != -1
+	    && show_ancestor_attrdepth != (int) parent->attr->group.depth)
+	  goto next;
+	if (parent->type == HWLOC_OBJ_CACHE
+	    && show_ancestor_attrdepth != -1
+	    && show_ancestor_attrdepth != (int) parent->attr->cache.depth)
+	  goto next;
+	if (parent->type == HWLOC_OBJ_CACHE
+	    && show_ancestor_attrcachetype != (hwloc_obj_cache_type_t) -1
+	    && show_ancestor_attrcachetype != parent->attr->cache.type)
+	  goto next;
+	hwloc_obj_type_snprintf(parents, sizeof(parents), parent, 1);
+	if (verbose < 0)
+	  printf("%s%s:%u\n", prefix, parents, parent->logical_index);
+	else
+	  printf("%s%s L#%u = parent of %s L#%u\n",
+		 prefix, parents, parent->logical_index, objs, obj->logical_index);
+	hwloc_info_show_obj(parent, parents, prefix, verbose);
+      }
+next:
+      parent = parent->parent;
+    }
+  } else {
+    if (verbose < 0)
+      printf("%s%s:%u\n", prefix, objs, obj->logical_index);
+    else
+      printf("%s%s L#%u\n", prefix, objs, obj->logical_index);
+    hwloc_info_show_obj(obj, objs, prefix, verbose);
+  }
+
+  current_obj++;
+}
+
+int
+main (int argc, char *argv[])
+{
+  int err;
+  hwloc_topology_t topology;
+  unsigned topodepth;
+  unsigned long flags = HWLOC_TOPOLOGY_FLAG_IO_DEVICES | HWLOC_TOPOLOGY_FLAG_IO_BRIDGES | HWLOC_TOPOLOGY_FLAG_ICACHES;
+  char * callname;
+  char * input = NULL;
+  enum hwloc_utils_input_format input_format = HWLOC_UTILS_INPUT_DEFAULT;
+  char *restrictstring = NULL;
+  size_t typelen;
+  int opt;
+
+  /* enable verbose backends */
+  putenv("HWLOC_XML_VERBOSE=1");
+  putenv("HWLOC_SYNTHETIC_VERBOSE=1");
+
+  callname = strrchr(argv[0], '/');
+  if (!callname)
+    callname = argv[0];
+  else
+    callname++;
+  /* skip argv[0], handle options */
+  argc--;
+  argv++;
+
+  err = hwloc_topology_init (&topology);
+  if (err)
+    return EXIT_FAILURE;
+
+  hwloc_topology_set_flags(topology, flags);
+
+  while (argc >= 1) {
+    opt = 0;
+    if (*argv[0] == '-') {
+      if (!strcmp (argv[0], "-v") || !strcmp (argv[0], "--verbose"))
+        verbose_mode++;
+      else if (!strcmp (argv[0], "-s") || !strcmp (argv[0], "--silent"))
+        verbose_mode--;
+      else if (!strcmp (argv[0], "-h") || !strcmp (argv[0], "--help")) {
+	usage(callname, stdout);
+        exit(EXIT_SUCCESS);
+      }
+      else if (!strcmp (argv[0], "-n"))
+	show_index_prefix = 1;
+      else if (!strcmp (argv[0], "--ancestors"))
+	show_ancestors = 1;
+      else if (!strcmp (argv[0], "--ancestor")) {
+	if (argc < 2) {
+	  usage (callname, stderr);
+	  exit(EXIT_FAILURE);
+	}
+	err = hwloc_obj_type_sscanf(argv[1], &show_ancestor_type, &show_ancestor_attrdepth, &show_ancestor_attrcachetype);
+        if (err < 0) {
+          fprintf(stderr, "unrecognized --ancestor type %s\n", argv[1]);
+          usage(callname, stderr);
+          return EXIT_SUCCESS;
+        }
+	opt = 1;
+      }
+      else if (!strcmp (argv[0], "--no-icaches"))
+	flags &= ~HWLOC_TOPOLOGY_FLAG_ICACHES;
+      else if (!strcmp (argv[0], "--whole-system"))
+	flags |= HWLOC_TOPOLOGY_FLAG_WHOLE_SYSTEM;
+      else if (!strcmp (argv[0], "--no-io"))
+	flags &= ~(HWLOC_TOPOLOGY_FLAG_IO_DEVICES | HWLOC_TOPOLOGY_FLAG_IO_BRIDGES);
+      else if (!strcmp (argv[0], "--no-bridges"))
+	flags &= ~(HWLOC_TOPOLOGY_FLAG_IO_BRIDGES);
+      else if (!strcmp (argv[0], "--whole-io"))
+	flags |= HWLOC_TOPOLOGY_FLAG_WHOLE_IO;
+      else if (!strcmp (argv[0], "--thissystem"))
+	flags |= HWLOC_TOPOLOGY_FLAG_IS_THISSYSTEM;
+      else if (!strcmp (argv[0], "--restrict")) {
+	if (argc < 2) {
+	  usage (callname, stderr);
+	  exit(EXIT_FAILURE);
+	}
+	restrictstring = strdup(argv[1]);
+	opt = 1;
+      }
+
+      else if (hwloc_utils_lookup_input_option(argv, argc, &opt,
+					       &input, &input_format,
+					       callname)) {
+	/* we'll enable later */
+      }
+      else if (!strcmp (argv[0], "--pid")) {
+	if (argc < 2) {
+	  usage (callname, stderr);
+	  exit(EXIT_FAILURE);
+	}
+	pid_number = atoi(argv[1]); opt = 1;
+      }
+      else if (!strcmp(argv[0], "-l") || !strcmp(argv[0], "--logical"))
+	logical = 1;
+      else if (!strcmp(argv[0], "-p") || !strcmp(argv[0], "--physical"))
+	logical = 0;
+      else if (!strcmp (argv[0], "--version")) {
+        printf("%s %s\n", callname, VERSION);
+        exit(EXIT_SUCCESS);
+      }
+      else {
+	fprintf (stderr, "Unrecognized option: %s\n", argv[0]);
+	usage(callname, stderr);
+	return EXIT_FAILURE;
+      }
+      argc -= opt+1;
+      argv += opt+1;
+    } else {
+      /* not an option */
+      break;
+    }
+  }
+
+  hwloc_topology_set_flags(topology, flags);
+
+  if (input) {
+    err = hwloc_utils_enable_input_format(topology, input, input_format, verbose_mode, callname);
+    if (err)
+      return err;
+  }
+
+  if (pid_number != -1 && pid_number != 0) {
+    pid = hwloc_pid_from_number(pid_number, 0);
+    if (hwloc_topology_set_pid(topology, pid)) {
+      perror("Setting target pid");
+      return EXIT_FAILURE;
+    }
+  }
+
+  err = hwloc_topology_load (topology);
+  if (err)
+    return EXIT_FAILURE;
+
+  topodepth = hwloc_topology_get_depth(topology);
+
+  if (restrictstring) {
+    hwloc_bitmap_t restrictset = hwloc_bitmap_alloc();
+    if (!strcmp (restrictstring, "binding")) {
+      if (pid_number != -1 && pid_number != 0)
+	hwloc_get_proc_cpubind(topology, pid, restrictset, HWLOC_CPUBIND_PROCESS);
+      else
+	hwloc_get_cpubind(topology, restrictset, HWLOC_CPUBIND_PROCESS);
+    } else {
+      hwloc_bitmap_sscanf(restrictset, restrictstring);
+    }
+    err = hwloc_topology_restrict (topology, restrictset, 0);
+    if (err) {
+      perror("Restricting the topology");
+      /* fallthrough */
+    }
+    hwloc_bitmap_free(restrictset);
+    free(restrictstring);
+  }
+
+  if (!argc)
+    hwloc_lstopo_show_summary(stdout, topology);
+
+  else {
+    current_obj = 0;
+    while (argc >= 1) {
+      /* try to match a type/depth followed by a special character */
+      typelen = strspn(argv[0], "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789");
+      if (typelen && (argv[0][typelen] == ':' || argv[0][typelen] == '=')) {
+	err = hwloc_calc_process_type_arg(topology, topodepth, argv[0], typelen, logical,
+					  hwloc_calc_process_arg_info_cb, NULL,
+					  verbose_mode);
+      }
+      argc--; argv++;
+    }
+  }
+
+  hwloc_topology_destroy (topology);
+
+  return EXIT_SUCCESS;
+}
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc-ps.1in b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc-ps.1in
index 6fd4d27..7fe73e2 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc-ps.1in
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc-ps.1in
@@ -4,7 +4,7 @@
 .\" See COPYING in top-level directory.
 .TH HWLOC-PS "1" "#HWLOC_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#"
 .SH NAME
-hwloc-ps \- List currently-running processes or threads that are bound.
+hwloc-ps \- List currently-running processes or threads that are bound
 .
 .\" **************************
 .\"    Synopsis Section
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc-ps.c b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc-ps.c
index 1b3bf0c..04c42a7 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc-ps.c
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc-ps.c
@@ -211,7 +211,6 @@ int main(int argc, char *argv[])
       if (taskdir) {
 	struct dirent *taskdirent;
 	long tid;
-	char *end;
 	unsigned n = 0;
 	/* count threads */
 	while ((taskdirent = readdir(taskdir))) {
@@ -272,7 +271,6 @@ int main(int argc, char *argv[])
     if (pidcmd) {
       char *cmd;
       FILE *file;
-      char *end;
       cmd = malloc(strlen(pidcmd)+1+5+2+1);
       sprintf(cmd, "%s %u", pidcmd, pid);
       file = popen(cmd, "r");
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/lstopo-draw.c b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/lstopo-draw.c
index 8ae58b4..1f39ea1 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/lstopo-draw.c
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/lstopo-draw.c
@@ -1,6 +1,6 @@
 /*
  * Copyright © 2009 CNRS
- * Copyright © 2009-2012 Inria.  All rights reserved.
+ * Copyright © 2009-2013 Inria.  All rights reserved.
  * Copyright © 2009-2012 Université Bordeaux 1
  * Copyright © 2009-2011 Cisco Systems, Inc.  All rights reserved.
  * See COPYING in top-level directory.
@@ -148,17 +148,27 @@ static foo_draw get_type_fun(hwloc_obj_type_t type);
 #define RECURSE_BEGIN(obj, border) do { \
   hwloc_obj_t *subobjs = obj->children; \
   unsigned numsubobjs = obj->arity; \
+  unsigned numignoredsubobjs = 0; \
   unsigned width, height; \
   unsigned maxwidth __hwloc_attribute_unused, maxheight __hwloc_attribute_unused; \
+  unsigned i; \
   maxwidth = maxheight = 0; \
   totwidth = (border) + mywidth; \
   totheight = (border) + myheight; \
+  /* Count objects to ignore */ \
+  if (lstopo_ignore_pus) { \
+    for (i = 0; i < numsubobjs; i++) \
+      if (subobjs[i]->type == HWLOC_OBJ_PU) \
+        numignoredsubobjs++; \
+    numsubobjs -= numignoredsubobjs; \
+  } \
   if (numsubobjs) { \
-    unsigned i; \
 
 #define RECURSE_FOR() \
     /* Iterate over subobjects */ \
-    for (i = 0; i < numsubobjs; i++) { \
+    for (i = 0; i < numsubobjs+numignoredsubobjs; i++) { \
+      if (lstopo_ignore_pus && subobjs[i]->type == HWLOC_OBJ_PU) \
+	continue; \
 
       /* Recursive call */
 #define RECURSE_CALL_FUN(methods) \
@@ -588,7 +598,7 @@ core_draw(hwloc_topology_t topology, struct draw_methods *methods, int logical,
 {
   unsigned myheight = (fontsize ? (fontsize + gridsize) : 0), totheight;
   unsigned mywidth = 0, totwidth;
-  unsigned textwidth = 5*fontsize;
+  unsigned textwidth = fontsize ? 8*fontsize : gridsize;
 
   DYNA_CHECK();
 
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/lstopo-text.c b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/lstopo-text.c
index 7adc737..64369f7 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/lstopo-text.c
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/lstopo-text.c
@@ -1,6 +1,6 @@
 /*
  * Copyright © 2009 CNRS
- * Copyright © 2009-2010 inria.  All rights reserved.
+ * Copyright © 2009-2013 Inria.  All rights reserved.
  * Copyright © 2009-2012 Université Bordeaux 1
  * Copyright © 2009-2011 Cisco Systems, Inc.  All rights reserved.
  * See COPYING in top-level directory.
@@ -51,7 +51,7 @@ output_console_obj (hwloc_topology_t topology, hwloc_obj_t l, FILE *output, int
   char type[32], *attr, phys[32] = "";
   unsigned idx = logical ? l->logical_index : l->os_index;
   const char *indexprefix = logical ? " L#" :  " P#";
-  if (show_cpuset < 2) {
+  if (lstopo_show_cpuset < 2) {
     int len;
     if (l->type == HWLOC_OBJ_MISC && l->name)
       fprintf(output, "%s", l->name);
@@ -81,11 +81,11 @@ output_console_obj (hwloc_topology_t topology, hwloc_obj_t l, FILE *output, int
   }
   if (!l->cpuset)
     return;
-  if (show_cpuset == 1)
+  if (lstopo_show_cpuset == 1)
     fprintf(output, " cpuset=");
-  if (show_cpuset) {
+  if (lstopo_show_cpuset) {
     char *cpusetstr;
-    if (taskset)
+    if (lstopo_show_taskset)
       hwloc_bitmap_taskset_asprintf(&cpusetstr, l->cpuset);
     else
       hwloc_bitmap_asprintf(&cpusetstr, l->cpuset);
@@ -109,7 +109,7 @@ static void
 output_topology (hwloc_topology_t topology, hwloc_obj_t l, hwloc_obj_t parent, FILE *output, int i, int logical, int verbose_mode)
 {
   unsigned x;
-  int group_identical = (verbose_mode <= 1) && !show_cpuset;
+  int group_identical = (verbose_mode <= 1) && !lstopo_show_cpuset;
   if (group_identical
       && parent && parent->arity == 1
       && l->cpuset && parent->cpuset && hwloc_bitmap_isequal(l->cpuset, parent->cpuset)) {
@@ -125,7 +125,8 @@ output_topology (hwloc_topology_t topology, hwloc_obj_t l, hwloc_obj_t parent, F
   if (l->arity || (!i && !l->arity))
     {
       for (x=0; x<l->arity; x++)
-	output_topology (topology, l->children[x], l, output, i, logical, verbose_mode);
+	if (l->children[x]->type != HWLOC_OBJ_PU || !lstopo_ignore_pus)
+	  output_topology (topology, l->children[x], l, output, i, logical, verbose_mode);
   }
 }
 
@@ -134,7 +135,7 @@ static void
 output_only (hwloc_topology_t topology, hwloc_obj_t l, FILE *output, int logical, int verbose_mode)
 {
   unsigned x;
-  if (show_only == l->type) {
+  if (lstopo_show_only == l->type) {
     output_console_obj (topology, l, output, logical, verbose_mode);
     fprintf (output, "\n");
   }
@@ -165,41 +166,20 @@ void output_console(hwloc_topology_t topology, const char *filename, int logical
    * if verbose_mode > 1, print both.
    */
 
-  if (show_only != (hwloc_obj_type_t)-1) {
+  if (lstopo_show_only != (hwloc_obj_type_t)-1) {
     if (verbose_mode > 1)
-      fprintf(output, "Only showing %s objects\n", hwloc_obj_type_string(show_only));
+      fprintf(output, "Only showing %s objects\n", hwloc_obj_type_string(lstopo_show_only));
     output_only (topology, hwloc_get_root_obj(topology), output, logical, verbose_mode);
   } else if (verbose_mode >= 1) {
     output_topology (topology, hwloc_get_root_obj(topology), NULL, output, 0, logical, verbose_mode);
     fprintf(output, "\n");
   }
 
-  if ((verbose_mode > 1 || !verbose_mode) && show_only == (hwloc_obj_type_t)-1) {
-    unsigned depth, nbobjs;
-    for (depth = 0; depth < topodepth; depth++) {
-      hwloc_obj_t obj = hwloc_get_obj_by_depth(topology, depth, 0);
-      char type[64];
-      nbobjs = hwloc_get_nbobjs_by_depth (topology, depth);
-      indent(output, depth);
-      hwloc_obj_type_snprintf(type, sizeof(type), obj, 1);
-      fprintf (output, "depth %u:\t%u %s (type #%u)\n",
-	       depth, nbobjs, type, obj->type);
-    }
-    nbobjs = hwloc_get_nbobjs_by_depth (topology, HWLOC_TYPE_DEPTH_BRIDGE);
-    if (nbobjs)
-      fprintf (output, "Special depth %d:\t%u %s (type #%u)\n",
-	       HWLOC_TYPE_DEPTH_BRIDGE, nbobjs, "Bridge", HWLOC_OBJ_BRIDGE);
-    nbobjs = hwloc_get_nbobjs_by_depth (topology, HWLOC_TYPE_DEPTH_PCI_DEVICE);
-    if (nbobjs)
-      fprintf (output, "Special depth %d:\t%u %s (type #%u)\n",
-	       HWLOC_TYPE_DEPTH_PCI_DEVICE, nbobjs, "PCI Device", HWLOC_OBJ_PCI_DEVICE);
-    nbobjs = hwloc_get_nbobjs_by_depth (topology, HWLOC_TYPE_DEPTH_OS_DEVICE);
-    if (nbobjs)
-      fprintf (output, "Special depth %d:\t%u %s (type #%u)\n",
-	       HWLOC_TYPE_DEPTH_OS_DEVICE, nbobjs, "OS Device", HWLOC_OBJ_OS_DEVICE);
-  }
-
-  if (verbose_mode > 1 && show_only == (hwloc_obj_type_t)-1) {
+  if ((verbose_mode > 1 || !verbose_mode) && lstopo_show_only == (hwloc_obj_type_t)-1) {
+    hwloc_lstopo_show_summary(output, topology);
+ }
+
+  if (verbose_mode > 1 && lstopo_show_only == (hwloc_obj_type_t)-1) {
     const struct hwloc_distances_s * distances;
     unsigned depth;
 
@@ -215,7 +195,7 @@ void output_console(hwloc_topology_t topology, const char *filename, int logical
     }
   }
 
-  if (verbose_mode > 1 && show_only == (hwloc_obj_type_t)-1) {
+  if (verbose_mode > 1 && lstopo_show_only == (hwloc_obj_type_t)-1) {
     hwloc_const_bitmap_t complete = hwloc_topology_get_complete_cpuset(topology);
     hwloc_const_bitmap_t topo = hwloc_topology_get_topology_cpuset(topology);
     hwloc_const_bitmap_t online = hwloc_topology_get_online_cpuset(topology);
@@ -277,6 +257,12 @@ void output_synthetic(hwloc_topology_t topology, const char *filename, int logic
   hwloc_obj_t obj = hwloc_get_root_obj(topology);
   int arity;
 
+  if (!obj->symmetric_subtree) {
+    fprintf(stderr, "Cannot output assymetric topology in synthetic format.\n");
+    fprintf(stderr, "Adding --no-io may help making the topology symmetric.\n");
+    return;
+  }
+
   if (!filename || !strcmp(filename, "-"))
     output = stdout;
   else {
@@ -287,12 +273,6 @@ void output_synthetic(hwloc_topology_t topology, const char *filename, int logic
     }
   }
 
-  if (!obj->symmetric_subtree) {
-    fprintf(stderr, "Cannot output assymetric topology in synthetic format.\n");
-    fprintf(stderr, "Adding --no-io may help making the topology symmetric.\n");
-    return;
-  }
-
   arity = obj->arity;
   while (arity) {
     obj = obj->first_child;
@@ -300,6 +280,9 @@ void output_synthetic(hwloc_topology_t topology, const char *filename, int logic
     arity = obj->arity;
   }
   fprintf(output, "\n");
+
+  if (output != stdout)
+    fclose(output);
 }
 
 /*
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/lstopo.1in b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/lstopo.1in
index 4f15415..f089597 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/lstopo.1in
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/lstopo.1in
@@ -1,13 +1,11 @@
 .\" -*- nroff -*-
-.\" Copyright © 2009-2012 Inria.  All rights reserved.
+.\" Copyright © 2009-2013 Inria.  All rights reserved.
 .\" Copyright © 2009-2010 Université of Bordeaux
 .\" Copyright © 2009-2010 Cisco Systems, Inc.  All rights reserved.
 .\" See COPYING in top-level directory.
 .TH LSTOPO "1" "#HWLOC_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#"
 .SH NAME
-lstopo, lstopo-no-graphics \- Show the topology of the system (note that hwloc-bind(1)
-provides a detailed explanation of the hwloc system; it should be read
-before reading this man page).
+lstopo, lstopo-no-graphics \- Show the topology of the system
 .
 .\" **************************
 .\"    Synopsis Section
@@ -59,6 +57,8 @@ and \fBsynthetic\fR.
 .TP
 \fB\-v\fR \fB\-\-verbose\fR
 Include additional detail.
+The hwloc-info tool may be used to display even more information
+about specific objects.
 .TP
 \fB\-s\fR \fB\-\-silent\fR
 Reduce the amount of details to show.
@@ -91,6 +91,10 @@ Only show objects of the given type in the textual output.
 .TP
 \fB\-\-ignore\fR <type>
 Ignore all objects of type <type> in the topology.
+hwloc supports ignoring any type except PUs and I/O devices.
+However lstopo still offers PU ignoring by hiding PU objects
+in the graphical and textual outputs.
+Note that PU may not be ignored in the XML output.
 .TP
 \fB\-\-no\-caches\fR
 Do not show caches.
@@ -425,5 +429,5 @@ To count the number of logical processors in the system
 .SH SEE ALSO
 .
 .ft R
-hwloc(7), hwloc-bind(1), hwloc-ps(1), hwloc-gather-topology(1)
+hwloc(7), hwloc-info(1), hwloc-bind(1), hwloc-ps(1), hwloc-gather-topology(1)
 .sp
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/lstopo.c b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/lstopo.c
index 91f395a..7c2d6d6 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/lstopo.c
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/lstopo.c
@@ -1,6 +1,6 @@
 /*
  * Copyright © 2009 CNRS
- * Copyright © 2009-2012 Inria.  All rights reserved.
+ * Copyright © 2009-2013 Inria.  All rights reserved.
  * Copyright © 2009-2012 Université Bordeaux 1
  * Copyright © 2009-2011 Cisco Systems, Inc.  All rights reserved.
  * See COPYING in top-level directory.
@@ -34,17 +34,20 @@
 #include "lstopo.h"
 #include "misc.h"
 
-int logical = -1;
-hwloc_obj_type_t show_only = (hwloc_obj_type_t) -1;
-int show_cpuset = 0;
-int taskset = 0;
+int lstopo_pid_number = -1;
+hwloc_pid_t lstopo_pid;
+hwloc_obj_type_t lstopo_show_only = (hwloc_obj_type_t) -1;
+int lstopo_show_cpuset = 0;
+int lstopo_show_taskset = 0;
+int lstopo_ignore_pus = 0;
+
 unsigned int fontsize = 10;
 unsigned int gridsize = 10;
 enum lstopo_orient_e force_orient[HWLOC_OBJ_TYPE_MAX];
-unsigned int legend = 1;
-unsigned int top = 0;
-int pid_number = -1;
-hwloc_pid_t pid;
+
+static int logical = -1;
+static unsigned int legend = 1;
+static unsigned int top = 0;
 
 FILE *open_file(const char *filename, const char *mode)
 {
@@ -262,11 +265,9 @@ void usage(const char *name, FILE *where)
                   "                        impact\n");
   fprintf (where, "  --restrict <cpuset>   Restrict the topology to processors listed in <cpuset>\n");
   fprintf (where, "  --restrict binding    Restrict the topology to the current process binding\n");
-#ifdef HWLOC_HAVE_LIBPCI
   fprintf (where, "  --no-io               Do not show any I/O device or bridge\n");
   fprintf (where, "  --no-bridges          Do not any I/O bridge except hostbridges\n");
   fprintf (where, "  --whole-io            Show all I/O devices and bridges\n");
-#endif
   fprintf (where, "Input options:\n");
   hwloc_utils_input_format_usage(where, 6);
   fprintf (where, "  --thissystem          Assume that the input topology provides the topology\n"
@@ -388,27 +389,36 @@ main (int argc, char *argv[])
       else if (!strcmp (argv[0], "-p") || !strcmp (argv[0], "--physical"))
 	logical = 0;
       else if (!strcmp (argv[0], "-c") || !strcmp (argv[0], "--cpuset"))
-	show_cpuset = 1;
+	lstopo_show_cpuset = 1;
       else if (!strcmp (argv[0], "-C") || !strcmp (argv[0], "--cpuset-only"))
-	show_cpuset = 2;
+	lstopo_show_cpuset = 2;
       else if (!strcmp (argv[0], "--taskset")) {
-	taskset = 1;
-	if (!show_cpuset)
-	  show_cpuset = 1;
+	lstopo_show_taskset = 1;
+	if (!lstopo_show_cpuset)
+	  lstopo_show_cpuset = 1;
       } else if (!strcmp (argv[0], "--only")) {
 	if (argc < 2) {
 	  usage (callname, stderr);
 	  exit(EXIT_FAILURE);
 	}
-        show_only = hwloc_obj_type_of_string(argv[1]);
+        lstopo_show_only = hwloc_obj_type_of_string(argv[1]);
+	if (lstopo_show_only == (hwloc_obj_type_t) -1)
+	  fprintf(stderr, "Unsupported type `%s' passed to --only, ignoring.\n", argv[1]);
 	opt = 1;
       }
       else if (!strcmp (argv[0], "--ignore")) {
+	hwloc_obj_type_t type;
 	if (argc < 2) {
 	  usage (callname, stderr);
 	  exit(EXIT_FAILURE);
 	}
-        hwloc_topology_ignore_type(topology, hwloc_obj_type_of_string(argv[1]));
+	type = hwloc_obj_type_of_string(argv[1]);
+	if (type == (hwloc_obj_type_t) -1)
+	  fprintf(stderr, "Unsupported type `%s' passed to --ignore, ignoring.\n", argv[1]);
+	else if (type == HWLOC_OBJ_PU)
+	  lstopo_ignore_pus = 1;
+	else
+	  hwloc_topology_ignore_type(topology, type);
 	opt = 1;
       }
       else if (!strcmp (argv[0], "--no-caches"))
@@ -456,6 +466,8 @@ main (int argc, char *argv[])
 	  type = hwloc_obj_type_of_string(tmp);
 	  if (type != (hwloc_obj_type_t) -1)
 	    force_orient[type] = orient;
+	  else
+	    fprintf(stderr, "Unsupported type `%s' passed to %s, ignoring.\n", tmp, argv[0]);
 	  if (!end)
 	    break;
 	  tmp = end+1;
@@ -492,7 +504,7 @@ main (int argc, char *argv[])
 	  usage (callname, stderr);
 	  exit(EXIT_FAILURE);
 	}
-	pid_number = atoi(argv[1]); opt = 1;
+	lstopo_pid_number = atoi(argv[1]); opt = 1;
       } else if (!strcmp (argv[0], "--ps") || !strcmp (argv[0], "--top"))
         top = 1;
       else if (!strcmp (argv[0], "--version")) {
@@ -517,7 +529,7 @@ main (int argc, char *argv[])
       argv += opt+1;
     }
 
-  if (show_only != (hwloc_obj_type_t)-1)
+  if (lstopo_show_only != (hwloc_obj_type_t)-1)
     merge = 0;
 
   hwloc_topology_set_flags(topology, flags);
@@ -536,9 +548,9 @@ main (int argc, char *argv[])
       return err;
   }
 
-  if (pid_number != -1 && pid_number != 0) {
-    pid = hwloc_pid_from_number(pid_number, 0);
-    if (hwloc_topology_set_pid(topology, pid)) {
+  if (lstopo_pid_number != -1 && lstopo_pid_number != 0) {
+    lstopo_pid = hwloc_pid_from_number(lstopo_pid_number, 0);
+    if (hwloc_topology_set_pid(topology, lstopo_pid)) {
       perror("Setting target pid");
       return EXIT_FAILURE;
     }
@@ -554,8 +566,8 @@ main (int argc, char *argv[])
   if (restrictstring) {
     hwloc_bitmap_t restrictset = hwloc_bitmap_alloc();
     if (!strcmp (restrictstring, "binding")) {
-      if (pid_number != -1 && pid_number != 0)
-	hwloc_get_proc_cpubind(topology, pid, restrictset, HWLOC_CPUBIND_PROCESS);
+      if (lstopo_pid_number != -1 && lstopo_pid_number != 0)
+	hwloc_get_proc_cpubind(topology, lstopo_pid, restrictset, HWLOC_CPUBIND_PROCESS);
       else
 	hwloc_get_cpubind(topology, restrictset, HWLOC_CPUBIND_PROCESS);
     } else {
@@ -570,12 +582,6 @@ main (int argc, char *argv[])
     free(restrictstring);
   }
 
-  if (!filename && !strcmp(callname,"hwloc-info")) {
-    /* behave kind-of plpa-info */
-    filename = "-";
-    verbose_mode--;
-  }
-
   /* if the output format wasn't enforced, look at the filename */
   if (filename && output_format == LSTOPO_OUTPUT_DEFAULT) {
     if (!strcmp(filename, "-")
@@ -585,13 +591,17 @@ main (int argc, char *argv[])
       char *dot = strrchr(filename, '.');
       if (dot)
         output_format = parse_output_format(dot+1, callname);
+      else {
+	fprintf(stderr, "Cannot infer output type for file `%s' without any extension, using default output.\n", filename);
+	filename = NULL;
+      }
     }
   }
 
   /* if  the output format wasn't enforced, think a bit about what the user probably want */
   if (output_format == LSTOPO_OUTPUT_DEFAULT) {
-    if (show_cpuset
-        || show_only != (hwloc_obj_type_t)-1
+    if (lstopo_show_cpuset
+        || lstopo_show_only != (hwloc_obj_type_t)-1
         || verbose_mode != LSTOPO_VERBOSE_MODE_DEFAULT)
       output_format = LSTOPO_OUTPUT_CONSOLE;
   }
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/lstopo.h b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/lstopo.h
index 9e9ff81..6df9d9e 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/lstopo.h
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/lstopo.h
@@ -1,6 +1,6 @@
 /*
  * Copyright © 2009 CNRS
- * Copyright © 2009-2010 inria.  All rights reserved.
+ * Copyright © 2009-2013 Inria.  All rights reserved.
  * Copyright © 2009-2010, 2012 Université Bordeaux 1
  * Copyright © 2011 Cisco Systems, Inc.  All rights reserved.
  * See COPYING in top-level directory.
@@ -11,11 +11,12 @@
 
 #include <hwloc.h>
 
-extern hwloc_obj_type_t show_only;
-extern int show_cpuset;
-extern int taskset;
-extern int pid_number;
-extern hwloc_pid_t pid;
+extern int lstopo_ignore_pus;
+extern hwloc_obj_type_t lstopo_show_only;
+extern int lstopo_show_cpuset;
+extern int lstopo_show_taskset;
+extern int lstopo_pid_number;
+extern hwloc_pid_t lstopo_pid;
 
 typedef void output_method (struct hwloc_topology *topology, const char *output, int logical, int legend, int verbose_mode);
 
@@ -61,9 +62,9 @@ static __hwloc_inline int lstopo_pu_running(hwloc_topology_t topology, hwloc_obj
 {
   hwloc_bitmap_t bind = hwloc_bitmap_alloc();
   int res;
-  if (pid_number != -1 && pid_number != 0)
-    hwloc_get_proc_cpubind(topology, pid, bind, 0);
-  else if (pid_number == 0)
+  if (lstopo_pid_number != -1 && lstopo_pid_number != 0)
+    hwloc_get_proc_cpubind(topology, lstopo_pid, bind, 0);
+  else if (lstopo_pid_number == 0)
     hwloc_get_cpubind(topology, bind, 0);
   res = bind && hwloc_bitmap_isset(bind, l->os_index);
   hwloc_bitmap_free(bind);
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/misc.h b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/misc.h
index f40779a..d5db53b 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/misc.h
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/misc.h
@@ -1,6 +1,6 @@
 /*
  * Copyright © 2009 CNRS
- * Copyright © 2009-2012 Inria.  All rights reserved.
+ * Copyright © 2009-2013 Inria.  All rights reserved.
  * Copyright © 2009-2012 Université Bordeaux 1
  * Copyright © 2009-2011 Cisco Systems, Inc.  All rights reserved.
  * See COPYING in top-level directory.
@@ -249,3 +249,31 @@ hwloc_pid_from_number(int pid_number, int set_info __hwloc_attribute_unused)
 #endif
   return pid;
 }
+
+static __hwloc_inline void
+hwloc_lstopo_show_summary(FILE *output, hwloc_topology_t topology)
+{
+  unsigned topodepth = hwloc_topology_get_depth(topology);
+  unsigned depth, nbobjs;
+  for (depth = 0; depth < topodepth; depth++) {
+    hwloc_obj_t obj = hwloc_get_obj_by_depth(topology, depth, 0);
+    char type[64];
+    nbobjs = hwloc_get_nbobjs_by_depth (topology, depth);
+    fprintf(output, "%*s", (int) depth, "");
+    hwloc_obj_type_snprintf(type, sizeof(type), obj, 1);
+    fprintf (output,"depth %u:\t%u %s (type #%u)\n",
+	     depth, nbobjs, type, obj->type);
+  }
+  nbobjs = hwloc_get_nbobjs_by_depth (topology, HWLOC_TYPE_DEPTH_BRIDGE);
+  if (nbobjs)
+    fprintf (output, "Special depth %d:\t%u %s (type #%u)\n",
+	     HWLOC_TYPE_DEPTH_BRIDGE, nbobjs, "Bridge", HWLOC_OBJ_BRIDGE);
+  nbobjs = hwloc_get_nbobjs_by_depth (topology, HWLOC_TYPE_DEPTH_PCI_DEVICE);
+  if (nbobjs)
+    fprintf (output, "Special depth %d:\t%u %s (type #%u)\n",
+	     HWLOC_TYPE_DEPTH_PCI_DEVICE, nbobjs, "PCI Device", HWLOC_OBJ_PCI_DEVICE);
+  nbobjs = hwloc_get_nbobjs_by_depth (topology, HWLOC_TYPE_DEPTH_OS_DEVICE);
+  if (nbobjs)
+    fprintf (output, "Special depth %d:\t%u %s (type #%u)\n",
+	     HWLOC_TYPE_DEPTH_OS_DEVICE, nbobjs, "OS Device", HWLOC_OBJ_OS_DEVICE);
+}
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/test-fake-plugin.sh.in b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/test-fake-plugin.sh.in
index ba2fc63..608e26f 100755
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/test-fake-plugin.sh.in
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/test-fake-plugin.sh.in
@@ -2,15 +2,15 @@
 #-*-sh-*-
 
 #
-# Copyright © 2009-2012 Inria.  All rights reserved.
+# Copyright © 2009-2013 Inria.  All rights reserved.
 # Copyright © 2009, 2011 Université Bordeaux 1
 # See COPYING in top-level directory.
 #
 
-abs_top_builddir="@abs_top_builddir@"
-lstopo="$abs_top_builddir/utils/lstopo-no-graphics"
+HWLOC_top_builddir="@HWLOC_top_builddir@"
+lstopo="$HWLOC_top_builddir/utils/lstopo-no-graphics"
 
-HWLOC_PLUGINS_PATH=${abs_top_builddir}/src
+HWLOC_PLUGINS_PATH=${HWLOC_top_builddir}/src
 export HWLOC_PLUGINS_PATH
 
 HWLOC_DEBUG_FAKE_COMPONENT=1
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/test-hwloc-annotate.sh.in b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/test-hwloc-annotate.sh.in
index 4e92756..6d17f20 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/test-hwloc-annotate.sh.in
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/test-hwloc-annotate.sh.in
@@ -2,15 +2,15 @@
 #-*-sh-*-
 
 #
-# Copyright © 2009-2012 Inria.  All rights reserved.
+# Copyright © 2009-2013 Inria.  All rights reserved.
 # See COPYING in top-level directory.
 #
 
-abs_top_builddir="@abs_top_builddir@"
-annotate="$abs_top_builddir/utils/hwloc-annotate"
-abs_top_srcdir="@abs_top_srcdir@"
+HWLOC_top_builddir="@HWLOC_top_builddir@"
+annotate="$HWLOC_top_builddir/utils/hwloc-annotate"
+HWLOC_top_srcdir="@HWLOC_top_srcdir@"
 
-HWLOC_PLUGINS_PATH=${abs_top_builddir}/src
+HWLOC_PLUGINS_PATH=${HWLOC_top_builddir}/src
 export HWLOC_PLUGINS_PATH
 
 if test x at HWLOC_XML_LOCALIZED@ = x1; then
@@ -34,9 +34,9 @@ file="$tmp/test-hwloc-annotate.output"
 
 set -e
 
-$annotate $abs_top_srcdir/utils/test-hwloc-annotate.input $file all info Foo Bar
+$annotate $HWLOC_top_srcdir/utils/test-hwloc-annotate.input $file all info Foo Bar
 $annotate --ci $file $file Core:all info Foo2 Bar2
 $annotate --ci $file $file L2Cache:0 none
 
-diff @HWLOC_DIFF_U@ $abs_top_srcdir/utils/test-hwloc-annotate.output "$file"
+diff @HWLOC_DIFF_U@ $HWLOC_top_srcdir/utils/test-hwloc-annotate.output "$file"
 rm -rf "$tmp"
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/test-hwloc-assembler.sh.in b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/test-hwloc-assembler.sh.in
index d3b8482..cdd0406 100755
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/test-hwloc-assembler.sh.in
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/test-hwloc-assembler.sh.in
@@ -2,16 +2,16 @@
 #-*-sh-*-
 
 #
-# Copyright © 2009-2012 Inria.  All rights reserved.
+# Copyright © 2009-2013 Inria.  All rights reserved.
 # Copyright © 2009, 2011 Université Bordeaux 1
 # See COPYING in top-level directory.
 #
 
-abs_top_builddir="@abs_top_builddir@"
-assembler="$abs_top_builddir/utils/hwloc-assembler"
-abs_top_srcdir="@abs_top_srcdir@"
+HWLOC_top_builddir="@HWLOC_top_builddir@"
+assembler="$HWLOC_top_builddir/utils/hwloc-assembler"
+HWLOC_top_srcdir="@HWLOC_top_srcdir@"
 
-HWLOC_PLUGINS_PATH=${abs_top_builddir}/src
+HWLOC_PLUGINS_PATH=${HWLOC_top_builddir}/src
 export HWLOC_PLUGINS_PATH
 
 if test x at HWLOC_XML_LOCALIZED@ = x1; then
@@ -36,8 +36,8 @@ file="$tmp/test-hwloc-assembler.output"
 set -e
 
 $assembler $file \
-	--name input1 $abs_top_srcdir/utils/test-hwloc-assembler.input1 \
-	--name input2 $abs_top_srcdir/utils/test-hwloc-assembler.input2 \
-	--name input1again $abs_top_srcdir/utils/test-hwloc-assembler.input1
-diff @HWLOC_DIFF_U@ $abs_top_srcdir/utils/test-hwloc-assembler.output "$file"
+	--name input1 $HWLOC_top_srcdir/utils/test-hwloc-assembler.input1 \
+	--name input2 $HWLOC_top_srcdir/utils/test-hwloc-assembler.input2 \
+	--name input1again $HWLOC_top_srcdir/utils/test-hwloc-assembler.input1
+diff @HWLOC_DIFF_U@ $HWLOC_top_srcdir/utils/test-hwloc-assembler.output "$file"
 rm -rf "$tmp"
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/test-hwloc-calc.output b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/test-hwloc-calc.output
index 86832a7..83fdc69 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/test-hwloc-calc.output
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/test-hwloc-calc.output
@@ -41,6 +41,15 @@ PU:22_PU:23_Core:6_Core:7_NUMANode:2
 0x0000ff0f
 0x0000e03f
 
+0xffffffff,0xffff0000,0x0
+0xffffff00,,0x0
+0xffffff00,,0x00ffffff
+0x00ffffff
+0x000000ff,0xffffffff,0xff000000
+0x000000ff,0xffff0000,0x00ffffff
+0x0
+0x00ffffff
+
 0x00000001
 0xf0000000,0x0000000f
 0xffff0000,0x0000ffff
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/test-hwloc-calc.sh.in b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/test-hwloc-calc.sh.in
index 1e915be..d52ce48 100755
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/test-hwloc-calc.sh.in
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/test-hwloc-calc.sh.in
@@ -3,16 +3,16 @@
 
 #
 # Copyright © 2009 CNRS
-# Copyright © 2009-2012 Inria.  All rights reserved.
+# Copyright © 2009-2013 Inria.  All rights reserved.
 # Copyright © 2009, 2011 Université Bordeaux 1
 # See COPYING in top-level directory.
 #
 
-abs_top_builddir="@abs_top_builddir@"
-calc="$abs_top_builddir/utils/hwloc-calc"
-abs_top_srcdir="@abs_top_srcdir@"
+HWLOC_top_builddir="@HWLOC_top_builddir@"
+calc="$HWLOC_top_builddir/utils/hwloc-calc"
+HWLOC_top_srcdir="@HWLOC_top_srcdir@"
 
-HWLOC_PLUGINS_PATH=${abs_top_builddir}/src
+HWLOC_PLUGINS_PATH=${HWLOC_top_builddir}/src
 export HWLOC_PLUGINS_PATH
 
 : ${TMPDIR=/tmp}
@@ -72,6 +72,15 @@ set -e
   $calc --if synthetic --input "group:2 group:2 cache:2 cache:2 pu:1" Group2:1 Group1:0
   $calc --if synthetic --input "group:2 group:2 cache:2 cache:2 pu:1" l2:0-2 L1cache:13:3
   echo
+  $calc --if xml --input $HWLOC_top_srcdir/tests/xml/96em64t-4n4d3ca2co-pci.xml os=eth6 os=eth4
+  $calc --if xml --input $HWLOC_top_srcdir/tests/xml/96em64t-4n4d3ca2co-pci.xml os=sdc os=sr0 ~os=sda
+  $calc --if xml --input $HWLOC_top_srcdir/tests/xml/96em64t-4n4d3ca2co-pci.xml pci:1000:0062:3:2
+  $calc --if xml --input $HWLOC_top_srcdir/tests/xml/96em64t-4n4d3ca2co-pci.xml pci:14e4:1639:1
+  $calc --if xml --input $HWLOC_top_srcdir/tests/xml/96em64t-4n4d3ca2co-pci.xml pci:14e4:1639:2-5
+  $calc --if xml --input $HWLOC_top_srcdir/tests/xml/96em64t-4n4d3ca2co-pci.xml pci=0000:62:00.1 pci=0000:02:00.1
+  $calc --if xml --input $HWLOC_top_srcdir/tests/xml/96em64t-4n4d3ca2co-pci.xml pci=0000:62:00.1 xpci=0000:02:00.0
+  $calc --if xml --input $HWLOC_top_srcdir/tests/xml/96em64t-4n4d3ca2co-pci.xml pci=0000:02:00.0 xpci=0000:02:00.1
+  echo
   cat << EOF | $calc --if synthetic --input "node:4 core:4 pu:4"
 pu:0
 core:0 core:15
@@ -82,5 +91,5 @@ node:0 node:3
 root
 EOF
 ) > "$file"
-diff @HWLOC_DIFF_U@ $abs_top_srcdir/utils/test-hwloc-calc.output "$file"
+diff @HWLOC_DIFF_U@ $HWLOC_top_srcdir/utils/test-hwloc-calc.output "$file"
 rm -rf "$tmp"
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/test-hwloc-distances.sh.in b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/test-hwloc-distances.sh.in
index 988faeb..3cb8a2a 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/test-hwloc-distances.sh.in
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/test-hwloc-distances.sh.in
@@ -2,15 +2,15 @@
 #-*-sh-*-
 
 #
-# Copyright © 2012 Inria.  All rights reserved.
+# Copyright © 2012-2013 Inria.  All rights reserved.
 # See COPYING in top-level directory.
 #
 
-abs_top_builddir="@abs_top_builddir@"
-distances="$abs_top_builddir/utils/hwloc-distances"
-abs_top_srcdir="@abs_top_srcdir@"
+HWLOC_top_builddir="@HWLOC_top_builddir@"
+distances="$HWLOC_top_builddir/utils/hwloc-distances"
+HWLOC_top_srcdir="@HWLOC_top_srcdir@"
 
-HWLOC_PLUGINS_PATH=${abs_top_builddir}/src
+HWLOC_PLUGINS_PATH=${HWLOC_top_builddir}/src
 export HWLOC_PLUGINS_PATH
 
 # make sure we use default numeric formats
@@ -62,5 +62,5 @@ set -e
   HWLOC_NUMANode_DISTANCES=none
   echo
 ) > "$file"
-diff @HWLOC_DIFF_U@ $abs_top_srcdir/utils/test-hwloc-distances.output "$file"
+diff @HWLOC_DIFF_U@ $HWLOC_top_srcdir/utils/test-hwloc-distances.output "$file"
 rm -rf "$tmp"
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/test-hwloc-distrib.sh.in b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/test-hwloc-distrib.sh.in
index ef46c0f..f820757 100755
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/test-hwloc-distrib.sh.in
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/test-hwloc-distrib.sh.in
@@ -3,16 +3,16 @@
 
 #
 # Copyright © 2009 CNRS
-# Copyright © 2009-2012 Inria.  All rights reserved.
+# Copyright © 2009-2013 Inria.  All rights reserved.
 # Copyright © 2009 Université Bordeaux 1
 # See COPYING in top-level directory.
 #
 
-abs_top_builddir="@abs_top_builddir@"
-distrib="$abs_top_builddir/utils/hwloc-distrib"
-abs_top_srcdir="@abs_top_srcdir@"
+HWLOC_top_builddir="@HWLOC_top_builddir@"
+distrib="$HWLOC_top_builddir/utils/hwloc-distrib"
+HWLOC_top_srcdir="@HWLOC_top_srcdir@"
 
-HWLOC_PLUGINS_PATH=${abs_top_builddir}/src
+HWLOC_PLUGINS_PATH=${HWLOC_top_builddir}/src
 export HWLOC_PLUGINS_PATH
 
 : ${TMPDIR=/tmp}
@@ -41,5 +41,5 @@ set -e
   echo
   $distrib --if synthetic --input "3 3 3" 4
 ) > "$file"
-diff @HWLOC_DIFF_U@ $abs_top_srcdir/utils/test-hwloc-distrib.output "$file"
+diff @HWLOC_DIFF_U@ $HWLOC_top_srcdir/utils/test-hwloc-distrib.output "$file"
 rm -rf "$tmp"
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/test-hwloc-info.output b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/test-hwloc-info.output
new file mode 100644
index 0000000..aeae33e
--- /dev/null
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/test-hwloc-info.output
@@ -0,0 +1,258 @@
+depth 0:	1 Machine (type #1)
+ depth 1:	2 NUMANode (type #2)
+  depth 2:	6 Core (type #5)
+   depth 3:	24 PU (type #6)
+
+Core L#2
+ type = Core
+ full type = Core
+ logical index = 2
+ os index = 2
+ depth = 2
+ sibling rank = 2
+ children = 4
+ cpuset = 0x00000f00
+ complete cpuset = 0x00000f00
+ online cpuset = 0x00000f00
+ allowed cpuset = 0x00000f00
+ nodeset = 0x00000001
+ complete nodeset = 0x00000001
+ allowed nodeset = 0x00000001
+Core L#3
+ type = Core
+ full type = Core
+ logical index = 3
+ os index = 3
+ depth = 2
+ sibling rank = 0
+ children = 4
+ cpuset = 0x0000f000
+ complete cpuset = 0x0000f000
+ online cpuset = 0x0000f000
+ allowed cpuset = 0x0000f000
+ nodeset = 0x00000002
+ complete nodeset = 0x00000002
+ allowed nodeset = 0x00000002
+Core L#4
+ type = Core
+ full type = Core
+ logical index = 4
+ os index = 4
+ depth = 2
+ sibling rank = 1
+ children = 4
+ cpuset = 0x000f0000
+ complete cpuset = 0x000f0000
+ online cpuset = 0x000f0000
+ allowed cpuset = 0x000f0000
+ nodeset = 0x00000002
+ complete nodeset = 0x00000002
+ allowed nodeset = 0x00000002
+
+0.0: PU L#10
+0.0:  type = PU
+0.0:  full type = PU
+0.0:  logical index = 10
+0.0:  os index = 10
+0.0:  depth = 3
+0.0:  sibling rank = 2
+0.0:  children = 0
+0.0:  cpuset = 0x00000400
+0.0:  complete cpuset = 0x00000400
+0.0:  online cpuset = 0x00000400
+0.0:  allowed cpuset = 0x00000400
+0.0:  nodeset = 0x00000001
+0.0:  complete nodeset = 0x00000001
+0.0:  allowed nodeset = 0x00000001
+0.1: Core L#2 = parent #1 of PU L#10
+0.1:  type = Core
+0.1:  full type = Core
+0.1:  logical index = 2
+0.1:  os index = 2
+0.1:  depth = 2
+0.1:  sibling rank = 2
+0.1:  children = 4
+0.1:  cpuset = 0x00000f00
+0.1:  complete cpuset = 0x00000f00
+0.1:  online cpuset = 0x00000f00
+0.1:  allowed cpuset = 0x00000f00
+0.1:  nodeset = 0x00000001
+0.1:  complete nodeset = 0x00000001
+0.1:  allowed nodeset = 0x00000001
+0.2: NUMANode L#0 = parent #2 of PU L#10
+0.2:  type = NUMANode
+0.2:  full type = NUMANode
+0.2:  logical index = 0
+0.2:  os index = 0
+0.2:  depth = 1
+0.2:  sibling rank = 0
+0.2:  children = 3
+0.2:  local memory = 1073741824
+0.2:  total memory = 1073741824
+0.2:  cpuset = 0x00000fff
+0.2:  complete cpuset = 0x00000fff
+0.2:  online cpuset = 0x00000fff
+0.2:  allowed cpuset = 0x00000fff
+0.2:  nodeset = 0x00000001
+0.2:  complete nodeset = 0x00000001
+0.2:  allowed nodeset = 0x00000001
+0.3: Machine L#0 = parent #3 of PU L#10
+0.3:  type = Machine
+0.3:  full type = Machine
+0.3:  logical index = 0
+0.3:  os index = 0
+0.3:  depth = 0
+0.3:  sibling rank = 0
+0.3:  children = 2
+0.3:  total memory = 2147483648
+0.3:  cpuset = 0x00ffffff
+0.3:  complete cpuset = 0x00ffffff
+0.3:  online cpuset = 0x00ffffff
+0.3:  allowed cpuset = 0x00ffffff
+0.3:  nodeset = 0x00000003
+0.3:  complete nodeset = 0x00000003
+0.3:  allowed nodeset = 0x00000003
+0.3:  info Backend = Synthetic
+0.3:  info SyntheticDescription = node:2 core:3 pu:4
+1.0: PU L#11
+1.0:  type = PU
+1.0:  full type = PU
+1.0:  logical index = 11
+1.0:  os index = 11
+1.0:  depth = 3
+1.0:  sibling rank = 3
+1.0:  children = 0
+1.0:  cpuset = 0x00000800
+1.0:  complete cpuset = 0x00000800
+1.0:  online cpuset = 0x00000800
+1.0:  allowed cpuset = 0x00000800
+1.0:  nodeset = 0x00000001
+1.0:  complete nodeset = 0x00000001
+1.0:  allowed nodeset = 0x00000001
+1.1: Core L#2 = parent #1 of PU L#11
+1.1:  type = Core
+1.1:  full type = Core
+1.1:  logical index = 2
+1.1:  os index = 2
+1.1:  depth = 2
+1.1:  sibling rank = 2
+1.1:  children = 4
+1.1:  cpuset = 0x00000f00
+1.1:  complete cpuset = 0x00000f00
+1.1:  online cpuset = 0x00000f00
+1.1:  allowed cpuset = 0x00000f00
+1.1:  nodeset = 0x00000001
+1.1:  complete nodeset = 0x00000001
+1.1:  allowed nodeset = 0x00000001
+1.2: NUMANode L#0 = parent #2 of PU L#11
+1.2:  type = NUMANode
+1.2:  full type = NUMANode
+1.2:  logical index = 0
+1.2:  os index = 0
+1.2:  depth = 1
+1.2:  sibling rank = 0
+1.2:  children = 3
+1.2:  local memory = 1073741824
+1.2:  total memory = 1073741824
+1.2:  cpuset = 0x00000fff
+1.2:  complete cpuset = 0x00000fff
+1.2:  online cpuset = 0x00000fff
+1.2:  allowed cpuset = 0x00000fff
+1.2:  nodeset = 0x00000001
+1.2:  complete nodeset = 0x00000001
+1.2:  allowed nodeset = 0x00000001
+1.3: Machine L#0 = parent #3 of PU L#11
+1.3:  type = Machine
+1.3:  full type = Machine
+1.3:  logical index = 0
+1.3:  os index = 0
+1.3:  depth = 0
+1.3:  sibling rank = 0
+1.3:  children = 2
+1.3:  total memory = 2147483648
+1.3:  cpuset = 0x00ffffff
+1.3:  complete cpuset = 0x00ffffff
+1.3:  online cpuset = 0x00ffffff
+1.3:  allowed cpuset = 0x00ffffff
+1.3:  nodeset = 0x00000003
+1.3:  complete nodeset = 0x00000003
+1.3:  allowed nodeset = 0x00000003
+1.3:  info Backend = Synthetic
+1.3:  info SyntheticDescription = node:2 core:3 pu:4
+
+NUMANode L#0 = parent of PU L#7
+ type = NUMANode
+ full type = NUMANode
+ logical index = 0
+ os index = 0
+ depth = 1
+ sibling rank = 0
+ children = 3
+ local memory = 1073741824
+ total memory = 1073741824
+ cpuset = 0x00000fff
+ complete cpuset = 0x00000fff
+ online cpuset = 0x00000fff
+ allowed cpuset = 0x00000fff
+ nodeset = 0x00000001
+ complete nodeset = 0x00000001
+ allowed nodeset = 0x00000001
+NUMANode L#0 = parent of PU L#8
+ type = NUMANode
+ full type = NUMANode
+ logical index = 0
+ os index = 0
+ depth = 1
+ sibling rank = 0
+ children = 3
+ local memory = 1073741824
+ total memory = 1073741824
+ cpuset = 0x00000fff
+ complete cpuset = 0x00000fff
+ online cpuset = 0x00000fff
+ allowed cpuset = 0x00000fff
+ nodeset = 0x00000001
+ complete nodeset = 0x00000001
+ allowed nodeset = 0x00000001
+NUMANode L#0 = parent of PU L#9
+ type = NUMANode
+ full type = NUMANode
+ logical index = 0
+ os index = 0
+ depth = 1
+ sibling rank = 0
+ children = 3
+ local memory = 1073741824
+ total memory = 1073741824
+ cpuset = 0x00000fff
+ complete cpuset = 0x00000fff
+ online cpuset = 0x00000fff
+ allowed cpuset = 0x00000fff
+ nodeset = 0x00000001
+ complete nodeset = 0x00000001
+ allowed nodeset = 0x00000001
+
+L2Cache L#3 = parent of PU L#12
+ type = Cache
+ full type = L2Cache
+ logical index = 3
+ os index = 3
+ depth = 3
+ sibling rank = 1
+ children = 2
+ cpuset = 0x0000f000
+ complete cpuset = 0x0000f000
+ online cpuset = 0x0000f000
+ allowed cpuset = 0x0000f000
+ nodeset = 0x00000001
+ complete nodeset = 0x00000001
+ allowed nodeset = 0x00000001
+ attr cache depth = 2
+ attr cache type = Unified
+ attr cache size = 4194304
+ attr cache line size = 64
+
+L1dCache:3
+L1dCache:4
+L1dCache:4
+L1dCache:5
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/test-hwloc-info.sh.in b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/test-hwloc-info.sh.in
new file mode 100755
index 0000000..4ec674b
--- /dev/null
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/test-hwloc-info.sh.in
@@ -0,0 +1,45 @@
+#!/bin/sh
+#-*-sh-*-
+
+#
+# Copyright © 2009 CNRS
+# Copyright © 2009-2013 Inria.  All rights reserved.
+# Copyright © 2009 Université Bordeaux 1
+# See COPYING in top-level directory.
+#
+
+HWLOC_top_builddir="@HWLOC_top_builddir@"
+info="$HWLOC_top_builddir/utils/hwloc-info"
+HWLOC_top_srcdir="@HWLOC_top_srcdir@"
+
+HWLOC_PLUGINS_PATH=${HWLOC_top_builddir}/src
+export HWLOC_PLUGINS_PATH
+
+: ${TMPDIR=/tmp}
+{
+  tmp=`
+    (umask 077 && mktemp -d "$TMPDIR/fooXXXXXX") 2>/dev/null
+  ` &&
+  test -n "$tmp" && test -d "$tmp"
+} || {
+  tmp=$TMPDIR/foo$$-$RANDOM
+  (umask 077 && mkdir "$tmp")
+} || exit $?
+file="$tmp/test-hwloc-info.output"
+
+set -e
+(
+  $info --if synthetic --input "node:2 core:3 pu:4"
+  echo
+  $info --if synthetic --input "node:2 core:3 pu:4" core:2-4
+  echo
+  $info --if synthetic --input "node:2 core:3 pu:4" -n --ancestors pu:10-11
+  echo
+  $info --if synthetic --input "node:2 core:3 pu:4" --ancestor node pu:7-9
+  echo
+  $info --if synthetic --input "node:2 core:2 ca:2 ca:2 pu:2" --ancestor l2 pu:12
+  echo
+  $info --if synthetic --input "node:2 core:2 ca:2 ca:2 pu:2" --ancestor l1 -s pu:7-10
+) > "$file"
+diff @HWLOC_DIFF_U@ $HWLOC_top_srcdir/utils/test-hwloc-info.output "$file"
+rm -rf "$tmp"
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/test-hwloc-ls.sh.in b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/test-hwloc-ls.sh.in
index 6c7a56a..e8e6cb8 100755
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/test-hwloc-ls.sh.in
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/test-hwloc-ls.sh.in
@@ -3,16 +3,16 @@
 
 #
 # Copyright © 2009 CNRS
-# Copyright © 2009-2012 Inria.  All rights reserved.
+# Copyright © 2009-2013 Inria.  All rights reserved.
 # Copyright © 2009, 2011 Université Bordeaux 1
 # See COPYING in top-level directory.
 #
 
-abs_top_builddir="@abs_top_builddir@"
-ls="$abs_top_builddir/utils/lstopo-no-graphics"
-abs_top_srcdir="@abs_top_srcdir@"
+HWLOC_top_builddir="@HWLOC_top_builddir@"
+ls="$HWLOC_top_builddir/utils/lstopo-no-graphics"
+HWLOC_top_srcdir="@HWLOC_top_srcdir@"
 
-HWLOC_PLUGINS_PATH=${abs_top_builddir}/src
+HWLOC_PLUGINS_PATH=${HWLOC_top_builddir}/src
 export HWLOC_PLUGINS_PATH
 
 : ${TMPDIR=/tmp}
@@ -51,5 +51,5 @@ $ls
   HWLOC_NO_LIBXML_EXPORT=1 $ls $tmp/test.xml
   $ls --input "ma:1 no:2 so:1 ca:2 2" $tmp/test.synthetic
 ) > "$file"
-diff @HWLOC_DIFF_U@ $abs_top_srcdir/utils/test-hwloc-ls.output "$file"
+diff @HWLOC_DIFF_U@ $HWLOC_top_srcdir/utils/test-hwloc-ls.output "$file"
 rm -rf "$tmp"

http://git.mpich.org/mpich.git/commitdiff/c0ed8d2701e0c55586120e66ab6d58fca5577eaf

commit c0ed8d2701e0c55586120e66ab6d58fca5577eaf
Author: Pavan Balaji <balaji at mcs.anl.gov>
Date:   Sun Apr 28 21:04:36 2013 -0500

    Get rid of getpagesize declaration. This is already fixed in hwloc.
    
    No reviewer.

diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/config/hwloc.m4 b/src/pm/hydra/tools/topo/hwloc/hwloc/config/hwloc.m4
index ab335f5..95fa6d4 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/config/hwloc.m4
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/config/hwloc.m4
@@ -573,16 +573,6 @@ EOF])
     AC_CHECK_HEADERS([malloc.h])
     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 config.h.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])
-    fi
-    if test $ac_cv_func_getpagesize = "yes" ; then
-       PAC_FUNC_NEEDS_DECL([#include <unistd.h>],getpagesize)
-    fi
-
     AC_CHECK_HEADERS([sys/utsname.h])
     AC_CHECK_FUNCS([uname])
 
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/include/private/private.h b/src/pm/hydra/tools/topo/hwloc/hwloc/include/private/private.h
index c33cc00..f1484f5 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/include/private/private.h
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/include/private/private.h
@@ -29,10 +29,6 @@
 #endif
 #include <string.h>
 
-#if defined(HAVE_GETPAGESIZE) && defined(NEEDS_GETPAGESIZE_DECL)
-int getpagesize(void);
-#endif
-
 #ifdef HWLOC_HAVE_ATTRIBUTE_FORMAT
 # if HWLOC_HAVE_ATTRIBUTE_FORMAT
 #  define __hwloc_attribute_format(type, str, arg)  __attribute__((__format__(type, str, arg)))

http://git.mpich.org/mpich.git/commitdiff/5be8001f1485825e97fd4507032a74e47a065213

commit 5be8001f1485825e97fd4507032a74e47a065213
Author: Pavan Balaji <balaji at mcs.anl.gov>
Date:   Sun Apr 28 20:22:51 2013 -0500

    Propagate errors in autogen.sh upstream.
    
    No reviewer.

diff --git a/src/pm/hydra/autogen.sh b/src/pm/hydra/autogen.sh
index a5d8ab9..51306b9 100755
--- a/src/pm/hydra/autogen.sh
+++ b/src/pm/hydra/autogen.sh
@@ -7,9 +7,9 @@ else
 fi
 
 echo "=== running autoreconf in 'mpl' ==="
-(cd mpl && $autoreconf ${autoreconf_args:-"-vif"})
+(cd mpl && $autoreconf ${autoreconf_args:-"-vif"}) || exit 1
 echo "=== running autoreconf in 'tools/topo/hwloc/hwloc' ==="
-(cd tools/topo/hwloc/hwloc && $autoreconf ${autoreconf_args:-"-vif"})
+(cd tools/topo/hwloc/hwloc && $autoreconf ${autoreconf_args:-"-vif"}) || exit 1
 $autoreconf ${autoreconf_args:-"-vif"}
 
 # Remove the autom4te.cache folders for a release-like structure.

-----------------------------------------------------------------------

Summary of changes:
 src/pm/hydra/autogen.sh                            |    4 +-
 src/pm/hydra/tools/topo/hwloc/hwloc/COPYING        |    1 +
 src/pm/hydra/tools/topo/hwloc/hwloc/HACKING        |    2 -
 src/pm/hydra/tools/topo/hwloc/hwloc/Makefile.am    |   22 +-
 src/pm/hydra/tools/topo/hwloc/hwloc/NEWS           |  107 +++-
 src/pm/hydra/tools/topo/hwloc/hwloc/README         |   53 ++-
 src/pm/hydra/tools/topo/hwloc/hwloc/VERSION        |    8 +-
 .../hydra/tools/topo/hwloc/hwloc/config/hwloc.m4   |  250 ++++++-
 .../topo/hwloc/hwloc/config/hwloc_components.m4    |    3 +
 .../topo/hwloc/hwloc/config/hwloc_internal.m4      |   67 +-
 src/pm/hydra/tools/topo/hwloc/hwloc/configure.ac   |   30 +-
 .../hwloc/hwloc/contrib/dist/make_dist_tarball     |    4 +-
 .../topo/hwloc/hwloc/contrib/hwloc-valgrind.supp   |   84 ++-
 .../hydra/tools/topo/hwloc/hwloc/doc/Makefile.am   |   32 +-
 .../topo/hwloc/hwloc/doc/doxygen-config.cfg.in     |    5 +
 src/pm/hydra/tools/topo/hwloc/hwloc/doc/hwloc.doxy |  404 +++++++++--
 .../tools/topo/hwloc/hwloc/include/Makefile.am     |    5 +
 .../hydra/tools/topo/hwloc/hwloc/include/hwloc.h   |  392 +++++-----
 .../tools/topo/hwloc/hwloc/include/hwloc/cuda.h    |  108 +++-
 .../tools/topo/hwloc/hwloc/include/hwloc/cudart.h  |   83 ++-
 .../tools/topo/hwloc/hwloc/include/hwloc/gl.h      |  131 ++++
 .../topo/hwloc/hwloc/include/hwloc/intel-mic.h     |  139 ++++
 .../topo/hwloc/hwloc/include/hwloc/myriexpress.h   |   25 +-
 .../tools/topo/hwloc/hwloc/include/hwloc/nvml.h    |  172 +++++
 .../tools/topo/hwloc/hwloc/include/hwloc/opencl.h  |  195 +++++
 .../hwloc/hwloc/include/hwloc/openfabrics-verbs.h  |   56 ++-
 .../tools/topo/hwloc/hwloc/include/hwloc/plugins.h |  302 ++++++++
 .../tools/topo/hwloc/hwloc/include/hwloc/rename.h  |  115 ++--
 .../topo/hwloc/hwloc/include/private/components.h  |  192 +-----
 .../tools/topo/hwloc/hwloc/include/private/debug.h |   11 +-
 .../tools/topo/hwloc/hwloc/include/private/misc.h  |   15 +-
 .../topo/hwloc/hwloc/include/private/private.h     |  115 +--
 .../hwloc/hwloc/include/private/solaris-chiptype.h |   15 +-
 .../tools/topo/hwloc/hwloc/include/private/xml.h   |    1 -
 .../hydra/tools/topo/hwloc/hwloc/src/Makefile.am   |   86 ++-
 src/pm/hydra/tools/topo/hwloc/hwloc/src/bind.c     |    8 +
 .../hydra/tools/topo/hwloc/hwloc/src/components.c  |  182 ++++-
 .../hydra/tools/topo/hwloc/hwloc/src/distances.c   |   10 +-
 src/pm/hydra/tools/topo/hwloc/hwloc/src/misc.c     |    2 +
 .../tools/topo/hwloc/hwloc/src/topology-aix.c      |   33 +-
 .../tools/topo/hwloc/hwloc/src/topology-bgq.c      |  239 ++++++
 .../tools/topo/hwloc/hwloc/src/topology-cuda.c     |  190 +++++
 .../tools/topo/hwloc/hwloc/src/topology-custom.c   |    8 +-
 .../tools/topo/hwloc/hwloc/src/topology-darwin.c   |    3 +-
 .../tools/topo/hwloc/hwloc/src/topology-fake.c     |    2 +-
 .../tools/topo/hwloc/hwloc/src/topology-freebsd.c  |    3 -
 .../hydra/tools/topo/hwloc/hwloc/src/topology-gl.c |  261 +++++++
 .../tools/topo/hwloc/hwloc/src/topology-hpux.c     |    9 +-
 .../tools/topo/hwloc/hwloc/src/topology-libpci.c   |  781 -------------------
 .../tools/topo/hwloc/hwloc/src/topology-linux.c    |  789 ++++++++++++++------
 .../tools/topo/hwloc/hwloc/src/topology-netbsd.c   |  197 +++++
 .../tools/topo/hwloc/hwloc/src/topology-nvml.c     |  229 ++++++
 .../tools/topo/hwloc/hwloc/src/topology-opencl.c   |  318 ++++++++
 .../tools/topo/hwloc/hwloc/src/topology-pci.c      |  781 +++++++++++++++++++
 .../hwloc/hwloc/src/topology-solaris-chiptype.c    |    7 +-
 .../topo/hwloc/hwloc/src/topology-synthetic.c      |    2 +-
 .../tools/topo/hwloc/hwloc/src/topology-windows.c  |    2 +
 .../topo/hwloc/hwloc/src/topology-xml-libxml.c     |    9 +-
 .../topo/hwloc/hwloc/src/topology-xml-nolibxml.c   |   78 ++-
 .../tools/topo/hwloc/hwloc/src/topology-xml.c      |   16 +-
 src/pm/hydra/tools/topo/hwloc/hwloc/src/topology.c |   81 ++-
 .../hydra/tools/topo/hwloc/hwloc/src/traversal.c   |    8 +-
 .../hydra/tools/topo/hwloc/hwloc/tests/Makefile.am |   20 +-
 src/pm/hydra/tools/topo/hwloc/hwloc/tests/cuda.c   |   31 +-
 src/pm/hydra/tools/topo/hwloc/hwloc/tests/cudart.c |   31 +-
 src/pm/hydra/tools/topo/hwloc/hwloc/tests/gl.c     |  116 +++
 .../hwloc/hwloc/tests/hwloc_topology_restrict.c    |    2 +-
 .../hydra/tools/topo/hwloc/hwloc/tests/intel-mic.c |   70 ++
 .../tools/topo/hwloc/hwloc/tests/linux-libnuma.c   |    4 +-
 .../hwloc/tests/linux/32amd64-4s2n4c-cgroup.output |    6 +-
 .../tests/linux/32amd64-4s2n4c-cgroup.xml.output   |    4 +-
 .../tools/topo/hwloc/hwloc/tests/linux/Makefile.am |    6 +-
 .../tests/linux/gather/test-gather-topology.sh.in  |    8 +-
 .../hwloc/tests/linux/hwloc-gather-topology.in     |    7 +-
 .../hwloc/hwloc/tests/linux/test-topology.sh.in    |    4 +-
 src/pm/hydra/tools/topo/hwloc/hwloc/tests/nvml.c   |   90 +++
 src/pm/hydra/tools/topo/hwloc/hwloc/tests/opencl.c |  105 +++
 .../topo/hwloc/hwloc/tests/openfabrics-verbs.c     |    2 +-
 .../tools/topo/hwloc/hwloc/tests/ports/Makefile.am |  188 ++++--
 .../hwloc/hwloc/tests/ports/include/aix/procinfo.h |   25 +
 .../hwloc/tests/ports/include/aix/sys/processor.h  |   18 +
 .../hwloc/hwloc/tests/ports/include/aix/sys/rset.h |   95 +++
 .../hwloc/tests/ports/include/aix/sys/systemcfg.h  |   27 +
 .../hwloc/tests/ports/include/aix/sys/thread.h     |   20 +
 .../include/bgq/spi/include/kernel/location.h      |   14 +
 .../ports/include/bgq/spi/include/kernel/process.h |   13 +
 .../topo/hwloc/hwloc/tests/ports/include/cpuset.h  |   24 -
 .../tests/ports/include/cuda/cuda_runtime_api.h    |   20 +
 .../hwloc/tests/ports/include/darwin/sys/sysctl.h  |   16 +
 .../hwloc/tests/ports/include/freebsd/pthread.h    |   10 +
 .../hwloc/tests/ports/include/freebsd/pthread_np.h |   14 +
 .../hwloc/tests/ports/include/freebsd/sys/cpuset.h |   36 +
 .../hwloc/tests/ports/include/freebsd/sys/sysctl.h |   15 +
 .../hwloc/tests/ports/include/gl/NVCtrl/NVCtrl.h   |   18 +
 .../tests/ports/include/gl/NVCtrl/NVCtrlLib.h      |   14 +
 .../hwloc/hwloc/tests/ports/include/gl/X11/Xlib.h  |   16 +
 .../hwloc/tests/ports/include/hpux/sys/mpctl.h     |   67 ++
 .../topo/hwloc/hwloc/tests/ports/include/kstat.h   |   46 --
 .../hwloc/tests/ports/include/netbsd/pthread.h     |   16 +
 .../hwloc/hwloc/tests/ports/include/netbsd/sched.h |   22 +
 .../topo/hwloc/hwloc/tests/ports/include/numa.h    |   29 -
 .../hwloc/hwloc/tests/ports/include/nvml/nvml.h    |   40 +
 .../hwloc/tests/ports/include/opencl/CL/cl_ext.h   |   49 ++
 .../hwloc/hwloc/tests/ports/include/osf/cpuset.h   |   24 +
 .../hwloc/hwloc/tests/ports/include/osf/numa.h     |   27 +
 .../hwloc/hwloc/tests/ports/include/osf/radset.h   |   81 ++
 .../topo/hwloc/hwloc/tests/ports/include/picl.h    |   49 --
 .../hwloc/hwloc/tests/ports/include/procinfo.h     |   24 -
 .../hwloc/hwloc/tests/ports/include/pthread_np.h   |   15 -
 .../topo/hwloc/hwloc/tests/ports/include/radset.h  |   81 --
 .../hwloc/tests/ports/include/solaris/kstat.h      |   46 ++
 .../hwloc/hwloc/tests/ports/include/solaris/picl.h |   48 ++
 .../tests/ports/include/solaris/sys/lgrp_user.h    |   61 ++
 .../tests/ports/include/solaris/sys/processor.h    |   17 +
 .../tests/ports/include/solaris/sys/procset.h      |   16 +
 .../tests/ports/include/solaris/sys/systeminfo.h   |   14 +
 .../hwloc/hwloc/tests/ports/include/sys/cpuset.h   |   36 -
 .../hwloc/tests/ports/include/sys/lgrp_user.h      |   61 --
 .../hwloc/hwloc/tests/ports/include/sys/mpctl.h    |   67 --
 .../hwloc/tests/ports/include/sys/processor.h      |   27 -
 .../hwloc/hwloc/tests/ports/include/sys/procset.h  |   16 -
 .../hwloc/hwloc/tests/ports/include/sys/rset.h     |   95 ---
 .../hwloc/hwloc/tests/ports/include/sys/sysctl.h   |   16 -
 .../hwloc/tests/ports/include/sys/systemcfg.h      |   21 -
 .../hwloc/tests/ports/include/sys/systeminfo.h     |   14 -
 .../hwloc/hwloc/tests/ports/include/sys/thread.h   |   20 -
 .../topo/hwloc/hwloc/tests/ports/include/windows.h |   72 --
 .../hwloc/tests/ports/include/windows/windows.h    |   72 ++
 .../topo/hwloc/hwloc/tests/rename/Makefile.am      |   83 ++-
 .../tools/topo/hwloc/hwloc/tests/rename/main.c     |   39 +-
 .../tools/topo/hwloc/hwloc/tests/wrapper.sh.in     |    6 +-
 .../tests/xml/32em64t-2n8c2t-pci-noio.options      |    1 +
 .../hwloc/tests/xml/32em64t-2n8c2t-pci-noio.source |    1 +
 .../hwloc/tests/xml/32em64t-2n8c2t-pci-noio.xml    |  184 +++++
 .../tests/xml/32em64t-2n8c2t-pci-normalio.source   |    1 +
 .../tests/xml/32em64t-2n8c2t-pci-normalio.xml      |  251 +++++++
 .../tests/xml/32em64t-2n8c2t-pci-wholeio.options   |    1 +
 .../hwloc/tests/xml/32em64t-2n8c2t-pci-wholeio.xml |  767 +++++++++++++++++++
 .../tools/topo/hwloc/hwloc/tests/xml/Makefile.am   |   21 +-
 .../topo/hwloc/hwloc/tests/xml/test-topology.sh.in |   16 +-
 .../hydra/tools/topo/hwloc/hwloc/utils/Makefile.am |   26 +-
 .../topo/hwloc/hwloc/utils/hwloc-annotate.1in      |    7 +-
 .../hwloc/hwloc/utils/hwloc-assembler-remote.1in   |    4 +-
 .../hwloc/hwloc/utils/hwloc-assembler-remote.in    |    8 +-
 .../tools/topo/hwloc/hwloc/utils/hwloc-bind.1in    |    3 +-
 .../tools/topo/hwloc/hwloc/utils/hwloc-calc.1in    |   20 +-
 .../tools/topo/hwloc/hwloc/utils/hwloc-calc.c      |    1 +
 .../tools/topo/hwloc/hwloc/utils/hwloc-calc.h      |  140 ++--
 .../tools/topo/hwloc/hwloc/utils/hwloc-distrib.1in |    2 +-
 .../tools/topo/hwloc/hwloc/utils/hwloc-distrib.c   |   11 +-
 .../hwloc/hwloc/utils/hwloc-gather-topology.1in    |    2 +-
 .../tools/topo/hwloc/hwloc/utils/hwloc-info.1in    |  178 +++++
 .../tools/topo/hwloc/hwloc/utils/hwloc-info.c      |  429 +++++++++++
 .../tools/topo/hwloc/hwloc/utils/hwloc-ps.1in      |    2 +-
 .../hydra/tools/topo/hwloc/hwloc/utils/hwloc-ps.c  |    2 -
 .../tools/topo/hwloc/hwloc/utils/lstopo-draw.c     |   18 +-
 .../tools/topo/hwloc/hwloc/utils/lstopo-text.c     |   67 +-
 .../hydra/tools/topo/hwloc/hwloc/utils/lstopo.1in  |   14 +-
 src/pm/hydra/tools/topo/hwloc/hwloc/utils/lstopo.c |   76 ++-
 src/pm/hydra/tools/topo/hwloc/hwloc/utils/lstopo.h |   19 +-
 src/pm/hydra/tools/topo/hwloc/hwloc/utils/misc.h   |   30 +-
 .../topo/hwloc/hwloc/utils/test-fake-plugin.sh.in  |    8 +-
 .../hwloc/hwloc/utils/test-hwloc-annotate.sh.in    |   14 +-
 .../hwloc/hwloc/utils/test-hwloc-assembler.sh.in   |   18 +-
 .../topo/hwloc/hwloc/utils/test-hwloc-calc.output  |    9 +
 .../topo/hwloc/hwloc/utils/test-hwloc-calc.sh.in   |   21 +-
 .../hwloc/hwloc/utils/test-hwloc-distances.sh.in   |   12 +-
 .../hwloc/hwloc/utils/test-hwloc-distrib.sh.in     |   12 +-
 .../topo/hwloc/hwloc/utils/test-hwloc-info.output  |  258 +++++++
 .../topo/hwloc/hwloc/utils/test-hwloc-info.sh.in   |   45 ++
 .../topo/hwloc/hwloc/utils/test-hwloc-ls.sh.in     |   12 +-
 171 files changed, 9720 insertions(+), 2979 deletions(-)
 create mode 100644 src/pm/hydra/tools/topo/hwloc/hwloc/include/hwloc/gl.h
 create mode 100644 src/pm/hydra/tools/topo/hwloc/hwloc/include/hwloc/intel-mic.h
 create mode 100644 src/pm/hydra/tools/topo/hwloc/hwloc/include/hwloc/nvml.h
 create mode 100644 src/pm/hydra/tools/topo/hwloc/hwloc/include/hwloc/opencl.h
 create mode 100644 src/pm/hydra/tools/topo/hwloc/hwloc/include/hwloc/plugins.h
 create mode 100644 src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-bgq.c
 create mode 100644 src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-cuda.c
 create mode 100644 src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-gl.c
 delete mode 100644 src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-libpci.c
 create mode 100644 src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-netbsd.c
 create mode 100644 src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-nvml.c
 create mode 100644 src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-opencl.c
 create mode 100644 src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-pci.c
 create mode 100644 src/pm/hydra/tools/topo/hwloc/hwloc/tests/gl.c
 create mode 100644 src/pm/hydra/tools/topo/hwloc/hwloc/tests/intel-mic.c
 create mode 100644 src/pm/hydra/tools/topo/hwloc/hwloc/tests/nvml.c
 create mode 100644 src/pm/hydra/tools/topo/hwloc/hwloc/tests/opencl.c
 create mode 100644 src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/aix/procinfo.h
 create mode 100644 src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/aix/sys/processor.h
 create mode 100644 src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/aix/sys/rset.h
 create mode 100644 src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/aix/sys/systemcfg.h
 create mode 100644 src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/aix/sys/thread.h
 create mode 100644 src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/bgq/spi/include/kernel/location.h
 create mode 100644 src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/bgq/spi/include/kernel/process.h
 delete mode 100644 src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/cpuset.h
 create mode 100644 src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/cuda/cuda_runtime_api.h
 create mode 100644 src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/darwin/sys/sysctl.h
 create mode 100644 src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/freebsd/pthread.h
 create mode 100644 src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/freebsd/pthread_np.h
 create mode 100644 src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/freebsd/sys/cpuset.h
 create mode 100644 src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/freebsd/sys/sysctl.h
 create mode 100644 src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/gl/NVCtrl/NVCtrl.h
 create mode 100644 src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/gl/NVCtrl/NVCtrlLib.h
 create mode 100644 src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/gl/X11/Xlib.h
 create mode 100644 src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/hpux/sys/mpctl.h
 delete mode 100644 src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/kstat.h
 create mode 100644 src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/netbsd/pthread.h
 create mode 100644 src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/netbsd/sched.h
 delete mode 100644 src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/numa.h
 create mode 100644 src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/nvml/nvml.h
 create mode 100644 src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/opencl/CL/cl_ext.h
 create mode 100644 src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/osf/cpuset.h
 create mode 100644 src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/osf/numa.h
 create mode 100644 src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/osf/radset.h
 delete mode 100644 src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/picl.h
 delete mode 100644 src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/procinfo.h
 delete mode 100644 src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/pthread_np.h
 delete mode 100644 src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/radset.h
 create mode 100644 src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/solaris/kstat.h
 create mode 100644 src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/solaris/picl.h
 create mode 100644 src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/solaris/sys/lgrp_user.h
 create mode 100644 src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/solaris/sys/processor.h
 create mode 100644 src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/solaris/sys/procset.h
 create mode 100644 src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/solaris/sys/systeminfo.h
 delete mode 100644 src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/sys/cpuset.h
 delete mode 100644 src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/sys/lgrp_user.h
 delete mode 100644 src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/sys/mpctl.h
 delete mode 100644 src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/sys/processor.h
 delete mode 100644 src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/sys/procset.h
 delete mode 100644 src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/sys/rset.h
 delete mode 100644 src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/sys/sysctl.h
 delete mode 100644 src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/sys/systemcfg.h
 delete mode 100644 src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/sys/systeminfo.h
 delete mode 100644 src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/sys/thread.h
 delete mode 100644 src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/windows.h
 create mode 100644 src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/windows/windows.h
 create mode 100644 src/pm/hydra/tools/topo/hwloc/hwloc/tests/xml/32em64t-2n8c2t-pci-noio.options
 create mode 100644 src/pm/hydra/tools/topo/hwloc/hwloc/tests/xml/32em64t-2n8c2t-pci-noio.source
 create mode 100644 src/pm/hydra/tools/topo/hwloc/hwloc/tests/xml/32em64t-2n8c2t-pci-noio.xml
 create mode 100644 src/pm/hydra/tools/topo/hwloc/hwloc/tests/xml/32em64t-2n8c2t-pci-normalio.source
 create mode 100644 src/pm/hydra/tools/topo/hwloc/hwloc/tests/xml/32em64t-2n8c2t-pci-normalio.xml
 create mode 100644 src/pm/hydra/tools/topo/hwloc/hwloc/tests/xml/32em64t-2n8c2t-pci-wholeio.options
 create mode 100644 src/pm/hydra/tools/topo/hwloc/hwloc/tests/xml/32em64t-2n8c2t-pci-wholeio.xml
 create mode 100644 src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc-info.1in
 create mode 100644 src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc-info.c
 create mode 100644 src/pm/hydra/tools/topo/hwloc/hwloc/utils/test-hwloc-info.output
 create mode 100755 src/pm/hydra/tools/topo/hwloc/hwloc/utils/test-hwloc-info.sh.in


hooks/post-receive
-- 
MPICH primary repository


More information about the commits mailing list