[mpich-commits] [mpich] MPICH primary repository branch, master, updated. v3.1b1-41-g177120e

mysql vizuser noreply at mpich.org
Fri Sep 20 12:22:45 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  177120ef3171e09c915182061c7d7ec426d46430 (commit)
       via  a460c1eeca56cc4c7f61fddcdb2724bd605fdea2 (commit)
       via  526749d0f10e8c5920836c9191d6a04b74bc167a (commit)
      from  b539c5a1765a1f03ef5e847b95180ca64c5a6c48 (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/177120ef3171e09c915182061c7d7ec426d46430

commit 177120ef3171e09c915182061c7d7ec426d46430
Author: Pavan Balaji <balaji at mcs.anl.gov>
Date:   Fri Sep 20 12:21:35 2013 -0500

    Update README with hwloc version.
    
    No reviewer.

diff --git a/CHANGES b/CHANGES
index a35ea83..d033542 100644
--- a/CHANGES
+++ b/CHANGES
@@ -21,7 +21,7 @@
 
  # Enable shared library builds by default.
 
- # Upgraded hwloc to 1.7.1.
+ # Upgraded hwloc to 1.7.2.
 
  # Several improvements to the Hydra-SLURM integration.
 

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

commit a460c1eeca56cc4c7f61fddcdb2724bd605fdea2
Author: Pavan Balaji <balaji at mcs.anl.gov>
Date:   Sun May 19 00:17:55 2013 -0500

    Hydra-specific patches for hwloc.
    
    Picked up the relevant parts of [2bda6bc7], [49b74176] and [59cbc846].
    
    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..c73edc2 100755
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/autogen.sh
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/autogen.sh
@@ -1,2 +1,9 @@
-:
-autoreconf -ivf
+#!/bin/sh
+
+if [ -n "$MPICH_AUTOTOOLS_DIR" ] ; then
+    autoreconf=${MPICH_AUTOTOOLS_DIR}/autoreconf
+else
+    autoreconf=${AUTORECONF:-autoreconf}
+fi
+
+$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 02b1e6f..b9ab48f 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/config/hwloc.m4
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/config/hwloc.m4
@@ -441,7 +441,25 @@ EOF])
     ])
     AC_CHECK_DECLS([strtoull], [], [], [AC_INCLUDES_DEFAULT])
 
-    AC_CHECK_FUNCS([sysctl sysctlbyname])
+    # Do a full link test instead of just using AC_CHECK_FUNCS, which
+    # just checks to see if the symbol exists or not.  For example,
+    # the prototype of sysctl uses u_int, which on some platforms
+    # (such as FreeBSD) is only defined under __BSD_VISIBLE, __USE_BSD
+    # or other similar definitions.  So while the symbols "sysctl" and
+    # "sysctlbyname" might still be available in libc (which autoconf
+    # checks for), they might not be actually usable.
+    AC_TRY_LINK([
+		#include <stdio.h>
+		#include <sys/sysctl.h>
+		],
+                [return sysctl(NULL,0,NULL,NULL,NULL,0);],
+                AC_DEFINE([HAVE_SYSCTL],[1],[Define to '1' if sysctl is present and usable]))
+    AC_TRY_LINK([
+		#include <stdio.h>
+		#include <sys/sysctl.h>
+		],
+                [return sysctlbyname(NULL,NULL,NULL,NULL,0);],
+                AC_DEFINE([HAVE_SYSCTLBYNAME],[1],[Define to '1' if sysctlbyname is present and usable]))
 
     case ${target} in
       *-*-mingw*|*-*-cygwin*)
@@ -1232,7 +1250,10 @@ dnl number of arguments (10). Success means the compiler couldn't really check.
 AC_DEFUN([_HWLOC_CHECK_DECL], [
   AC_MSG_CHECKING([whether function $1 is declared])
   AC_REQUIRE([AC_PROG_CC])
-  AC_COMPILE_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT([$4])],[$1(1,2,3,4,5,6,7,8,9,10);])],
+  AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
+	[AC_INCLUDES_DEFAULT([$4])
+	$1(int,long,int,long,int,long,int,long,int,long);],
+	[$1(1,2,3,4,5,6,7,8,9,10);])],
     [AC_MSG_RESULT([no])
      $3],
     [AC_MSG_RESULT([yes])
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/embedded/configure.ac b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/embedded/configure.ac
index d697e58..e7477e9 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/embedded/configure.ac
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/embedded/configure.ac
@@ -12,6 +12,7 @@ m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
 AC_LANG([C])
 
 AC_PROG_CC
+AM_PROG_CC_C_O
 
 cat <<EOF
 

http://git.mpich.org/mpich.git/commitdiff/526749d0f10e8c5920836c9191d6a04b74bc167a

commit 526749d0f10e8c5920836c9191d6a04b74bc167a
Author: Pavan Balaji <balaji at mcs.anl.gov>
Date:   Fri Sep 20 10:37:18 2013 -0500

    Upgrade to hwloc-1.7.2.
    
    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 5d635d5..a76d42e 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 bc99c0e..60a762d 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/NEWS
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/NEWS
@@ -17,6 +17,18 @@ bug fixes (and other actions) for each version of hwloc since version
 in v0.9.1).
 
 
+Version 1.7.2
+-------------
+* Do not create invalid block OS devices on very old Linux kernel such
+  as RHEL4 2.6.9.
+* Fix PCI subvendor/device IDs.
+* Fix the management of Misc objects inserted by parent.
+  Thanks to Jirka Hladky for reporting the problem.
+* Add a Port<n>State into attribute to OpenFabrics OS devices.
+* Add a MICSerialNumber info attribute to Xeon PHI/MIC OS devices.
+* Improve verbose error messages when failing to load from XML.
+
+
 Version 1.7.1
 -------------
 * Fix a failed assertion in the distance grouping code when loading a XML
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/VERSION b/src/pm/hydra/tools/topo/hwloc/hwloc/VERSION
index b057041..68cd34e 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=7
-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
@@ -58,4 +58,4 @@ date="Unreleased developer copy"
 # 2. Version numbers are described in the Libtool current:revision:age
 # format.
 
-libhwloc_so_version=8:1:3
+libhwloc_so_version=8:2:3
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/autogen.sh b/src/pm/hydra/tools/topo/hwloc/hwloc/autogen.sh
index c73edc2..d69ef09 100755
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/autogen.sh
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/autogen.sh
@@ -1,9 +1,2 @@
-#!/bin/sh
-
-if [ -n "$MPICH_AUTOTOOLS_DIR" ] ; then
-    autoreconf=${MPICH_AUTOTOOLS_DIR}/autoreconf
-else
-    autoreconf=${AUTORECONF:-autoreconf}
-fi
-
-$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 b9ab48f..02b1e6f 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/config/hwloc.m4
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/config/hwloc.m4
@@ -441,25 +441,7 @@ EOF])
     ])
     AC_CHECK_DECLS([strtoull], [], [], [AC_INCLUDES_DEFAULT])
 
-    # Do a full link test instead of just using AC_CHECK_FUNCS, which
-    # just checks to see if the symbol exists or not.  For example,
-    # the prototype of sysctl uses u_int, which on some platforms
-    # (such as FreeBSD) is only defined under __BSD_VISIBLE, __USE_BSD
-    # or other similar definitions.  So while the symbols "sysctl" and
-    # "sysctlbyname" might still be available in libc (which autoconf
-    # checks for), they might not be actually usable.
-    AC_TRY_LINK([
-		#include <stdio.h>
-		#include <sys/sysctl.h>
-		],
-                [return sysctl(NULL,0,NULL,NULL,NULL,0);],
-                AC_DEFINE([HAVE_SYSCTL],[1],[Define to '1' if sysctl is present and usable]))
-    AC_TRY_LINK([
-		#include <stdio.h>
-		#include <sys/sysctl.h>
-		],
-                [return sysctlbyname(NULL,NULL,NULL,NULL,0);],
-                AC_DEFINE([HAVE_SYSCTLBYNAME],[1],[Define to '1' if sysctlbyname is present and usable]))
+    AC_CHECK_FUNCS([sysctl sysctlbyname])
 
     case ${target} in
       *-*-mingw*|*-*-cygwin*)
@@ -1250,10 +1232,7 @@ dnl number of arguments (10). Success means the compiler couldn't really check.
 AC_DEFUN([_HWLOC_CHECK_DECL], [
   AC_MSG_CHECKING([whether function $1 is declared])
   AC_REQUIRE([AC_PROG_CC])
-  AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
-	[AC_INCLUDES_DEFAULT([$4])
-	$1(int,long,int,long,int,long,int,long,int,long);],
-	[$1(1,2,3,4,5,6,7,8,9,10);])],
+  AC_COMPILE_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT([$4])],[$1(1,2,3,4,5,6,7,8,9,10);])],
     [AC_MSG_RESULT([no])
      $3],
     [AC_MSG_RESULT([yes])
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 d756120..4af37db 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/doc/Makefile.am
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/doc/Makefile.am
@@ -1,5 +1,5 @@
 # Copyright © 2009-2013 Inria.  All rights reserved.
-# Copyright © 2009-2012 Université Bordeaux 1
+# Copyright © 2009-2013 Université Bordeaux 1
 # Copyright © 2009-2010 Cisco Systems, Inc.  All rights reserved.
 # See COPYING in top-level directory.
 
@@ -116,11 +116,8 @@ endif
 # of nested structurre/union declarations.
 #
 
-if HWLOC_BUILD_DOXYGEN
-$(DOX_TAG): $(BUILT_SOURCES) $(dox_inputs) $(PREBUILT_IMAGES)
-	rm -fr $(DOX_DIR)
-	$(DOXYGEN) $(DOX_CONFIG)
-	-$(SED_I) -e 's/__hwloc_restrict/restrict/g' \
+RENAME_SED = \
+	$(SED_I) -e 's/__hwloc_restrict/restrict/g' \
 	          -e 's/\\_\\-\\_\\-hwloc\\_\\-restrict/restrict/g' \
 	          -e 's/__hwloc_attribute_unused//g' \
 	          -e 's/\\_\\-\\_\\-hwloc\\_\\-attribute\\_\\-unused//g' \
@@ -135,7 +132,13 @@ $(DOX_TAG): $(BUILT_SOURCES) $(dox_inputs) $(PREBUILT_IMAGES)
 	          -e 's/HWLOC_DECLSPEC//g' \
 	          -e 's/HWLOC\\_\\-DECLSPEC//g' \
 	          -e 's/__hwloc_inline/inline/g' \
-	          -e 's/\\_\\-\\_\\-hwloc\\_\\-inline/inline/g' \
+	          -e 's/\\_\\-\\_\\-hwloc\\_\\-inline/inline/g'
+
+if HWLOC_BUILD_DOXYGEN
+$(DOX_TAG): $(BUILT_SOURCES) $(dox_inputs) $(PREBUILT_IMAGES)
+	rm -fr $(DOX_DIR)
+	$(DOXYGEN) $(DOX_CONFIG)
+	-$(RENAME_SED) \
 		$(DOX_DIR)/html/*.html $(DOX_DIR)/latex/*.tex $(DOX_DIR)/man/man3/*.3
 	@echo "Work-around spurious leading _ in doxygen filenames..."
 	-(cd $(DOX_DIR)/man/man3 ; \
@@ -149,6 +152,9 @@ $(DOX_TAG): $(BUILT_SOURCES) $(dox_inputs) $(PREBUILT_IMAGES)
 	@mv $(DOX_DIR)/man.tmp $(DOX_MAN_DIR)/man3
 endif
 
+www-doc-sed:
+	-$(RENAME_SED) www.open-mpi.org/html/*.php
+
 #
 # Rules for building the PDF
 #
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 d6d5c19..507e962 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/doc/hwloc.doxy
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/doc/hwloc.doxy
@@ -1647,8 +1647,10 @@ object instead.
 <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.
+<dt>MICFamily, MICSKU, MICSerialNumber, MICActiveCores, MICMemorySize</dt>
+<dd>The family, SKU (model), serial number,
+ number of active cores, and memory size (in kB)
+ 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
@@ -1659,10 +1661,12 @@ as reported by Linux under <tt>/sys/class/dmi/id/</tt>.
 <dd>The MAC address and the port number of a software network
 interface, such as <tt>eth4</tt> on Linux.
 </dd>
-<dt>NodeGUID, SysImageGUID, Port3LID, Port4LMC, Port5GID6
+<dt>NodeGUID, SysImageGUID, Port1State, Port2LID, Port2LMC, Port3GID1
 (OpenFabrics OS devices)</dt>
-<dd>The node GUID and GUID mask, the LID and LID mask count of a given
-port, and a GID of a port.
+<dd>The node GUID and GUID mask,
+the state of a port #1 (value is 4 when active),
+the LID and LID mask count of port #2,
+and GID #1 of port #3.
 </dd>
 </dl>
 
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 ddf5731..6aacb8e 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
@@ -528,12 +528,14 @@ extern "C" {
 #define hwloc_set_binding_hooks HWLOC_NAME(set_binding_hooks)
 
 #define hwloc_set_linuxfs_hooks HWLOC_NAME(set_linuxfs_hooks)
+#define hwloc_set_bgq_hooks HWLOC_NAME(set_bgq_hooks)
 #define hwloc_set_solaris_hooks HWLOC_NAME(set_solaris_hooks)
 #define hwloc_set_aix_hooks HWLOC_NAME(set_aix_hooks)
 #define hwloc_set_osf_hooks HWLOC_NAME(set_osf_hooks)
 #define hwloc_set_windows_hooks HWLOC_NAME(set_windows_hooks)
 #define hwloc_set_darwin_hooks HWLOC_NAME(set_darwin_hooks)
 #define hwloc_set_freebsd_hooks HWLOC_NAME(set_freebsd_hooks)
+#define hwloc_set_netbsd_hooks HWLOC_NAME(set_netbsd_hooks)
 #define hwloc_set_hpux_hooks HWLOC_NAME(set_hpux_hooks)
 
 #define hwloc_add_uname_info HWLOC_NAME(add_uname_info)
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 1566a2f..3403f51 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,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.
  * Copyright © 2010 IBM
  * See COPYING in top-level directory.
@@ -272,6 +272,47 @@ hwloc_opendir(const char *p, int d __hwloc_attribute_unused)
 }
 
 
+static int
+hwloc_linux_parse_cpuset_file(FILE *file, hwloc_bitmap_t set)
+{
+  unsigned long start, stop;
+
+  /* reset to zero first */
+  hwloc_bitmap_zero(set);
+
+  while (fscanf(file, "%lu", &start) == 1)
+  {
+    int c = fgetc(file);
+
+    stop = start;
+
+    if (c == '-') {
+      /* Range */
+      if (fscanf(file, "%lu", &stop) != 1) {
+        /* Expected a number here */
+        errno = EINVAL;
+        return -1;
+      }
+      c = fgetc(file);
+    }
+
+    if (c == EOF || c == '\n') {
+      hwloc_bitmap_set_range(set, start, stop);
+      break;
+    }
+
+    if (c != ',') {
+      /* Expected EOF, EOL, or a comma */
+      errno = EINVAL;
+      return -1;
+    }
+
+    hwloc_bitmap_set_range(set, start, stop);
+  }
+
+  return 0;
+}
+
 
 /*****************************
  ******* CpuBind Hooks *******
@@ -353,6 +394,7 @@ hwloc_linux_find_kernel_nr_cpus(hwloc_topology_t topology)
 {
   static int _nr_cpus = -1;
   int nr_cpus = _nr_cpus;
+  FILE *possible;
 
   if (nr_cpus != -1)
     /* already computed */
@@ -365,6 +407,21 @@ hwloc_linux_find_kernel_nr_cpus(hwloc_topology_t topology)
     /* start from scratch, the topology isn't ready yet (complete_cpuset is missing (-1) or empty (0))*/
     nr_cpus = 1;
 
+  possible = fopen("/sys/devices/system/cpu/possible", "r");
+  if (possible) {
+    hwloc_bitmap_t possible_bitmap = hwloc_bitmap_alloc();
+    if (hwloc_linux_parse_cpuset_file(possible, possible_bitmap) == 0) {
+      int max_possible = hwloc_bitmap_last(possible_bitmap);
+
+      hwloc_debug_bitmap("possible CPUs are %s\n", possible_bitmap);
+
+      if (nr_cpus < max_possible + 1)
+        nr_cpus = max_possible + 1;
+    }
+    fclose(possible);
+    hwloc_bitmap_free(possible_bitmap);
+  }
+
   while (1) {
     cpu_set_t *set = CPU_ALLOC(nr_cpus);
     size_t setsize = CPU_ALLOC_SIZE(nr_cpus);
@@ -3542,14 +3599,23 @@ hwloc_linux_class_readdir(struct hwloc_topology *topology, struct hwloc_obj *pci
   DIR *dir;
   struct dirent *dirent;
   hwloc_obj_t obj;
-  int res = 0;
+  int res = 0, err;
 
   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> */
+    struct stat st;
     snprintf(path, sizeof(path), "%s/%s", devicepath, classname);
+
+    /* some very host kernel (2.6.9/RHEL4) have <device>/<class> symlink without any way to find <name>.
+     * make sure <device>/<class> is a directory to avoid this case.
+     */
+    err = lstat(path, &st);
+    if (err < 0 || !S_ISDIR(st.st_mode))
+      goto trydeprecated;
+
     dir = opendir(path);
     if (dir) {
       hwloc_linux_deprecated_classlinks_model = 0;
@@ -3568,6 +3634,7 @@ hwloc_linux_class_readdir(struct hwloc_topology *topology, struct hwloc_obj *pci
     }
   }
 
+trydeprecated:
   if (hwloc_linux_deprecated_classlinks_model != 0) {
     /* deprecated sysfs: <device>/<class>:<name> */
     dir = opendir(devicepath);
@@ -3678,6 +3745,22 @@ hwloc_linux_infiniband_class_fillinfos(struct hwloc_topology *topology __hwloc_a
   }
 
   for(i=1; ; i++) {
+    snprintf(path, sizeof(path), "%s/ports/%u/state", osdevpath, i);
+    fd = fopen(path, "r");
+    if (fd) {
+      char statevalue[2];
+      if (fgets(statevalue, sizeof(statevalue), fd)) {
+	char statename[32];
+	statevalue[1] = '\0'; /* only keep the first byte/digit */
+	snprintf(statename, sizeof(statename), "Port%uState", i);
+	hwloc_obj_add_info(obj, statename, statevalue);
+      }
+      fclose(fd);
+    } else {
+      /* no such port */
+      break;
+    }
+
     snprintf(path, sizeof(path), "%s/ports/%u/lid", osdevpath, i);
     fd = fopen(path, "r");
     if (fd) {
@@ -3691,9 +3774,6 @@ hwloc_linux_infiniband_class_fillinfos(struct hwloc_topology *topology __hwloc_a
 	hwloc_obj_add_info(obj, lidname, lidvalue);
       }
       fclose(fd);
-    } else {
-      /* no such port */
-      break;
     }
 
     snprintf(path, sizeof(path), "%s/ports/%u/lid_mask_count", osdevpath, i);
@@ -3881,6 +3961,19 @@ hwloc_linux_mic_class_fillinfos(struct hwloc_topology *topology __hwloc_attribut
     fclose(fd);
   }
 
+  snprintf(path, sizeof(path), "%s/serialnumber", osdevpath);
+  fd = fopen(path, "r");
+  if (fd) {
+    char sn[64];
+    if (fgets(sn, sizeof(sn), fd)) {
+      char *eol = strchr(sn, '\n');
+      if (eol)
+        *eol = 0;
+      hwloc_obj_add_info(obj, "MICSerialNumber", sn);
+    }
+    fclose(fd);
+  }
+
   snprintf(path, sizeof(path), "%s/active_cores", osdevpath);
   fd = fopen(path, "r");
   if (fd) {
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-pci.c b/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-pci.c
index f70609e..62f88a0 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-pci.c
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-pci.c
@@ -503,6 +503,7 @@ hwloc_look_pci(struct hwloc_backend *backend)
     unsigned isbridge;
     unsigned domain;
     unsigned device_class;
+    unsigned short tmp16;
     char name[128];
     unsigned offset;
 #ifdef HWLOC_HAVE_PCI_FIND_CAP
@@ -559,10 +560,6 @@ hwloc_look_pci(struct hwloc_backend *backend)
     obj->attr->pcidev.class_id = device_class;
     HWLOC_BUILD_ASSERT(PCI_REVISION_ID < CONFIG_SPACE_CACHESIZE);
     obj->attr->pcidev.revision = config_space_cache[PCI_REVISION_ID];
-    HWLOC_BUILD_ASSERT(PCI_SUBSYSTEM_VENDOR_ID < CONFIG_SPACE_CACHESIZE);
-    obj->attr->pcidev.subvendor_id = config_space_cache[PCI_SUBSYSTEM_VENDOR_ID];
-    HWLOC_BUILD_ASSERT(PCI_SUBSYSTEM_ID < CONFIG_SPACE_CACHESIZE);
-    obj->attr->pcidev.subdevice_id = config_space_cache[PCI_SUBSYSTEM_ID];
 
     obj->attr->pcidev.linkspeed = 0; /* unknown */
 #ifdef HWLOC_HAVE_PCI_FIND_CAP
@@ -648,6 +645,20 @@ hwloc_look_pci(struct hwloc_backend *backend)
       obj->attr->bridge.downstream.pci.subordinate_bus = config_space_cache[PCI_SUBORDINATE_BUS];
     }
 
+    if (obj->type == HWLOC_OBJ_PCI_DEVICE) {
+      memcpy(&tmp16, &config_space_cache[PCI_SUBSYSTEM_VENDOR_ID], sizeof(tmp16));
+      HWLOC_BUILD_ASSERT(PCI_SUBSYSTEM_VENDOR_ID < CONFIG_SPACE_CACHESIZE);
+      obj->attr->pcidev.subvendor_id = tmp16;
+      memcpy(&tmp16, &config_space_cache[PCI_SUBSYSTEM_ID], sizeof(tmp16));
+      HWLOC_BUILD_ASSERT(PCI_SUBSYSTEM_ID < CONFIG_SPACE_CACHESIZE);
+      obj->attr->pcidev.subdevice_id = tmp16;
+    } else {
+      /* TODO:
+       * bridge must lookup PCI_CAP_ID_SSVID and then look at offset+PCI_SSVID_VENDOR/DEVICE_ID
+       * cardbus must look at PCI_CB_SUBSYSTEM_VENDOR_ID and PCI_CB_SUBSYSTEM_ID
+       */
+    }
+
 /* starting from pciutils 2.2, pci_lookup_name() takes a variable number
  * of arguments, and supports the PCI_LOOKUP_NO_NUMBERS flag.
  */
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 2a2c41a..cc6521c 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
@@ -706,6 +706,8 @@ hwloc_look_xml(struct hwloc_backend *backend)
  failed:
   if (data->look_failed)
     data->look_failed(data);
+  if (hwloc__xml_verbose())
+    fprintf(stderr, "XML component discovery failed.\n");
  err:
   hwloc_localeswitch_fini();
   return -1;
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 d09627a..a6fc4f9 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology.c
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology.c
@@ -688,6 +688,7 @@ hwloc___insert_object_by_cpuset(struct hwloc_topology *topology, hwloc_obj_t cur
 	    child->distances_count += obj->distances_count;
 	    child->distances = realloc(child->distances, child->distances_count * sizeof(*child->distances));
 	    memcpy(child->distances + obj->distances_count, obj->distances, obj->distances_count * sizeof(*child->distances));
+	    free(obj->distances);
 	  } else {
 	    child->distances_count = obj->distances_count;
 	    child->distances = obj->distances;
@@ -700,6 +701,7 @@ hwloc___insert_object_by_cpuset(struct hwloc_topology *topology, hwloc_obj_t cur
 	    child->infos_count += obj->infos_count;
 	    child->infos = realloc(child->infos, child->infos_count * sizeof(*child->infos));
 	    memcpy(child->infos + obj->infos_count, obj->infos, obj->infos_count * sizeof(*child->infos));
+	    free(obj->infos);
 	  } else {
 	    child->infos_count = obj->infos_count;
 	    child->infos = obj->infos;
@@ -897,7 +899,7 @@ hwloc_topology_insert_misc_object_by_cpuset(struct hwloc_topology *topology, hwl
 
   if (hwloc_bitmap_iszero(cpuset))
     return NULL;
-  if (!hwloc_bitmap_isincluded(cpuset, hwloc_topology_get_complete_cpuset(topology)))
+  if (!hwloc_bitmap_isincluded(cpuset, hwloc_topology_get_topology_cpuset(topology)))
     return NULL;
 
   obj = hwloc_alloc_setup_object(HWLOC_OBJ_MISC, -1);
@@ -1183,11 +1185,18 @@ add_default_object_sets(hwloc_obj_t obj, int parent_has_sets)
   if (hwloc_obj_type_is_io(obj->type))
     return;
 
-  if (parent_has_sets || obj->cpuset) {
-    /* if the parent has non-NULL sets, or if the object has non-NULL cpusets,
-     * it must have non-NULL nodesets
-     */
+  if (parent_has_sets && obj->type != HWLOC_OBJ_MISC) {
+    /* non-MISC object must have cpuset if parent has one. */
     assert(obj->cpuset);
+  }
+
+  /* other sets must be consistent with main cpuset:
+   * check cpusets and add nodesets if needed.
+   *
+   * MISC may have no sets at all (if added by parent), or usual ones (if added by cpuset),
+   * but that's not easy to detect, so just make sure sets are consistent as usual.
+   */
+  if (obj->cpuset) {
     assert(obj->online_cpuset);
     assert(obj->complete_cpuset);
     assert(obj->allowed_cpuset);
@@ -1198,9 +1207,9 @@ add_default_object_sets(hwloc_obj_t obj, int parent_has_sets)
     if (!obj->allowed_nodeset)
       obj->allowed_nodeset = hwloc_bitmap_alloc_full();
   } else {
-    /* parent has no sets and object has NULL cpusets,
-     * it must have NULL nodesets
-     */
+    assert(!obj->online_cpuset);
+    assert(!obj->complete_cpuset);
+    assert(!obj->allowed_cpuset);
     assert(!obj->nodeset);
     assert(!obj->complete_nodeset);
     assert(!obj->allowed_nodeset);
@@ -1239,6 +1248,9 @@ propagate_nodeset(hwloc_obj_t obj, hwloc_obj_t sys)
     /* don't propagate nodesets in I/O objects, keep them NULL */
     if (hwloc_obj_type_is_io(child->type))
       return;
+    /* don't propagate nodesets in Misc inserted by parent (no nodeset if no cpuset) */
+    if (child->type == HWLOC_OBJ_MISC && !child->cpuset)
+      return;
 
     /* Propagate singleton nodesets down */
     if (parent_weight == 1) {
@@ -1450,7 +1462,7 @@ remove_empty(hwloc_topology_t topology, hwloc_obj_t *pobj)
 
   if (obj->type != HWLOC_OBJ_NODE
       && !obj->first_child /* only remove if all children were removed above, so that we don't remove parents of NUMAnode */
-      && !hwloc_obj_type_is_io(obj->type)
+      && !hwloc_obj_type_is_io(obj->type) && obj->type != HWLOC_OBJ_MISC
       && obj->cpuset /* don't remove if no cpuset at all, there's likely a good reason why it's different from having an empty cpuset */
       && hwloc_bitmap_iszero(obj->cpuset)) {
     /* Remove empty children */
@@ -2195,7 +2207,7 @@ next_cpubackend:
   }
 
   if (!discoveries) {
-    hwloc_debug("%s", "No CPU backend enabled\n");
+    hwloc_debug("%s", "No CPU backend enabled or no discovery succeeded\n");
     errno = EINVAL;
     return -1;
   }
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/embedded/configure.ac b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/embedded/configure.ac
index c0d6ba1..d697e58 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/embedded/configure.ac
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/embedded/configure.ac
@@ -9,11 +9,9 @@ AC_CANONICAL_TARGET
 AM_INIT_AUTOMAKE([1.10 dist-bzip2 foreign subdir-objects tar-ustar -Wall -Werror])
 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
 
-
 AC_LANG([C])
 
 AC_PROG_CC
-AM_PROG_CC_C_O
 
 cat <<EOF
 
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/hwloc_insert_misc.c b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/hwloc_insert_misc.c
index 95365af..74180c1 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/hwloc_insert_misc.c
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/hwloc_insert_misc.c
@@ -23,8 +23,9 @@ int main(void)
   hwloc_topology_load(topology);
   hwloc_topology_check(topology);
   cpuset = hwloc_bitmap_alloc();
-  hwloc_bitmap_set(cpuset, 0);
+  hwloc_bitmap_set(cpuset, hwloc_bitmap_first(hwloc_topology_get_topology_cpuset(topology)));
   obj = hwloc_topology_insert_misc_object_by_cpuset(topology, cpuset, "test");
+  assert(obj);
   hwloc_bitmap_free(cpuset);
   hwloc_topology_insert_misc_object_by_parent(topology, obj, "test2");
   hwloc_topology_check(topology);
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 54f5295..969eda7 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
@@ -34,6 +34,10 @@ usage()
    echo "  $0 /tmp/\$(uname -n)"
 }
 
+if test $# -lt 1 ; then
+  usage
+  exit 1
+fi
 name="$1"; shift
 if [ -z "$name" -o x`echo $name | cut -c1` = x- ] ; then
   [ x$name != x -a x$name != x-h -a x$name != x--help ] && echo "Unrecognized option: $name"
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 a2195d7..72bb583 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
@@ -84,12 +84,12 @@ hwloc-annotate's operation is best described through several examples.
 .PP
 Add an info attribute to all Core objects:
 
-    $ hwloc-annotate input.xml output.xml Core:all infoname infovalue
+    $ hwloc-annotate input.xml output.xml Core:all info infoname infovalue
 
 Add an info attribute to the root object of the topology
 and modify the input XML directly:
 
-    $ hwloc-annotate file.xml file.xml root infoname infovalue
+    $ hwloc-annotate file.xml file.xml root info infoname infovalue
 
 .
 .\" **************************
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
index 8bfe806..75ada8a 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc-info.1in
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc-info.1in
@@ -16,7 +16,7 @@ hwloc-info \- Show some information about some objects or about a topology
 .B hwloc-info
 [ \fIoptions \fR]...
 \fI<object>\fR...
-.
+.PP
 .B hwloc-info
 [ \fIoptions \fR]...
 .
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 f089597..549a53a 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/lstopo.1in
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/lstopo.1in
@@ -351,6 +351,8 @@ in the particular case of NUMA nodes, the layout is always a flat
 rectangle, to avoid letting the user believe any particular NUMA
 topology (lstopo is not able to render that yet).
 .
+The layout of a level may be changed with \-\-vert and \-\-horiz.
+.
 .\" **************************
 .\"    Examples Section
 .\" **************************
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 7c2d6d6..16d5b1f 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/lstopo.c
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/lstopo.c
@@ -557,8 +557,10 @@ main (int argc, char *argv[])
   }
 
   err = hwloc_topology_load (topology);
-  if (err)
+  if (err) {
+    fprintf(stderr, "hwloc_topology_load() failed (%s).\n", strerror(errno));
     return EXIT_FAILURE;
+  }
 
   if (top)
     add_process_objects(topology);

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

Summary of changes:
 CHANGES                                            |    2 +-
 src/pm/hydra/tools/topo/hwloc/hwloc/NEWS           |   12 +++
 src/pm/hydra/tools/topo/hwloc/hwloc/VERSION        |    4 +-
 .../hydra/tools/topo/hwloc/hwloc/doc/Makefile.am   |   20 +++--
 src/pm/hydra/tools/topo/hwloc/hwloc/doc/hwloc.doxy |   14 ++-
 .../tools/topo/hwloc/hwloc/include/hwloc/rename.h  |    2 +
 .../tools/topo/hwloc/hwloc/src/topology-linux.c    |  103 +++++++++++++++++++-
 .../tools/topo/hwloc/hwloc/src/topology-pci.c      |   19 +++-
 .../tools/topo/hwloc/hwloc/src/topology-xml.c      |    2 +
 src/pm/hydra/tools/topo/hwloc/hwloc/src/topology.c |   32 ++++--
 .../topo/hwloc/hwloc/tests/embedded/configure.ac   |    1 -
 .../topo/hwloc/hwloc/tests/hwloc_insert_misc.c     |    3 +-
 .../hwloc/tests/linux/hwloc-gather-topology.in     |    4 +
 .../topo/hwloc/hwloc/utils/hwloc-annotate.1in      |    4 +-
 .../tools/topo/hwloc/hwloc/utils/hwloc-info.1in    |    2 +-
 .../hydra/tools/topo/hwloc/hwloc/utils/lstopo.1in  |    2 +
 src/pm/hydra/tools/topo/hwloc/hwloc/utils/lstopo.c |    4 +-
 17 files changed, 190 insertions(+), 40 deletions(-)


hooks/post-receive
-- 
MPICH primary repository


More information about the commits mailing list