[mpich-commits] [mpich] MPICH primary repository branch, master, updated. v3.0.2-22-ge971ce3

mysql vizuser noreply at mpich.org
Mon Feb 18 13:19:31 CST 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  e971ce3d34f599a6e0ca35beaf3e1f9d391b81fc (commit)
       via  e7754bbfe2124c85ef3863803856a4f7bdea8cca (commit)
       via  beb405075ee66a795e85a046a51c25e00b367bf6 (commit)
      from  72d347070b52402039af3db2428a49089d2de35e (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/e971ce3d34f599a6e0ca35beaf3e1f9d391b81fc

commit e971ce3d34f599a6e0ca35beaf3e1f9d391b81fc
Author: Pavan Balaji <balaji at mcs.anl.gov>
Date:   Mon Feb 18 13:17:22 2013 -0600

    Updated the CHANGES file with the hwloc-1.6.2rc1 information.
    
    No reviewer.

diff --git a/CHANGES b/CHANGES
index 744cb61..89b3316 100644
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,9 @@
                                Changes in 3.0.3
 ===============================================================================
 
+ # PM/PMI: Upgraded to hwloc-1.6.2rc1.  This version uses libpciaccess
+   instead of libpci, to workaround the GPL license used by libpci.
+
  # PM/PMI: Added support for the Cobalt process manager.
 
  # Several other minor bug fixes, memory leak fixes, and code cleanup.

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

commit e7754bbfe2124c85ef3863803856a4f7bdea8cca
Author: Pavan Balaji <balaji at mcs.anl.gov>
Date:   Thu Jan 3 18:17:41 2013 +0000

    Merge hydra-specific hwloc patches from
    0e24791586e76e97bc533c8c20fdafec9af70a2b.
    
    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 b146aae..918d3a1 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/config/hwloc.m4 b/src/pm/hydra/tools/topo/hwloc/hwloc/config/hwloc.m4
index 95fa6d4..ab335f5 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/config/hwloc.m4
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/config/hwloc.m4
@@ -573,6 +573,16 @@ 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/configure.ac b/src/pm/hydra/tools/topo/hwloc/hwloc/configure.ac
index 899f9d8..1e4eb45 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/configure.ac
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/configure.ac
@@ -184,6 +184,19 @@ 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])
+
+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/include/private/private.h b/src/pm/hydra/tools/topo/hwloc/hwloc/include/private/private.h
index f1484f5..c33cc00 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,6 +29,10 @@
 #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)))
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 5882cef..77a0f8d 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/src/Makefile.am
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/src/Makefile.am
@@ -136,7 +136,7 @@ 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)

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

commit beb405075ee66a795e85a046a51c25e00b367bf6
Author: Pavan Balaji <balaji at mcs.anl.gov>
Date:   Mon Feb 18 12:45:01 2013 -0600

    Upgrade to hwloc-1.6.1rc2.  This version uses libpciaccess instead of
    libpci, which works around the GPL license of libpci.
    
    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 918d3a1..b146aae 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/NEWS b/src/pm/hydra/tools/topo/hwloc/hwloc/NEWS
index 2ea5a1e..24e73c0 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/NEWS
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/NEWS
@@ -17,6 +17,17 @@ bug fixes (and other actions) for each version of hwloc since version
 in v0.9.1).
 
 
+Version 1.6.2
+-------------
+* 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.
+
+
 Version 1.6.1
 -------------
 * Fix some crash or buggy detection in the x86 backend when Linux
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/VERSION b/src/pm/hydra/tools/topo/hwloc/hwloc/VERSION
index 9005840..13dcb20 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/VERSION
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/VERSION
@@ -7,7 +7,7 @@
 
 major=1
 minor=6
-release=1
+release=2
 
 # 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=1
 # requirement is that it must be entirely printable ASCII characters
 # and have no white space.
 
-greek=rc3
+greek=rc1
 
 # 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:1:2
+libhwloc_so_version=7:2:2
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 a380286..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])
 
@@ -644,7 +634,13 @@ EOF])
 
     # PCI support
     hwloc_pci_happy=no
-    if test "x$enable_pci" != "xno"; then
+    if test "x$enable_pci" != xno -a "x$enable_libpci" != "xyes"; then
+      hwloc_pci_happy=yes
+      HWLOC_PKG_CHECK_MODULES([PCIACCESS], [pciaccess], [pci_slot_match_iterator_create], [:], [hwloc_pci_happy=no])
+      if test x$hwloc_pci_happy = xyes; then hwloc_pci_lib=pciaccess; fi
+    fi
+    # 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], [:], [
           # manually check pciutils in case a old one without .pc is installed
@@ -684,18 +680,35 @@ EOF])
                     [hwloc_pci_happy=no])])
             ], [hwloc_pci_happy=no])
         ])
+        if test x$hwloc_pci_happy = xyes; then
+	  # pciutils could be used, but we don't want to force use it since it may GPL-taint hwloc
+	  if test x$enable_libpci = xyes; then
+	    hwloc_pci_lib=pciutils
+	  else
+	    # user didn't explicit request pciutils, disable PCI and warn the user
+	    hwloc_pci_happy=no
+	    hwloc_warn_may_use_libpci=yes
+	  fi
+	fi
     fi
     AC_SUBST(HWLOC_PCI_LIBS)
     # If we asked for pci support but couldn't deliver, fail
-    AS_IF([test "$enable_pci" = "yes" -a "$hwloc_pci_happy" = "no"],
+    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])
            AC_MSG_WARN([find appropriate support])
            AC_MSG_ERROR([Cannot continue])])
-    if test "x$hwloc_pci_happy" = "xyes"; then
+    # pciaccess specific enabling
+    if test "x$hwloc_pci_lib" = "xpciaccess"; then
+      HWLOC_PCIACCESS_REQUIRES=pciaccess
+      AC_DEFINE([HWLOC_HAVE_LIBPCIACCESS], [1], [Define to 1 if you have the `libpciaccess' library.])
+    fi
+    # pciutils specific checks and enabling
+    if test "x$hwloc_pci_lib" = "xpciutils"; then
       tmp_save_CFLAGS="$CFLAGS"
       CFLAGS="$CFLAGS $HWLOC_PCI_CFLAGS"
       tmp_save_LIBS="$LIBS"
       LIBS="$LIBS $HWLOC_PCI_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])
@@ -721,16 +734,16 @@ EOF])
         AC_DEFINE([HWLOC_HAVE_PCIDEV_DOMAIN], [1], [Define to 1 if struct pci_dev has a `domain' field.])
       fi
 
-      HWLOC_PCI_REQUIRES=libpci
-      AC_DEFINE([HWLOC_HAVE_LIBPCI], [1], [Define to 1 if you have the `libpci' library.])
-      AC_SUBST([HWLOC_HAVE_LIBPCI], [1])
       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.])
+    fi
+    # final common PCI enabling
+    if test "x$hwloc_pci_happy" = "xyes"; then
       hwloc_components="$hwloc_components libpci"
       hwloc_libpci_component_maybeplugin=1
-    else
-      AC_SUBST([HWLOC_HAVE_LIBPCI], [0])
     fi
     # don't add LIBS/CFLAGS/REQUIRES yet, depends on plugins
 
@@ -850,9 +863,9 @@ EOF])
     AC_MSG_RESULT([$hwloc_plugin_components])
 
     AS_IF([test "$hwloc_libpci_component" = "static"],
-          [HWLOC_LIBS="$HWLOC_LIBS $HWLOC_PCI_LIBS"
-           HWLOC_CFLAGS="$HWLOC_CFLAGS $HWLOC_PCI_CFLAGS"
-           HWLOC_REQUIRES="$HWLOC_PCI_REQUIRES $HWLOC_REQUIRES"])
+          [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_xml_libxml_component" = "static"],
           [HWLOC_LIBS="$HWLOC_LIBS $HWLOC_LIBXML2_LIBS"
            HWLOC_CFLAGS="$HWLOC_CFLAGS $HWLOC_LIBXML2_CFLAGS"
@@ -937,7 +950,7 @@ AC_DEFUN([HWLOC_DO_AM_CONDITIONALS],[
 		       [test "x$hwloc_have_cudart" = "xyes"])
         AM_CONDITIONAL([HWLOC_HAVE_LIBXML2], [test "$hwloc_libxml2_happy" = "yes"])
         AM_CONDITIONAL([HWLOC_HAVE_CAIRO], [test "$hwloc_cairo_happy" = "yes"])
-        AM_CONDITIONAL([HWLOC_HAVE_LIBPCI], [test "$hwloc_pci_happy" = "yes"])
+        AM_CONDITIONAL([HWLOC_HAVE_PCI], [test "$hwloc_pci_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"])
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 1023a50..0a47d53 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
@@ -63,7 +63,10 @@ AC_DEFUN([HWLOC_DEFINE_ARGS],[
     # PCI?
     AC_ARG_ENABLE([pci],
                   AS_HELP_STRING([--disable-pci],
-                                 [Disable the PCI device discovery using libpci]))
+                                 [Disable the PCI device discovery]))
+    AC_ARG_ENABLE([libpci],
+		  AS_HELP_STRING([--enable-libpci],
+				 [Use libpci for PCI support. Note that hwloc may be tainted by the pciutils GPL license.]))
 
     # Linux libnuma
     AC_ARG_ENABLE([libnuma],
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/configure.ac b/src/pm/hydra/tools/topo/hwloc/hwloc/configure.ac
index 5cd3343..899f9d8 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/configure.ac
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/configure.ac
@@ -184,19 +184,6 @@ 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])
-
-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
 
@@ -215,6 +202,16 @@ append_env() {
     eval "[$]1=\"$new_value\""
 }
 
+# Warn about PCI support
+if test x$hwloc_warn_may_use_libpci = xyes; then
+  echo
+  echo "***********************************************************************"
+  echo "PCI support could not be enabled because libpciaccess is not available."
+  echo "libpci could be used instead but hwloc may be tainted by the GPL"
+  echo "license of pciutils. Add --enable-libpci to enable it."
+  echo "***********************************************************************"
+fi
+
 # Show which optional support we'll be building
 hwloc_xml_status=basic
 AS_IF([test "$hwloc_libxml2_happy" = "yes"], [hwloc_xml_status=full])
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 4e7eaee..22f94b5 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
@@ -54,3 +54,20 @@
    ...
    fun:lt_dlforeachfile
 }
+
+# 
+{
+   libpciaccess_device_name_leak
+   Memcheck:Leak
+   ...
+   fun:pci_device_get_device_name
+   fun:hwloc_look_libpci
+}
+{
+   libpciaccess_leak
+   Memcheck:Leak
+   ...
+   obj:*libpciaccess*
+   ...
+   fun:hwloc_look_libpci
+}
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 d9e7de9..c947011 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/doc/hwloc.doxy
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/doc/hwloc.doxy
@@ -145,9 +145,14 @@ is configured and build.
 
 The hwloc core may also benefit from the following development packages:
 <ul>
-<li>pciutils (libpci) for I/O discovery.
-    The relevant development package is usually <tt>pciutils-devel</tt>
-    or <tt>libpci-dev</tt>.
+<li>Hwloc can use one of two different libraries for I/O device
+discovery:
+<ol>
+<li> libpciaccess (BSD).  The relevant development package is usually
+<tt>libpciaccess-devel</tt> or <tt>libpciaccess-dev</tt>.  </li>
+<li>libpci, from the pciutils package (GPL). The relevant development
+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).
@@ -160,11 +165,30 @@ The hwloc core may also benefit from the following development packages:
     or <tt>libxml2-dev</tt>.
 </li>
 </ul>
-libpci and libxml2 support may be statically built inside the main
-hwloc library, or as separate dynamically-loaded plugins
-(see the \ref plugins section).
 
+PCI and XML support may be statically built inside the main hwloc
+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
+<tt>libpciaccess</tt> to the <tt>pciutils</tt> package.  Indeed, if
+<tt>libpciaccess</tt> is not found, hwloc will not use
+<tt>pciutils</tt> unless it is specifically requested via the
+<tt>--enable-libpci</tt> 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:
+
+\verbatim
+./configure PKG_CONFIG_PATH=/opt/pciaccess/lib/pkgconfig ...
+\endverbatim
 
 \htmlonly
 </div><div class="section" id="cli_examples">
@@ -1124,8 +1148,9 @@ It can be enabled by passing flags such as <tt>::HWLOC_TOPOLOGY_FLAG_IO_DEVICES<
 to hwloc_topology_set_flags() before loading the topology.
 
 Note that I/O discovery requires significant help from the operating system.
-The pciutils library (the development package is usually <tt>pciutils-devel</tt>
-or <tt>libpci-dev</tt>) is needed to detect PCI devices and bridges,
+The pciaccess library (the development package is usually <tt>libpciaccess-devel</tt>
+or <tt>libpciaccess-dev</tt>) is needed to detect PCI devices and bridges
+(libpci/pciutils may be used instead if a GPL dependency is acceptable),
 and the actual locality of these devices is only currently detected
 on Linux. Also, some operating systems require privileges for probing PCI
 devices, see \ref faq_privileged for details.
@@ -2017,7 +2042,8 @@ environment variable (see \ref envvar).
 </dd>
 <dt>libpci</dt>
 <dd>
- PCI object discovery uses the external pciutils library (aka libpci),
+ 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>
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 09ee33a..61cc602 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
@@ -188,9 +188,9 @@ HWLOC_DECLSPEC extern const struct hwloc_component hwloc_freebsd_component;
 HWLOC_DECLSPEC extern const struct hwloc_component hwloc_hpux_component;
 #endif /* HWLOC_HPUX_SYS */
 
-#ifdef HWLOC_HAVE_LIBPCI
+#if (defined HWLOC_HAVE_LIBPCI) || (defined HWLOC_HAVE_LIBPCIACCESS)
 HWLOC_DECLSPEC extern const struct hwloc_component hwloc_libpci_component;
-#endif /* HWLOC_HAVE_LIBPCI */
+#endif /* HWLOC_HAVE_LIBPCI || HWLOC_HAVE_LIBPCIACCESS */
 
 HWLOC_DECLSPEC extern const struct hwloc_component hwloc_synthetic_component;
 
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)))
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 3e978a6..5882cef 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/src/Makefile.am
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/src/Makefile.am
@@ -1,4 +1,4 @@
-# Copyright © 2009-2012 Inria.  All rights reserved.
+# Copyright © 2009-2013 Inria.  All rights reserved.
 # Copyright © 2009-2010, 2012 Université Bordeaux 1
 # Copyright © 2009-2010 Cisco Systems, Inc.  All rights reserved.
 # Copyright © 2011-2012 Oracle and/or its affiliates.  All rights reserved.
@@ -55,16 +55,16 @@ hwloc_xml_libxml_la_LDFLAGS = $(plugins_ldflags) $(HWLOC_LIBXML2_LIBS)
 endif
 endif HWLOC_HAVE_LIBXML2
 
-if HWLOC_HAVE_LIBPCI
+if HWLOC_HAVE_PCI
 if HWLOC_LIBPCI_BUILD_STATIC
 sources += topology-libpci.c
 else
 plugins_LTLIBRARIES += hwloc_libpci.la
 hwloc_libpci_la_SOURCES = topology-libpci.c
-hwloc_libpci_la_CFLAGS = $(AM_CFLAGS) $(HWLOC_PCI_CFLAGS)
-hwloc_libpci_la_LDFLAGS = $(plugins_ldflags) $(HWLOC_PCI_LIBS)
+hwloc_libpci_la_CFLAGS = $(AM_CFLAGS) $(HWLOC_PCI_CFLAGS) $(HWLOC_PCIACCESS_CFLAGS)
+hwloc_libpci_la_LDFLAGS = $(plugins_ldflags) $(HWLOC_PCI_LIBS) $(HWLOC_PCIACCESS_LIBS)
 endif
-endif HWLOC_HAVE_LIBPCI
+endif HWLOC_HAVE_PCI
 
 if HWLOC_HAVE_SOLARIS
 sources += topology-solaris.c
@@ -136,7 +136,7 @@ endif HWLOC_HAVE_WINDOWS
 # Installable library
 
 libhwloc_la_SOURCES = $(sources)
-libhwloc_la_LDFLAGS = $(ldflags) $(libhwloc_so_versionflags) $(HWLOC_LIBS)
+libhwloc_la_LDFLAGS = $(ldflags) -version-info $(libhwloc_so_version) $(HWLOC_LIBS)
 
 if HWLOC_HAVE_PLUGINS
 AM_CPPFLAGS += $(LTDLINCL)
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-libpci.c b/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-libpci.c
index eec944b..7766766 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-libpci.c
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-libpci.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
  * See COPYING in top-level directory.
  */
 
@@ -12,7 +12,6 @@
 #include <private/debug.h>
 #include <private/misc.h>
 
-#include <pci/pci.h>
 #include <stdio.h>
 #include <fcntl.h>
 #include <string.h>
@@ -20,7 +19,94 @@
 #include <stdarg.h>
 #include <setjmp.h>
 
-#define CONFIG_SPACE_CACHESIZE 256
+#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
+#endif
+
+#ifdef HWLOC_HAVE_LIBPCIACCESS
+#include <pciaccess.h>
+#else /* HWLOC_HAVE_LIBPCI */
+#include <pci/pci.h>
+#endif
+
+#ifndef PCI_HEADER_TYPE
+#define PCI_HEADER_TYPE 0x0e
+#endif
+#ifndef PCI_HEADER_TYPE_BRIDGE
+#define PCI_HEADER_TYPE_BRIDGE 1
+#endif
+
+#ifndef PCI_CLASS_DEVICE
+#define PCI_CLASS_DEVICE 0x0a
+#endif
+#ifndef PCI_CLASS_BRIDGE_PCI
+#define PCI_CLASS_BRIDGE_PCI 0x0604
+#endif
+
+#ifndef PCI_REVISION_ID
+#define PCI_REVISION_ID 0x08
+#endif
+
+#ifndef PCI_SUBSYSTEM_VENDOR_ID
+#define PCI_SUBSYSTEM_VENDOR_ID 0x2c
+#endif
+#ifndef PCI_SUBSYSTEM_ID
+#define PCI_SUBSYSTEM_ID 0x2e
+#endif
+
+#ifndef PCI_PRIMARY_BUS
+#define PCI_PRIMARY_BUS 0x18
+#endif
+#ifndef PCI_SECONDARY_BUS
+#define PCI_SECONDARY_BUS 0x19
+#endif
+#ifndef PCI_SUBORDINATE_BUS
+#define PCI_SUBORDINATE_BUS 0x1a
+#endif
+
+#ifndef PCI_EXP_LNKSTA
+#define PCI_EXP_LNKSTA 18
+#endif
+
+#ifndef PCI_EXP_LNKSTA_SPEED
+#define PCI_EXP_LNKSTA_SPEED 0x000f
+#endif
+#ifndef PCI_EXP_LNKSTA_WIDTH
+#define PCI_EXP_LNKSTA_WIDTH 0x03f0
+#endif
+
+#ifndef PCI_CAP_ID_EXP
+#define PCI_CAP_ID_EXP 0x10
+#endif
+
+#ifndef PCI_CAP_NORMAL
+#define PCI_CAP_NORMAL 1
+#endif
+
+#ifndef PCI_STATUS
+#define PCI_STATUS 0x06
+#endif
+
+#ifndef PCI_CAPABILITY_LIST
+#define PCI_CAPABILITY_LIST 0x34
+#endif
+
+#ifndef PCI_STATUS_CAP_LIST
+#define PCI_STATUS_CAP_LIST 0x10
+#endif
+
+#ifndef PCI_CAP_LIST_ID
+#define PCI_CAP_LIST_ID 0
+#endif
+
+#ifndef PCI_CAP_LIST_NEXT
+#define PCI_CAP_LIST_NEXT 1
+#endif
+
+#define CONFIG_SPACE_CACHESIZE_TRY 256
+#define CONFIG_SPACE_CACHESIZE 64
 
 static void
 hwloc_pci_traverse_print_cb(void * cbdata __hwloc_attribute_unused,
@@ -289,6 +375,7 @@ hwloc_pci_find_hostbridge_parent(struct hwloc_topology *topology, struct hwloc_b
   return parent;
 }
 
+#ifdef HWLOC_HAVE_LIBPCI
 /* Avoid letting libpci call exit(1) when no PCI bus is available. */
 static jmp_buf err_buf;
 static void
@@ -307,15 +394,58 @@ static void
 hwloc_pci_warning(char *msg __hwloc_attribute_unused, ...)
 {
 }
+#endif
+
+#ifndef HWLOC_HAVE_PCI_FIND_CAP
+static unsigned
+hwloc_pci_find_cap(const unsigned char *config, size_t config_size, unsigned cap)
+{
+  unsigned char seen[256] = { 0 };
+  unsigned char ptr;
+
+  if (!(config[PCI_STATUS] & PCI_STATUS_CAP_LIST))
+    return 0;
+
+  for (ptr = config[PCI_CAPABILITY_LIST] & ~3;
+       ptr;
+       ptr = config[ptr + PCI_CAP_LIST_NEXT] & ~3) {
+    unsigned char id;
+
+    if (ptr >= config_size)
+      return 0;
+
+    /* Looped around! */
+    if (seen[ptr])
+      return 0;
+    seen[ptr] = 1;
+
+    id = config[ptr + PCI_CAP_LIST_ID];
+    if (id == cap)
+      return ptr;
+    if (id == 0xff)
+      break;
+
+    if (ptr + PCI_CAP_LIST_NEXT >= (unsigned char) config_size)
+      return 0;
+  }
+  return 0;
+}
+#endif
 
 static int
 hwloc_look_libpci(struct hwloc_backend *backend)
 {
   struct hwloc_topology *topology = backend->topology;
-  struct pci_access *pciaccess;
-  struct pci_dev *pcidev;
   struct hwloc_obj fakehostbridge; /* temporary object covering the whole PCI hierarchy until its complete */
   unsigned current_hostbridge;
+#ifdef HWLOC_HAVE_LIBPCIACCESS
+  int ret;
+  struct pci_device_iterator *iter;
+  struct pci_device *pcidev;
+#else /* HWLOC_HAVE_LIBPCI */
+  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)))
@@ -331,6 +461,16 @@ hwloc_look_libpci(struct hwloc_backend *backend)
 
   hwloc_debug("%s", "\nScanning PCI buses...\n");
 
+  /* initialize PCI scanning */
+#ifdef HWLOC_HAVE_LIBPCIACCESS
+  ret = pci_system_init();
+  if (ret) {
+    hwloc_debug("%s", "Can not initialize libpciaccess\n");
+    return -1;
+  }
+
+  iter = pci_slot_match_iterator_create(NULL);
+#else /* HWLOC_HAVE_LIBPCI */
   pciaccess = pci_alloc();
   pciaccess->error = hwloc_pci_error;
   pciaccess->warning = hwloc_pci_warning;
@@ -342,34 +482,64 @@ hwloc_look_libpci(struct hwloc_backend *backend)
 
   pci_init(pciaccess);
   pci_scan_bus(pciaccess);
+#endif
 
-  pcidev = pciaccess->devices;
-  while (pcidev) {
-    char name[128];
-    const char *resname;
-    u8 config_space_cache[CONFIG_SPACE_CACHESIZE];
+  /* iterate over devices */
+#ifdef HWLOC_HAVE_LIBPCIACCESS
+  for (pcidev = pci_device_next(iter);
+       pcidev;
+       pcidev = pci_device_next(iter))
+#else /* HWLOC_HAVE_LIBPCI */
+  for (pcidev = pciaccess->devices;
+       pcidev;
+       pcidev = pcidev->next)
+#endif
+  {
+    const char *vendorname, *devicename, *fullname;
+    unsigned char config_space_cache[CONFIG_SPACE_CACHESIZE_TRY];
+    unsigned config_space_cachesize = CONFIG_SPACE_CACHESIZE_TRY;
     struct hwloc_obj *obj;
     unsigned char headertype;
     unsigned os_index;
     unsigned isbridge;
     unsigned domain;
     unsigned device_class;
+    char name[128];
+    unsigned offset;
+#ifdef HWLOC_HAVE_PCI_FIND_CAP
+    struct pci_cap *cap;
+#endif
+#ifdef HWLOC_HAVE_LIBPCIACCESS
+    pciaddr_t got;
+#endif
 
     /* cache what we need of the config space */
-    pci_read_block(pcidev, 0, config_space_cache, CONFIG_SPACE_CACHESIZE);
+#ifdef HWLOC_HAVE_LIBPCIACCESS
+    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 */
+    pci_read_block(pcidev, 0, config_space_cache, CONFIG_SPACE_CACHESIZE_TRY);
+#endif
 
-    /* read some fields that may not always be available */
-#ifdef HWLOC_HAVE_PCIDEV_DOMAIN
+    /* try to read the domain */
+#if (defined HWLOC_HAVE_LIBPCIACCESS) || (defined HWLOC_HAVE_PCIDEV_DOMAIN)
     domain = pcidev->domain;
 #else
     domain = 0; /* default domain number */
 #endif
+
+    /* try to read the device_class */
+#ifdef HWLOC_HAVE_LIBPCIACCESS
+    device_class = pcidev->device_class >> 8;
+#else /* HWLOC_HAVE_LIBPCI */
 #ifdef HWLOC_HAVE_PCIDEV_DEVICE_CLASS
     device_class = pcidev->device_class;
 #else
     HWLOC_BUILD_ASSERT(PCI_CLASS_DEVICE < CONFIG_SPACE_CACHESIZE);
     device_class = config_space_cache[PCI_CLASS_DEVICE] | (config_space_cache[PCI_CLASS_DEVICE+1] << 8);
 #endif
+#endif
 
     /* is this a bridge? */
     HWLOC_BUILD_ASSERT(PCI_HEADER_TYPE < CONFIG_SPACE_CACHESIZE);
@@ -397,15 +567,18 @@ hwloc_look_libpci(struct hwloc_backend *backend)
 
     obj->attr->pcidev.linkspeed = 0; /* unknown */
 #ifdef HWLOC_HAVE_PCI_FIND_CAP
-    {
-    struct pci_cap *cap = pci_find_cap(pcidev, PCI_CAP_ID_EXP, PCI_CAP_NORMAL);
-    if (cap) {
-      if (cap->addr + PCI_EXP_LNKSTA >= CONFIG_SPACE_CACHESIZE) {
-        fprintf(stderr, "cannot read PCI_EXP_LNKSTA cap at %d (only %d cached)\n", cap->addr + PCI_EXP_LNKSTA, CONFIG_SPACE_CACHESIZE);
+    cap = pci_find_cap(pcidev, PCI_CAP_ID_EXP, PCI_CAP_NORMAL);
+    offset = cap ? cap->addr : 0;
+#else
+    offset = hwloc_pci_find_cap(config_space_cache, config_space_cachesize, PCI_CAP_ID_EXP);
+#endif /* HWLOC_HAVE_PCI_FIND_CAP */
+    if (offset > 0) {
+      if (offset + PCI_EXP_LNKSTA + 4 >= config_space_cachesize) {
+        fprintf(stderr, "cannot read PCI_EXP_LNKSTA cap at %d (only %d cached)\n", offset + PCI_EXP_LNKSTA, CONFIG_SPACE_CACHESIZE);
       } else {
         unsigned linksta, speed, width;
         float lanespeed;
-        memcpy(&linksta, &config_space_cache[cap->addr + PCI_EXP_LNKSTA], 4);
+        memcpy(&linksta, &config_space_cache[offset + PCI_EXP_LNKSTA], 4);
         speed = linksta & PCI_EXP_LNKSTA_SPEED; /* PCIe generation */
         width = (linksta & PCI_EXP_LNKSTA_WIDTH) >> 4; /* how many lanes */
 	/* PCIe Gen1 = 2.5GT/s signal-rate per lane with 8/10 encoding    = 0.25GB/s data-rate per lane
@@ -416,8 +589,6 @@ hwloc_look_libpci(struct hwloc_backend *backend)
         obj->attr->pcidev.linkspeed = lanespeed * width / 8; /* GB/s */
       }
     }
-    }
-#endif /* HWLOC_HAVE_PCI_FIND_CAP */
 
     if (isbridge) {
       HWLOC_BUILD_ASSERT(PCI_PRIMARY_BUS < CONFIG_SPACE_CACHESIZE);
@@ -437,7 +608,10 @@ hwloc_look_libpci(struct hwloc_backend *backend)
  * of arguments, and supports the PCI_LOOKUP_NO_NUMBERS flag.
  */
 
-    resname = pci_lookup_name(pciaccess, name, sizeof(name),
+#ifdef HWLOC_HAVE_LIBPCIACCESS
+    vendorname = pci_device_get_vendor_name(pcidev);
+#else /* HWLOC_HAVE_LIBPCI */
+    vendorname = pci_lookup_name(pciaccess, name, sizeof(name),
 #if HAVE_DECL_PCI_LOOKUP_NO_NUMBERS
 			      PCI_LOOKUP_VENDOR|PCI_LOOKUP_NO_NUMBERS,
 			      pcidev->vendor_id
@@ -446,10 +620,14 @@ hwloc_look_libpci(struct hwloc_backend *backend)
 			      pcidev->vendor_id, 0, 0, 0
 #endif
 			      );
-    if (resname)
-      hwloc_obj_add_info(obj, "PCIVendor", resname);
-
-    resname = pci_lookup_name(pciaccess, name, sizeof(name),
+#endif /* HWLOC_HAVE_LIBPCI */
+    if (vendorname)
+      hwloc_obj_add_info(obj, "PCIVendor", vendorname);
+
+#ifdef HWLOC_HAVE_LIBPCIACCESS
+    devicename = pci_device_get_device_name(pcidev);
+#else /* HWLOC_HAVE_LIBPCI */
+    devicename = pci_lookup_name(pciaccess, name, sizeof(name),
 #if HAVE_DECL_PCI_LOOKUP_NO_NUMBERS
 			      PCI_LOOKUP_DEVICE|PCI_LOOKUP_NO_NUMBERS,
 			      pcidev->vendor_id, pcidev->device_id
@@ -458,10 +636,19 @@ hwloc_look_libpci(struct hwloc_backend *backend)
 			      pcidev->vendor_id, pcidev->device_id, 0, 0
 #endif
 			      );
-    if (resname)
-      hwloc_obj_add_info(obj, "PCIDevice", resname);
-
-    resname = pci_lookup_name(pciaccess, name, sizeof(name),
+#endif /* HWLOC_HAVE_LIBPCI */
+    if (devicename)
+      hwloc_obj_add_info(obj, "PCIDevice", devicename);
+
+#ifdef HWLOC_HAVE_LIBPCIACCESS
+    snprintf(name, sizeof(name), "%s%s%s",
+	     vendorname ? vendorname : "",
+	     vendorname && devicename ? " " : "",
+	     devicename ? devicename : "");
+    fullname = name;
+    obj->name = strdup(name);
+#else /* HWLOC_HAVE_LIBPCI */
+    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,
 			      pcidev->vendor_id, pcidev->device_id
@@ -470,21 +657,26 @@ hwloc_look_libpci(struct hwloc_backend *backend)
 			      pcidev->vendor_id, pcidev->device_id, 0, 0
 #endif
 			      );
-    if (resname)
-      obj->name = strdup(resname);
+    if (fullname)
+      obj->name = strdup(fullname);
     else
-      resname = "??";
-
+      fullname = "??";
+#endif /* HWLOC_HAVE_LIBPCI */
     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,
-		resname);
+		fullname);
 
     hwloc_pci_add_object(&fakehostbridge, obj);
-    pcidev = pcidev->next;
   }
 
+  /* finalize device scanning */
+#ifdef HWLOC_HAVE_LIBPCIACCESS
+  pci_iterator_destroy(iter);
+  pci_system_cleanup();
+#else /* HWLOC_HAVE_LIBPCI */
   pci_cleanup(pciaccess);
+#endif
 
   hwloc_debug("%s", "\nPCI hierarchy after basic scan:\n");
   hwloc_pci_traverse(NULL, &fakehostbridge, hwloc_pci_traverse_print_cb);
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 1410b7b..1b95de0 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
@@ -3170,20 +3170,26 @@ hwloc__get_dmi_one_info(struct hwloc_linux_backend_data_s *data,
   char *tmp;
   FILE *fd;
 
-  snprintf(sysfs_path, sizeof(sysfs_path), "/sys/class/dmi/id/%s", sysfs_name);
+  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';
-  fd = hwloc_fopen(sysfs_path, "r", data->root_fd);
-  if (fd) {
-    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);
-    }
+  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);
   }
 }
 
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-solaris.c b/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-solaris.c
index bf6d25a..fec511d 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-solaris.c
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-solaris.c
@@ -140,6 +140,7 @@ hwloc_solaris_set_thisthread_cpubind(hwloc_topology_t topology, hwloc_const_bitm
 static int
 hwloc_solaris_get_sth_cpubind(hwloc_topology_t topology, idtype_t idtype, id_t id, hwloc_bitmap_t hwloc_set, int flags __hwloc_attribute_unused)
 {
+  processorid_t binding;
   int depth = hwloc_get_type_depth(topology, HWLOC_OBJ_NODE);
   int n;
   int i;
@@ -149,15 +150,21 @@ hwloc_solaris_get_sth_cpubind(hwloc_topology_t topology, idtype_t idtype, id_t i
     return -1;
   }
 
+  /* first check if processor_bind() was used to bind to a single processor rather than to an lgroup */
+  if ( processor_bind(idtype, id, PBIND_QUERY, &binding) == 0 && binding != PBIND_NONE ) {
+    hwloc_bitmap_only(hwloc_set, binding);
+    return 0;
+  }
+
+  /* if not, check lgroups */
   hwloc_bitmap_zero(hwloc_set);
   n = hwloc_get_nbobjs_by_depth(topology, depth);
-
   for (i = 0; i < n; i++) {
     hwloc_obj_t obj = hwloc_get_obj_by_depth(topology, depth, i);
     lgrp_affinity_t aff = lgrp_affinity_get(idtype, id, obj->os_index);
 
     if (aff == LGRP_AFF_STRONG)
-      hwloc_bitmap_or(hwloc_set, hwloc_set, obj->cpuset);      
+      hwloc_bitmap_or(hwloc_set, hwloc_set, obj->cpuset);
   }
 
   if (hwloc_bitmap_iszero(hwloc_set))
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/sys/processor.h
index 3d7b439..19877bc 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/sys/processor.h
@@ -11,6 +11,7 @@
 #include <sys/procset.h>
 typedef int processorid_t;
 #define PBIND_NONE -1
+#define PBIND_QUERY -2
 
 extern int processor_bind(idtype_t idtype, id_t id, processorid_t processorid, processorid_t *obind);
 
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 f647e3f..372a21d 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
@@ -16,12 +16,16 @@ and/or memory.
 .B hwloc-bind
 [\fIoptions\fR] \fI<location1> [<location2> [...] ] [--] <command> \fR...
 .
+.PP
+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
 .\" **************************
 .SH OPTIONS
 .
-See below for a description of valid <location> formats.
 .TP 10
 \fB\-\-cpubind\fR
 Use following arguments for CPU binding (default).
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 e2ad48d..1ba0c24 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
@@ -14,6 +14,11 @@ hwloc-calc \- Operate on cpu mask strings and objects
 .B hwloc-calc
 [\fIoptions\fR] \fI<location1> [<location2> [...] ]
 .
+.PP
+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/lstopo.1in b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/lstopo.1in
index 620a20b..4f15415 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/lstopo.1in
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/lstopo.1in
@@ -21,6 +21,10 @@ before reading this man page).
 .B lstopo-no-graphics
 [ \fIoptions \fR]... [ \fIfilename \fR]
 .
+.PP
+Note that hwloc(7) provides a detailed explanation of the hwloc system; it
+should be read before reading this man page
+.
 .\" **************************
 .\"    Options Section
 .\" **************************
@@ -421,5 +425,5 @@ To count the number of logical processors in the system
 .SH SEE ALSO
 .
 .ft R
-hwloc-bind(1), hwloc-ps(1), hwloc-gather-topology(1)
+hwloc(7), hwloc-bind(1), hwloc-ps(1), hwloc-gather-topology(1)
 .sp
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 bc6c91c..6c7a56a 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
@@ -38,10 +38,10 @@ $ls
   $ls --taskset -v > $tmp/test.taskset
   $ls --merge > $tmp/test.merge
 
- at HWLOC_HAVE_LIBPCI_TRUE@  $ls --no-io > $tmp/test.no-io
- at HWLOC_HAVE_LIBPCI_TRUE@  $ls --no-bridges > $tmp/test.no-bridges
- at HWLOC_HAVE_LIBPCI_TRUE@  $ls --whole-io > $tmp/test.whole-io
- at HWLOC_HAVE_LIBPCI_TRUE@  $ls -v --whole-io > $tmp/test.wholeio_verbose
+ at HWLOC_HAVE_PCI_TRUE@  $ls --no-io > $tmp/test.no-io
+ at HWLOC_HAVE_PCI_TRUE@  $ls --no-bridges > $tmp/test.no-bridges
+ at HWLOC_HAVE_PCI_TRUE@  $ls --whole-io > $tmp/test.whole-io
+ at HWLOC_HAVE_PCI_TRUE@  $ls -v --whole-io > $tmp/test.wholeio_verbose
 
   $ls --whole-system > $tmp/test.whole-system
   $ls --ps > $tmp/test.

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

Summary of changes:
 CHANGES                                            |    3 +
 src/pm/hydra/tools/topo/hwloc/hwloc/NEWS           |   11 +
 src/pm/hydra/tools/topo/hwloc/hwloc/VERSION        |    6 +-
 .../hydra/tools/topo/hwloc/hwloc/config/hwloc.m4   |   47 +++-
 .../topo/hwloc/hwloc/config/hwloc_internal.m4      |    5 +-
 src/pm/hydra/tools/topo/hwloc/hwloc/configure.ac   |   10 +
 .../topo/hwloc/hwloc/contrib/hwloc-valgrind.supp   |   17 ++
 src/pm/hydra/tools/topo/hwloc/hwloc/doc/hwloc.doxy |   44 +++-
 .../topo/hwloc/hwloc/include/private/components.h  |    4 +-
 .../hydra/tools/topo/hwloc/hwloc/src/Makefile.am   |   10 +-
 .../tools/topo/hwloc/hwloc/src/topology-libpci.c   |  264 +++++++++++++++++---
 .../tools/topo/hwloc/hwloc/src/topology-linux.c    |   30 ++-
 .../tools/topo/hwloc/hwloc/src/topology-solaris.c  |   11 +-
 .../hwloc/tests/ports/include/sys/processor.h      |    1 +
 .../tools/topo/hwloc/hwloc/utils/hwloc-bind.1in    |    6 +-
 .../tools/topo/hwloc/hwloc/utils/hwloc-calc.1in    |    5 +
 .../hydra/tools/topo/hwloc/hwloc/utils/lstopo.1in  |    6 +-
 .../topo/hwloc/hwloc/utils/test-hwloc-ls.sh.in     |    8 +-
 18 files changed, 400 insertions(+), 88 deletions(-)


hooks/post-receive
-- 
MPICH primary repository


More information about the commits mailing list