[mpich-commits] [mpich] MPICH primary repository branch, master, updated. v3.2-205-g9ee96c6
Service Account
noreply at mpich.org
Thu Feb 18 16:38:36 CST 2016
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 9ee96c63c52299e0bc382d0a5817eedaabdceba5 (commit)
via d335259e9deac6b53b47afe6736503a7d71eea35 (commit)
from a5748c7c039db29cf6a4cee5316251ecee1a7f9c (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/9ee96c63c52299e0bc382d0a5817eedaabdceba5
commit 9ee96c63c52299e0bc382d0a5817eedaabdceba5
Author: Sangmin Seo <sseo at anl.gov>
Date: Tue Feb 16 17:31:00 2016 +0000
Hydra-specific patches for hwloc.
Applied [23821aa1487b] and [637cf86f6f7d].
NOTE for dropped patches:
- [5ce7102445fe]: hwloc-1.11.2 includes the same patch.
- [23cbd2969684]: picked up a different patch in hwloc-1.11.2.
Signed-off-by: Pavan Balaji <balaji at anl.gov>
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/Makefile.am b/src/pm/hydra/tools/topo/hwloc/hwloc/Makefile.am
index 69ae667..724f96f 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 += tests utils
+# SUBDIRS += tests utils
# 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 df42802..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 ${autoreconf_args:-"-ivf"}
+#!/bin/sh
+
+if [ -n "$MPICH_AUTOTOOLS_DIR" ] ; then
+ autoreconf=${MPICH_AUTOTOOLS_DIR}/autoreconf
+else
+ autoreconf=${AUTORECONF:-autoreconf}
+fi
+
+$autoreconf ${autoreconf_args:-"-ivf"}
http://git.mpich.org/mpich.git/commitdiff/d335259e9deac6b53b47afe6736503a7d71eea35
commit d335259e9deac6b53b47afe6736503a7d71eea35
Author: Sangmin Seo <sseo at anl.gov>
Date: Tue Feb 16 17:10:23 2016 +0000
Upgraded to hwloc-1.11.2.
Signed-off-by: Pavan Balaji <balaji at anl.gov>
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/.gitignore b/src/pm/hydra/tools/topo/hwloc/hwloc/.gitignore
index 99d4e38..b3a60f9 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/.gitignore
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/.gitignore
@@ -5,6 +5,12 @@ Makefile
test-suite.log
*~
+/auto.out
+/config.out
+/dist.out
+/doc/doc.out
+/doc/readme.out
+
/config/ar-lib
/config/argz.m4
/config/compile
@@ -41,14 +47,15 @@ test-suite.log
/doc/doxygen-doc/
/doc/images/diagram.eps
/doc/images/diagram.png
-/doc/hwloc-hello
-/doc/hwloc-hello-cpp
-/doc/hwloc-hello-cpp.cpp
-/doc/*.o
-/doc/*.log
-/doc/*.trs
-/doc/doc.out
-/doc/readme.out
+/doc/examples/hwloc-hello
+/doc/examples/hwloc-hello-cpp
+/doc/examples/hwloc-hello-cpp.cpp
+/doc/examples/cpuset+bitmap+cpubind
+/doc/examples/nodeset+membind+policy
+/doc/examples/sharedcaches
+/doc/examples/*.o
+/doc/examples/*.log
+/doc/examples/*.trs
/src/static-components.h
/src/*.lo
@@ -58,6 +65,7 @@ test-suite.log
/tests/wrapper.sh
/tests/hwloc_list_components
/tests/hwloc_bitmap
+/tests/hwloc_bitmap_compare_inclusion
/tests/hwloc_bitmap_string
/tests/hwloc_get_closest_objs
/tests/hwloc_get_obj_covering_cpuset
@@ -102,7 +110,6 @@ test-suite.log
/tests/*.log
/tests/*.trs
-/tests/linux/hwloc-gather-topology
/tests/linux/test-topology.sh
/tests/linux/*.log
/tests/linux/*.trs
@@ -138,6 +145,9 @@ test-suite.log
/utils/hwloc/hwloc-distances.1
/utils/hwloc/hwloc-distrib
/utils/hwloc/hwloc-distrib.1
+/utils/hwloc/hwloc-dump-hwdata
+/utils/hwloc/hwloc-dump-hwdata.1
+/utils/hwloc/hwloc-gather-topology
/utils/hwloc/hwloc-gather-topology.1
/utils/hwloc/hwloc-info
/utils/hwloc/hwloc-info.1
@@ -161,7 +171,7 @@ test-suite.log
/utils/lstopo/*.o
/utils/lstopo/lstopo
/utils/lstopo/lstopo-no-graphics
-/utils/lstopo/lstopo.1
+/utils/lstopo/lstopo-no-graphics.1
/utils/lstopo/test-hwloc-ls.sh
/utils/lstopo/test-*.sh.log
/utils/lstopo/test-*.sh.trs
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/AUTHORS b/src/pm/hydra/tools/topo/hwloc/hwloc/AUTHORS
index 837b27f..0e52215 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/AUTHORS
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/AUTHORS
@@ -1,8 +1,10 @@
Cédric Augonnet <Cedric.Augonnet at labri.fr>
+Guillaume Beauchamp <Guillaume.Beauchamp at inria.fr>
Jérôme Clet-Ortega <Jerome.Clet-Ortega at labri.fr>
Ludovic Courtès <Ludovic.Courtes at inria.fr>
-Brice Goglin <Brice.Goglin at inria.fr>
Nathalie Furmento <Nathalie.Furmento at labri.fr>
-Samuel Thibault <Samuel.Thibault at labri.fr>
-Jeff Squyres <jsquyres at cisco.com>
+Brice Goglin <Brice.Goglin at inria.fr>
Alexey Kardashevskiy <aik at au1.ibm.com>
+Antoine Rougier (University of Bordeaux intern)
+Jeff Squyres <jsquyres at cisco.com>
+Samuel Thibault <Samuel.Thibault at labri.fr>
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/Makefile.am b/src/pm/hydra/tools/topo/hwloc/hwloc/Makefile.am
index 5449f70..69ae667 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 += tests utils
# 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 df246fe..c44f16f 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/NEWS
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/NEWS
@@ -17,6 +17,93 @@ bug fixes (and other actions) for each version of hwloc since version
in v0.9.1).
+Version 1.11.2
+--------------
+* Improve support for Intel Knights Landing Xeon Phi on Linux:
+ + Group local NUMA nodes of normal memory (DDR) and high-bandwidth memory
+ (MCDRAM) together through "Cluster" groups so that the local MCDRAM is
+ easy to find.
+ - See "How do I find the local MCDRAM NUMA node on Intel Knights
+ Landing Xeon Phi?" in the documentation.
+ - For uniformity across all KNL configurations, always have a NUMA node
+ object even if the host is UMA.
+ + Fix the detection of the memory-side cache:
+ - Add the hwloc-dump-hwdata superuser utility to dump SMBIOS information
+ into /var/run/hwloc/ as root during boot, and load this dumped
+ information from the hwloc library at runtime.
+ - See "Why do I need hwloc-dump-hwdata for caches on Intel Knights
+ Landing Xeon Phi?" in the documentation.
+ Thanks to Grzegorz Andrejczuk for the patches and for the help.
+* The x86 and linux backends may now be combined for discovering CPUs
+ through x86 CPUID and memory from the Linux kernel.
+ This is useful for working around buggy CPU information reported by Linux
+ (for instance the AMD Bulldozer/Piledriver bug below).
+ Combination is enabled by passing HWLOC_COMPONENTS=x86 in the environment.
+* Fix L3 cache sharing on AMD Opteron 63xx (Piledriver) and 62xx (Bulldozer)
+ in the x86 backend. Thanks to many users who helped.
+* Fix the overzealous L3 cache sharing fix added to the x86 backend in 1.11.1
+ for AMD Opteron 61xx (Magny-Cours) processors.
+* The x86 backend may now add the info attribute Inclusive=0 or 1 to caches
+ it discovers, or to caches discovered by other backends earlier.
+ Thanks to Guillaume Beauchamp for the patch.
+* Fix the management on alloc_membind() allocation failures on AIX, HP-UX
+ and OSF/Tru64.
+* Fix spurious failures to load with ENOMEM on AIX in case of Misc objects
+ below PUs.
+* lstopo improvements in X11 and Windows graphical mode:
+ + Add + - f 1 shortcuts to manually zoom-in, zoom-out, reset the scale,
+ or fit the entire window.
+ + Display all keyboard shortcuts in the console.
+* Debug messages may be disabled at runtime by passing HWLOC_DEBUG_VERBOSE=0
+ in the environment when --enable-debug was passed to configure.
+* Add a FAQ entry "What are these Group objects in my topology?".
+
+
+Version 1.11.1
+--------------
+* Detection fixes
+ + Hardwire the topology of Fujitsu K-computer, FX10, FX100 servers to
+ workaround buggy Linux kernels.
+ Thanks to Takahiro Kawashima and Gilles Gouaillardet.
+ + Fix L3 cache information on AMD Opteron 61xx Magny-Cours processors
+ in the x86 backend. Thanks to Guillaume Beauchamp for the patch.
+ + Detect block devices directly attached to PCI without a controller,
+ for instance NVMe disks. Thanks to Barry M. Tannenbaum.
+ + Add the PCISlot attribute to all PCI functions instead of only the
+ first one.
+* Miscellaneous internal fixes
+ + Ignore PCI bridges that could fail assertions by reporting buggy
+ secondary-subordinate bus numbers
+ Thanks to George Bosilca for reporting the issue.
+ + Fix an overzealous assertion when inserting an intermediate Group object
+ while Groups are totally ignored.
+ + Fix a memory leak on Linux on AMD processors with dual-core compute units.
+ Thanks to Bob Benner.
+ + Fix a memory leak on failure to load a xml diff file.
+ + Fix some segfaults when inputting an invalid synthetic description.
+ + Fix a segfault when plugins fail to find core symbols.
+ Thanks to Guy Streeter.
+* Many fixes and improvements in the Windows backend:
+ + Fix the discovery of more than 32 processors and multiple processor
+ groups. Thanks to Barry M. Tannenbaum for the help.
+ + Add thread binding set support in case of multiple process groups.
+ + Add thread binding get support.
+ + Add get_last_cpu_location() support for the current thread.
+ + Disable the unsupported process binding in case of multiple processor
+ groups.
+ + Fix/update the Visual Studio support under contrib/windows.
+ Thanks to Eloi Gaudry for the help.
+* Tools fixes
+ + Fix a segfault when displaying logical indexes in the graphical lstopo.
+ Thanks to Guillaume Mercier for reporting the issue.
+ + Fix lstopo linking with X11 libraries, for instance on Mac OS X.
+ Thanks to Scott Atchley and Pierre Ramet for reporting the issue.
+ + hwloc-annotate, hwloc-diff and hwloc-patch do not drop unavailable
+ resources from the output anymore and those may be annotated as well.
+ + Command-line tools may now import XML from the standard input with -i -.xml
+ + Add missing documentation for the hwloc-info --no-icaches option.
+
+
Version 1.11.0
--------------
* API
@@ -33,7 +120,7 @@ Version 1.11.0
info attributes to Block OS devices on Linux. Thanks to Vineet Pedaballe
for the help.
- Add --disable-libudev to avoid dependency on the libudev library.
- + Add "MemoryDevice" Misc objects with information about DIMMs, on Linux
+ + Add "MemoryModule" Misc objects with information about DIMMs, on Linux
when privileged and when I/O is enabled.
Thanks to Vineet Pedaballe for the help.
+ Add a PCISlot attribute to PCI devices on Linux when supported to
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/README b/src/pm/hydra/tools/topo/hwloc/hwloc/README
index fed9319..6332fbc 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/README
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/README
@@ -557,7 +557,7 @@ Questions and Bugs
Questions should be sent to the devel mailing list (http://www.open-mpi.org/
community/lists/hwloc.php). Bug reports should be reported in the tracker (
-https://git.open-mpi.org/trac/hwloc/).
+https://github.com/open-mpi/hwloc/issues).
If hwloc discovers an incorrect topology for your machine, the very first thing
you should check is to ensure that you have the most recent updates installed
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/VERSION b/src/pm/hydra/tools/topo/hwloc/hwloc/VERSION
index 7233789..3943a7f 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=11
-release=0
+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=0
# requirement is that it must be entirely printable ASCII characters
# and have no white space.
-greek=rc3
+greek=rc2
# The date when this release was created
@@ -39,4 +39,4 @@ snapshot_version=${major}.${minor}.${release}${greek}-git
# 2. Version numbers are described in the Libtool current:revision:age
# format.
-libhwloc_so_version=11:6:6
+libhwloc_so_version=11:8:6
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/autogen.sh b/src/pm/hydra/tools/topo/hwloc/hwloc/autogen.sh
index c73edc2..df42802 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 ${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 2f44504..1b4f490 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/config/hwloc.m4
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/config/hwloc.m4
@@ -1,7 +1,7 @@
dnl -*- Autoconf -*-
dnl
dnl Copyright © 2009-2015 Inria. All rights reserved.
-dnl Copyright © 2009-2012 Université Bordeaux
+dnl Copyright © 2009-2012, 2015 Université Bordeaux
dnl Copyright © 2004-2005 The Trustees of Indiana University and Indiana
dnl University Research and Technology
dnl Corporation. All rights reserved.
@@ -398,7 +398,8 @@ EOF])
GROUP_RELATIONSHIP,
SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX,
PSAPI_WORKING_SET_EX_BLOCK,
- PSAPI_WORKING_SET_EX_INFORMATION],
+ PSAPI_WORKING_SET_EX_INFORMATION,
+ PROCESSOR_NUMBER],
[],[],[[#include <windows.h>]])
CPPFLAGS="$old_CPPFLAGS"
AC_CHECK_LIB([gdi32], [main],
@@ -573,15 +574,13 @@ EOF])
AC_MSG_RESULT([yes])],
[AC_MSG_RESULT([no])])
- AC_MSG_CHECKING([for working _syscall3])
+ AC_MSG_CHECKING([for working syscall])
AC_LINK_IFELSE([
AC_LANG_PROGRAM([[
- #include <linux/unistd.h>
- #include <errno.h>
- #define __NR_hwloc_test 123
- _syscall3(int, hwloc_test, int, param1, int, param2, int, param3);
- ]], [[ hwloc_test(1, 2, 3); ]])],
- [AC_DEFINE([HWLOC_HAVE__SYSCALL3], [1], [Define to 1 if the _syscall3 macro works])
+ #include <unistd.h>
+ #include <sys/syscall.h>
+ ]], [[syscall(1, 2, 3);]])],
+ [AC_DEFINE([HWLOC_HAVE_SYSCALL], [1], [Define to 1 if function `syscall' is available])
AC_MSG_RESULT([yes])],
[AC_MSG_RESULT([no])])
@@ -885,8 +884,11 @@ EOF])
# lstopo needs more
AC_CHECK_HEADERS([X11/Xutil.h],
[AC_CHECK_HEADERS([X11/keysym.h],
- [AC_DEFINE([HWLOC_HAVE_X11_KEYSYM], [1], [Define to 1 if X11 headers including Xutil.h and keysym.h are available.])])
- AC_SUBST([HWLOC_X11_LIBS], ["-lX11"])
+ [AC_DEFINE([HWLOC_HAVE_X11_KEYSYM], [1], [Define to 1 if X11 headers including Xutil.h and keysym.h are available.])
+ HWLOC_X11_CPPFLAGS="$X_CFLAGS"
+ AC_SUBST([HWLOC_X11_CPPFLAGS])
+ HWLOC_X11_LIBS="$X_PRE_LIBS $X_LIBS -lX11 $X_EXTRA_LIBS"
+ AC_SUBST([HWLOC_X11_LIBS])])
], [], [#include <X11/Xlib.h>])
])
])
@@ -1211,6 +1213,7 @@ AC_DEFUN([HWLOC_DO_AM_CONDITIONALS],[
AM_CONDITIONAL([HWLOC_HAVE_WINDOWS], [test "x$hwloc_windows" = "xyes"])
AM_CONDITIONAL([HWLOC_HAVE_MINGW32], [test "x$target_os" = "xmingw32"])
+ AM_CONDITIONAL([HWLOC_HAVE_X86], [test "x$hwloc_x86_32" = "xyes" -o "x$hwloc_x86_64" = "xyes"])
AM_CONDITIONAL([HWLOC_HAVE_X86_32], [test "x$hwloc_x86_32" = "xyes"])
AM_CONDITIONAL([HWLOC_HAVE_X86_64], [test "x$hwloc_x86_64" = "xyes"])
AM_CONDITIONAL([HWLOC_HAVE_X86_CPUID], [test "x$hwloc_have_x86_cpuid" = "xyes"])
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/ci.inria.fr/job-0-tarball.sh b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/ci.inria.fr/job-0-tarball.sh
new file mode 100755
index 0000000..ce51b1c
--- /dev/null
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/ci.inria.fr/job-0-tarball.sh
@@ -0,0 +1,37 @@
+#!/bin/sh
+#
+# Copyright © 2012-2015 Inria. All rights reserved.
+# See COPYING in top-level directory.
+#
+
+set -e
+set -x
+
+# environment variables
+test -f $HOME/.ciprofile && . $HOME/.ciprofile
+branch=$( echo $GIT_BRANCH | sed -r -e 's@^.*/([^/]+)$@\1@' )
+if test -d $HOME/local/hwloc-$branch ; then
+ export PATH=$HOME/local/hwloc-${branch}/bin:$PATH
+ echo using specific $HOME/local/hwloc-$branch
+else
+ export PATH=$HOME/local/hwloc-master/bin:$PATH
+ echo using generic $HOME/local/hwloc-master
+fi
+
+# remove everything but the last 10 builds
+ls -td hwloc-* | tail -n +11 | xargs chmod u+w -R || true
+ls -td hwloc-* | tail -n +11 | xargs rm -rf || true
+
+# display autotools versions
+automake --version | head -1
+libtool --version | head -1
+autoconf --version | head -1
+
+# append a better version string
+VERSION=$branch-`date +%Y%m%d.%H%M`.git`git show --format=format:%h -s`
+
+# let's go
+./autogen.sh
+./configure
+make
+make distcheck VERSION=$VERSION
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/ci.inria.fr/job-1-check.sh b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/ci.inria.fr/job-1-check.sh
new file mode 100755
index 0000000..b8fc443
--- /dev/null
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/ci.inria.fr/job-1-check.sh
@@ -0,0 +1,54 @@
+#!/bin/sh
+#
+# Copyright © 2012-2015 Inria. All rights reserved.
+# See COPYING in top-level directory.
+#
+
+set -e
+set -x
+
+# environment variables
+test -f $HOME/.ciprofile && . $HOME/.ciprofile
+
+# remove everything but the last 10 builds
+ls | grep -v ^hwloc- | grep -v ^job- | xargs rm -rf || true
+ls -td hwloc-* | tail -n +11 | xargs chmod u+w -R || true
+ls -td hwloc-* | tail -n +11 | xargs rm -rf || true
+
+# find the tarball, extract it
+tarball=$(ls -tr hwloc-*.tar.gz | grep -v build.tar.gz | tail -1)
+basename=$(basename $tarball .tar.gz)
+test -d $basename && chmod -R u+rwX $basename && rm -rf $basename
+tar xfz $tarball
+rm $tarball
+cd $basename
+
+# ignore clock problems
+touch configure
+
+# build without plugins
+mkdir build
+cd build
+../configure
+make
+make check
+utils/lstopo/lstopo-no-graphics -v
+cd ..
+
+# build with plugins
+mkdir build-plugins
+cd build-plugins
+../configure --enable-plugins
+make
+make check
+tests/wrapper.sh utils/lstopo/lstopo-no-graphics -v
+cd ..
+
+# check renaming
+(cd build/tests/rename && make check)
+
+# cleanup
+rm -rf doc build/doc build-plugins/doc
+cd ..
+tar cfz ${basename}.build.tar.gz $basename
+rm -rf $basename
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/ci.inria.fr/job-3-mingw.sh b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/ci.inria.fr/job-3-mingw.sh
new file mode 100755
index 0000000..e8fedff
--- /dev/null
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/ci.inria.fr/job-3-mingw.sh
@@ -0,0 +1,150 @@
+#!/bin/sh
+#
+# Copyright © 2012-2015 Inria. All rights reserved.
+# See COPYING in top-level directory.
+#
+
+set -e
+set -x
+
+dotar=1
+dokeeptar=0
+doconf=1
+dobuild32=1
+dobuild64=1
+docheck=1
+doinstall=1
+confopts=
+
+while test $# -gt 0; do
+ if test "$1" = "--no-tar"; then
+ dotar=0
+ else if test "$1" = "--keep-tar"; then
+ dokeeptar=1
+ else if test "$1" = "--no-conf"; then
+ doconf=0
+ else if test "$1" = "--debug"; then
+ confopts="$confopts --enable-debug"
+ else if test "$1" = "--no-32"; then
+ dobuild32=0
+ else if test "$1" = "--no-64"; then
+ dobuild64=0
+ else if test "$1" = "--no-check"; then
+ docheck=0
+ else if test "$1" = "--no-install"; then
+ doinstall=0
+ else if test "$1" = "--help" -o "$1" = "-h"; then
+ echo " --no-tar Use current directory instead of latest hwloc-*.tar.gz"
+ echo " --keep-tar Don't delete tarball after unpacking"
+ echo " --no-conf Don't reconfigure tarball"
+ echo " --debug Enable debug"
+ echo " --no-32 Don't build in 32bits"
+ echo " --no-64 Don't build in 64bits"
+ echo " --no-check Don't run make check"
+ echo " --no-install Don't install"
+ echo " --help Show this help"
+ exit 0
+ fi fi fi fi fi fi fi fi fi
+ shift
+done
+
+oldPATH=$PATH
+
+if test x$dotar = x1; then
+ # remove everything but the last 10 builds
+ rm -rf $(ls | grep -v ^hwloc- | grep -v ^job-) || true
+ chmod u+w -R $(ls -td hwloc-* | tail -n +11) || true
+ rm -rf $(ls -td hwloc-* | tail -n +11) || true
+
+ # find the tarball and extract it
+ tarball=$(ls -tr hwloc-*.tar.gz | tail -1)
+ basename=$(basename $tarball .tar.gz)
+ version=$(echo $basename | cut -d- -f2)
+ test -d $basename && chmod -R u+rwX $basename && rm -rf $basename
+ tar xfz $tarball
+ if test x$dokeeptar = x0; then
+ rm $tarball
+ fi
+else
+ basename=./
+ version=custom
+fi
+
+if test x$dobuild32 = x1; then
+
+ mkdir ${basename}/build32 || true
+ cd ${basename}/build32
+
+ export PATH=/c/Builds:/c/Builds/mingw32/bin/:/c/Builds/mingw64/bin/:/c/Builds/mingw32/i686-w64-mingw32/lib:"/c/Program Files (x86)/Microsoft Visual Studio 11.0/VC/bin":"/c/Program Files (x86)/Microsoft Visual Studio 11.0/Common7/IDE":$oldPATH
+ if test x$doconf = x1; then
+ winball=hwloc-win32-build-${version}
+ prefix=${PWD}/../${winball}
+ ../configure --prefix=$prefix --enable-static --host=i686-w64-mingw32 CC_FOR_BUILD=x86_64-w64-mingw32-gcc $confopts
+ fi
+
+ make
+
+ if test x$docheck = x1; then
+ make check
+ fi
+
+ if test x$doinstall = x1; then
+ make install
+ #make install-winball || true # not needed anymore in v1.7+
+ winball=$(basename $(head config.log | sed -r -n -e 's/.*--prefix=([^ ]+).*/\1/p'))
+ cd ..
+
+ zip -r ../${winball}.zip ${winball}
+ test -f ${winball}/lib/libhwloc.lib || false
+ else
+ cd ..
+ fi
+
+ build32/utils/lstopo/lstopo-no-graphics -v
+
+ if test x$dotar = x1; then
+ cd ..
+ fi
+
+fi
+
+
+if test x$dobuild64 = x1; then
+
+ mkdir ${basename}/build64 || true
+ cd ${basename}/build64
+
+ export PATH=/c/Builds:/c/Builds/mingw64/bin/:/c/Builds/mingw32/i686-w64-mingw32/lib/:"/c/Program Files (x86)/Microsoft Visual Studio 11.0/VC/bin":"/c/Program Files (x86)/Microsoft Visual Studio 11.0/Common7/IDE":$oldPATH
+ if test x$doconf = x1; then
+ winball=hwloc-win64-build-${version}
+ prefix=${PWD}/../${winball}
+ ../configure --prefix=$prefix --enable-static --host=x86_64-w64-mingw32 $confopts
+ fi
+
+ make
+
+ if test x$docheck = x1; then
+ make check
+ fi
+
+ if test x$doinstall = x1; then
+ make install
+ #make install-winball || true # not needed anymore in v1.7+
+ winball=$(basename $(head config.log | sed -r -n -e 's/.*--prefix=([^ ]+).*/\1/p'))
+ cd ..
+
+ zip -r ../${winball}.zip ${winball}
+ test -f ${winball}/lib/libhwloc.lib || false
+ else
+ cd ..
+ fi
+
+ build64/utils/lstopo/lstopo-no-graphics -v
+
+ if test x$dotar = x1; then
+ cd ..
+ fi
+
+fi
+
+PATH=$oldPATH
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/ci.inria.fr/job-3-visualstudio.bat b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/ci.inria.fr/job-3-visualstudio.bat
new file mode 100644
index 0000000..abeb9c3
--- /dev/null
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/ci.inria.fr/job-3-visualstudio.bat
@@ -0,0 +1,33 @@
+REM
+REM Copyright © 2012-2015 Inria. All rights reserved.
+REM See COPYING in top-level directory.
+REM
+
+set PATH=%PATH%;C:\Builds\MSYS-20111123\msys\bin
+
+REM remove everything but the last 10 builds
+sh -c "rm -rf $(ls | grep -v ^hwloc- | grep -v ^job-) || true"
+sh -c "rm -rf $(ls -td hwloc-* | tail -n +21) || true"
+REM chmod not needed when not doing make distcheck
+
+REM find the tarball name
+for /f %%i in ('sh -c "ls -tr hwloc-*.tar.gz | grep -v build.tar.gz | tail -1 | sed -e s/.tar.gz//"') do set TARBALL=%%i
+
+sh -c "tar xfz %TARBALL%.tar.gz"
+if %errorlevel% neq 0 exit /b %errorlevel%
+
+cd %TARBALL%\contrib\windows
+if %errorlevel% neq 0 exit /b %errorlevel%
+
+C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild hwloc.sln /p:Configuration=Release /p:Platform=x64
+if %errorlevel% neq 0 exit /b %errorlevel%
+
+x64\Release\lstopo-no-graphics.exe
+if %errorlevel% neq 0 exit /b %errorlevel%
+
+cd ..\..\..
+
+sh -c "tar cfz %TARBALL%-build.tar.gz %TARBALL%"
+if %errorlevel% neq 0 exit /b %errorlevel%
+
+sh -c "rm -rf %TARBALL%"
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/README b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/README
index 04a2ae9..c7d8d47 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/README
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/README
@@ -11,6 +11,9 @@ Enforce a specific toolset before building if needed.
hwloc-assembler-remote is not built because it requires a hardwired
path to hwloc-assembler and it uses ssh.
+hwloc-compress-dir not built because needs work.
+
+hwloc-gather-topology is Linux specific.
hwloc-ps is not built because it does nothing on Windows anyway.
Possible code proposed by Eloi Gaudry:
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-annotate.vcxproj b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-annotate.vcxproj
index cd89930..42e9ca0 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-annotate.vcxproj
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-annotate.vcxproj
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="Globals">
- <ProjectGuid>{9DE76C6D-4773-4766-9F93-69C56166CB8E}</ProjectGuid>
+ <ProjectGuid>{9DE76C6D-4773-4766-9F93-69C56166CB8F}</ProjectGuid>
<RootNamespace>hwloc-bind</RootNamespace>
<Keyword>Win32Proj</Keyword>
</PropertyGroup>
@@ -17,6 +17,7 @@
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
@@ -59,7 +60,7 @@
<SuppressStartupBanner>true</SuppressStartupBanner>
<TargetMachine>MachineX64</TargetMachine>
<LinkErrorReporting>NoErrorReport</LinkErrorReporting>
- <AdditionalLibraryDirectories>$(SolutionDir)$(Platform)\ReleaseDll;$(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalLibraryDirectories>$(SolutionDir)$(Platform)\Release;$(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>libhwloc.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
@@ -77,7 +78,6 @@
<ClInclude Include="..\..\include\hwloc\plugins.h" />
<ClInclude Include="..\..\include\hwloc\rename.h" />
<ClInclude Include="..\..\include\private\components.h" />
- <ClInclude Include="..\..\include\private\cpuid.h" />
<ClInclude Include="..\..\include\private\debug.h" />
<ClInclude Include="..\..\include\private\misc.h" />
<ClInclude Include="..\..\include\private\private.h" />
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-annotate.vcxproj.filters b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-annotate.vcxproj.filters
index f950ed4..8c95a9b 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-annotate.vcxproj.filters
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-annotate.vcxproj.filters
@@ -44,9 +44,6 @@
<ClInclude Include="..\..\include\private\components.h">
<Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="..\..\include\private\cpuid.h">
- <Filter>Header Files</Filter>
- </ClInclude>
<ClInclude Include="..\..\include\private\debug.h">
<Filter>Header Files</Filter>
</ClInclude>
@@ -65,7 +62,7 @@
<ClInclude Include="..\..\include\hwloc\autogen\config.h">
<Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="..\..\utils\hwloc\hwloc-calc.h">
+ <ClInclude Include="..\..\utils\hwloc\misc.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-assembler.vcxproj b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-assembler.vcxproj
index 88e25bd..aba819a 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-assembler.vcxproj
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-assembler.vcxproj
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="Globals">
- <ProjectGuid>{9DE76C6D-4773-4766-9F93-69C56166CB8E}</ProjectGuid>
+ <ProjectGuid>{9DE76C6D-4773-4766-9F93-69C56166CB9A}</ProjectGuid>
<RootNamespace>hwloc-bind</RootNamespace>
<Keyword>Win32Proj</Keyword>
</PropertyGroup>
@@ -17,6 +17,7 @@
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
@@ -59,7 +60,7 @@
<SuppressStartupBanner>true</SuppressStartupBanner>
<TargetMachine>MachineX64</TargetMachine>
<LinkErrorReporting>NoErrorReport</LinkErrorReporting>
- <AdditionalLibraryDirectories>$(SolutionDir)$(Platform)\ReleaseDll;$(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalLibraryDirectories>$(SolutionDir)$(Platform)\Release;$(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>libhwloc.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-bind.vcxproj b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-bind.vcxproj
index 1416ab9..a544967 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-bind.vcxproj
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-bind.vcxproj
@@ -1,7 +1,7 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="Globals">
- <ProjectGuid>{9DE76C6D-4773-4766-9F93-69C56166CB8E}</ProjectGuid>
+ <ProjectGuid>{9DE76C6D-4773-4766-9F93-69C56166CB91}</ProjectGuid>
<RootNamespace>hwloc-bind</RootNamespace>
<Keyword>Win32Proj</Keyword>
</PropertyGroup>
@@ -17,6 +17,7 @@
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
@@ -59,7 +60,7 @@
<SuppressStartupBanner>true</SuppressStartupBanner>
<TargetMachine>MachineX64</TargetMachine>
<LinkErrorReporting>NoErrorReport</LinkErrorReporting>
- <AdditionalLibraryDirectories>$(SolutionDir)$(Platform)\ReleaseDll;$(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalLibraryDirectories>$(SolutionDir)$(Platform)\Release;$(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>libhwloc.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
@@ -77,7 +78,6 @@
<ClInclude Include="..\..\include\hwloc\plugins.h" />
<ClInclude Include="..\..\include\hwloc\rename.h" />
<ClInclude Include="..\..\include\private\components.h" />
- <ClInclude Include="..\..\include\private\cpuid.h" />
<ClInclude Include="..\..\include\private\debug.h" />
<ClInclude Include="..\..\include\private\misc.h" />
<ClInclude Include="..\..\include\private\private.h" />
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-bind.vcxproj.filters b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-bind.vcxproj.filters
index e32415f..dea4bf6 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-bind.vcxproj.filters
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-bind.vcxproj.filters
@@ -44,9 +44,6 @@
<ClInclude Include="..\..\include\private\components.h">
<Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="..\..\include\private\cpuid.h">
- <Filter>Header Files</Filter>
- </ClInclude>
<ClInclude Include="..\..\include\private\debug.h">
<Filter>Header Files</Filter>
</ClInclude>
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-calc.vcxproj b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-calc.vcxproj
index df32755..65e172d 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-calc.vcxproj
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-calc.vcxproj
@@ -1,7 +1,7 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="Globals">
- <ProjectGuid>{9DE76C6D-4773-4766-9F93-69C56166CB8E}</ProjectGuid>
+ <ProjectGuid>{9DE76C6D-4773-4766-9F93-69C56166CB92}</ProjectGuid>
<RootNamespace>hwloc-calc</RootNamespace>
<Keyword>Win32Proj</Keyword>
</PropertyGroup>
@@ -17,6 +17,7 @@
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
@@ -59,7 +60,7 @@
<SuppressStartupBanner>true</SuppressStartupBanner>
<TargetMachine>MachineX64</TargetMachine>
<LinkErrorReporting>NoErrorReport</LinkErrorReporting>
- <AdditionalLibraryDirectories>$(SolutionDir)$(Platform)\ReleaseDll;$(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalLibraryDirectories>$(SolutionDir)$(Platform)\Release;$(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>libhwloc.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
@@ -77,7 +78,6 @@
<ClInclude Include="..\..\include\hwloc\plugins.h" />
<ClInclude Include="..\..\include\hwloc\rename.h" />
<ClInclude Include="..\..\include\private\components.h" />
- <ClInclude Include="..\..\include\private\cpuid.h" />
<ClInclude Include="..\..\include\private\debug.h" />
<ClInclude Include="..\..\include\private\misc.h" />
<ClInclude Include="..\..\include\private\private.h" />
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-calc.vcxproj.filters b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-calc.vcxproj.filters
index 71e798b..96caf5d 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-calc.vcxproj.filters
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-calc.vcxproj.filters
@@ -44,9 +44,6 @@
<ClInclude Include="..\..\include\private\components.h">
<Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="..\..\include\private\cpuid.h">
- <Filter>Header Files</Filter>
- </ClInclude>
<ClInclude Include="..\..\include\private\debug.h">
<Filter>Header Files</Filter>
</ClInclude>
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-diff.vcxproj b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-diff.vcxproj
index f55a3d2..c5d3750 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-diff.vcxproj
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-diff.vcxproj
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="Globals">
- <ProjectGuid>{9DE76C6D-4773-4766-9F93-69C56166CB8E}</ProjectGuid>
+ <ProjectGuid>{9DE76C6D-4773-4766-9F93-69C56166CB93}</ProjectGuid>
<RootNamespace>hwloc-bind</RootNamespace>
<Keyword>Win32Proj</Keyword>
</PropertyGroup>
@@ -17,6 +17,7 @@
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
@@ -59,7 +60,7 @@
<SuppressStartupBanner>true</SuppressStartupBanner>
<TargetMachine>MachineX64</TargetMachine>
<LinkErrorReporting>NoErrorReport</LinkErrorReporting>
- <AdditionalLibraryDirectories>$(SolutionDir)$(Platform)\ReleaseDll;$(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalLibraryDirectories>$(SolutionDir)$(Platform)\Release;$(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>libhwloc.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
@@ -77,7 +78,6 @@
<ClInclude Include="..\..\include\hwloc\plugins.h" />
<ClInclude Include="..\..\include\hwloc\rename.h" />
<ClInclude Include="..\..\include\private\components.h" />
- <ClInclude Include="..\..\include\private\cpuid.h" />
<ClInclude Include="..\..\include\private\debug.h" />
<ClInclude Include="..\..\include\private\misc.h" />
<ClInclude Include="..\..\include\private\private.h" />
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-diff.vcxproj.filters b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-diff.vcxproj.filters
index 336e844..7b648e9 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-diff.vcxproj.filters
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-diff.vcxproj.filters
@@ -44,9 +44,6 @@
<ClInclude Include="..\..\include\private\components.h">
<Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="..\..\include\private\cpuid.h">
- <Filter>Header Files</Filter>
- </ClInclude>
<ClInclude Include="..\..\include\private\debug.h">
<Filter>Header Files</Filter>
</ClInclude>
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-distances.vcxproj b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-distances.vcxproj
index 998cff5..aadbb45 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-distances.vcxproj
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-distances.vcxproj
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="Globals">
- <ProjectGuid>{9DE76C6D-4773-4766-9F93-69C56166CB8E}</ProjectGuid>
+ <ProjectGuid>{9DE76C6D-4773-4766-9F93-69C56166CB94}</ProjectGuid>
<RootNamespace>hwloc-bind</RootNamespace>
<Keyword>Win32Proj</Keyword>
</PropertyGroup>
@@ -17,6 +17,7 @@
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
@@ -59,7 +60,7 @@
<SuppressStartupBanner>true</SuppressStartupBanner>
<TargetMachine>MachineX64</TargetMachine>
<LinkErrorReporting>NoErrorReport</LinkErrorReporting>
- <AdditionalLibraryDirectories>$(SolutionDir)$(Platform)\ReleaseDll;$(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalLibraryDirectories>$(SolutionDir)$(Platform)\Release;$(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>libhwloc.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
@@ -77,7 +78,6 @@
<ClInclude Include="..\..\include\hwloc\plugins.h" />
<ClInclude Include="..\..\include\hwloc\rename.h" />
<ClInclude Include="..\..\include\private\components.h" />
- <ClInclude Include="..\..\include\private\cpuid.h" />
<ClInclude Include="..\..\include\private\debug.h" />
<ClInclude Include="..\..\include\private\misc.h" />
<ClInclude Include="..\..\include\private\private.h" />
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-distances.vcxproj.filters b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-distances.vcxproj.filters
index 41de164..7a1af48 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-distances.vcxproj.filters
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-distances.vcxproj.filters
@@ -44,9 +44,6 @@
<ClInclude Include="..\..\include\private\components.h">
<Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="..\..\include\private\cpuid.h">
- <Filter>Header Files</Filter>
- </ClInclude>
<ClInclude Include="..\..\include\private\debug.h">
<Filter>Header Files</Filter>
</ClInclude>
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-distrib.vcxproj b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-distrib.vcxproj
index b7fcf74..5407924 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-distrib.vcxproj
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-distrib.vcxproj
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="Globals">
- <ProjectGuid>{9DE76C6D-4773-4766-9F93-69C56166CB8E}</ProjectGuid>
+ <ProjectGuid>{9DE76C6D-4773-4766-9F93-69C56166CB95}</ProjectGuid>
<RootNamespace>hwloc-bind</RootNamespace>
<Keyword>Win32Proj</Keyword>
</PropertyGroup>
@@ -17,6 +17,7 @@
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
@@ -59,7 +60,7 @@
<SuppressStartupBanner>true</SuppressStartupBanner>
<TargetMachine>MachineX64</TargetMachine>
<LinkErrorReporting>NoErrorReport</LinkErrorReporting>
- <AdditionalLibraryDirectories>$(SolutionDir)$(Platform)\ReleaseDll;$(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalLibraryDirectories>$(SolutionDir)$(Platform)\Release;$(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>libhwloc.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
@@ -77,7 +78,6 @@
<ClInclude Include="..\..\include\hwloc\plugins.h" />
<ClInclude Include="..\..\include\hwloc\rename.h" />
<ClInclude Include="..\..\include\private\components.h" />
- <ClInclude Include="..\..\include\private\cpuid.h" />
<ClInclude Include="..\..\include\private\debug.h" />
<ClInclude Include="..\..\include\private\misc.h" />
<ClInclude Include="..\..\include\private\private.h" />
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-distrib.vcxproj.filters b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-distrib.vcxproj.filters
index 9ee60a4..7b77f48 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-distrib.vcxproj.filters
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-distrib.vcxproj.filters
@@ -44,9 +44,6 @@
<ClInclude Include="..\..\include\private\components.h">
<Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="..\..\include\private\cpuid.h">
- <Filter>Header Files</Filter>
- </ClInclude>
<ClInclude Include="..\..\include\private\debug.h">
<Filter>Header Files</Filter>
</ClInclude>
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-info.vcxproj b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-info.vcxproj
index 5adba72..ce01efe 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-info.vcxproj
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-info.vcxproj
@@ -1,7 +1,7 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="Globals">
- <ProjectGuid>{9DE76C6D-4773-4766-9F93-69C56166CB8E}</ProjectGuid>
+ <ProjectGuid>{9DE76C6D-4773-4766-9F93-69C56166CB96}</ProjectGuid>
<RootNamespace>hwloc-info</RootNamespace>
<Keyword>Win32Proj</Keyword>
</PropertyGroup>
@@ -17,6 +17,7 @@
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
@@ -59,7 +60,7 @@
<SuppressStartupBanner>true</SuppressStartupBanner>
<TargetMachine>MachineX64</TargetMachine>
<LinkErrorReporting>NoErrorReport</LinkErrorReporting>
- <AdditionalLibraryDirectories>$(SolutionDir)$(Platform)\ReleaseDll;$(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalLibraryDirectories>$(SolutionDir)$(Platform)\Release;$(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>libhwloc.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
@@ -77,7 +78,6 @@
<ClInclude Include="..\..\include\hwloc\plugins.h" />
<ClInclude Include="..\..\include\hwloc\rename.h" />
<ClInclude Include="..\..\include\private\components.h" />
- <ClInclude Include="..\..\include\private\cpuid.h" />
<ClInclude Include="..\..\include\private\debug.h" />
<ClInclude Include="..\..\include\private\misc.h" />
<ClInclude Include="..\..\include\private\private.h" />
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-info.vcxproj.filters b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-info.vcxproj.filters
index 143148b..9769af1 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-info.vcxproj.filters
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-info.vcxproj.filters
@@ -44,9 +44,6 @@
<ClInclude Include="..\..\include\private\components.h">
<Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="..\..\include\private\cpuid.h">
- <Filter>Header Files</Filter>
- </ClInclude>
<ClInclude Include="..\..\include\private\debug.h">
<Filter>Header Files</Filter>
</ClInclude>
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-patch.vcxproj b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-patch.vcxproj
index 645190a..64faf42 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-patch.vcxproj
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-patch.vcxproj
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="Globals">
- <ProjectGuid>{9DE76C6D-4773-4766-9F93-69C56166CB8E}</ProjectGuid>
+ <ProjectGuid>{9DE76C6D-4773-4766-9F93-69C56166CB97}</ProjectGuid>
<RootNamespace>hwloc-bind</RootNamespace>
<Keyword>Win32Proj</Keyword>
</PropertyGroup>
@@ -17,6 +17,7 @@
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
@@ -59,7 +60,7 @@
<SuppressStartupBanner>true</SuppressStartupBanner>
<TargetMachine>MachineX64</TargetMachine>
<LinkErrorReporting>NoErrorReport</LinkErrorReporting>
- <AdditionalLibraryDirectories>$(SolutionDir)$(Platform)\ReleaseDll;$(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalLibraryDirectories>$(SolutionDir)$(Platform)\Release;$(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>libhwloc.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
@@ -77,7 +78,6 @@
<ClInclude Include="..\..\include\hwloc\plugins.h" />
<ClInclude Include="..\..\include\hwloc\rename.h" />
<ClInclude Include="..\..\include\private\components.h" />
- <ClInclude Include="..\..\include\private\cpuid.h" />
<ClInclude Include="..\..\include\private\debug.h" />
<ClInclude Include="..\..\include\private\misc.h" />
<ClInclude Include="..\..\include\private\private.h" />
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-patch.vcxproj.filters b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-patch.vcxproj.filters
index 0c1ed29..de6769d 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-patch.vcxproj.filters
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-patch.vcxproj.filters
@@ -44,9 +44,6 @@
<ClInclude Include="..\..\include\private\components.h">
<Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="..\..\include\private\cpuid.h">
- <Filter>Header Files</Filter>
- </ClInclude>
<ClInclude Include="..\..\include\private\debug.h">
<Filter>Header Files</Filter>
</ClInclude>
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc.sln b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc.sln
index 5f4f4e4..bfb53e2 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc.sln
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc.sln
@@ -1,6 +1,6 @@
Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 2012
+# Visual Studio Express 2012 for Windows Desktop
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libhwloc", "libhwloc.vcxproj", "{9DE76C6D-4773-4766-9F93-69C56166CB8D}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lstopo-no-graphics", "lstopo-no-graphics.vcxproj", "{9DE76C6D-4773-4766-9F93-69C56166CB8E}"
@@ -65,47 +65,55 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lstopo-win", "lstopo-win.vc
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
- ReleaseDll|x64 = ReleaseDll|x64
+ Release|x64 = Release|x64
ReleaseStatic|x64 = ReleaseStatic|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {9DE76C6D-4773-4766-9F93-69C56166CB8D}.ReleaseDll|x64.ActiveCfg = ReleaseDll|x64
- {9DE76C6D-4773-4766-9F93-69C56166CB8D}.ReleaseDll|x64.Build.0 = ReleaseDll|x64
+ {9DE76C6D-4773-4766-9F93-69C56166CB8D}.Release|x64.ActiveCfg = Release|x64
+ {9DE76C6D-4773-4766-9F93-69C56166CB8D}.Release|x64.Build.0 = Release|x64
{9DE76C6D-4773-4766-9F93-69C56166CB8D}.ReleaseStatic|x64.ActiveCfg = ReleaseStatic|x64
{9DE76C6D-4773-4766-9F93-69C56166CB8D}.ReleaseStatic|x64.Build.0 = ReleaseStatic|x64
- {9DE76C6D-4773-4766-9F93-69C56166CB8E}.ReleaseDll|x64.ActiveCfg = Release|x64
- {9DE76C6D-4773-4766-9F93-69C56166CB8E}.ReleaseDll|x64.Build.0 = Release|x64
+ {9DE76C6D-4773-4766-9F93-69C56166CB8E}.Release|x64.ActiveCfg = Release|x64
+ {9DE76C6D-4773-4766-9F93-69C56166CB8E}.Release|x64.Build.0 = Release|x64
{9DE76C6D-4773-4766-9F93-69C56166CB8E}.ReleaseStatic|x64.ActiveCfg = Release|x64
- {9DE76C6D-4773-4766-9F93-69C56166CB8F}.ReleaseDll|x64.ActiveCfg = Release|x64
- {9DE76C6D-4773-4766-9F93-69C56166CB8F}.ReleaseDll|x64.Build.0 = Release|x64
+ {9DE76C6D-4773-4766-9F93-69C56166CB8F}.Release|x64.ActiveCfg = Release|x64
+ {9DE76C6D-4773-4766-9F93-69C56166CB8F}.Release|x64.Build.0 = Release|x64
{9DE76C6D-4773-4766-9F93-69C56166CB8F}.ReleaseStatic|x64.ActiveCfg = Release|x64
- {9DE76C6D-4773-4766-9F93-69C56166CB90}.ReleaseDll|x64.ActiveCfg = Release|x64
- {9DE76C6D-4773-4766-9F93-69C56166CB90}.ReleaseDll|x64.Build.0 = Release|x64
+ {9DE76C6D-4773-4766-9F93-69C56166CB90}.Release|x64.ActiveCfg = Release|x64
+ {9DE76C6D-4773-4766-9F93-69C56166CB90}.Release|x64.Build.0 = Release|x64
{9DE76C6D-4773-4766-9F93-69C56166CB90}.ReleaseStatic|x64.ActiveCfg = Release|x64
- {9DE76C6D-4773-4766-9F93-69C56166CB91}.ReleaseDll|x64.ActiveCfg = Release|x64
- {9DE76C6D-4773-4766-9F93-69C56166CB91}.ReleaseDll|x64.Build.0 = Release|x64
+ {9DE76C6D-4773-4766-9F93-69C56166CB91}.Release|x64.ActiveCfg = Release|x64
+ {9DE76C6D-4773-4766-9F93-69C56166CB91}.Release|x64.Build.0 = Release|x64
{9DE76C6D-4773-4766-9F93-69C56166CB91}.ReleaseStatic|x64.ActiveCfg = Release|x64
- {9DE76C6D-4773-4766-9F93-69C56166CB92}.ReleaseDll|x64.ActiveCfg = Release|x64
- {9DE76C6D-4773-4766-9F93-69C56166CB92}.ReleaseDll|x64.Build.0 = Release|x64
+ {9DE76C6D-4773-4766-9F93-69C56166CB92}.Release|x64.ActiveCfg = Release|x64
+ {9DE76C6D-4773-4766-9F93-69C56166CB92}.Release|x64.Build.0 = Release|x64
{9DE76C6D-4773-4766-9F93-69C56166CB92}.ReleaseStatic|x64.ActiveCfg = Release|x64
- {9DE76C6D-4773-4766-9F93-69C56166CB93}.ReleaseDll|x64.ActiveCfg = Release|x64
- {9DE76C6D-4773-4766-9F93-69C56166CB93}.ReleaseDll|x64.Build.0 = Release|x64
+ {9DE76C6D-4773-4766-9F93-69C56166CB93}.Release|x64.ActiveCfg = Release|x64
+ {9DE76C6D-4773-4766-9F93-69C56166CB93}.Release|x64.Build.0 = Release|x64
{9DE76C6D-4773-4766-9F93-69C56166CB93}.ReleaseStatic|x64.ActiveCfg = Release|x64
- {9DE76C6D-4773-4766-9F93-69C56166CB94}.ReleaseDll|x64.ActiveCfg = Release|x64
- {9DE76C6D-4773-4766-9F93-69C56166CB94}.ReleaseDll|x64.Build.0 = Release|x64
+ {9DE76C6D-4773-4766-9F93-69C56166CB94}.Release|x64.ActiveCfg = Release|x64
+ {9DE76C6D-4773-4766-9F93-69C56166CB94}.Release|x64.Build.0 = Release|x64
{9DE76C6D-4773-4766-9F93-69C56166CB94}.ReleaseStatic|x64.ActiveCfg = Release|x64
- {9DE76C6D-4773-4766-9F93-69C56166CB95}.ReleaseDll|x64.ActiveCfg = Release|x64
- {9DE76C6D-4773-4766-9F93-69C56166CB95}.ReleaseDll|x64.Build.0 = Release|x64
+ {9DE76C6D-4773-4766-9F93-69C56166CB95}.Release|x64.ActiveCfg = Release|x64
+ {9DE76C6D-4773-4766-9F93-69C56166CB95}.Release|x64.Build.0 = Release|x64
{9DE76C6D-4773-4766-9F93-69C56166CB95}.ReleaseStatic|x64.ActiveCfg = Release|x64
- {9DE76C6D-4773-4766-9F93-69C56166CB96}.ReleaseDll|x64.ActiveCfg = Release|x64
- {9DE76C6D-4773-4766-9F93-69C56166CB96}.ReleaseDll|x64.Build.0 = Release|x64
+ {9DE76C6D-4773-4766-9F93-69C56166CB96}.Release|x64.ActiveCfg = Release|x64
+ {9DE76C6D-4773-4766-9F93-69C56166CB96}.Release|x64.Build.0 = Release|x64
{9DE76C6D-4773-4766-9F93-69C56166CB96}.ReleaseStatic|x64.ActiveCfg = Release|x64
- {9DE76C6D-4773-4766-9F93-69C56166CB97}.ReleaseDll|x64.ActiveCfg = Release|x64
- {9DE76C6D-4773-4766-9F93-69C56166CB97}.ReleaseDll|x64.Build.0 = Release|x64
+ {9DE76C6D-4773-4766-9F93-69C56166CB97}.Release|x64.ActiveCfg = Release|x64
+ {9DE76C6D-4773-4766-9F93-69C56166CB97}.Release|x64.Build.0 = Release|x64
{9DE76C6D-4773-4766-9F93-69C56166CB97}.ReleaseStatic|x64.ActiveCfg = Release|x64
- {9DE76C6D-4773-4766-9F93-69C56166CB98}.ReleaseDll|x64.ActiveCfg = Release|x64
- {9DE76C6D-4773-4766-9F93-69C56166CB98}.ReleaseDll|x64.Build.0 = Release|x64
+ {9DE76C6D-4773-4766-9F93-69C56166CB98}.Release|x64.ActiveCfg = Release|x64
+ {9DE76C6D-4773-4766-9F93-69C56166CB98}.Release|x64.Build.0 = Release|x64
{9DE76C6D-4773-4766-9F93-69C56166CB98}.ReleaseStatic|x64.ActiveCfg = Release|x64
+ {9DE76C6D-4773-4766-9F93-69C56166CB99}.Release|x64.ActiveCfg = Release|x64
+ {9DE76C6D-4773-4766-9F93-69C56166CB99}.Release|x64.Build.0 = Release|x64
+ {9DE76C6D-4773-4766-9F93-69C56166CB99}.ReleaseStatic|x64.ActiveCfg = Release|x64
+ {9DE76C6D-4773-4766-9F93-69C56166CB99}.ReleaseStatic|x64.Build.0 = Release|x64
+ {9DE76C6D-4773-4766-9F93-69C56166CB9A}.Release|x64.ActiveCfg = Release|x64
+ {9DE76C6D-4773-4766-9F93-69C56166CB9A}.Release|x64.Build.0 = Release|x64
+ {9DE76C6D-4773-4766-9F93-69C56166CB9A}.ReleaseStatic|x64.ActiveCfg = Release|x64
+ {9DE76C6D-4773-4766-9F93-69C56166CB9A}.ReleaseStatic|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/libhwloc.vcxproj b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/libhwloc.vcxproj
index 8ff75ec..e1475e6 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/libhwloc.vcxproj
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/libhwloc.vcxproj
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="Globals">
<ProjectGuid>{9DE76C6D-4773-4766-9F93-69C56166CB8D}</ProjectGuid>
@@ -18,8 +18,8 @@
<Configuration>ReleaseStatic</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
- <ProjectConfiguration Include="ReleaseDll|x64">
- <Configuration>ReleaseDll</Configuration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
@@ -28,23 +28,27 @@
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugStatic|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseDll|x64'" Label="Configuration">
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseStatic|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
@@ -55,7 +59,7 @@
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='DebugStatic|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
- <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='ReleaseDll|x64'">
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseStatic|x64'" Label="PropertySheets">
@@ -76,7 +80,7 @@
<IntDir>$(SolutionDir)$(Platform)\$(Configuration)\</IntDir>
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseDll|x64'">
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
<EmbedManifest>true</EmbedManifest>
<TargetName>$(ProjectName)-5</TargetName>
@@ -124,7 +128,7 @@
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseDll|x64'">
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<PreBuildEvent>
<Command>copy /V /Y private_config.h ..\..\include\private\autogen\config.h && copy /V /Y hwloc_config.h ..\..\include\hwloc\autogen\config.h && copy /V /Y static-components.h ..\..\src\static-components.h</Command>
</PreBuildEvent>
@@ -198,8 +202,8 @@
<ClCompile Include="..\..\src\distances.c" />
<ClCompile Include="..\..\src\diff.c" />
<ClCompile Include="..\..\src\misc.c" />
+ <ClCompile Include="..\..\src\pci-common.c" />
<ClCompile Include="..\..\src\topology-custom.c" />
- <ClCompile Include="..\..\src\topology-fake.c" />
<ClCompile Include="..\..\src\topology-noos.c" />
<ClCompile Include="..\..\src\topology-synthetic.c" />
<ClCompile Include="..\..\src\topology-windows.c" />
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/libhwloc.vcxproj.filters b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/libhwloc.vcxproj.filters
index 2bfb4c7..77b4f77 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/libhwloc.vcxproj.filters
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/libhwloc.vcxproj.filters
@@ -36,10 +36,10 @@
<ClCompile Include="..\..\src\misc.c">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="..\..\src\topology-custom.c">
+ <ClCompile Include="..\..\src\pci-common.c">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="..\..\src\topology-fake.c">
+ <ClCompile Include="..\..\src\topology-custom.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\src\topology-noos.c">
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/lstopo-no-graphics.vcxproj b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/lstopo-no-graphics.vcxproj
index 942a743..48659e8 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/lstopo-no-graphics.vcxproj
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/lstopo-no-graphics.vcxproj
@@ -17,6 +17,7 @@
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
@@ -59,12 +60,13 @@
<SuppressStartupBanner>true</SuppressStartupBanner>
<TargetMachine>MachineX64</TargetMachine>
<LinkErrorReporting>NoErrorReport</LinkErrorReporting>
- <AdditionalLibraryDirectories>$(SolutionDir)$(Platform)\ReleaseDll;$(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalLibraryDirectories>$(SolutionDir)$(Platform)\Release;$(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>libhwloc.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\..\utils\lstopo\lstopo.c" />
+ <ClCompile Include="..\..\utils\lstopo\lstopo-ascii.c" />
<ClCompile Include="..\..\utils\lstopo\lstopo-color.c" />
<ClCompile Include="..\..\utils\lstopo\lstopo-draw.c" />
<ClCompile Include="..\..\utils\lstopo\lstopo-fig.c" />
@@ -82,7 +84,6 @@
<ClInclude Include="..\..\include\hwloc\plugins.h" />
<ClInclude Include="..\..\include\hwloc\rename.h" />
<ClInclude Include="..\..\include\private\components.h" />
- <ClInclude Include="..\..\include\private\cpuid.h" />
<ClInclude Include="..\..\include\private\debug.h" />
<ClInclude Include="..\..\include\private\misc.h" />
<ClInclude Include="..\..\include\private\private.h" />
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/lstopo-no-graphics.vcxproj.filters b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/lstopo-no-graphics.vcxproj.filters
index c3625c5..d888f3a 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/lstopo-no-graphics.vcxproj.filters
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/lstopo-no-graphics.vcxproj.filters
@@ -18,6 +18,9 @@
<ClCompile Include="..\..\utils\lstopo\lstopo.c">
<Filter>Source Files</Filter>
</ClCompile>
+ <ClCompile Include="..\..\utils\lstopo\lstopo-ascii.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
<ClCompile Include="..\..\utils\lstopo\lstopo-color.c">
<Filter>Source Files</Filter>
</ClCompile>
@@ -59,9 +62,6 @@
<ClInclude Include="..\..\include\private\components.h">
<Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="..\..\include\private\cpuid.h">
- <Filter>Header Files</Filter>
- </ClInclude>
<ClInclude Include="..\..\include\private\debug.h">
<Filter>Header Files</Filter>
</ClInclude>
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/lstopo-win.vcxproj b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/lstopo-win.vcxproj
index 4c0ca4f..fdbefca 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/lstopo-win.vcxproj
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/lstopo-win.vcxproj
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="Globals">
- <ProjectGuid>{9DE76C6D-4773-4766-9F93-69C56166CB8E}</ProjectGuid>
+ <ProjectGuid>{9DE76C6D-4773-4766-9F93-69C56166CB99}</ProjectGuid>
<RootNamespace>lstopo-no-graphics</RootNamespace>
<Keyword>Win32Proj</Keyword>
</PropertyGroup>
@@ -17,6 +17,7 @@
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
@@ -59,13 +60,14 @@
<SuppressStartupBanner>true</SuppressStartupBanner>
<TargetMachine>MachineX64</TargetMachine>
<LinkErrorReporting>NoErrorReport</LinkErrorReporting>
- <AdditionalLibraryDirectories>$(SolutionDir)$(Platform)\ReleaseDll;$(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalLibraryDirectories>$(SolutionDir)$(Platform)\Release;$(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>libhwloc.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<EntryPointSymbol>mainCRTStartup</EntryPointSymbol>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\..\utils\lstopo\lstopo.c" />
+ <ClCompile Include="..\..\utils\lstopo\lstopo-ascii.c" />
<ClCompile Include="..\..\utils\lstopo\lstopo-color.c" />
<ClCompile Include="..\..\utils\lstopo\lstopo-draw.c" />
<ClCompile Include="..\..\utils\lstopo\lstopo-fig.c" />
@@ -84,7 +86,6 @@
<ClInclude Include="..\..\include\hwloc\plugins.h" />
<ClInclude Include="..\..\include\hwloc\rename.h" />
<ClInclude Include="..\..\include\private\components.h" />
- <ClInclude Include="..\..\include\private\cpuid.h" />
<ClInclude Include="..\..\include\private\debug.h" />
<ClInclude Include="..\..\include\private\misc.h" />
<ClInclude Include="..\..\include\private\private.h" />
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/lstopo-win.vcxproj.filters b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/lstopo-win.vcxproj.filters
index d7aeda7..4ce0ed8 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/lstopo-win.vcxproj.filters
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/lstopo-win.vcxproj.filters
@@ -18,6 +18,9 @@
<ClCompile Include="..\..\utils\lstopo\lstopo.c">
<Filter>Source Files</Filter>
</ClCompile>
+ <ClCompile Include="..\..\utils\lstopo\lstopo-ascii.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
<ClCompile Include="..\..\utils\lstopo\lstopo-color.c">
<Filter>Source Files</Filter>
</ClCompile>
@@ -62,9 +65,6 @@
<ClInclude Include="..\..\include\private\components.h">
<Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="..\..\include\private\cpuid.h">
- <Filter>Header Files</Filter>
- </ClInclude>
<ClInclude Include="..\..\include\private\debug.h">
<Filter>Header Files</Filter>
</ClInclude>
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/lstopo.vcxproj b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/lstopo.vcxproj
index fd5ee50..ba75246 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/lstopo.vcxproj
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/lstopo.vcxproj
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="Globals">
- <ProjectGuid>{9DE76C6D-4773-4766-9F93-69C56166CB8E}</ProjectGuid>
+ <ProjectGuid>{9DE76C6D-4773-4766-9F93-69C56166CB98}</ProjectGuid>
<RootNamespace>lstopo-no-graphics</RootNamespace>
<Keyword>Win32Proj</Keyword>
</PropertyGroup>
@@ -17,6 +17,7 @@
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
@@ -59,12 +60,13 @@
<SuppressStartupBanner>true</SuppressStartupBanner>
<TargetMachine>MachineX64</TargetMachine>
<LinkErrorReporting>NoErrorReport</LinkErrorReporting>
- <AdditionalLibraryDirectories>$(SolutionDir)$(Platform)\ReleaseDll;$(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalLibraryDirectories>$(SolutionDir)$(Platform)\Release;$(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>libhwloc.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\..\utils\lstopo\lstopo.c" />
+ <ClCompile Include="..\..\utils\lstopo\lstopo-ascii.c" />
<ClCompile Include="..\..\utils\lstopo\lstopo-color.c" />
<ClCompile Include="..\..\utils\lstopo\lstopo-draw.c" />
<ClCompile Include="..\..\utils\lstopo\lstopo-fig.c" />
@@ -83,7 +85,6 @@
<ClInclude Include="..\..\include\hwloc\plugins.h" />
<ClInclude Include="..\..\include\hwloc\rename.h" />
<ClInclude Include="..\..\include\private\components.h" />
- <ClInclude Include="..\..\include\private\cpuid.h" />
<ClInclude Include="..\..\include\private\debug.h" />
<ClInclude Include="..\..\include\private\misc.h" />
<ClInclude Include="..\..\include\private\private.h" />
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/lstopo.vcxproj.filters b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/lstopo.vcxproj.filters
index d7aeda7..4ce0ed8 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/lstopo.vcxproj.filters
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/lstopo.vcxproj.filters
@@ -18,6 +18,9 @@
<ClCompile Include="..\..\utils\lstopo\lstopo.c">
<Filter>Source Files</Filter>
</ClCompile>
+ <ClCompile Include="..\..\utils\lstopo\lstopo-ascii.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
<ClCompile Include="..\..\utils\lstopo\lstopo-color.c">
<Filter>Source Files</Filter>
</ClCompile>
@@ -62,9 +65,6 @@
<ClInclude Include="..\..\include\private\components.h">
<Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="..\..\include\private\cpuid.h">
- <Filter>Header Files</Filter>
- </ClInclude>
<ClInclude Include="..\..\include\private\debug.h">
<Filter>Header Files</Filter>
</ClInclude>
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/private_config.h b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/private_config.h
index b2b426d..942aed7 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/private_config.h
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/private_config.h
@@ -1,7 +1,7 @@
/*
* Copyright © 2009, 2011, 2012 CNRS. All rights reserved.
- * Copyright © 2009-2014 Inria. All rights reserved.
- * Copyright © 2009, 2011, 2012 Université Bordeaux. All rights reserved.
+ * Copyright © 2009-2015 Inria. All rights reserved.
+ * Copyright © 2009, 2011, 2012, 2015 Université Bordeaux. All rights reserved.
* Copyright © 2009 Cisco Systems, Inc. All rights reserved.
* $COPYRIGHT$
*
@@ -232,6 +232,9 @@
*/
/* #undef HAVE_PSAPI_WORKING_SET_EX_INFORMATION */
+/* Define to 1 if the system has the type `PROCESSOR_NUMBER'. */
+#define HAVE_PROCESSOR_NUMBER 1
+
/* Define to 1 if you have the <pthread_np.h> header file. */
/* #undef HAVE_PTHREAD_NP_H */
@@ -514,8 +517,8 @@
/* Define to 1 if X11 headers including Xutil.h and keysym.h are available. */
/* #undef HWLOC_HAVE_X11_KEYSYM */
-/* Define to 1 if the _syscall3 macro works */
-/* #undef HWLOC_HAVE__SYSCALL3 */
+/* Define to 1 if function `syscall' is available */
+/* #undef HWLOC_HAVE_SYSCALL */
/* Define to 1 on HP-UX */
/* #undef HWLOC_HPUX_SYS */
@@ -579,7 +582,7 @@
#define PACKAGE_NAME "hwloc"
/* Define to the full name and version of this package. */
-#define PACKAGE_STRING "hwloc 1.7.2"
+#define PACKAGE_STRING "hwloc"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "hwloc"
@@ -588,7 +591,7 @@
#define PACKAGE_URL ""
/* Define to the version of this package. */
-#define PACKAGE_VERSION "1.7.2"
+#define PACKAGE_VERSION HWLOC_VERSION
/* The size of `unsigned int', as computed by sizeof. */
#define SIZEOF_UNSIGNED_INT 4
@@ -642,7 +645,8 @@
/* Version number of package */
-#define VERSION "1.9"
+#define HWLOC_VERSION "1.11.1"
+#define VERSION HWLOC_VERSION
/* Define to 1 if the X Window System is missing or not being used. */
#define X_DISPLAY_MISSING 1
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 5dc4883..8d3eeaf 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/doc/hwloc.doxy
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/doc/hwloc.doxy
@@ -48,9 +48,10 @@ hwloc supports the following operating systems:
<ul>
<li>Linux (including old kernels not having sysfs topology
-information, with knowledge of cpusets, offline CPUs, ScaleMP vSMP,
-NumaScale NumaConnect, and Kerrighed support) on all supported hardware, including Intel Xeon Phi
-(either standalone or as a coprocessor).</li>
+information, with knowledge of cpusets, offline CPUs, ScaleMP vSMP and Kerrighed support)
+on all supported hardware, including Intel Xeon Phi
+(KNL and KNC, either standalone or as a coprocessor)
+and NumaScale NumaConnect.</li>
<li>Solaris</li>
<li>AIX</li>
<li>Darwin / OS X</li>
@@ -473,7 +474,7 @@ shell$
Questions should be sent to the devel mailing
list (http://www.open-mpi.org/community/lists/hwloc.php).
Bug reports should be reported in the tracker
-(https://git.open-mpi.org/trac/hwloc/).
+(https://github.com/open-mpi/hwloc/issues).
If hwloc discovers an incorrect topology for your machine, the very
first thing you should check is to ensure that you have the most
@@ -486,7 +487,7 @@ the most recent version of the BIOS for your machine.
If those things fail, contact us on the mailing list for additional
help. Please attach the output of lstopo after having given the
-<tt>--enable-debug</tt> option to ./configure and rebuilt completely, to get
+<tt>\--enable-debug</tt> option to ./configure and rebuilt completely, to get
debugging output. Also attach the <tt>/proc</tt> + <tt>/sys</tt> tarball
generated by the installed script <tt>hwloc-gather-topology</tt>
when submitting problems about Linux, or send the
@@ -615,7 +616,7 @@ Make sure to have had a look at those too!
of parent/child links between the root object and the given object.
If the topology is asymmetric, the difference between some parent
and child depths may be larger than one when some intermediate levels
- (for instance caches) are missing in only some parts of the machine.
+ (for instance groups) are missing in only some parts of the machine.
</dd>
<dt>OS or physical index</dt>
@@ -661,10 +662,11 @@ Make sure to have had a look at those too!
The following diagram can help to understand the vocabulary of the relationships
by showing the example of a machine with two dual core packages (with no
-hardware threads); thus, a topology with 4 levels. Each box with rounded corner
-corresponds to one hwloc_obj_t, containing the values of the different integer
-fields (depth, logical_index, etc.), and arrows show to which other hwloc_obj_t
+hardware threads); thus, a topology with 5 levels. Each box with rounded corner
+corresponds to one ::hwloc_obj_t, containing the values of the different integer
+fields (depth, logical_index, etc.), and arrows show to which other ::hwloc_obj_t
pointers point to (first_child, parent, etc.). The L2 cache of the last core is intentionally missing to show how asymmetric topologies are handled.
+See \ref faq_asymmetric for more information about such strange topologies.
\image html diagram.png
\image latex diagram.eps "" width=\textwidth
@@ -672,8 +674,6 @@ pointers point to (first_child, parent, etc.). The L2 cache of the last core is
It should be noted that for PU objects, the logical index -- as
computed linearly by hwloc -- is not the same as the OS index.
-See also \ref faq_asymmetric for more details.
-
\page tools Command-Line Tools
@@ -697,7 +697,7 @@ Textual outputs (those that do not depend on heavy external libraries
such as Cairo) are supported in both lstopo and lstopo-no-graphics.
This command can also display the processes currently bound to a part
-of the machine (via the <tt>--ps</tt> option).
+of the machine (via the <tt>\--ps</tt> option).
Note that lstopo can read XML files and/or alternate chroot
filesystems and display topological maps representing those systems
@@ -760,6 +760,16 @@ relevant topology files of the current machine into a tarball
later (possibly offline) for simulating or debugging a machine
without actually running on it.
+\section cli_hwloc_dump_hwdata hwloc-dump-hwdata
+
+hwloc-dump-hwdata is a Linux and x86-specific tool that dumps
+(during boot, privileged) some topology and locality information
+from raw hardware files (SMBIOS and ACPI tables) to human-readable
+and world-accessible files that the hwloc library will later reuse.
+
+Currently only used on Intel Knights Landing Xeon Phi platforms.
+See \ref faq_knl_dump.
+
\section cli_hwloc_distances hwloc-distances
hwloc-distances displays all distance matrices attached to
@@ -851,7 +861,7 @@ following environment variables.
<dt>HWLOC_THISSYSTEM=1</dt>
<dd>enforces the return value of hwloc_topology_is_thissystem(), as if
- HWLOC_TOPOLOGY_FLAG_IS_THISSYSTEM was set with hwloc_topology_set_flags().
+ ::HWLOC_TOPOLOGY_FLAG_IS_THISSYSTEM was set with hwloc_topology_set_flags().
It means that it makes hwloc assume that the selected backend provides the
topology for the system on which we are running, even if it is not the
OS-specific backend but the XML backend for instance.
@@ -951,6 +961,11 @@ following environment variables.
and which components are successfully loaded.
</dd>
+<dt>HWLOC_DUMPED_HWDATA_DIR=/path/to/dumped/files/</dt>
+ <dd>loads files dumped by <tt>hwloc-dump-hwdata</tt> (on Linux)
+ from the given directory instead of <tt>/var/run/hwloc/</tt>.
+ </dd>
+
<dt>HWLOC_COMPONENTS=list,of,components</dt>
<dd>forces a list of components to enable or disable.
Enable or disable the given comma-separated list of components
@@ -983,6 +998,11 @@ following environment variables.
(all of them are <em>registered</em> at startup).
</dd>
+<dt>HWLOC_DEBUG_VERBOSE=0</dt>
+ <dd>disables all verbose messages that are enabled by default
+ when <tt>--enable-debug</tt> is passed to configure.
+ </dd>
+
</dl>
<!-- not documented:
@@ -992,8 +1012,10 @@ following environment variables.
HWLOC_LINUX_USE_CPUINFO
uses /proc/cpuinfo instead of sysfs.
may be useful in the doc for debugging?
+ HWLOC_KNL_NUMA_QUIRK
+ disables the KNL NUMA Cluster quirk in the linux backend
HWLOC_DEBUG_CHECK
- runs 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
@@ -1025,9 +1047,9 @@ when they provide better binding support.
If the application does not want the CPU binding to change when
changing the memory policy, it needs to use the
-HWLOC_MEMBIND_NOCPUBIND flag to prevent hwloc from using OS functions
+::HWLOC_MEMBIND_NOCPUBIND flag to prevent hwloc from using OS functions
which would change the CPU binding. Additionally,
-HWLOC_CPUBIND_NOMEMBIND can be passed to CPU binding function to
+::HWLOC_CPUBIND_NOMEMBIND can be passed to CPU binding function to
prevent hwloc from using OS functions would change the memory binding
policy. Of course, using these flags will reduce hwloc's overall support for
binding, so their use is discouraged.
@@ -1077,7 +1099,8 @@ There are some examples under doc/examples/ in the source tree.
hwloc usually manipulates processing units and memory but it can also
discover I/O devices and report their locality as well.
This is useful for placing I/O intensive applications on cores near the
-I/O devices they use.
+I/O devices they use, or for gathering information about all platform
+components.
\section iodevices_enabling Enabling and requirements
@@ -1088,27 +1111,44 @@ to hwloc_topology_set_flags() before loading the topology.
Note that I/O discovery requires significant help from the operating system.
The pciaccess library (the development package is usually <tt>libpciaccess-devel</tt>
-or <tt>libpciaccess-dev</tt>) is needed to fully detect PCI devices and bridges,
-and the actual locality of these devices is only currently detected
-on Linux. Also, some operating systems require privileges for probing PCI
-devices, see \ref faq_privileged for details.
+or <tt>libpciaccess-dev</tt>) is needed to fully detect PCI devices and bridges.
+On Linux, PCI discovery may still be performed even if <tt>libpciaccess</tt> cannot
+be used. But it misses PCI device names.
+Moreover, some operating systems require privileges for probing PCI devices,
+see \ref faq_privileged for details.
-On Linux, PCI discovery may still be performed even
-if <tt>libpciaccess</tt> cannot be used.
-But it misses PCI device names.
+The actual locality of I/O devices is only currently detected on Linux.
+Other operating system will just reported I/O devices as being attached
+to the topology root object.
-\section iodevices_hierarchy I/O object hierarchy
+\section iodevices_objects I/O objects
When I/O discovery is enabled and supported, some additional objects
-(types <tt>::HWLOC_OBJ_BRIDGE</tt>, <tt>::HWLOC_OBJ_PCI_DEVICE</tt> and
-<tt>::HWLOC_OBJ_OS_DEVICE</tt>)
-are added to the topology as a child of the object they are close to.
-For instance, if a I/O Hub is connected to a package, the corresponding
-hwloc bridge object (and its PCI bridges and devices children) is inserted
-as a child of the corresponding hwloc package object.
-
-These new objects have neither CPU sets nor node sets (NULL pointers) because
-they are not directly usable by the user applications.
+are added to the topology.
+The corresponding I/O object types are:
+<ul><li>
+<tt>::HWLOC_OBJ_OS_DEVICE</tt> describes an operating-system-specific
+handle such as the <em>sda</em> drive or the <em>eth0</em> network interface.
+See \ref iodevices_osdev.
+</li><li>
+<tt>::HWLOC_OBJ_PCI_DEVICE</tt> and <tt>::HWLOC_OBJ_BRIDGE</tt> build up
+a PCI hierarchy made of devices and bridges.
+See \ref iodevices_pci.
+</li><li>
+<tt>::HWLOC_OBJ_MISC</tt> describes miscellaneous devices such as
+memory modules (DIMMs).
+These are neither PCI nor OS handles, therefore they appear as Misc objects.
+See \ref miscobjs_auto.
+</li></ul>
+
+hwloc tries to attach these new objects to normal objects
+(usually NUMA nodes) to match their actual physical location.
+For instance, if a I/O Hub is physically connected to a package,
+the corresponding hwloc bridge object (and its PCI bridges and devices children)
+is inserted as a child of the corresponding hwloc Package object.
+
+I/O objects also have neither CPU sets nor node sets (NULL pointers) because
+they are not directly usable by the user applications for binding.
Moreover I/O hierarchies may be highly complex (asymmetric trees of bridges).
So I/O objects are placed in specific levels with custom depths.
Their lists may still be traversed with regular helpers such as
@@ -1116,22 +1156,12 @@ hwloc_get_next_obj_by_type().
However, hwloc offers some dedicated helpers such as hwloc_get_next_pcidev()
and hwloc_get_next_osdev() for convenience (see \ref hwlocality_advanced_io).
-An I/O hierarchy is organized as follows:
-A hostbridge object ( <tt>::HWLOC_OBJ_BRIDGE</tt> object with upstream
-type <em>Host</em> and downstream type <em>PCI</em>) is attached below
-a regular object (usually the entire machine or a NUMA node).
-There may be multiple hostbridges in the machine, attached to
-different places, but all I/O devices are below one of them.
-Each hostbridge contains one or several children, either other bridges
-(usually PCI to PCI) or PCI devices (<tt>::HWLOC_OBJ_PCI_DEVICE</tt>).
-The number of bridges between the hostbridge and a PCI device depends
-on the machine and on the topology flags.
-
-\section iodevices_osdev Software devices
+\section iodevices_osdev OS devices
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
+(e.g. 0000:01:02.3), a user-space application can hardly find out which
+PCI device it is actually using.
+Applications rather use software handles
(such as the <em>eth0</em> network interface,
the <em>sda</em> hard drive,
or the <em>mlx4_0</em> OpenFabrics HCA).
@@ -1139,15 +1169,14 @@ Therefore hwloc tries to add software devices
(<tt>::HWLOC_OBJ_OS_DEVICE</tt>, also known as OS devices)
below their PCI objects.
-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.
+hwloc first tries to discover OS devices from the operating system,
+e.g. <em>eth0</em>, <em>sda</em> or <em>mlx4_0</em>.
However, this ability is currently only available on Linux for some
classes of devices.
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,
+For instance proprietary graphics drivers do not expose any named OS device,
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
@@ -1157,22 +1186,22 @@ 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)
+<li>Hard disks (::HWLOC_OBJ_OSDEV_BLOCK)
<ul>
<li><em>sda</em> (Linux component)</li>
</ul>
</li>
-<li>Network interfaces (HWLOC_OBJ_OSDEV_NETWORK)
+<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)
+<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)
+<li>GPUs (::HWLOC_OBJ_OSDEV_GPU)
<ul>
<li><em>nvml0</em> for the first NVML device
(NVML component, using the NVIDIA Management Library)</li>
@@ -1180,7 +1209,7 @@ components when I/O discovery is enabled and supported.
(GL component, using the NV-CONTROL X extension library, NVCtrl)</li>
</ul>
</li>
-<li>Co-Processors (HWLOC_OBJ_OSDEV_COPROC)
+<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
@@ -1191,9 +1220,9 @@ components when I/O discovery is enabled and supported.
(Linux component)</li>
</ul>
</li>
-<li>DMA engine channel (HWLOC_OBJ_OSDEV_DMA)
+<li>DMA engine channel (::HWLOC_OBJ_OSDEV_DMA)
<ul>
- <li><em>dma0chan0</em> (Linux component)</li>
+ <li><em>dma0chan0</em> (Linux component) when full I/O discovery is enabled (::HWLOC_TOPOLOGY_FLAG_WHOLE_IO)</li>
</ul>
</li>
</ul>
@@ -1206,6 +1235,20 @@ Note that some PCI devices may contain multiple software devices
See also \ref interoperability for managing these devices without
considering them as hwloc objects.
+\section iodevices_pci PCI devices and bridges
+
+A PCI hierarchy is usually organized as follows:
+A hostbridge object ( <tt>::HWLOC_OBJ_BRIDGE</tt> object with upstream
+type <em>Host</em> and downstream type <em>PCI</em>) is attached below
+a normal object (usually the entire machine or a NUMA node).
+There may be multiple hostbridges in the machine, attached to
+different places, but all PCI devices are below one of them.
+
+Each hostbridge contains one or several children, either other bridges
+(usually PCI to PCI) or PCI devices (<tt>::HWLOC_OBJ_PCI_DEVICE</tt>).
+The number of bridges between the hostbridge and a PCI device depends
+on the machine and on the topology flags.
+
\section iodevices_consult Consulting I/O devices and binding
I/O devices may be consulted by traversing the topology manually
@@ -1227,7 +1270,7 @@ a NUMA node with the same locality.
Command-line tools are also aware of I/O devices.
lstopo displays the interesting ones by default
-(passing <tt>--no-io</tt> disables it).
+(passing <tt>\--no-io</tt> disables it).
hwloc-calc and hwloc-bind may manipulate I/O devices specified
by PCI bus ID or by OS device name.
@@ -1262,7 +1305,7 @@ are an unused IDE controller (no disk attached)
and a graphic card (no corresponding software device reported
to the user by the operating system).
-On the contrary, it should be noted three different software
+On the contrary, it should be noted that three different software
devices were found for the last PCI device (<em>PCI 15b3:634a</em>).
Indeed this OpenFabrics HCA PCI device object contains one
one OpenFabrics software device (<em>mlx4_0</em>) and two virtual
@@ -1307,7 +1350,7 @@ Machine (24GB)
\page miscobjs Miscellaneous objects
hwloc topologies may be annotated with Misc objects
-(of type <tt>HWLOC_OBJ_MISC</tt>)
+(of type <tt>::HWLOC_OBJ_MISC</tt>)
either automatically or by the user.
This is an flexible way to annotate topologies with
large sets of information since Misc objects may be inserted
@@ -1325,8 +1368,10 @@ hwloc only uses Misc objects when other object types are not sufficient.
This currently includes:
<ul>
<li>
-Memory devices (DIMMs), on Linux when privileged, and when I/O discovery is enabled.
-These objects have a <tt>Type</tt> info attribute of value <tt>MemoryDevice</tt>.
+Memory modules (DIMMs), on Linux when privileged and when
+<tt>dmi-sysfs</tt> is supported by the kernel,
+and when I/O discovery is enabled.
+These objects have a <tt>Type</tt> info attribute of value <tt>MemoryModule</tt>.
They are currently always attached to the root object.
Their attributes describe the DIMM vendor, model, etc.
<tt>lstopo -v</tt> displays them as:
@@ -1335,7 +1380,7 @@ Misc(MemoryModule) (P#1 Type=MemoryModule DeviceLocation="Bottom-Slot 2(right)"
\endcode
</li>
<li>
-Displaying process binding in <tt>lstopo --top</tt>.
+Displaying process binding in <tt>lstopo \--top</tt>.
These objects have a <tt>Type</tt> info attribute of value <tt>Process</tt>
and a name attribute made of their PID and program name.
They are attached below the object they are bound to.
@@ -1549,7 +1594,7 @@ Each object contains a list of such pairs that may be consulted
manually (looking at the object <tt>infos</tt> array field)
or using the hwloc_obj_get_info_by_name().
The user may additionally add new key-value pairs to any object using
-::hwloc_obj_add_info() or the \ref cli_hwloc_annotate program.
+hwloc_obj_add_info() or the \ref cli_hwloc_annotate program.
Here is a non-exhaustive list of attributes that may be automatically
added by hwloc (with the usual corresponding object in parentheses).
@@ -1605,6 +1650,10 @@ Currently only available on Linux.
Usually added to Package objects, but can be in Machine instead if
hwloc failed to discover any package.
</dd>
+<dt>Inclusive (Caches)</dt>
+<dd>The inclusiveness of a cache (1 if inclusive, 0 otherwise).
+Currently only available on x86 processors.
+</dd>
<dt>PCIVendor, PCIDevice (PCI devices and bridges)</dt>
<dd>The vendor and device names of the PCI device.
</dd>
@@ -1612,7 +1661,7 @@ hwloc failed to discover any package.
<dd>The name/number of the physical slot where the PCI device is plugged.
</dd>
<dt>Vendor, Model, Revision, SerialNumber</dt>
-<dd>The vendor and model names, and revision and serial numbers of a Block OS device.
+<dd>The vendor and model names, revision, and serial number of a Block OS device.
</dd>
<dt>LinuxDeviceID</dt>
<dd>The major/minor device number such as 8:0 on Linux for a Block OS device.
@@ -1680,14 +1729,15 @@ and GID #1 of port #3.
<dt>Type</dt>
<dd>A better type name than the usual one.
This may be used to specify where Groups come from.
-For instance Linux s390 <em>books</em> appear as Groups of type <em>Book</em>.
+For instance Linux S/390 <em>books</em> appear as Groups of type <em>Book</em>
+(see also \ref faq_groups).
Block OS devices may have a Type of "Disk", "Tape", "Removable Media Device"
or "Other".
The Type attribute value is displayed instead of the default object type name in lstopo.
</dd>
-<dt>Vendor, AssetTag, PartNumber, DeviceLocation, BankLocation (MemoryDevice Misc objects)</dt>
+<dt>Vendor, AssetTag, PartNumber, DeviceLocation, BankLocation (MemoryModule Misc objects)</dt>
<dd>
-Information about memory devices (DIMMs) extracted from SMBIOS.
+Information about memory modules (DIMMs) extracted from SMBIOS.
</dd>
<dt>hwlocVersion</dt>
<dd>The version number of the hwloc library that was used to generate
@@ -1729,14 +1779,14 @@ The lstopo program can also serve as a XML topology export tool.
XML topologies may then be reloaded later with hwloc_topology_set_xml()
and hwloc_topology_set_xmlbuffer().
-The XMLFILE environment variable also tells hwloc to load the topology
+The HWLOC_XMLFILE environment variable also tells hwloc to load the topology
from the given XML file.
\note Loading XML topologies disables binding because the loaded
topology may not correspond to the physical machine that loads it.
This behavior may be reverted by asserting that loaded file really
matches the underlying system with the HWLOC_THISSYSTEM environment
-variable or the HWLOC_TOPOLOGY_FLAG_IS_THISSYSTEM topology flag.
+variable or the ::HWLOC_TOPOLOGY_FLAG_IS_THISSYSTEM topology flag.
\note hwloc also offers the ability to export/import \ref hwlocality_diff.
@@ -1763,7 +1813,7 @@ headers are available (the relevant development package is usually
<tt>libxml2-devel</tt> or <tt>libxml2-dev</tt>).
If libxml2 is not available at configure time,
-or if <tt>--disable-libxml2</tt> is passed, hwloc falls back to a
+or if <tt>\--disable-libxml2</tt> is passed, hwloc falls back to a
custom backend.
Contrary to the aforementioned full XML backend with libxml2, this
minimalistic XML backend cannot be guaranteed to work with external
@@ -1776,9 +1826,9 @@ any external dependency.
If libxml2 is available but the core hwloc library should not directly
depend on it, the libxml2 support may be built as a dynamicall-loaded
plugin.
-One should pass <tt>--enable-plugins</tt> to enable plugin support
+One should pass <tt>\--enable-plugins</tt> to enable plugin support
(when supported) and build as plugins all component that support it.
-Or pass <tt>--enable-plugins=xml_libxml</tt> to only build this
+Or pass <tt>\--enable-plugins=xml_libxml</tt> to only build this
libxml2 support as a plugin.
\section xml_errors XML import error management
@@ -1852,9 +1902,7 @@ if a Machine level is specified in the string.
Cache level depths are automatically chosen by hwloc (only a L2 first,
then a L1 under it, then L3 above, then L4 etc.) unless they are specified.
-Memory and cache sizes are also automatically chosen.
-The only way to modifying them is to export to XML and manually modify
-the file.
+Memory and cache sizes are also automatically chosen if needed.
Each item may be followed parentheses containing a list of
space-separated attributes. For instance:
@@ -1887,7 +1935,7 @@ space-separated attributes. For instance:
Aside from lstopo, the hwloc programming interface offers the same
ability by passing the synthetic description string to
-::hwloc_topology_set_synthetic() before hwloc_topology_load().
+hwloc_topology_set_synthetic() before hwloc_topology_load().
Synthetic topologies are created by the <tt>synthetic</tt> component.
This component may be enabled by force by setting the HWLOC_COMPONENTS
@@ -1897,12 +1945,12 @@ environment variable to something such as
Loading a synthetic topology disables binding support since the
topology usually does not match the underlying hardware.
Binding may be reenabled as usual by setting HWLOC_THISSYSTEM=1 in the
-environment or by setting the HWLOC_TOPOLOGY_FLAG_IS_THISSYSTEM
+environment or by setting the ::HWLOC_TOPOLOGY_FLAG_IS_THISSYSTEM
topology flag.
\section synthetic_export Exporting a topology as a synthetic string
-The function ::hwloc_topology_export_synthetic() may export
+The function hwloc_topology_export_synthetic() may export
a topology as a synthetic string.
It offers a convenient way to quickly describe the contents of a machine.
The lstopo tool may also perform such an export by forcing the output format.
@@ -1914,15 +1962,15 @@ Package:1 Cache:1 Cache:2 Cache:1 Cache:1 Core:1 PU:2
The exported string may be passed back to hwloc for recreating
another similar topology.
-The entire tree will be similar, but some special attributes such
-processort types may be missing.
+The entire tree will be similar, but some attributes such as
+the processor model will be missing.
Such an export is only possible if the topology is totally symmetric,
which means the <tt>symmetric_subtree</tt> field of the root object
is set.
This usually implies that I/O objects are disabled since attaching I/O
busses often cause the topology to become asymmetric.
-Passing <tt>--no-io</tt> to lstopo is therefore often useful to make
+Passing <tt>\--no-io</tt> to lstopo is therefore often useful to make
synthetic export work (as well as not passing any I/O topology flag
before exporting with ::hwloc_topology_export_synthetic()).
@@ -2045,7 +2093,7 @@ enabled for the current topology.
string in fixed-size subsets and separates them with commas).
To ease interoperability, hwloc offers routines to convert
hwloc CPU sets from/to taskset-specific string format.
- Most hwloc command-line tools also support the <tt>--taskset</tt>
+ Most hwloc command-line tools also support the <tt>\--taskset</tt>
option to manipulate taskset-specific strings.
</dd>
@@ -2057,23 +2105,23 @@ enabled for the current topology.
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
+::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
+different ::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
+::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.
+same ::hwloc_topology_t instance concurrently.
When running in multiprocessor environments, be aware that proper thread
synchronization and/or memory coherency protection is needed to pass hwloc
-data (such as \ref hwloc_topology_t pointers) from one processor
+data (such as ::hwloc_topology_t pointers) from one processor
to another (e.g., a mutex, semaphore, or a memory barrier).
Note that this is not a hwloc-specific requirement, but it is worth
mentioning.
-For reference, \ref hwloc_topology_t modification operations include
+For reference, ::hwloc_topology_t modification operations include
(but may not be limited to):
<dl>
@@ -2092,7 +2140,7 @@ For reference, \ref hwloc_topology_t modification operations include
<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
+ <tt>hwloc_topology_restrict()</tt> modifies the topology even more
dramatically by removing some objects.
Although references to former objects <em>may</em> still be valid
@@ -2215,7 +2263,7 @@ or <tt>hwloc_topology_set_synthetic()</tt>.
Components may optionally be built as plugins so that the hwloc core
library does not directly depend on their dependencies (for instance
the <tt>libpciaccess</tt> library).
-Plugin support may be enabled with the <tt>--enable-plugins</tt>
+Plugin support may be enabled with the <tt>\--enable-plugins</tt>
configure option.
All components buildable as plugins will then be built as plugins.
The configure option may be given a comma-separated list of component
@@ -2245,10 +2293,10 @@ anything under the <tt>include/hwloc</tt> subdirectory) and nothing from the
\subsection plugins_disc_basic Basics of discovery components
-Each discovery component is defined by a <tt>hwloc_disc_component</tt>
+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 fills a new <tt>hwloc_backend</tt> structure that usually contains
+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.
@@ -2258,16 +2306,16 @@ 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.
+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
+\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.
@@ -2310,7 +2358,7 @@ environment variable (see \ref envvar).
<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>
+ 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>
@@ -2637,7 +2685,7 @@ 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>.
+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>)
@@ -2651,7 +2699,7 @@ 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>,
+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>.
@@ -2681,25 +2729,24 @@ resulting topology will miss some objects and may be asymmetric
****************************************************************************
\endverbatim
-As explained in the message, reporting this issue to the hwloc developers
-(by sending the tarball that is generated by the hwloc-gather-topology script
- on this platform) is a good way to make sure that this is a software
-(operating system) or hardware bug (BIOS, etc).
-
-These errors are common on large AMD platforms because several BIOS releases
-fail to properly report L3 caches. In the above example, the hardware reports
+These errors are common on large AMD platforms because of BIOS and/or Linux
+kernel bugs causing invalid L3 cache information.
+In the above example, the hardware reports
a L3 cache that is shared by 2 cores in the first NUMA node and 4 cores
in the second NUMA node. That's wrong, it should actually be shared by all 6
cores in a single NUMA node.
The resulting topology will miss some L3 caches.
+
If your application not care about cache sharing, or if you do not plan to
request cache-aware binding in your process launcher, you may likely ignore
-this error.
+this error (and hide it by setting HWLOC_HIDE_ERRORS=1 in your environment).
Some platforms report similar warnings about conflicting Packages and NUMANodes.
Upgrading the BIOS and/or the operating system may help.
-Otherwise, the warning may be hidden by setting HWLOC_HIDE_ERRORS=1
-in your environment.
+Otherwise, as explained in the message, reporting this issue to the hwloc developers
+(by sending the tarball that is generated by the hwloc-gather-topology script
+ on this platform) is a good way to make sure that this is a software
+(operating system) or hardware bug (BIOS, etc).
\section faq_privileged Does hwloc require privileged access?
@@ -2707,10 +2754,11 @@ in your environment.
hwloc discovers the topology by querying the operating system.
Some minor features may require privileged access to the operation
system.
-For instance memory device and PCI link speed discovery on Linux
+For instance memory module and PCI link speed discovery on Linux
is reserved to root,
-and the entire PCI discovery on FreeBSD requires access to the
-/dev/pci special file.
+and the entire PCI discovery on Solaris and BSDs requires access to
+some special files that are usually restricted to root
+(/dev/pci* or /devices/pci*).
To workaround this limitation, it is recommended to export the
topology as a XML file generated by the administrator (with the
@@ -2725,6 +2773,11 @@ This XML-based model also has the advantage of speeding up the
discovery because reading a XML topology is usually much faster
than querying the operating system again.
+The utility <tt>hwloc-dump-hwdata</tt> is also involved in gathering
+privileged information at boot time and making it available to
+non-privileged users. However it only applies to Intel Knights Landing
+Xeon Phi for now (see \ref faq_knl_dump).
+
\section faq_onedim hwloc only has a one-dimensional view of the architecture, it ignores distances
@@ -2832,17 +2885,51 @@ hello from a single thread on core #3
\endverbatim
+\section faq_groups What are these Group objects in my topology?
+
+hwloc comes with a set of predefined object types (Core, Package, NUMA node, Caches)
+that match the vast majority of hardware platforms.
+The ::HWLOC_OBJ_GROUP type was designed for cases where this set is not sufficient.
+Groups may be used anywhere to add more structure information to the topology,
+for instance to show that 2 out of 4 NUMA nodes are actually closer than the others.
+When applicable, the <tt>Type</tt> info attribute describes why a Group
+was actually added (see also \ref attributes_info).
+
+hwloc currently uses Groups for the following reasons:
+<ul>
+<li>AMD dual-core compute units (<tt>Type=ComputeUnit</tt>, in the x86 backend),
+ but these objects are usually merged with the L2 caches.</li>
+<li>Intel x2APIC non-core and non-package levels (in the x86 backend).</li>
+<li>Windows processor groups.</li>
+<li>IBM S/390 "Books" on Linux (<tt>Type=Book</tt>).</li>
+<li>AIX unknown hierarchy levels.</li>
+<li>Distance-based groups made of close objects.</li>
+<li>I/O parents when I/O locality does not match any existing object.</li>
+</ul>
+
+
\section faq_asymmetric What happens if my topology is asymmetric?
hwloc supports asymmetric topologies even if most platforms are usually
-symmetric. For example, there may be different types of processors
+symmetric. For example, there could be different types of processors
in a single machine, each with different numbers of cores, symmetric
multithreading, or levels of caches.
+In practice, asymmetric topologies mostly appear when intermediate groups
+are added for I/O affinity: on a 4-package machine, an I/O bus may be
+connected to 2 packages. These packages are below an additional Group
+object, while the other packages are not (see also \ref faq_groups).
+
+Before hwloc v2.0, hwloc_topology_ignore_type_keep_structure() and
+hwloc_topology_ignore_all_keep_structure() may also make topologies
+assymetric by removing parts of levels, especially when part of the
+machine is disallowed by administrator restrictions
+(e.g. Linux cgroups).
+
To understand how hwloc manages such cases, one should first remember
the meaning of levels and cousin objects. All objects of the same type
are gathered as horizontal levels with a given depth. They are also
-connected through the cousin pointers of the hwloc_obj structure.
+connected through the cousin pointers of the ::hwloc_obj structure.
Some types, such as Caches or Groups, are annotated with a depth or
level attribute (for instance L2 cache or Group1). Moreover caches
have a type attribute (for instance L1i or L1d). Such
@@ -2850,8 +2937,8 @@ attributes are also taken in account when gathering objects as
horizontal levels. To be clear: there will be one level for L1i
caches, another level for L1d caches, another one for L2, etc.
-If the topology is asymmetric (e.g., if a cache is missing in one of
-the processors), a given horizontal level will still exist if there
+If the topology is asymmetric (e.g., if a group is missing above some
+processors), a given horizontal level will still exist if there
exist any objects of that type. However, some branches of the overall
tree may not have an object located in that horizontal level. Note
that this specific hole within one horizontal level does not imply
@@ -2859,11 +2946,14 @@ anything for other levels. All objects of the same type are gathered
in horizontal levels even if their parents or children have different
depths and types.
+See the diagram in \ref termsanddefs for a graphical representation
+of such topologies.
+
Moreover, it is important to understand that a same parent object may
have children of different types (and therefore, different
depths). <strong>These children are therefore siblings (because they
have the same parent), but they are <em>not</em> cousins (because they
-do not belong to the same horizontal levels).</strong>
+do not belong to the same horizontal level).</strong>
\section faq_annotate How do I annotate the topology with private notes?
@@ -2946,7 +3036,21 @@ to fix several issues of the 1.x interface.
The ABI will be broken, which means
<b>applications must be recompiled against the new 2.0 interface</b>.
-To check that you are not mixing old/recent headers with a recent/old runtime library:
+To check that you are not mixing old/recent headers with a recent/old runtime library,
+check the major revision number in the API version:
+\verbatim
+#include <hwloc.h>
+ unsigned version = hwloc_get_api_version();
+ if ((version >> 16) != (HWLOC_API_VERSION >> 16)) {
+ fprintf(stderr,
+ "%s compiled for hwloc API 0x%x but running on library API 0x%x.\n"
+ "You may need to point LD_LIBRARY_PATH to the right hwloc library.\n"
+ "Aborting since the new ABI is not backward compatible.\n",
+ callname, HWLOC_API_VERSION, version);
+ exit(EXIT_FAILURE);
+ }
+\endverbatim
+To specifically detect v2.0 issues:
\verbatim
#include <hwloc.h>
#if HWLOC_API_VERSION >= 0x00020000
@@ -2961,7 +3065,7 @@ To check that you are not mixing old/recent headers with a recent/old runtime li
\endverbatim
You should not try to remain compatible with very old releases such as
-1.1.x or earlier because <tt>HWLOC_API_VERSION</tt> was added in 1.0.0
+1.1.x or earlier because <tt>::HWLOC_API_VERSION</tt> was added in 1.0.0
and <tt>hwloc_get_api_version()</tt> came only in 1.1.1.
Also do not use the old cpuset API since it was deprecated and superseded
by the bitmap API in 1.1, and later removed in 1.5.
@@ -2995,9 +3099,63 @@ sysctl variable must be set to 1 to do so.
Otherwise, only the number of logical processors will be detected.
+\section faq_knl_numa How do I find the local MCDRAM NUMA node on Intel Knights Landing Xeon Phi?
+
+Intel Knights Landing Xeon Phi processors introduce a new memory architecture by
+possibly having two distinct local memories:
+some normal memory (DDR) and some high-bandwidth on-package memory (MCDRAM).
+Processors can be configured in various clustering modes to have up to 4 <em>Clusters</em>.
+Moreover, each <em>Cluster</em> (quarter, half or whole processor) of the processor may have its own local
+parts of the DDR and of the MCDRAM.
+
+The upcoming hwloc 2.0 will address this new architecture by presenting memory
+in an improved way.
+For now, starting with 1.11.2, hwloc releases use the following approximate representation:
+
+If a cluster only contains DDR or MCDRAM but not both, that memory is available
+as a local NUMA node above cores as usual.
+
+If a cluster contains both, two distinct NUMA nodes appear.
+They are sibling children of a Group object of type <tt>Cluster</tt>
+(or sibling children of the Package object for non-clustered processors).
+
+The DDR memory is the local NUMA node above cores as usual.
+Allocating memory from one core to its local NUMA node will therefore actually
+allocate it on the normal memory by default.
+
+The local high-bandwidth MCDRAM is the second NUMA node (without any Core or PU below it).
+It is the next sibling of the local DDR NUMA node below the same parent object.
+To allocate on the faster MCDRAM, one should first find the local NUMA node (the DDR memory,
+by looking up parent objects), and then take the next sibling to reach the local MCDRAM
+NUMA node (if any).
+
+The MCDRAM NUMA nodes may also be identified thanks to the <tt>Type</tt> info attribute
+which is set to <tt>MCDRAM</tt>.
+
+
+\section faq_knl_dump Why do I need hwloc-dump-hwdata for caches on Intel Knights Landing Xeon Phi?
+
+Intel Knights Landing Xeon Phi processors may use the on-package memory (MCDRAM)
+as either memory or a memory-side cache (currently reported as a L3 cache by hwloc).
+Details about this cache (especially its size) are currently only available to privileged users.
+
+The hwloc-dump-hwdata utility may be used to dump this privileged binary information
+into human-readable and world-accessible files that the hwloc library will later load.
+The utility should usually run as root once during boot, in order to update dumped
+information (stored under /var/run/hwloc by default) in case the MCDRAM configuration
+changed between reboots.
+
+hwloc-dump-hwdata requires <tt>dmi-sysfs</tt> kernel module loaded.
+
+The utility is currently unneeded on non-KNL platforms.
+
+
\section faq_phi How do I build for Intel Xeon Phi coprocessor?
-Intel Xeon Phi coprocessors usually runs a Linux environment but cross-compiling from the host is required.
+\note This section does not apply to standalone Intel Knights Landing Xeon Phi.
+
+Intel Knights Corner Xeon Phi coprocessors usually runs a Linux environment
+but cross-compiling from the host is required.
hwloc uses standard autotools options for cross-compiling.
For instance, to build for a <em>Knights Corner (KNC)</em> coprocessor:
@@ -3006,7 +3164,7 @@ If building with <tt>icc</tt>:
./configure CC="icc -mmic" --host=x86_64-k1om-linux --build=x86_64-unknown-linux-gnu
\endverbatim
-If building with the Xeon Phi-specific GCC that comes with the MPSS environment\n
+If building with the Xeon Phi-specific GCC that comes with the MPSS environment,
for instance <tt>/usr/linux-k1om-4.7/bin/x86_64-k1om-linux-gcc</tt>:
\verbatim
export PATH=$PATH:/usr/linux-k1om-4.7/bin/
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 66e1220..deb5141 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/include/hwloc.h
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/include/hwloc.h
@@ -80,7 +80,10 @@ extern "C" {
/** \brief Indicate at build time which hwloc API version is being used. */
#define HWLOC_API_VERSION 0x00010b00
-/** \brief Indicate at runtime which hwloc API version was used at build time. */
+/** \brief Indicate at runtime which hwloc API version was used at build time.
+ *
+ * Should be ::HWLOC_API_VERSION if running on the same version.
+ */
HWLOC_DECLSPEC unsigned hwloc_get_api_version(void);
/** \brief Current component and plugin ABI version (see hwloc/plugins.h) */
@@ -208,6 +211,7 @@ typedef enum {
* expose their arbitrary processors aggregation this
* way. And hwloc may insert such objects to group
* NUMA nodes according to their distances.
+ * See also \ref faq_groups.
*
* These objects are ignored when they do not bring
* any structure.
@@ -216,7 +220,7 @@ typedef enum {
HWLOC_OBJ_MISC, /**< \brief Miscellaneous objects.
* Objects without particular meaning, that can e.g. be
* added by the application for its own use, or by hwloc
- * for miscellaneous objects such as MemoryDevice.
+ * for miscellaneous objects such as MemoryModule (DIMMs).
*/
HWLOC_OBJ_BRIDGE, /**< \brief Bridge.
@@ -254,7 +258,7 @@ typedef enum hwloc_obj_cache_type_e {
HWLOC_OBJ_CACHE_UNIFIED, /**< \brief Unified cache. */
HWLOC_OBJ_CACHE_DATA, /**< \brief Data cache. */
HWLOC_OBJ_CACHE_INSTRUCTION /**< \brief Instruction cache.
- * Only used when the HWLOC_TOPOLOGY_FLAG_ICACHES topology flag is set. */
+ * Only used when the ::HWLOC_TOPOLOGY_FLAG_ICACHES topology flag is set. */
} hwloc_obj_cache_type_t;
/** \brief Type of one side (upstream or downstream) of an I/O bridge. */
@@ -289,12 +293,12 @@ typedef enum hwloc_obj_osdev_type_e {
* respectively if \p type1 objects usually include \p type2 objects, are the
* same as \p type2 objects, or are included in \p type2 objects. If the types
* can not be compared (because neither is usually contained in the other),
- * HWLOC_TYPE_UNORDERED is returned. Object types containing CPUs can always
+ * ::HWLOC_TYPE_UNORDERED is returned. Object types containing CPUs can always
* be compared (usually, a system contains machines which contain nodes which
* contain packages which contain caches, which contain cores, which contain
* processors).
*
- * \note HWLOC_OBJ_PU will always be the deepest.
+ * \note ::HWLOC_OBJ_PU will always be the deepest.
* \note This does not mean that the actual topology will respect that order:
* e.g. as of today cores may also contain caches, and packages may also contain
* nodes. This is thus just to be seen as a fallback comparison method.
@@ -302,7 +306,7 @@ typedef enum hwloc_obj_osdev_type_e {
HWLOC_DECLSPEC int hwloc_compare_types (hwloc_obj_type_t type1, hwloc_obj_type_t type2) __hwloc_attribute_const;
enum hwloc_compare_types_e {
- HWLOC_TYPE_UNORDERED = INT_MAX /**< \brief Value returned by hwloc_compare_types when types can not be compared. \hideinitializer */
+ HWLOC_TYPE_UNORDERED = INT_MAX /**< \brief Value returned by hwloc_compare_types() when types can not be compared. \hideinitializer */
};
/** @} */
@@ -393,22 +397,22 @@ struct hwloc_obj {
* object and known how (the children path between this object and the PU
* objects).
*
- * If the HWLOC_TOPOLOGY_FLAG_WHOLE_SYSTEM configuration flag is set, some of
+ * If the ::HWLOC_TOPOLOGY_FLAG_WHOLE_SYSTEM configuration flag is set, some of
* these CPUs may be offline, or not allowed for binding, see online_cpuset
* and allowed_cpuset.
*
- * \note Its value must not be changed, hwloc_bitmap_dup must be used instead.
+ * \note Its value must not be changed, hwloc_bitmap_dup() must be used instead.
*/
hwloc_cpuset_t complete_cpuset; /**< \brief The complete CPU set of logical processors of this object,
*
* This includes not only the same as the cpuset field, but also the CPUs for
* which topology information is unknown or incomplete, and the CPUs that are
- * ignored when the HWLOC_TOPOLOGY_FLAG_WHOLE_SYSTEM flag is not set.
+ * ignored when the ::HWLOC_TOPOLOGY_FLAG_WHOLE_SYSTEM flag is not set.
* Thus no corresponding PU object may be found in the topology, because the
* precise position is undefined. It is however known that it would be somewhere
* under this object.
*
- * \note Its value must not be changed, hwloc_bitmap_dup must be used instead.
+ * \note Its value must not be changed, hwloc_bitmap_dup() must be used instead.
*/
hwloc_cpuset_t online_cpuset; /**< \brief The CPU set of online logical processors
*
@@ -416,7 +420,7 @@ struct hwloc_obj {
* power and can execute threads. It may however not be allowed to bind to
* them due to administration rules, see allowed_cpuset.
*
- * \note Its value must not be changed, hwloc_bitmap_dup must be used instead.
+ * \note Its value must not be changed, hwloc_bitmap_dup() must be used instead.
*/
hwloc_cpuset_t allowed_cpuset; /**< \brief The CPU set of allowed logical processors
*
@@ -426,7 +430,7 @@ struct hwloc_obj {
* Some of them may however be offline so binding to them may still not be
* possible, see online_cpuset.
*
- * \note Its value must not be changed, hwloc_bitmap_dup must be used instead.
+ * \note Its value must not be changed, hwloc_bitmap_dup() must be used instead.
*/
hwloc_nodeset_t nodeset; /**< \brief NUMA nodes covered by this object or containing this object
@@ -438,19 +442,19 @@ struct hwloc_obj {
*
* In the end, these nodes are those that are close to the current object.
*
- * If the HWLOC_TOPOLOGY_FLAG_WHOLE_SYSTEM configuration flag is set, some of
+ * If the ::HWLOC_TOPOLOGY_FLAG_WHOLE_SYSTEM configuration flag is set, some of
* these nodes may not be allowed for allocation, see allowed_nodeset.
*
* If there are no NUMA nodes in the machine, all the memory is close to this
* object, so \p nodeset is full.
*
- * \note Its value must not be changed, hwloc_bitmap_dup must be used instead.
+ * \note Its value must not be changed, hwloc_bitmap_dup() must be used instead.
*/
hwloc_nodeset_t complete_nodeset; /**< \brief The complete NUMA node set of this object,
*
* This includes not only the same as the nodeset field, but also the NUMA
* nodes for which topology information is unknown or incomplete, and the nodes
- * that are ignored when the HWLOC_TOPOLOGY_FLAG_WHOLE_SYSTEM flag is not set.
+ * that are ignored when the ::HWLOC_TOPOLOGY_FLAG_WHOLE_SYSTEM flag is not set.
* Thus no corresponding NODE object may be found in the topology, because the
* precise position is undefined. It is however known that it would be
* somewhere under this object.
@@ -458,7 +462,7 @@ struct hwloc_obj {
* If there are no NUMA nodes in the machine, all the memory is close to this
* object, so \p complete_nodeset is full.
*
- * \note Its value must not be changed, hwloc_bitmap_dup must be used instead.
+ * \note Its value must not be changed, hwloc_bitmap_dup() must be used instead.
*/
hwloc_nodeset_t allowed_nodeset; /**< \brief The set of allowed NUMA memory nodes
*
@@ -470,7 +474,7 @@ struct hwloc_obj {
* If there are no NUMA nodes in the machine, all the memory is close to this
* object, so \p allowed_nodeset is full.
*
- * \note Its value must not be changed, hwloc_bitmap_dup must be used instead.
+ * \note Its value must not be changed, hwloc_bitmap_dup() must be used instead.
*/
struct hwloc_distances_s **distances; /**< \brief Distances between all objects at same depth below this object */
@@ -679,7 +683,7 @@ HWLOC_DECLSPEC void hwloc_topology_check(hwloc_topology_t topology);
/** \brief Ignore an object type.
*
* Ignore all objects from the given type.
- * The bottom-level type HWLOC_OBJ_PU may not be ignored.
+ * The bottom-level type ::HWLOC_OBJ_PU may not be ignored.
* The top-level object of the hierarchy will never be ignored, even if this function
* succeeds.
* Group objects are always ignored if they do not bring any structure
@@ -693,7 +697,7 @@ HWLOC_DECLSPEC int hwloc_topology_ignore_type(hwloc_topology_t topology, hwloc_o
*
* Ignore all objects from the given type as long as they do not bring any structure:
* Each ignored object should have a single children or be the only child of its parent.
- * The bottom-level type HWLOC_OBJ_PU may not be ignored.
+ * The bottom-level type ::HWLOC_OBJ_PU may not be ignored.
* I/O objects may not be ignored, topology flags should be used to configure
* their discovery instead.
*/
@@ -702,9 +706,8 @@ HWLOC_DECLSPEC int hwloc_topology_ignore_type_keep_structure(hwloc_topology_t to
/** \brief Ignore all objects that do not bring any structure.
*
* Ignore all objects that do not bring any structure:
- * Each ignored object should have a single children or be the only child of its parent.
- * I/O objects may not be ignored, topology flags should be used to configure
- * their discovery instead.
+ * This is equivalent to calling hwloc_topology_ignore_type_keep_structure()
+ * for all object types.
*/
HWLOC_DECLSPEC int hwloc_topology_ignore_all_keep_structure(hwloc_topology_t topology);
@@ -719,6 +722,10 @@ enum hwloc_topology_flags_e {
* Gather all resources, even if some were disabled by the administrator.
* For instance, ignore Linux Cgroup/Cpusets and gather all processors and memory nodes,
* and ignore the fact that some resources may be offline.
+ *
+ * When this flag is not set, PUs that are disallowed are not added to the topology.
+ * Parent objects (package, core, cache, etc.) are added only if some of their children are allowed.
+ * NUMA nodes are always added but their available memory is set to 0 when disallowed.
* \hideinitializer
*/
HWLOC_TOPOLOGY_FLAG_WHOLE_SYSTEM = (1UL<<0),
@@ -726,7 +733,7 @@ enum hwloc_topology_flags_e {
/** \brief Assume that the selected backend provides the topology for the
* system on which we are running.
*
- * This forces hwloc_topology_is_thissystem to return 1, i.e. makes hwloc assume that
+ * 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,
* even if it is not the OS-specific backend but the XML backend for instance.
* This means making the binding functions actually call the OS-specific
@@ -749,7 +756,7 @@ enum hwloc_topology_flags_e {
* 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.
- * Additionally it also enables MemoryDevice misc objects.
+ * Additionally it also enables MemoryModule misc objects.
* Uncommon devices and other bridges (such as PCI-to-PCI bridges) will be
* ignored.
* \hideinitializer
@@ -758,7 +765,7 @@ enum hwloc_topology_flags_e {
/** \brief Detect PCI bridges.
*
- * This flag should be combined with HWLOC_TOPOLOGY_FLAG_IO_DEVICES to enable
+ * 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
@@ -767,10 +774,10 @@ enum hwloc_topology_flags_e {
/** \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 pci
- * backend.
- * This implies HWLOC_TOPOLOGY_FLAG_IO_DEVICES.
+ * This flag enables detection of all I/O devices (even the uncommon ones
+ * such as DMA channels) and bridges (even those that have no device behind
+ * them) using the pci backend.
+ * This implies ::HWLOC_TOPOLOGY_FLAG_IO_DEVICES.
* \hideinitializer
*/
HWLOC_TOPOLOGY_FLAG_WHOLE_IO = (1UL<<4),
@@ -803,7 +810,7 @@ HWLOC_DECLSPEC int hwloc_topology_set_flags (hwloc_topology_t topology, unsigned
*/
HWLOC_DECLSPEC unsigned long hwloc_topology_get_flags (hwloc_topology_t topology);
-/** \brief Change which pid the topology is viewed from
+/** \brief Change which process the topology is viewed from
*
* On some systems, processes may have different views of the machine, for
* instance the set of allowed CPUs. By default, hwloc exposes the view from
@@ -838,7 +845,7 @@ HWLOC_DECLSPEC int hwloc_topology_set_pid(hwloc_topology_t __hwloc_restrict topo
*
* \note For convenience, this backend provides empty binding hooks which just
* return success. To have hwloc still actually call OS-specific hooks, the
- * HWLOC_TOPOLOGY_FLAG_IS_THISSYSTEM has to be set to assert that the loaded
+ * ::HWLOC_TOPOLOGY_FLAG_IS_THISSYSTEM has to be set to assert that the loaded
* file is really the underlying system.
*
* \note On success, the Linux component replaces the previously enabled
@@ -895,7 +902,7 @@ HWLOC_DECLSPEC int hwloc_topology_set_synthetic(hwloc_topology_t __hwloc_restric
*
* \note For convenience, this backend provides empty binding hooks which just
* return success. To have hwloc still actually call OS-specific hooks, the
- * HWLOC_TOPOLOGY_FLAG_IS_THISSYSTEM has to be set to assert that the loaded
+ * ::HWLOC_TOPOLOGY_FLAG_IS_THISSYSTEM has to be set to assert that the loaded
* file is really the underlying system.
*
* \note On success, the XML component replaces the previously enabled
@@ -923,7 +930,7 @@ HWLOC_DECLSPEC int hwloc_topology_set_xml(hwloc_topology_t __hwloc_restrict topo
*
* \note For convenience, this backend provides empty binding hooks which just
* return success. To have hwloc still actually call OS-specific hooks, the
- * HWLOC_TOPOLOGY_FLAG_IS_THISSYSTEM has to be set to assert that the loaded
+ * ::HWLOC_TOPOLOGY_FLAG_IS_THISSYSTEM has to be set to assert that the loaded
* file is really the underlying system.
*
* \note On success, the XML component replaces the previously enabled
@@ -1099,7 +1106,7 @@ HWLOC_DECLSPEC void * hwloc_topology_get_userdata(hwloc_topology_t topology);
/** \brief Get the depth of the hierarchical tree of objects.
*
- * This is the depth of HWLOC_OBJ_PU objects plus one.
+ * This is the depth of ::HWLOC_OBJ_PU objects plus one.
*/
HWLOC_DECLSPEC unsigned hwloc_topology_get_depth(hwloc_topology_t __hwloc_restrict topology) __hwloc_attribute_pure;
@@ -1107,14 +1114,14 @@ HWLOC_DECLSPEC unsigned hwloc_topology_get_depth(hwloc_topology_t __hwloc_restri
*
* If no object of this type is present on the underlying architecture, or if
* the OS doesn't provide this kind of information, the function returns
- * HWLOC_TYPE_DEPTH_UNKNOWN.
+ * ::HWLOC_TYPE_DEPTH_UNKNOWN.
*
* If type is absent but a similar type is acceptable, see also
* hwloc_get_type_or_below_depth() and hwloc_get_type_or_above_depth().
*
* If some objects of the given type exist in different levels,
* for instance L1 and L2 caches, or L1i and L1d caches,
- * the function returns HWLOC_TYPE_DEPTH_MULTIPLE.
+ * the function returns ::HWLOC_TYPE_DEPTH_MULTIPLE.
* See hwloc_get_cache_type_depth() in hwloc/helper.h to better handle this
* case.
*
@@ -1142,7 +1149,7 @@ enum hwloc_get_type_depth_e {
* inside \p type.
*
* If some objects of the given type exist in different levels, for instance
- * L1 and L2 caches, the function returns HWLOC_TYPE_DEPTH_MULTIPLE.
+ * L1 and L2 caches, the function returns ::HWLOC_TYPE_DEPTH_MULTIPLE.
*/
static __hwloc_inline int
hwloc_get_type_or_below_depth (hwloc_topology_t topology, hwloc_obj_type_t type) __hwloc_attribute_pure;
@@ -1154,13 +1161,15 @@ hwloc_get_type_or_below_depth (hwloc_topology_t topology, hwloc_obj_type_t type)
* containing \p type.
*
* If some objects of the given type exist in different levels, for instance
- * L1 and L2 caches, the function returns HWLOC_TYPE_DEPTH_MULTIPLE.
+ * L1 and L2 caches, the function returns ::HWLOC_TYPE_DEPTH_MULTIPLE.
*/
static __hwloc_inline int
hwloc_get_type_or_above_depth (hwloc_topology_t topology, hwloc_obj_type_t type) __hwloc_attribute_pure;
/** \brief Returns the type of objects at depth \p depth.
*
+ * \p depth should between 0 and hwloc_topology_get_depth()-1.
+ *
* \return -1 if depth \p depth does not exist.
*/
HWLOC_DECLSPEC hwloc_obj_type_t hwloc_get_depth_type (hwloc_topology_t topology, unsigned depth) __hwloc_attribute_pure;
@@ -1243,7 +1252,7 @@ HWLOC_DECLSPEC const char * hwloc_obj_type_string (hwloc_obj_type_t type) __hwlo
* Attributes that are not specified in the string (for instance "Group"
* without a depth, or "L2Cache" without a cache type) are set to -1.
*
- * \p typeattrd is only filled if the size specified in \p typeattrsize
+ * \p typeattrp is only filled if the size specified in \p typeattrsize
* is large enough. It is currently only used for caches, and the required
* size is at least the size of hwloc_obj_cache_type_t.
*
@@ -1457,10 +1466,10 @@ HWLOC_DECLSPEC int hwloc_get_cpubind(hwloc_topology_t topology, hwloc_cpuset_t s
* and \p HANDLE on native Windows platforms.
*
* \note As a special case on Linux, if a tid (thread ID) is supplied
- * instead of a pid (process ID) and HWLOC_CPUBIND_THREAD is passed in flags,
+ * instead of a pid (process ID) and ::HWLOC_CPUBIND_THREAD is passed in flags,
* the binding is applied to that specific thread.
*
- * \note On non-Linux systems, HWLOC_CPUBIND_THREAD can not be used in \p flags.
+ * \note On non-Linux systems, ::HWLOC_CPUBIND_THREAD can not be used in \p flags.
*/
HWLOC_DECLSPEC int hwloc_set_proc_cpubind(hwloc_topology_t topology, hwloc_pid_t pid, hwloc_const_cpuset_t set, int flags);
@@ -1470,10 +1479,10 @@ HWLOC_DECLSPEC int hwloc_set_proc_cpubind(hwloc_topology_t topology, hwloc_pid_t
* and \p HANDLE on native Windows platforms.
*
* \note As a special case on Linux, if a tid (thread ID) is supplied
- * instead of a pid (process ID) and HWLOC_CPUBIND_THREAD is passed in flags,
+ * instead of a pid (process ID) and ::HWLOC_CPUBIND_THREAD is passed in flags,
* the binding for that specific thread is returned.
*
- * \note On non-Linux systems, HWLOC_CPUBIND_THREAD can not be used in \p flags.
+ * \note On non-Linux systems, ::HWLOC_CPUBIND_THREAD can not be used in \p flags.
*/
HWLOC_DECLSPEC int hwloc_get_proc_cpubind(hwloc_topology_t topology, hwloc_pid_t pid, hwloc_cpuset_t set, int flags);
@@ -1483,7 +1492,7 @@ HWLOC_DECLSPEC int hwloc_get_proc_cpubind(hwloc_topology_t topology, hwloc_pid_t
* \note \p hwloc_thread_t is \p pthread_t on Unix platforms,
* and \p HANDLE on native Windows platforms.
*
- * \note HWLOC_CPUBIND_PROCESS can not be used in \p flags.
+ * \note ::HWLOC_CPUBIND_PROCESS can not be used in \p flags.
*/
HWLOC_DECLSPEC int hwloc_set_thread_cpubind(hwloc_topology_t topology, hwloc_thread_t thread, hwloc_const_cpuset_t set, int flags);
#endif
@@ -1494,7 +1503,7 @@ HWLOC_DECLSPEC int hwloc_set_thread_cpubind(hwloc_topology_t topology, hwloc_thr
* \note \p hwloc_thread_t is \p pthread_t on Unix platforms,
* and \p HANDLE on native Windows platforms.
*
- * \note HWLOC_CPUBIND_PROCESS can not be used in \p flags.
+ * \note ::HWLOC_CPUBIND_PROCESS can not be used in \p flags.
*/
HWLOC_DECLSPEC int hwloc_get_thread_cpubind(hwloc_topology_t topology, hwloc_thread_t thread, hwloc_cpuset_t set, int flags);
#endif
@@ -1506,7 +1515,7 @@ HWLOC_DECLSPEC int hwloc_get_thread_cpubind(hwloc_topology_t topology, hwloc_thr
* so this function may return something that is already
* outdated.
*
- * \p flags can include either HWLOC_CPUBIND_PROCESS or HWLOC_CPUBIND_THREAD to
+ * \p flags can include either ::HWLOC_CPUBIND_PROCESS or ::HWLOC_CPUBIND_THREAD to
* specify whether the query should be for the whole process (union of all CPUs
* on which all threads are running), or only the current thread. If the
* process is single-threaded, flags can be set to zero to let hwloc use
@@ -1525,10 +1534,10 @@ HWLOC_DECLSPEC int hwloc_get_last_cpu_location(hwloc_topology_t topology, hwloc_
* and \p HANDLE on native Windows platforms.
*
* \note As a special case on Linux, if a tid (thread ID) is supplied
- * instead of a pid (process ID) and HWLOC_CPUBIND_THREAD is passed in flags,
+ * instead of a pid (process ID) and ::HWLOC_CPUBIND_THREAD is passed in flags,
* the last CPU location of that specific thread is returned.
*
- * \note On non-Linux systems, HWLOC_CPUBIND_THREAD can not be used in \p flags.
+ * \note On non-Linux systems, ::HWLOC_CPUBIND_THREAD can not be used in \p flags.
*/
HWLOC_DECLSPEC int hwloc_get_proc_last_cpu_location(hwloc_topology_t topology, hwloc_pid_t pid, hwloc_cpuset_t set, int flags);
@@ -1611,8 +1620,8 @@ HWLOC_DECLSPEC int hwloc_get_proc_last_cpu_location(hwloc_topology_t topology, h
typedef enum {
/** \brief Reset the memory allocation policy to the system default.
* Depending on the operating system, this may correspond to
- * HWLOC_MEMBIND_FIRSTTOUCH (Linux),
- * or HWLOC_MEMBIND_BIND (AIX, HP-UX, OSF, Solaris, Windows).
+ * ::HWLOC_MEMBIND_FIRSTTOUCH (Linux),
+ * or ::HWLOC_MEMBIND_BIND (AIX, HP-UX, OSF, Solaris, Windows).
* \hideinitializer */
HWLOC_MEMBIND_DEFAULT = 0,
@@ -2041,7 +2050,7 @@ HWLOC_DECLSPEC void *hwloc_alloc_membind(hwloc_topology_t topology, size_t len,
/** \brief Allocate some memory on the given nodeset \p nodeset
*
- * This is similar to hwloc_alloc_membind except that it is allowed to change
+ * This is similar to hwloc_alloc_membind() except that it is allowed to change
* the current memory binding policy, thus providing more binding support, at
* the expense of changing the current state.
*/
@@ -2050,7 +2059,7 @@ hwloc_alloc_membind_policy_nodeset(hwloc_topology_t topology, size_t len, hwloc_
/** \brief Allocate some memory on the memory nodes near given cpuset \p cpuset
*
- * This is similar to hwloc_alloc_membind_policy_nodeset, but for a given cpuset.
+ * This is similar to hwloc_alloc_membind_policy_nodeset(), but for a given cpuset.
*/
static __hwloc_inline void *
hwloc_alloc_membind_policy(hwloc_topology_t topology, size_t len, hwloc_const_cpuset_t set, hwloc_membind_policy_t policy, int flags) __hwloc_attribute_malloc;
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/include/hwloc/bitmap.h b/src/pm/hydra/tools/topo/hwloc/hwloc/include/hwloc/bitmap.h
index bb18f65..5626428 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/include/hwloc/bitmap.h
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/include/hwloc/bitmap.h
@@ -38,7 +38,7 @@ extern "C" {
*
* \note Several examples of using the bitmap API are available under the
* doc/examples/ directory in the source tree.
- * Regression tests such as tests/hwloc_bitmap*.c also make intensive use
+ * Regression tests such as tests/hwloc/hwloc_bitmap*.c also make intensive use
* of this API.
* @{
*/
@@ -257,27 +257,35 @@ HWLOC_DECLSPEC int hwloc_bitmap_last(hwloc_const_bitmap_t bitmap) __hwloc_attrib
HWLOC_DECLSPEC int hwloc_bitmap_weight(hwloc_const_bitmap_t bitmap) __hwloc_attribute_pure;
/** \brief Loop macro iterating on bitmap \p bitmap
- * \hideinitializer
+ *
+ * The loop must start with hwloc_bitmap_foreach_begin() and end
+ * with hwloc_bitmap_foreach_end() followed by a terminating ';'.
*
* \p index is the loop variable; it should be an unsigned int. The
* first iteration will set \p index to the lowest index in the bitmap.
* Successive iterations will iterate through, in order, all remaining
- * indexes that in the bitmap. To be specific: each iteration will return a
+ * indexes set in the bitmap. To be specific: each iteration will return a
* value for \p index such that hwloc_bitmap_isset(bitmap, index) is true.
*
* The assert prevents the loop from being infinite if the bitmap is infinite.
+ *
+ * \hideinitializer
*/
#define hwloc_bitmap_foreach_begin(id, bitmap) \
do { \
assert(hwloc_bitmap_weight(bitmap) != -1); \
for (id = hwloc_bitmap_first(bitmap); \
(unsigned) id != (unsigned) -1; \
- id = hwloc_bitmap_next(bitmap, id)) { \
-/** \brief End of loop. Needs a terminating ';'.
- * \hideinitializer
+ id = hwloc_bitmap_next(bitmap, id)) {
+
+/** \brief End of loop macro iterating on a bitmap.
+ *
+ * Needs a terminating ';'.
*
- * \sa hwloc_bitmap_foreach_begin */
-#define hwloc_bitmap_foreach_end() \
+ * \sa hwloc_bitmap_foreach_begin()
+ * \hideinitializer
+ */
+#define hwloc_bitmap_foreach_end() \
} \
} while (0)
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/include/hwloc/deprecated.h b/src/pm/hydra/tools/topo/hwloc/hwloc/include/hwloc/deprecated.h
index 3d09203..2a58120 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/include/hwloc/deprecated.h
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/include/hwloc/deprecated.h
@@ -81,7 +81,7 @@ hwloc_distribute(hwloc_topology_t topology, hwloc_obj_t root, hwloc_cpuset_t *se
/** \brief Distribute \p n items over the topology under \p roots
*
- * This is the same as hwloc_distribute, but takes an array of roots instead of
+ * This is the same as hwloc_distribute(), but takes an array of roots instead of
* just one root.
*
* \note This function requires the \p roots objects to have a CPU set.
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/include/hwloc/diff.h b/src/pm/hydra/tools/topo/hwloc/hwloc/include/hwloc/diff.h
index 3f1beb1..8b2fe92 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/include/hwloc/diff.h
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/include/hwloc/diff.h
@@ -1,5 +1,5 @@
/*
- * Copyright © 2013-2014 Inria. All rights reserved.
+ * Copyright © 2013-2015 Inria. All rights reserved.
* See COPYING in top-level directory.
*/
@@ -59,19 +59,19 @@ extern "C" {
*/
typedef enum hwloc_topology_diff_obj_attr_type_e {
/** \brief The object local memory is modified.
- * The union is a hwloc_topology_diff_obj_attr_uint64_s
+ * The union is a hwloc_topology_diff_obj_attr_u::hwloc_topology_diff_obj_attr_uint64_s
* (and the index field is ignored).
*/
HWLOC_TOPOLOGY_DIFF_OBJ_ATTR_SIZE,
/** \brief The object name is modified.
- * The union is a hwloc_topology_diff_obj_attr_string_s
+ * The union is a hwloc_topology_diff_obj_attr_u::hwloc_topology_diff_obj_attr_string_s
* (and the name field is ignored).
*/
HWLOC_TOPOLOGY_DIFF_OBJ_ATTR_NAME,
/** \brief the value of an info attribute is modified.
- * The union is a hwloc_topology_diff_obj_attr_string_s.
+ * The union is a hwloc_topology_diff_obj_attr_u::hwloc_topology_diff_obj_attr_string_s.
*/
HWLOC_TOPOLOGY_DIFF_OBJ_ATTR_INFO
} hwloc_topology_diff_obj_attr_type_t;
@@ -107,17 +107,17 @@ union hwloc_topology_diff_obj_attr_u {
/** \brief Type of one element of a difference list.
*/
typedef enum hwloc_topology_diff_type_e {
- /*< \brief An object attribute was changed.
- * The union is a hwloc_topology_diff_obj_attr_s.
- */
+ /** \brief An object attribute was changed.
+ * The union is a hwloc_topology_diff_obj_attr_u::hwloc_topology_diff_obj_attr_s.
+ */
HWLOC_TOPOLOGY_DIFF_OBJ_ATTR,
- /*< \brief The difference is too complex,
+ /** \brief The difference is too complex,
* it cannot be represented. The difference below
* this object has not been checked.
* hwloc_topology_diff_build() will return 1.
*
- * The union is a hwloc_topology_diff_too_complex_s.
+ * The union is a hwloc_topology_diff_obj_attr_u::hwloc_topology_diff_too_complex_s.
*/
HWLOC_TOPOLOGY_DIFF_TOO_COMPLEX
} hwloc_topology_diff_type_t;
@@ -133,7 +133,7 @@ typedef union hwloc_topology_diff_u {
/* A difference in an object attribute. */
struct hwloc_topology_diff_obj_attr_s {
- hwloc_topology_diff_type_t type; /* must be HWLOC_TOPOLOGY_DIFF_OBJ_ATTR */
+ hwloc_topology_diff_type_t type; /* must be ::HWLOC_TOPOLOGY_DIFF_OBJ_ATTR */
union hwloc_topology_diff_u * next;
/* List of attribute differences for a single object */
unsigned obj_depth;
@@ -143,7 +143,7 @@ typedef union hwloc_topology_diff_u {
/* A difference that is too complex. */
struct hwloc_topology_diff_too_complex_s {
- hwloc_topology_diff_type_t type; /* must be HWLOC_TOPOLOGY_DIFF_TOO_COMPLEX */
+ hwloc_topology_diff_type_t type; /* must be ::HWLOC_TOPOLOGY_DIFF_TOO_COMPLEX */
union hwloc_topology_diff_u * next;
/* Where we had to stop computing the diff in the first topology */
unsigned obj_depth;
@@ -154,14 +154,14 @@ typedef union hwloc_topology_diff_u {
/** \brief Compute the difference between 2 topologies.
*
- * The difference is stored as a list of hwloc_topology_diff_t entries
+ * The difference is stored as a list of ::hwloc_topology_diff_t entries
* starting at \p diff.
* It is computed by doing a depth-first traversal of both topology trees
* simultaneously.
*
* If the difference between 2 objects is too complex to be represented
* (for instance if some objects have different types, or different numbers
- * of children), a special diff entry of type HWLOC_TOPOLOGY_DIFF_TOO_COMPLEX
+ * of children), a special diff entry of type ::HWLOC_TOPOLOGY_DIFF_TOO_COMPLEX
* is queued.
* The computation of the diff does not continue below these objects.
* So each such diff entry means that the difference between two subtrees
@@ -173,7 +173,7 @@ typedef union hwloc_topology_diff_u {
* between the topologies.
*
* \return 1 if the difference is too complex (see above). Some entries in
- * the list will be of type HWLOC_TOPOLOGY_DIFF_TOO_COMPLEX.
+ * the list will be of type ::HWLOC_TOPOLOGY_DIFF_TOO_COMPLEX.
*
* \return -1 on any other error.
*
@@ -183,7 +183,7 @@ typedef union hwloc_topology_diff_u {
*
* \note The output diff can only be exported to XML or passed to
* hwloc_topology_diff_apply() if 0 was returned, i.e. if no entry of type
- * HWLOC_TOPOLOGY_DIFF_TOO_COMPLEX is listed.
+ * ::HWLOC_TOPOLOGY_DIFF_TOO_COMPLEX is listed.
*
* \note The output diff may be modified by removing some entries from
* the list. The removed entries should be freed by passing them to
@@ -202,7 +202,7 @@ enum hwloc_topology_diff_apply_flags_e {
/** \brief Apply a topology diff to an existing topology.
*
- * \p flags is an OR'ed set of hwloc_topology_diff_apply_flags_e.
+ * \p flags is an OR'ed set of ::hwloc_topology_diff_apply_flags_e.
*
* The new topology is modified in place. hwloc_topology_dup()
* may be used to duplicate it before patching.
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/include/hwloc/helper.h b/src/pm/hydra/tools/topo/hwloc/hwloc/include/hwloc/helper.h
index 70d7d17..029f2a3 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/include/hwloc/helper.h
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/include/hwloc/helper.h
@@ -379,7 +379,7 @@ hwloc_get_ancestor_obj_by_type (hwloc_topology_t topology __hwloc_attribute_unus
return ancestor;
}
-/** \brief Returns the common parent object to objects lvl1 and lvl2 */
+/** \brief Returns the common parent object to objects \p obj1 and \p obj2 */
static __hwloc_inline hwloc_obj_t
hwloc_get_common_ancestor_obj (hwloc_topology_t topology __hwloc_attribute_unused, hwloc_obj_t obj1, hwloc_obj_t obj2) __hwloc_attribute_pure;
static __hwloc_inline hwloc_obj_t
@@ -442,19 +442,19 @@ hwloc_get_next_child (hwloc_topology_t topology __hwloc_attribute_unused, hwloc_
* Return the depth of the topology level that contains cache objects
* whose attributes match \p cachedepth and \p cachetype. This function
* intends to disambiguate the case where hwloc_get_type_depth() returns
- * \p HWLOC_TYPE_DEPTH_MULTIPLE.
+ * ::HWLOC_TYPE_DEPTH_MULTIPLE.
*
- * If no cache level matches, \p HWLOC_TYPE_DEPTH_UNKNOWN is returned.
+ * If no cache level matches, ::HWLOC_TYPE_DEPTH_UNKNOWN is returned.
*
- * If \p cachetype is \p HWLOC_OBJ_CACHE_UNIFIED, the depth of the
+ * If \p cachetype is ::HWLOC_OBJ_CACHE_UNIFIED, the depth of the
* unique matching unified cache level is returned.
*
- * If \p cachetype is \p HWLOC_OBJ_CACHE_DATA or \p HWLOC_OBJ_CACHE_INSTRUCTION,
+ * If \p cachetype is ::HWLOC_OBJ_CACHE_DATA or ::HWLOC_OBJ_CACHE_INSTRUCTION,
* either a matching cache, or a unified cache is returned.
*
* If \p cachetype is \c -1, it is ignored and multiple levels may
* match. The function returns either the depth of a uniquely matching
- * level or \p HWLOC_TYPE_DEPTH_MULTIPLE.
+ * level or ::HWLOC_TYPE_DEPTH_MULTIPLE.
*/
static __hwloc_inline int
hwloc_get_cache_type_depth (hwloc_topology_t topology,
@@ -941,7 +941,7 @@ hwloc_cpuset_to_nodeset(hwloc_topology_t topology, hwloc_const_cpuset_t _cpuset,
/** \brief Convert a CPU set into a NUMA node set without handling non-NUMA cases
*
- * This is the strict variant of ::hwloc_cpuset_to_nodeset. It does not fix
+ * This is the strict variant of hwloc_cpuset_to_nodeset(). It does not fix
* non-NUMA cases. If the topology contains some NUMA nodes, behave exactly
* the same. However, if the topology contains no NUMA nodes, return an empty
* nodeset.
@@ -993,7 +993,7 @@ hwloc_cpuset_from_nodeset(hwloc_topology_t topology, hwloc_cpuset_t _cpuset, hwl
/** \brief Convert a NUMA node set into a CPU set without handling non-NUMA cases
*
- * This is the strict variant of ::hwloc_cpuset_from_nodeset. It does not fix
+ * This is the strict variant of hwloc_cpuset_from_nodeset(). It does not fix
* non-NUMA cases. If the topology contains some NUMA nodes, behave exactly
* the same. However, if the topology contains no NUMA nodes, return an empty
* cpuset.
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/include/hwloc/linux.h b/src/pm/hydra/tools/topo/hwloc/hwloc/include/hwloc/linux.h
index 4ddc900..565bfee 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/include/hwloc/linux.h
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/include/hwloc/linux.h
@@ -1,6 +1,6 @@
/*
* Copyright © 2009 CNRS
- * Copyright © 2009-2013 Inria. All rights reserved.
+ * Copyright © 2009-2015 Inria. All rights reserved.
* Copyright © 2009-2011 Université Bordeaux
* See COPYING in top-level directory.
*/
@@ -55,14 +55,14 @@ HWLOC_DECLSPEC int hwloc_linux_set_tid_cpubind(hwloc_topology_t topology, pid_t
* but uses a hwloc cpuset.
*
* \note This is equivalent to calling hwloc_get_proc_cpubind() with
- * HWLOC_CPUBIND_THREAD as flags.
+ * ::HWLOC_CPUBIND_THREAD as flags.
*/
HWLOC_DECLSPEC int hwloc_linux_get_tid_cpubind(hwloc_topology_t topology, pid_t tid, hwloc_cpuset_t set);
/** \brief Get the last physical CPU where thread \p tid ran.
*
* \note This is equivalent to calling hwloc_get_proc_last_cpu_location() with
- * HWLOC_CPUBIND_THREAD as flags.
+ * ::HWLOC_CPUBIND_THREAD as flags.
*/
HWLOC_DECLSPEC int hwloc_linux_get_tid_last_cpu_location(hwloc_topology_t topology, pid_t tid, hwloc_bitmap_t set);
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
index 238a689..510157b 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/include/hwloc/plugins.h
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/include/hwloc/plugins.h
@@ -56,7 +56,7 @@ struct hwloc_disc_component {
*/
const char *name;
- /** \brief Component types to exclude, as an OR'ed set of HWLOC_DISC_COMPONENT_TYPE_*.
+ /** \brief Component types to exclude, as an OR'ed set of ::hwloc_disc_component_type_e.
*
* For a GLOBAL component, this usually includes all other types (~0).
*
@@ -121,7 +121,7 @@ struct hwloc_backend {
/** \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_* */
+ /** \brief Backend flags, as an OR'ed set of ::hwloc_backend_flag_e */
unsigned long flags;
/** \brief Backend-specific 'is_custom' property.
@@ -143,7 +143,7 @@ struct hwloc_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. */
+ * 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.
@@ -213,7 +213,7 @@ typedef enum hwloc_component_type_e {
* or dynamically loaded as a plugin.
*/
struct hwloc_component {
- /** \brief Component ABI version, set to HWLOC_COMPONENT_ABI */
+ /** \brief Component ABI version, set to ::HWLOC_COMPONENT_ABI */
unsigned abi;
/** \brief Process-wide component initialization callback.
@@ -379,7 +379,7 @@ hwloc_plugin_check_namespace(const char *pluginname __hwloc_attribute_unused, co
static int verboseenv_value = 0;
if (!verboseenv_checked) {
const char *verboseenv = getenv("HWLOC_PLUGINS_VERBOSE");
- verboseenv_value = atoi(verboseenv);
+ verboseenv_value = verboseenv ? atoi(verboseenv) : 0;
verboseenv_checked = 1;
}
if (verboseenv_value)
@@ -426,6 +426,8 @@ HWLOC_DECLSPEC int hwloc_pci_find_linkspeed(const unsigned char *config, unsigne
/** \brief Modify the PCI device object into a bridge and fill its attribute if a bridge is found in the PCI config space.
*
* This function requires 64 bytes of common configuration header at the beginning of config.
+ *
+ * Returns -1 and destroys /p obj if bridge fields are invalid.
*/
HWLOC_DECLSPEC int hwloc_pci_prepare_bridge(hwloc_obj_t obj, const unsigned char *config);
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 7b4b8a3..27a6f9d 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-2014 Inria. All rights reserved.
+ * Copyright © 2010-2015 Inria. All rights reserved.
* See COPYING in top-level directory.
*/
@@ -510,6 +510,7 @@ extern "C" {
/* private/debug.h */
+#define hwloc_debug_enabled HWLOC_NAME(debug_enabled)
#define hwloc_debug HWLOC_NAME(debug)
/* private/misc.h */
@@ -604,6 +605,10 @@ extern "C" {
#define hwloc_set_netbsd_hooks HWLOC_NAME(set_netbsd_hooks)
#define hwloc_set_hpux_hooks HWLOC_NAME(set_hpux_hooks)
+#define hwloc_look_hardwired_fujitsu_k HWLOC_NAME(look_hardwired_fujitsu_k)
+#define hwloc_look_hardwired_fujitsu_fx10 HWLOC_NAME(look_hardwired_fujitsu_fx10)
+#define hwloc_look_hardwired_fujitsu_fx100 HWLOC_NAME(look_hardwired_fujitsu_fx100)
+
#define hwloc_add_uname_info HWLOC_NAME(add_uname_info)
#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/cpuid-x86.h b/src/pm/hydra/tools/topo/hwloc/hwloc/include/private/cpuid-x86.h
index ca5cb97..9a5f544 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/include/private/cpuid-x86.h
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/include/private/cpuid-x86.h
@@ -73,11 +73,10 @@ static __hwloc_inline void hwloc_x86_cpuid(unsigned *eax, unsigned *ebx, unsigne
"+c" (*ecx), "=&d" (*edx));
#elif defined(HWLOC_X86_32_ARCH)
__asm__(
- "xchg %%ebx,%1\n\t"
+ "mov %%ebx,%1\n\t"
"cpuid\n\t"
"xchg %%ebx,%1\n\t"
- : "=a" (*eax), "=r" (*ebx), "=c"(*ecx), "=d" (*edx)
- : "0" (*eax), "2" (*ecx));
+ : "+a" (*eax), "=SD" (*ebx), "+c" (*ecx), "=d" (*edx));
#else
#error unknown architecture
#endif
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 4de91bf..2038a4c 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-2012 Inria. All rights reserved.
+ * Copyright © 2009-2015 Inria. All rights reserved.
* Copyright © 2009, 2011 Université Bordeaux
* Copyright © 2011 Cisco Systems, Inc. All rights reserved.
* See COPYING in top-level directory.
@@ -18,36 +18,57 @@
#include <stdio.h>
#endif
+#ifdef HWLOC_DEBUG
+static __hwloc_inline int hwloc_debug_enabled(void)
+{
+ static int checked = 0;
+ static int enabled = 1;
+ if (!checked) {
+ const char *env = getenv("HWLOC_DEBUG_VERBOSE");
+ if (env)
+ enabled = atoi(env);
+ if (enabled)
+ fprintf(stderr, "hwloc verbose debug enabled, may be disabled with HWLOC_DEBUG_VERBOSE=0 in the environment.\n");
+ checked = 1;
+ }
+ return enabled;
+}
+#endif
+
static __hwloc_inline void hwloc_debug(const char *s __hwloc_attribute_unused, ...)
{
#ifdef HWLOC_DEBUG
+ if (hwloc_debug_enabled()) {
va_list ap;
-
va_start(ap, s);
vfprintf(stderr, s, ap);
va_end(ap);
+ }
#endif
}
#ifdef HWLOC_DEBUG
#define hwloc_debug_bitmap(fmt, bitmap) do { \
+if (hwloc_debug_enabled()) { \
char *s; \
hwloc_bitmap_asprintf(&s, bitmap); \
fprintf(stderr, fmt, s); \
free(s); \
-} while (0)
+} } while (0)
#define hwloc_debug_1arg_bitmap(fmt, arg1, bitmap) do { \
+if (hwloc_debug_enabled()) { \
char *s; \
hwloc_bitmap_asprintf(&s, bitmap); \
fprintf(stderr, fmt, arg1, s); \
free(s); \
-} while (0)
+} } while (0)
#define hwloc_debug_2args_bitmap(fmt, arg1, arg2, bitmap) do { \
+if (hwloc_debug_enabled()) { \
char *s; \
hwloc_bitmap_asprintf(&s, bitmap); \
fprintf(stderr, fmt, arg1, arg2, s); \
free(s); \
-} while (0)
+} } while (0)
#else
#define hwloc_debug_bitmap(s, bitmap) do { } while(0)
#define hwloc_debug_1arg_bitmap(s, arg1, bitmap) do { } while(0)
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 0d59298..dafc266 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
@@ -192,6 +192,10 @@ extern void hwloc_set_netbsd_hooks(struct hwloc_binding_hooks *binding_hooks, st
extern void hwloc_set_hpux_hooks(struct hwloc_binding_hooks *binding_hooks, struct hwloc_topology_support *support);
#endif /* HWLOC_HPUX_SYS */
+extern int hwloc_look_hardwired_fujitsu_k(struct hwloc_topology *topology);
+extern int hwloc_look_hardwired_fujitsu_fx10(struct hwloc_topology *topology);
+extern int hwloc_look_hardwired_fujitsu_fx100(struct hwloc_topology *topology);
+
/* Insert uname-specific names/values in the object infos array.
* If cached_uname isn't NULL, it is used as a struct utsname instead of recalling uname.
* Any field that starts with \0 is ignored.
@@ -256,8 +260,13 @@ extern void hwloc_group_by_distances(struct hwloc_topology *topology);
} \
} while(0)
#else /* HAVE_USELOCALE */
+#if __HWLOC_HAVE_ATTRIBUTE_UNUSED
#define hwloc_localeswitch_declare int __dummy_nolocale __hwloc_attribute_unused
#define hwloc_localeswitch_init()
+#else
+#define hwloc_localeswitch_declare int __dummy_nolocale
+#define hwloc_localeswitch_init() (void)__dummy_nolocale
+#endif
#define hwloc_localeswitch_fini()
#endif /* HAVE_USELOCALE */
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 41aa35c..a241d70 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/src/Makefile.am
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/src/Makefile.am
@@ -118,7 +118,7 @@ sources += topology-solaris-chiptype.c
endif HWLOC_HAVE_SOLARIS
if HWLOC_HAVE_LINUX
-sources += topology-linux.c
+sources += topology-linux.c topology-hardwired.c
endif HWLOC_HAVE_LINUX
if HWLOC_HAVE_BGQ
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/src/base64.c b/src/pm/hydra/tools/topo/hwloc/hwloc/src/base64.c
index 7a3392f..4e1976f 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/src/base64.c
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/src/base64.c
@@ -178,7 +178,7 @@ hwloc_encode_to_base64(const char *src, size_t srclength, char *target, size_t t
if (datalength >= targsize)
return (-1);
target[datalength] = '\0'; /* Returned value doesn't count \0. */
- return (datalength);
+ return (int)(datalength);
}
/* skips all whitespace anywhere.
@@ -213,7 +213,7 @@ hwloc_decode_from_base64(char const *src, char *target, size_t targsize)
if (target) {
if (tarindex >= targsize)
return (-1);
- target[tarindex] = (pos - Base64) << 2;
+ target[tarindex] = (char)(pos - Base64) << 2;
}
state = 1;
break;
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 e2b5a06..afef5e8 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/src/bind.c
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/src/bind.c
@@ -2,7 +2,7 @@
* Copyright © 2009 CNRS
* Copyright © 2009-2011 inria. All rights reserved.
* Copyright © 2009-2010, 2012 Université Bordeaux
- * Copyright © 2011 Cisco Systems, Inc. All rights reserved.
+ * Copyright © 2011-2015 Cisco Systems, Inc. All rights reserved.
* See COPYING in top-level directory.
*/
@@ -74,9 +74,13 @@ hwloc_set_cpubind(hwloc_topology_t topology, hwloc_const_bitmap_t set, int flags
if (topology->binding_hooks.set_thisthread_cpubind)
return topology->binding_hooks.set_thisthread_cpubind(topology, set, flags);
} else {
- if (topology->binding_hooks.set_thisproc_cpubind)
- return topology->binding_hooks.set_thisproc_cpubind(topology, set, flags);
- else if (topology->binding_hooks.set_thisthread_cpubind)
+ if (topology->binding_hooks.set_thisproc_cpubind) {
+ int err = topology->binding_hooks.set_thisproc_cpubind(topology, set, flags);
+ if (err >= 0 || errno != ENOSYS)
+ return err;
+ /* ENOSYS, fallback */
+ }
+ if (topology->binding_hooks.set_thisthread_cpubind)
return topology->binding_hooks.set_thisthread_cpubind(topology, set, flags);
}
@@ -94,9 +98,13 @@ hwloc_get_cpubind(hwloc_topology_t topology, hwloc_bitmap_t set, int flags)
if (topology->binding_hooks.get_thisthread_cpubind)
return topology->binding_hooks.get_thisthread_cpubind(topology, set, flags);
} else {
- if (topology->binding_hooks.get_thisproc_cpubind)
- return topology->binding_hooks.get_thisproc_cpubind(topology, set, flags);
- else if (topology->binding_hooks.get_thisthread_cpubind)
+ if (topology->binding_hooks.get_thisproc_cpubind) {
+ int err = topology->binding_hooks.get_thisproc_cpubind(topology, set, flags);
+ if (err >= 0 || errno != ENOSYS)
+ return err;
+ /* ENOSYS, fallback */
+ }
+ if (topology->binding_hooks.get_thisthread_cpubind)
return topology->binding_hooks.get_thisthread_cpubind(topology, set, flags);
}
@@ -164,9 +172,13 @@ hwloc_get_last_cpu_location(hwloc_topology_t topology, hwloc_bitmap_t set, int f
if (topology->binding_hooks.get_thisthread_last_cpu_location)
return topology->binding_hooks.get_thisthread_last_cpu_location(topology, set, flags);
} else {
- if (topology->binding_hooks.get_thisproc_last_cpu_location)
- return topology->binding_hooks.get_thisproc_last_cpu_location(topology, set, flags);
- else if (topology->binding_hooks.get_thisthread_last_cpu_location)
+ if (topology->binding_hooks.get_thisproc_last_cpu_location) {
+ int err = topology->binding_hooks.get_thisproc_last_cpu_location(topology, set, flags);
+ if (err >= 0 || errno != ENOSYS)
+ return err;
+ /* ENOSYS, fallback */
+ }
+ if (topology->binding_hooks.get_thisthread_last_cpu_location)
return topology->binding_hooks.get_thisthread_last_cpu_location(topology, set, flags);
}
@@ -272,9 +284,13 @@ hwloc_set_membind_nodeset(hwloc_topology_t topology, hwloc_const_nodeset_t nodes
if (topology->binding_hooks.set_thisthread_membind)
return topology->binding_hooks.set_thisthread_membind(topology, nodeset, policy, flags);
} else {
- if (topology->binding_hooks.set_thisproc_membind)
- return topology->binding_hooks.set_thisproc_membind(topology, nodeset, policy, flags);
- else if (topology->binding_hooks.set_thisthread_membind)
+ if (topology->binding_hooks.set_thisproc_membind) {
+ int err = topology->binding_hooks.set_thisproc_membind(topology, nodeset, policy, flags);
+ if (err >= 0 || errno != ENOSYS)
+ return err;
+ /* ENOSYS, fallback */
+ }
+ if (topology->binding_hooks.set_thisthread_membind)
return topology->binding_hooks.set_thisthread_membind(topology, nodeset, policy, flags);
}
@@ -307,9 +323,13 @@ hwloc_get_membind_nodeset(hwloc_topology_t topology, hwloc_nodeset_t nodeset, hw
if (topology->binding_hooks.get_thisthread_membind)
return topology->binding_hooks.get_thisthread_membind(topology, nodeset, policy, flags);
} else {
- if (topology->binding_hooks.get_thisproc_membind)
- return topology->binding_hooks.get_thisproc_membind(topology, nodeset, policy, flags);
- else if (topology->binding_hooks.get_thisthread_membind)
+ if (topology->binding_hooks.get_thisproc_membind) {
+ int err = topology->binding_hooks.get_thisproc_membind(topology, nodeset, policy, flags);
+ if (err >= 0 || errno != ENOSYS)
+ return err;
+ /* ENOSYS, fallback */
+ }
+ if (topology->binding_hooks.get_thisthread_membind)
return topology->binding_hooks.get_thisthread_membind(topology, nodeset, policy, flags);
}
@@ -447,7 +467,7 @@ hwloc_get_area_membind(hwloc_topology_t topology, const void *addr, size_t len,
void *
hwloc_alloc_heap(hwloc_topology_t topology __hwloc_attribute_unused, size_t len)
{
- void *p;
+ void *p = NULL;
#if defined(hwloc_getpagesize) && defined(HAVE_POSIX_MEMALIGN)
errno = posix_memalign(&p, hwloc_getpagesize(), len);
if (errno)
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/src/bitmap.c b/src/pm/hydra/tools/topo/hwloc/hwloc/src/bitmap.c
index 1e78a96..d6b5c5e 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/src/bitmap.c
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/src/bitmap.c
@@ -241,7 +241,7 @@ int hwloc_bitmap_snprintf(char * __hwloc_restrict buf, size_t buflen, const stru
return -1;
ret += res;
if (res >= size)
- res = size>0 ? size - 1 : 0;
+ res = size>0 ? (int)size - 1 : 0;
tmp += res;
size -= res;
}
@@ -291,7 +291,7 @@ int hwloc_bitmap_snprintf(char * __hwloc_restrict buf, size_t buflen, const stru
#endif
if (res >= size)
- res = size>0 ? size - 1 : 0;
+ res = size>0 ? (int)size - 1 : 0;
tmp += res;
size -= res;
@@ -422,7 +422,7 @@ int hwloc_bitmap_list_snprintf(char * __hwloc_restrict buf, size_t buflen, const
ret += res;
if (res >= size)
- res = size>0 ? size - 1 : 0;
+ res = size>0 ? (int)size - 1 : 0;
tmp += res;
size -= res;
@@ -526,7 +526,7 @@ int hwloc_bitmap_taskset_snprintf(char * __hwloc_restrict buf, size_t buflen, co
return -1;
ret += res;
if (res >= size)
- res = size>0 ? size - 1 : 0;
+ res = size>0 ? (int)size - 1 : 0;
tmp += res;
size -= res;
}
@@ -562,7 +562,7 @@ int hwloc_bitmap_taskset_snprintf(char * __hwloc_restrict buf, size_t buflen, co
return -1;
ret += res;
if (res >= size)
- res = size>0 ? size - 1 : 0;
+ res = size>0 ? (int)size - 1 : 0;
tmp += res;
size -= res;
}
@@ -620,7 +620,7 @@ int hwloc_bitmap_taskset_sscanf(struct hwloc_bitmap_s *set, const char * __hwloc
}
/* we know there are other characters now */
- chars = strlen(current);
+ chars = (int)strlen(current);
count = (chars * 4 + HWLOC_BITS_PER_LONG - 1) / HWLOC_BITS_PER_LONG;
hwloc_bitmap_reset_by_ulongs(set, count);
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 dc656e3..aa0c8f9 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/src/components.c
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/src/components.c
@@ -520,11 +520,11 @@ hwloc_disc_components_enable_others(struct hwloc_topology *topology)
char c, d;
/* replace libpci with pci for backward compatibility with v1.6 */
- if (!strncmp(curenv, "libpci", s)) {
+ if (!strncmp(curenv, "libpci", 6) && s == 6) {
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)) {
+ } else if (curenv[0] == HWLOC_COMPONENT_EXCLUDE_CHAR && !strncmp(curenv+1, "libpci", 6) && s == 7 ) {
curenv[3] = curenv[0];
curenv[0] = curenv[1] = curenv[2] = *HWLOC_COMPONENT_SEPS;
curenv += 3;
@@ -583,7 +583,7 @@ nextname:
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 (curenv[0] == HWLOC_COMPONENT_EXCLUDE_CHAR && !strncmp(curenv+1, comp->name, s-1) && strlen(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);
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/src/pci-common.c b/src/pm/hydra/tools/topo/hwloc/hwloc/src/pci-common.c
index 01d4e79..367d386 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/src/pci-common.c
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/src/pci-common.c
@@ -6,6 +6,7 @@
#include <private/autogen/config.h>
#include <hwloc.h>
#include <hwloc/plugins.h>
+#include <private/private.h>
#include <private/debug.h>
#ifdef HWLOC_DEBUG
@@ -469,7 +470,7 @@ hwloc_pci_find_linkspeed(const unsigned char *config,
* 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 = speed <= 2 ? 2.5 * speed * 0.8 : 8.0 * 128/130; /* Gbit/s per lane */
+ lanespeed = speed <= 2 ? 2.5f * speed * 0.8f : 8.0f * 128/130; /* Gbit/s per lane */
*linkspeed = lanespeed * width / 8; /* GB/s */
return 0;
}
@@ -499,9 +500,14 @@ hwloc_pci_prepare_bridge(hwloc_obj_t obj,
battr = &obj->attr->bridge;
- if (config[HWLOC_PCI_PRIMARY_BUS] != pattr->bus)
+ if (config[HWLOC_PCI_PRIMARY_BUS] != pattr->bus) {
+ /* Sometimes the config space contains 00 instead of the actual primary bus number.
+ * Always trust the bus ID because it was built by the system which has more information
+ * to workaround such problems (e.g. ACPI information about PCI parent/children).
+ */
hwloc_debug(" %04x:%02x:%02x.%01x bridge with (ignored) invalid PCI_PRIMARY_BUS %02x\n",
pattr->domain, pattr->bus, pattr->dev, pattr->func, config[HWLOC_PCI_PRIMARY_BUS]);
+ }
obj->type = HWLOC_OBJ_BRIDGE;
battr->upstream_type = HWLOC_OBJ_BRIDGE_PCI;
@@ -510,5 +516,21 @@ hwloc_pci_prepare_bridge(hwloc_obj_t obj,
battr->downstream.pci.secondary_bus = config[HWLOC_PCI_SECONDARY_BUS];
battr->downstream.pci.subordinate_bus = config[HWLOC_PCI_SUBORDINATE_BUS];
+ if (battr->downstream.pci.secondary_bus <= pattr->bus
+ || battr->downstream.pci.subordinate_bus <= pattr->bus
+ || battr->downstream.pci.secondary_bus > battr->downstream.pci.subordinate_bus) {
+ /* This should catch most cases of invalid bridge information
+ * (e.g. 00 for secondary and subordinate).
+ * Ideally we would also check that [secondary-subordinate] is included
+ * in the parent bridge [secondary+1:subordinate]. But that's hard to do
+ * because objects may be discovered out of order (especially in the fsroot case).
+ */
+ hwloc_debug(" %04x:%02x:%02x.%01x bridge has invalid secondary-subordinate buses [%02x-%02x]\n",
+ pattr->domain, pattr->bus, pattr->dev, pattr->func,
+ battr->downstream.pci.secondary_bus, battr->downstream.pci.subordinate_bus);
+ hwloc_free_unlinked_object(obj);
+ return -1;
+ }
+
return 0;
}
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 1b98ba6..37812f3 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
@@ -585,7 +585,7 @@ hwloc_aix_alloc_membind(hwloc_topology_t topology, size_t len, hwloc_const_nodes
ret = ra_mmap(NULL, len, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0, R_RSET, rsid, aix_policy);
rs_free(rsid.at_rset);
- return ret;
+ return ret == (void*)-1 ? NULL : ret;
}
#endif /* P_DEFAULT */
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
index 1258b65..f3aec62 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-bgq.c
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-bgq.c
@@ -15,6 +15,8 @@
#include <spi/include/kernel/location.h>
#include <spi/include/kernel/process.h>
+#ifndef HWLOC_DISABLE_BGQ_PORT_TEST
+
static int
hwloc_look_bgq(struct hwloc_backend *backend)
{
@@ -239,3 +241,5 @@ const struct hwloc_component hwloc_bgq_component = {
0,
&hwloc_bgq_disc_component
};
+
+#endif /* !HWLOC_DISABLE_BGQ_PORT_TEST */
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-hardwired.c b/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-hardwired.c
new file mode 100644
index 0000000..03ffc83
--- /dev/null
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-hardwired.c
@@ -0,0 +1,191 @@
+/*
+ * Copyright © 2015 Inria. All rights reserved.
+ * See COPYING in top-level directory.
+ */
+
+#include <private/autogen/config.h>
+
+#include <hwloc.h>
+#include <private/private.h>
+
+int hwloc_look_hardwired_fujitsu_k(struct hwloc_topology *topology)
+{
+ /* FIXME: what if a broken core is disabled? */
+ unsigned i;
+ hwloc_obj_t obj;
+ hwloc_bitmap_t set;
+
+ for(i=0; i<8; i++) {
+ set = hwloc_bitmap_alloc();
+ hwloc_bitmap_set(set, i);
+
+ 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 = 32*1024;
+ obj->attr->cache.linesize = 128;
+ obj->attr->cache.associativity = 2;
+ hwloc_insert_object_by_cpuset(topology, obj);
+
+ 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 = 32*1024;
+ obj->attr->cache.linesize = 128;
+ obj->attr->cache.associativity = 2;
+ hwloc_insert_object_by_cpuset(topology, obj);
+
+ obj = hwloc_alloc_setup_object(HWLOC_OBJ_CORE, i);
+ obj->cpuset = set;
+ hwloc_insert_object_by_cpuset(topology, obj);
+ }
+
+ set = hwloc_bitmap_alloc();
+ hwloc_bitmap_set_range(set, 0, 7);
+
+ 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 = 6*1024*1024;
+ obj->attr->cache.linesize = 128;
+ obj->attr->cache.associativity = 12;
+ hwloc_insert_object_by_cpuset(topology, obj);
+
+ obj = hwloc_alloc_setup_object(HWLOC_OBJ_PACKAGE, 0);
+ obj->cpuset = set;
+ hwloc_obj_add_info(obj, "CPUVendor", "Fujitsu");
+ hwloc_obj_add_info(obj, "CPUModel", "SPARC64 VIIIfx");
+ hwloc_insert_object_by_cpuset(topology, obj);
+
+ hwloc_setup_pu_level(topology, 8);
+
+ return 0;
+}
+
+int hwloc_look_hardwired_fujitsu_fx10(struct hwloc_topology *topology)
+{
+ /* FIXME: what if a broken core is disabled? */
+ unsigned i;
+ hwloc_obj_t obj;
+ hwloc_bitmap_t set;
+
+ for(i=0; i<16; i++) {
+ set = hwloc_bitmap_alloc();
+ hwloc_bitmap_set(set, i);
+
+ 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 = 32*1024;
+ obj->attr->cache.linesize = 128;
+ obj->attr->cache.associativity = 2;
+ hwloc_insert_object_by_cpuset(topology, obj);
+
+ 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 = 32*1024;
+ obj->attr->cache.linesize = 128;
+ obj->attr->cache.associativity = 2;
+ hwloc_insert_object_by_cpuset(topology, obj);
+
+ obj = hwloc_alloc_setup_object(HWLOC_OBJ_CORE, i);
+ obj->cpuset = set;
+ hwloc_insert_object_by_cpuset(topology, obj);
+ }
+
+ set = hwloc_bitmap_alloc();
+ hwloc_bitmap_set_range(set, 0, 15);
+
+ 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 = 12*1024*1024;
+ obj->attr->cache.linesize = 128;
+ obj->attr->cache.associativity = 24;
+ hwloc_insert_object_by_cpuset(topology, obj);
+
+ obj = hwloc_alloc_setup_object(HWLOC_OBJ_PACKAGE, 0);
+ obj->cpuset = set;
+ hwloc_obj_add_info(obj, "CPUVendor", "Fujitsu");
+ hwloc_obj_add_info(obj, "CPUModel", "SPARC64 IXfx");
+ hwloc_insert_object_by_cpuset(topology, obj);
+
+ hwloc_setup_pu_level(topology, 16);
+
+ return 0;
+}
+
+int hwloc_look_hardwired_fujitsu_fx100(struct hwloc_topology *topology)
+{
+ /* FIXME: what if a broken core is disabled? */
+ unsigned i;
+ hwloc_obj_t obj;
+ hwloc_bitmap_t set;
+
+ for(i=0; i<34; i++) {
+ set = hwloc_bitmap_alloc();
+ hwloc_bitmap_set(set, i);
+
+ 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 = 64*1024;
+ obj->attr->cache.linesize = 256;
+ obj->attr->cache.associativity = 4;
+ hwloc_insert_object_by_cpuset(topology, obj);
+
+ 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 = 64*1024;
+ obj->attr->cache.linesize = 256;
+ obj->attr->cache.associativity = 4;
+ hwloc_insert_object_by_cpuset(topology, obj);
+
+ obj = hwloc_alloc_setup_object(HWLOC_OBJ_CORE, i);
+ obj->cpuset = set;
+ hwloc_insert_object_by_cpuset(topology, obj);
+ }
+
+ obj = hwloc_alloc_setup_object(HWLOC_OBJ_CACHE, -1);
+ obj->cpuset = hwloc_bitmap_alloc();
+ hwloc_bitmap_set_range(obj->cpuset, 0, 15);
+ hwloc_bitmap_set(obj->cpuset, 32);
+ obj->attr->cache.type = HWLOC_OBJ_CACHE_UNIFIED;
+ obj->attr->cache.depth = 2;
+ obj->attr->cache.size = 12*1024*1024;
+ obj->attr->cache.linesize = 256;
+ obj->attr->cache.associativity = 24;
+ hwloc_insert_object_by_cpuset(topology, obj);
+
+ obj = hwloc_alloc_setup_object(HWLOC_OBJ_CACHE, -1);
+ obj->cpuset = hwloc_bitmap_alloc();
+ hwloc_bitmap_set_range(obj->cpuset, 16, 31);
+ hwloc_bitmap_set(obj->cpuset, 33);
+ obj->attr->cache.type = HWLOC_OBJ_CACHE_UNIFIED;
+ obj->attr->cache.depth = 2;
+ obj->attr->cache.size = 12*1024*1024;
+ obj->attr->cache.linesize = 256;
+ obj->attr->cache.associativity = 24;
+ hwloc_insert_object_by_cpuset(topology, obj);
+
+ obj = hwloc_alloc_setup_object(HWLOC_OBJ_PACKAGE, 0);
+ obj->cpuset = hwloc_bitmap_alloc();
+ hwloc_bitmap_set_range(obj->cpuset, 0, 33);
+ hwloc_obj_add_info(obj, "CPUVendor", "Fujitsu");
+ hwloc_obj_add_info(obj, "CPUModel", "SPARC64 XIfx");
+ hwloc_insert_object_by_cpuset(topology, obj);
+
+ hwloc_setup_pu_level(topology, 34);
+
+ return 0;
+}
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 44a4a4c..44258cc 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
@@ -142,6 +142,7 @@ static void*
hwloc_hpux_alloc_membind(hwloc_topology_t topology, size_t len, hwloc_const_nodeset_t nodeset, hwloc_membind_policy_t policy, int flags)
{
int mmap_flags;
+ void *p;
/* Can not give a set of nodes. */
if (!hwloc_bitmap_isequal(nodeset, hwloc_topology_get_complete_nodeset(topology))) {
@@ -165,7 +166,8 @@ hwloc_hpux_alloc_membind(hwloc_topology_t topology, size_t len, hwloc_const_node
return NULL;
}
- return mmap(NULL, len, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS | mmap_flags, -1, 0);
+ p = mmap(NULL, len, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS | mmap_flags, -1, 0);
+ return p == MAP_FAILED ? NULL : p;
}
#endif /* MAP_MEM_FIRST_TOUCH */
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 2d9d4da..54490ff 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-2015 Inria. All rights reserved.
- * Copyright © 2009-2013 Université Bordeaux
+ * Copyright © 2009-2013, 2015 Université Bordeaux
* Copyright © 2009-2014 Cisco Systems, Inc. All rights reserved.
* Copyright © 2015 Intel, Inc. All rights reserved.
* Copyright © 2010 IBM
@@ -47,7 +47,8 @@ struct hwloc_linux_backend_data_s {
#ifdef HAVE_LIBUDEV_H
struct udev *udev; /* Global udev context */
#endif
-
+ char *dumped_hwdata_dirname;
+ int is_knl;
struct utsname utsname; /* fields contain \0 when unknown */
int deprecated_classlinks_model; /* -2 if never tried, -1 if unknown, 0 if new (device contains class/name), 1 if old (device contains class:name) */
@@ -61,8 +62,8 @@ struct hwloc_linux_backend_data_s {
* Misc Abstraction layers *
***************************/
-#if !(defined HWLOC_HAVE_SCHED_SETAFFINITY) && (defined HWLOC_HAVE__SYSCALL3)
-/* libc doesn't have support for sched_setaffinity, build system call
+#if !(defined HWLOC_HAVE_SCHED_SETAFFINITY) && (defined HWLOC_HAVE_SYSCALL)
+/* libc doesn't have support for sched_setaffinity, make system call
* ourselves: */
# include <linux/unistd.h>
# ifndef __NR_sched_setaffinity
@@ -96,7 +97,7 @@ struct hwloc_linux_backend_data_s {
# endif
# endif
# ifndef sched_setaffinity
- _syscall3(int, sched_setaffinity, pid_t, pid, unsigned int, lg, const void *, mask)
+# define sched_setaffinity(pid, lg, mask) syscall(__NR_sched_setaffinity, pid, lg, mask)
# endif
# ifndef __NR_sched_getaffinity
# ifdef __i386__
@@ -129,7 +130,7 @@ struct hwloc_linux_backend_data_s {
# endif
# endif
# ifndef sched_getaffinity
- _syscall3(int, sched_getaffinity, pid_t, pid, unsigned int, lg, void *, mask)
+# define sched_getaffinity(pid, lg, mask) (syscall(__NR_sched_getaffinity, pid, lg, mask) < 0 ? -1 : 0)
# endif
#endif
@@ -347,7 +348,7 @@ hwloc_linux_set_tid_cpubind(hwloc_topology_t topology __hwloc_attribute_unused,
#else /* HWLOC_HAVE_OLD_SCHED_SETAFFINITY */
return sched_setaffinity(tid, sizeof(linux_set), &linux_set);
#endif /* HWLOC_HAVE_OLD_SCHED_SETAFFINITY */
-#elif defined(HWLOC_HAVE__SYSCALL3)
+#elif defined(HWLOC_HAVE_SYSCALL)
unsigned long mask = hwloc_bitmap_to_ulong(hwloc_set);
#ifdef HWLOC_HAVE_OLD_SCHED_SETAFFINITY
@@ -355,10 +356,10 @@ hwloc_linux_set_tid_cpubind(hwloc_topology_t topology __hwloc_attribute_unused,
#else /* HWLOC_HAVE_OLD_SCHED_SETAFFINITY */
return sched_setaffinity(tid, sizeof(mask), (void*) &mask);
#endif /* HWLOC_HAVE_OLD_SCHED_SETAFFINITY */
-#else /* !_SYSCALL3 */
+#else /* !SYSCALL */
errno = ENOSYS;
return -1;
-#endif /* !_SYSCALL3 */
+#endif /* !SYSCALL */
}
#if defined(HWLOC_HAVE_CPU_SET_S) && !defined(HWLOC_HAVE_OLD_SCHED_SETAFFINITY)
@@ -427,7 +428,7 @@ 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");
+ possible = fopen("/sys/devices/system/cpu/possible", "r"); /* binding only supported in real fsroot, no need for data->root_fd */
if (possible) {
hwloc_bitmap_t possible_bitmap = hwloc_bitmap_alloc();
if (hwloc_linux_parse_cpuset_file(possible, possible_bitmap) == 0) {
@@ -510,7 +511,7 @@ hwloc_linux_get_tid_cpubind(hwloc_topology_t topology __hwloc_attribute_unused,
for(cpu=0; cpu<CPU_SETSIZE; cpu++)
if (CPU_ISSET(cpu, &linux_set))
hwloc_bitmap_set(hwloc_set, cpu);
-#elif defined(HWLOC_HAVE__SYSCALL3)
+#elif defined(HWLOC_HAVE_SYSCALL)
unsigned long mask;
#ifdef HWLOC_HAVE_OLD_SCHED_SETAFFINITY
@@ -522,10 +523,10 @@ hwloc_linux_get_tid_cpubind(hwloc_topology_t topology __hwloc_attribute_unused,
return -1;
hwloc_bitmap_from_ulong(hwloc_set, mask);
-#else /* !_SYSCALL3 */
+#else /* !SYSCALL */
errno = ENOSYS;
return -1;
-#endif /* !_SYSCALL3 */
+#endif /* !SYSCALL */
return 0;
}
@@ -2801,6 +2802,96 @@ look_powerpc_device_tree(struct hwloc_topology *topology,
free(cpus.p);
}
+/* Try to add memory-side caches for KNL.
+ * Returns 0 on success and -1 otherwise */
+static int hwloc_linux_try_add_knl_mcdram_caches(hwloc_topology_t topology, struct hwloc_linux_backend_data_s *data, hwloc_obj_t *nodes, unsigned nbnodes)
+{
+ char *knl_cache_file;
+ long long int cache_size = -1;
+ int associativity = -1;
+ int inclusiveness = -1;
+ int line_size = -1;
+ unsigned i;
+ FILE *f;
+ char buffer[512] = {0};
+ char *data_beg = NULL;
+ char *data_end = NULL;
+
+ if (asprintf(&knl_cache_file, "%s/knl_memoryside_cache", data->dumped_hwdata_dirname) < 0)
+ return -1;
+
+ hwloc_debug("Reading knl cache data from: %s\n", knl_cache_file);
+ f = hwloc_fopen(knl_cache_file, "r", data->root_fd);
+ if (!f) {
+ hwloc_debug("Unable to open KNL data file `%s' (%s)\n", knl_cache_file, strerror(errno));
+ free(knl_cache_file);
+ return -1;
+ }
+ free(knl_cache_file);
+
+ data_beg = &buffer[0];
+ data_end = data_beg + fread(buffer, 1, sizeof(buffer), f);
+
+ /* file must start with version information, only 1 accepted for now */
+ if (strncmp("version: 1\n", data_beg, strlen("version: 1\n"))) {
+ fprintf(stderr, "Invalid knl_memoryside_cache header, expected \"version: 1\".\n");
+ fclose(f);
+ return -1;
+ }
+ data_beg += strlen("version: 1\n");
+
+ while (data_beg < data_end) {
+ char *line_end = strstr(data_beg, "\n");
+ if (!line_end)
+ break;
+ if (!strncmp("cache_size:", data_beg, strlen("cache_size"))) {
+ sscanf(data_beg, "cache_size: %lld", &cache_size);
+ hwloc_debug("read cache_size=%lld\n", cache_size);
+ } else if (!strncmp("line_size:", data_beg, strlen("line_size:"))) {
+ sscanf(data_beg, "line_size: %d", &line_size);
+ hwloc_debug("read line_size=%d\n", line_size);
+ } else if (!strncmp("inclusiveness:", data_beg, strlen("inclusiveness:"))) {
+ sscanf(data_beg, "inclusiveness: %d", &inclusiveness);
+ hwloc_debug("read inclusiveness=%d\n", inclusiveness);
+ } else if (!strncmp("associativity:", data_beg, strlen("associativity:"))) {
+ sscanf(data_beg, "associativity: %d\n", &associativity);
+ hwloc_debug("read associativity=%d\n", associativity);
+ }
+ data_beg += line_end - data_beg +1;
+ }
+
+ fclose(f);
+
+ if (line_size == -1 || cache_size == -1 || associativity == -1 || inclusiveness == -1) {
+ hwloc_debug("Incorrect file format line_size=%d cache_size=%lld associativity=%d inclusiveness=%d\n",
+ line_size, cache_size, associativity, inclusiveness);
+ return -1;
+ }
+
+ for(i=0; i<nbnodes; i++) {
+ hwloc_obj_t cache;
+
+ if (hwloc_bitmap_iszero(nodes[i]->cpuset))
+ /* one L3 per DDR, none for MCDRAM nodes */
+ continue;
+
+ cache = hwloc_alloc_setup_object(HWLOC_OBJ_CACHE, -1);
+ if (!cache)
+ return -1;
+
+ cache->attr->cache.depth = 3;
+ cache->attr->cache.type = HWLOC_OBJ_CACHE_UNIFIED;
+ cache->attr->cache.associativity = associativity;
+ hwloc_obj_add_info(cache, "Inclusive", inclusiveness ? "1" : "0");
+ cache->attr->cache.size = cache_size;
+ cache->attr->cache.linesize = line_size;
+ cache->cpuset = hwloc_bitmap_dup(nodes[i]->cpuset);
+ hwloc_obj_add_info(cache, "Type", "MemorySideCache");
+ hwloc_insert_object_by_cpuset(topology, cache);
+ }
+ return 0;
+}
+
/**************************************
@@ -2838,18 +2929,17 @@ look_sysfsnode(struct hwloc_topology *topology,
else
return -1;
- if (nbnodes <= 1)
- {
- hwloc_bitmap_free(nodeset);
- return 0;
- }
+ if (!nbnodes || (nbnodes == 1 && !data->is_knl)) { /* always keep NUMA for KNL, or configs might look too different */
+ hwloc_bitmap_free(nodeset);
+ return 0;
+ }
/* For convenience, put these declarations inside a block. */
{
hwloc_obj_t * nodes = calloc(nbnodes, sizeof(hwloc_obj_t));
unsigned *indexes = calloc(nbnodes, sizeof(unsigned));
- float * distances;
+ float * distances = NULL;
int failednodes = 0;
unsigned index_;
@@ -2886,6 +2976,7 @@ look_sysfsnode(struct hwloc_topology *topology,
char nodepath[SYSFS_NUMA_NODE_PATH_LEN];
hwloc_bitmap_t cpuset;
hwloc_obj_t node, res_obj;
+ int annotate;
osnode = indexes[index_];
@@ -2897,32 +2988,43 @@ look_sysfsnode(struct hwloc_topology *topology,
continue;
}
- node = hwloc_alloc_setup_object(HWLOC_OBJ_NUMANODE, osnode);
- node->cpuset = cpuset;
- node->nodeset = hwloc_bitmap_alloc();
- hwloc_bitmap_set(node->nodeset, osnode);
-
+ node = hwloc_get_numanode_obj_by_os_index(topology, osnode);
+ annotate = (node != NULL);
+ if (!annotate) {
+ /* create a new node */
+ node = hwloc_alloc_setup_object(HWLOC_OBJ_NUMANODE, 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);
- if (node == res_obj) {
+
+ if (annotate) {
nodes[index_] = node;
} else {
- /* We got merged somehow, could be a buggy BIOS reporting wrong NUMA node cpuset.
- * This object disappeared, we'll ignore distances */
- failednodes++;
+ res_obj = hwloc_insert_object_by_cpuset(topology, node);
+ if (node == res_obj) {
+ nodes[index_] = node;
+ } else {
+ /* We got merged somehow, could be a buggy BIOS reporting wrong NUMA node cpuset.
+ * This object disappeared, we'll ignore distances */
+ failednodes++;
+ }
}
}
+ if (!failednodes && data->is_knl)
+ hwloc_linux_try_add_knl_mcdram_caches(topology, data, nodes, nbnodes);
+
if (failednodes) {
/* failed to read/create some nodes, don't bother reading/fixing
* a distance matrix that would likely be wrong anyway.
*/
nbnodes -= failednodes;
- distances = NULL;
- } else {
+ } else if (nbnodes > 1) {
distances = calloc(nbnodes*nbnodes, sizeof(float));
}
@@ -2944,6 +3046,46 @@ look_sysfsnode(struct hwloc_topology *topology,
hwloc_parse_node_distance(nodepath, nbnodes, distances+index_*nbnodes, data->root_fd);
}
+ if (data->is_knl) {
+ char *env = getenv("HWLOC_KNL_NUMA_QUIRK");
+ if (!(env && !atoi(env)) && nbnodes>=2) { /* SNC2 or SNC4, with 0 or 2/4 MCDRAM, and 0-4 DDR nodes */
+ unsigned i, j, closest;
+ for(i=0; i<nbnodes; i++) {
+ if (!hwloc_bitmap_iszero(nodes[i]->cpuset))
+ /* nodes with CPU, that's DDR, skip it */
+ continue;
+ hwloc_obj_add_info(nodes[i], "Type", "MCDRAM");
+
+ /* DDR is the closest node with CPUs */
+ closest = (unsigned)-1;
+ for(j=0; j<nbnodes; j++) {
+ if (j==i)
+ continue;
+ if (hwloc_bitmap_iszero(nodes[j]->cpuset))
+ /* nodes without CPU, that's another MCDRAM, skip it */
+ continue;
+ if (closest == (unsigned)-1 || distances[i*nbnodes+j]<distances[i*nbnodes+closest])
+ closest = j;
+ }
+ if (closest != (unsigned) -1) {
+ /* Add a Group for Cluster containing this MCDRAM + DDR */
+ hwloc_obj_t cluster = hwloc_alloc_setup_object(HWLOC_OBJ_GROUP, -1);
+ cluster->cpuset = hwloc_bitmap_dup(nodes[i]->cpuset);
+ cluster->nodeset = hwloc_bitmap_dup(nodes[i]->nodeset);
+ hwloc_bitmap_or(cluster->cpuset, cluster->cpuset, nodes[closest]->cpuset);
+ hwloc_bitmap_or(cluster->nodeset, cluster->nodeset, nodes[closest]->nodeset);
+ hwloc_obj_add_info(cluster, "Type", "Cluster");
+ hwloc_insert_object_by_cpuset(topology, cluster);
+ }
+ }
+ /* drop the distance matrix, it contradicts the above NUMA layout groups */
+ free(distances);
+ free(nodes);
+ free(indexes);
+ goto out;
+ }
+ }
+
hwloc_distances_set(topology, HWLOC_OBJ_NUMANODE, nbnodes, indexes, nodes, distances, 0 /* OS cannot force */);
}
@@ -3134,11 +3276,11 @@ package_done:
hwloc_bitmap_set(core->cpuset, i);
} else {
core->cpuset = coreset;
+ coreset = NULL; /* don't free it */
}
hwloc_debug_1arg_bitmap("os core %u has cpuset %s\n",
- mycoreid, coreset);
+ mycoreid, core->cpuset);
hwloc_insert_object_by_cpuset(topology, core);
- coreset = NULL; /* don't free it */
}
/* look at the books */
@@ -3224,6 +3366,11 @@ package_done:
kB = atol(str2); /* in kB */
fclose(fd);
}
+ /* KNL reports L3 with size=0 and full cpuset in cpuid.
+ * Let hwloc_linux_try_add_knl_mcdram_cache() detect it better.
+ */
+ if (!kB && depth == 2 && data->is_knl)
+ continue;
/* get the line size */
sprintf(mappath, "%s/cpu%d/cache/index%d/coherency_line_size", path, i, j);
@@ -3459,6 +3606,7 @@ hwloc_linux_parse_cpuinfo_generic(const char *prefix, const char *value,
return 0;
}
+/* Lprocs_p set to NULL unless returns > 0 */
static int
hwloc_linux_parse_cpuinfo(struct hwloc_linux_backend_data_s *data,
const char *path,
@@ -3606,6 +3754,7 @@ hwloc_linux_parse_cpuinfo(struct hwloc_linux_backend_data_s *data,
fclose(fd);
free(str);
free(Lprocs);
+ *Lprocs_p = NULL;
return -1;
}
@@ -3625,18 +3774,13 @@ hwloc_linux_free_cpuinfo(struct hwloc_linux_cpuinfo_proc * Lprocs, unsigned nump
static int
look_cpuinfo(struct hwloc_topology *topology,
- struct hwloc_linux_backend_data_s *data,
- const char *path, hwloc_bitmap_t online_cpuset)
+ struct hwloc_linux_cpuinfo_proc * Lprocs,
+ unsigned numprocs, hwloc_bitmap_t online_cpuset)
{
- struct hwloc_linux_cpuinfo_proc * Lprocs = NULL;
- struct hwloc_obj_info_s *global_infos = NULL;
- unsigned global_infos_count = 0;
/* P for physical/OS index, L for logical (e.g. in we order we get them, not in the final hwloc logical order) */
unsigned *Lcore_to_Pcore;
unsigned *Lcore_to_Ppkg; /* needed because Lcore is equivalent to Pcore+Ppkg, not to Pcore alone */
unsigned *Lpkg_to_Ppkg;
- int _numprocs;
- unsigned numprocs;
unsigned numpkgs=0;
unsigned numcores=0;
unsigned long Lproc;
@@ -3645,20 +3789,6 @@ look_cpuinfo(struct hwloc_topology *topology,
unsigned i,j;
hwloc_bitmap_t cpuset;
- /* parse the entire cpuinfo first, fill the Lprocs array and numprocs */
- _numprocs = hwloc_linux_parse_cpuinfo(data, path, &Lprocs, &global_infos, &global_infos_count);
-
-
- /* setup root info */
- hwloc__move_infos(&hwloc_get_root_obj(topology)->infos, &hwloc_get_root_obj(topology)->infos_count,
- &global_infos, &global_infos_count);
-
-
- if (_numprocs <= 0)
- /* found no processor */
- return -1;
- numprocs = _numprocs;
-
/* initialize misc arrays, there can be at most numprocs entries */
Lcore_to_Pcore = malloc(numprocs * sizeof(*Lcore_to_Pcore));
Lcore_to_Ppkg = malloc(numprocs * sizeof(*Lcore_to_Ppkg));
@@ -3713,7 +3843,7 @@ look_cpuinfo(struct hwloc_topology *topology,
* provide bogus information. We should rather drop it. */
missingpkg=0;
for(j=0; j<numprocs; j++)
- if (Lprocs[i].Ppkg == -1) {
+ if (Lprocs[j].Ppkg == -1) {
missingpkg=1;
break;
}
@@ -3757,7 +3887,7 @@ look_cpuinfo(struct hwloc_topology *topology,
* provide bogus information. We should rather drop it. */
missingcore=0;
for(j=0; j<numprocs; j++)
- if (Lprocs[i].Pcore == -1) {
+ if (Lprocs[j].Pcore == -1) {
missingcore=1;
break;
}
@@ -3779,10 +3909,6 @@ look_cpuinfo(struct hwloc_topology *topology,
free(Lcore_to_Pcore);
free(Lcore_to_Ppkg);
free(Lpkg_to_Ppkg);
-
- hwloc_linux_free_cpuinfo(Lprocs, numprocs, global_infos, global_infos_count);
-
- look_powerpc_device_tree(topology, data);
return 0;
}
@@ -3898,6 +4024,52 @@ hwloc_gather_system_info(struct hwloc_topology *topology,
}
}
+/* returns 0 on success, -1 on non-match or error during hardwired load */
+static int
+hwloc_linux_try_hardwired_cpuinfo(struct hwloc_backend *backend)
+{
+ struct hwloc_topology *topology = backend->topology;
+ struct hwloc_linux_backend_data_s *data = backend->private_data;
+ FILE *fd;
+ char line[128];
+
+ if (getenv("HWLOC_NO_HARDWIRED_TOPOLOGY"))
+ return -1;
+
+ if (!strcmp(data->utsname.machine, "s64fx")) {
+ /* Fujistu K-computer, FX10, and FX100 use specific processors
+ * whose Linux topology support is broken until 4.1 (acc455cffa75070d55e74fc7802b49edbc080e92and)
+ * and existing machines will likely never be fixed by kernel upgrade.
+ */
+
+ /* /proc/cpuinfo starts with one of these lines:
+ * "cpu : Fujitsu SPARC64 VIIIfx"
+ * "cpu : Fujitsu SPARC64 XIfx"
+ * "cpu : Fujitsu SPARC64 IXfx"
+ */
+ fd = hwloc_fopen("/proc/cpuinfo", "r", data->root_fd);
+ if (!fd)
+ return -1;
+
+ if (!fgets(line, sizeof(line), fd)) {
+ fclose(fd);
+ return -1;
+ }
+ fclose(fd);
+
+ if (strncmp(line, "cpu ", 4))
+ return -1;
+
+ if (strstr(line, "Fujitsu SPARC64 VIIIfx"))
+ return hwloc_look_hardwired_fujitsu_k(topology);
+ else if (strstr(line, "Fujitsu SPARC64 IXfx"))
+ return hwloc_look_hardwired_fujitsu_fx10(topology);
+ else if (strstr(line, "FUJITSU SPARC64 XIfx"))
+ return hwloc_look_hardwired_fujitsu_fx100(topology);
+ }
+ return -1;
+}
+
static int
hwloc_look_linuxfs(struct hwloc_backend *backend)
{
@@ -3906,17 +4078,58 @@ hwloc_look_linuxfs(struct hwloc_backend *backend)
DIR *nodes_dir;
unsigned nbnodes;
char *cpuset_mntpnt, *cgroup_mntpnt, *cpuset_name = NULL;
+ struct hwloc_linux_cpuinfo_proc * Lprocs = NULL;
+ struct hwloc_obj_info_s *global_infos = NULL;
+ unsigned global_infos_count = 0;
+ int numprocs = 0;
+ int already_pus;
int err;
- if (topology->levels[0][0]->cpuset)
- /* somebody discovered things */
- return 0;
+ already_pus = (topology->levels[0][0]->complete_cpuset != NULL
+ && !hwloc_bitmap_iszero(topology->levels[0][0]->complete_cpuset));
+ /* if there are PUs, still look at memory information
+ * since x86 misses NUMA node information (unless the processor supports topoext)
+ * memory size.
+ */
+
+ /* allocate root sets in case not done yet */
+ hwloc_alloc_obj_cpusets(topology->levels[0][0]);
+ /*********************************
+ * Platform information for later
+ */
hwloc_gather_system_info(topology, data);
- hwloc_alloc_obj_cpusets(topology->levels[0][0]);
+ /**********************
+ * /proc/cpuinfo
+ */
+ numprocs = hwloc_linux_parse_cpuinfo(data, "/proc/cpuinfo", &Lprocs, &global_infos, &global_infos_count);
- /* Gather the list of admin-disabled cpus and mems */
+ /* detect models for quirks */
+ if (numprocs > 0) {
+ /* KNL */
+ if (!strncmp(data->utsname.machine, "x86", 3)) { /* supports 32bits? */
+ unsigned i;
+ const char *cpuvendor = NULL, *cpufamilynumber = NULL, *cpumodelnumber = NULL;
+ for(i=0; i<Lprocs[0].infos_count; i++) {
+ if (!strcmp(Lprocs[0].infos[i].name, "CPUVendor")) {
+ cpuvendor = Lprocs[0].infos[i].value;
+ } else if (!strcmp(Lprocs[0].infos[i].name, "CPUFamilyNumber")) {
+ cpufamilynumber = Lprocs[0].infos[i].value;
+ } else if (!strcmp(Lprocs[0].infos[i].name, "CPUModelNumber")) {
+ cpumodelnumber = Lprocs[0].infos[i].value;
+ }
+ }
+ if (cpuvendor && !strcmp(cpuvendor, "GenuineIntel")
+ && cpufamilynumber && !strcmp(cpufamilynumber, "6")
+ && cpumodelnumber && !strcmp(cpumodelnumber, "87"))
+ data->is_knl = 1;
+ }
+ }
+
+ /**********************
+ * Gather the list of admin-disabled cpus and mems
+ */
hwloc_find_linux_cpuset_mntpnt(&cgroup_mntpnt, &cpuset_mntpnt, data->root_fd);
if (cgroup_mntpnt || cpuset_mntpnt) {
cpuset_name = hwloc_read_linux_cpuset_name(data->root_fd, topology->pid);
@@ -3936,6 +4149,10 @@ hwloc_look_linuxfs(struct hwloc_backend *backend)
hwloc_obj_t machine;
hwloc_bitmap_t machine_online_set;
+ if (already_pus)
+ /* we don't support extending kerrighed topologies */
+ return 0;
+
/* replace top-level object type with SYSTEM and add some MACHINE underneath */
topology->levels[0][0]->type = HWLOC_OBJ_SYSTEM;
@@ -3944,13 +4161,19 @@ hwloc_look_linuxfs(struct hwloc_backend *backend)
/* No cpuset support for now. */
/* No sys support for now. */
while ((dirent = readdir(nodes_dir)) != NULL) {
+ struct hwloc_linux_cpuinfo_proc * machine_Lprocs = NULL;
+ struct hwloc_obj_info_s *machine_global_infos = NULL;
+ unsigned machine_global_infos_count = 0;
+ int machine_numprocs = 0;
unsigned long node;
if (strncmp(dirent->d_name, "node", 4))
continue;
machine_online_set = hwloc_bitmap_alloc();
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);
+ machine_numprocs = hwloc_linux_parse_cpuinfo(data, path, &machine_Lprocs, &machine_global_infos, &machine_global_infos_count);
+ err = look_cpuinfo(topology, machine_Lprocs, machine_numprocs, machine_online_set);
+ hwloc_linux_free_cpuinfo(machine_Lprocs, machine_numprocs, machine_global_infos, machine_global_infos_count);
if (err < 0) {
hwloc_bitmap_free(machine_online_set);
continue;
@@ -3972,6 +4195,10 @@ hwloc_look_linuxfs(struct hwloc_backend *backend)
}
closedir(nodes_dir);
} else {
+ /*********************
+ * Memory information
+ */
+
/* Get the machine memory attributes */
hwloc_get_procfs_meminfo_info(topology, data, &topology->levels[0][0]->memory);
@@ -3988,7 +4215,23 @@ hwloc_look_linuxfs(struct hwloc_backend *backend)
topology->levels[0][0]->memory.page_types[i].count = 0;
}
+ /**********************
+ * CPU information
+ */
+
+ /* Don't rediscover CPU resources if already done */
+ if (already_pus)
+ goto done;
+
/* Gather the list of cpus now */
+ err = hwloc_linux_try_hardwired_cpuinfo(backend);
+ if (!err)
+ goto done;
+
+ /* setup root info */
+ hwloc__move_infos(&hwloc_get_root_obj(topology)->infos, &hwloc_get_root_obj(topology)->infos_count,
+ &global_infos, &global_infos_count);
+
if (getenv("HWLOC_LINUX_USE_CPUINFO")
|| (hwloc_access("/sys/devices/system/cpu/cpu0/topology/core_siblings", R_OK, data->root_fd) < 0
&& hwloc_access("/sys/devices/system/cpu/cpu0/topology/thread_siblings", R_OK, data->root_fd) < 0
@@ -3996,26 +4239,28 @@ hwloc_look_linuxfs(struct hwloc_backend *backend)
&& hwloc_access("/sys/bus/cpu/devices/cpu0/topology/core_siblings", R_OK, data->root_fd) < 0)) {
/* revert to reading cpuinfo only if /sys/.../topology unavailable (before 2.6.16)
* or not containing anything interesting */
- err = look_cpuinfo(topology, data, "/proc/cpuinfo", topology->levels[0][0]->online_cpuset);
+ if (numprocs > 0)
+ err = look_cpuinfo(topology, Lprocs, numprocs, topology->levels[0][0]->online_cpuset);
+ else
+ err = -1;
if (err < 0)
hwloc_linux_fallback_pu_level(topology);
+ look_powerpc_device_tree(topology, data);
} else {
- struct hwloc_linux_cpuinfo_proc * Lprocs = NULL;
- struct hwloc_obj_info_s *global_infos = NULL;
- unsigned global_infos_count = 0;
- int numprocs = hwloc_linux_parse_cpuinfo(data, "/proc/cpuinfo", &Lprocs, &global_infos, &global_infos_count);
- if (numprocs <= 0)
- Lprocs = NULL;
+ /* sysfs */
if (look_sysfscpu(topology, data, "/sys/bus/cpu/devices", Lprocs, numprocs) < 0)
if (look_sysfscpu(topology, data, "/sys/devices/system/cpu", Lprocs, numprocs) < 0)
/* sysfs but we failed to read cpu topology, fallback */
hwloc_linux_fallback_pu_level(topology);
- hwloc__move_infos(&hwloc_get_root_obj(topology)->infos, &hwloc_get_root_obj(topology)->infos_count,
- &global_infos, &global_infos_count);
- hwloc_linux_free_cpuinfo(Lprocs, numprocs, global_infos, global_infos_count);
}
+ done:
+
+ /**********************
+ * Misc
+ */
+
/* Gather DMI info */
hwloc__get_dmi_id_info(data, topology->levels[0][0]);
if (hwloc_topology_get_flags(topology) & (HWLOC_TOPOLOGY_FLAG_IO_DEVICES|HWLOC_TOPOLOGY_FLAG_WHOLE_IO))
@@ -4033,6 +4278,7 @@ hwloc_look_linuxfs(struct hwloc_backend *backend)
/* data->utsname was filled with real uname or \0, we can safely pass it */
hwloc_add_uname_info(topology, &data->utsname);
+ hwloc_linux_free_cpuinfo(Lprocs, numprocs, global_infos, global_infos_count);
return 1;
}
@@ -4413,20 +4659,30 @@ hwloc_linux_block_class_fillinfos(struct hwloc_backend *backend,
if (!dev)
return;
prop = udev_device_get_property_value(dev, "ID_VENDOR");
- if (prop)
- strcpy(vendor, prop);
+ if (prop) {
+ strncpy(vendor, prop, sizeof(vendor));
+ vendor[sizeof(vendor)-1] = '\0';
+ }
prop = udev_device_get_property_value(dev, "ID_MODEL");
- if (prop)
- strcpy(model, prop);
+ if (prop) {
+ strncpy(model, prop, sizeof(model));
+ model[sizeof(model)-1] = '\0';
+ }
prop = udev_device_get_property_value(dev, "ID_REVISION");
- if (prop)
- strcpy(revision, prop);
+ if (prop) {
+ strncpy(revision, prop, sizeof(revision));
+ revision[sizeof(revision)-1] = '\0';
+ }
prop = udev_device_get_property_value(dev, "ID_SERIAL_SHORT");
- if (prop)
- strcpy(serial, prop);
+ if (prop) {
+ strncpy(serial, prop, sizeof(serial));
+ serial[sizeof(serial)-1] = '\0';
+ }
prop = udev_device_get_property_value(dev, "ID_TYPE");
- if (prop)
- strcpy(blocktype, prop);
+ if (prop) {
+ strncpy(blocktype, prop, sizeof(blocktype));
+ blocktype[sizeof(blocktype)-1] = '\0';
+ }
udev_device_unref(dev);
} else
@@ -4443,15 +4699,20 @@ hwloc_linux_block_class_fillinfos(struct hwloc_backend *backend,
if (tmp)
*tmp = '\0';
if (!strncmp(line, "E:ID_VENDOR=", strlen("E:ID_VENDOR="))) {
- strcpy(vendor, line+strlen("E:ID_VENDOR="));
+ strncpy(vendor, line+strlen("E:ID_VENDOR="), sizeof(vendor));
+ vendor[sizeof(vendor)-1] = '\0';
} else if (!strncmp(line, "E:ID_MODEL=", strlen("E:ID_MODEL="))) {
- strcpy(model, line+strlen("E:ID_MODEL="));
+ strncpy(model, line+strlen("E:ID_MODEL="), sizeof(model));
+ model[sizeof(model)-1] = '\0';
} else if (!strncmp(line, "E:ID_REVISION=", strlen("E:ID_REVISION="))) {
- strcpy(revision, line+strlen("E:ID_REVISION="));
+ strncpy(revision, line+strlen("E:ID_REVISION="), sizeof(revision));
+ revision[sizeof(revision)-1] = '\0';
} else if (!strncmp(line, "E:ID_SERIAL_SHORT=", strlen("E:ID_SERIAL_SHORT="))) {
- strcpy(serial, line+strlen("E:ID_SERIAL_SHORT="));
+ strncpy(serial, line+strlen("E:ID_SERIAL_SHORT="), sizeof(serial));
+ serial[sizeof(serial)-1] = '\0';
} else if (!strncmp(line, "E:ID_TYPE=", strlen("E:ID_TYPE="))) {
- strcpy(blocktype, line+strlen("E:ID_TYPE="));
+ strncpy(blocktype, line+strlen("E:ID_TYPE="), sizeof(blocktype));
+ blocktype[sizeof(blocktype)-1] = '\0';
}
}
fclose(fd);
@@ -4592,6 +4853,14 @@ hwloc_linux_lookup_block_class(struct hwloc_backend *backend,
strcpy(path, pcidevpath);
pathlen = strlen(path);
+ /* look for a direct block device here (such as NVMe, something without controller subdirs in the middle) */
+ res += hwloc_linux_class_readdir(backend, pcidev, path,
+ HWLOC_OBJ_OSDEV_BLOCK, "block",
+ hwloc_linux_block_class_fillinfos);
+ if (res)
+ return res;
+ /* otherwise try to find controller subdirectories */
+
devicedir = hwloc_opendir(pcidevpath, root_fd);
if (!devicedir)
return 0;
@@ -4772,7 +5041,7 @@ hwloc_linux_directlookup_mic_class(struct hwloc_backend *backend,
/* read the entire class and find the max id of mic%u dirents */
dir = hwloc_opendir("/sys/devices/virtual/mic", root_fd);
if (!dir) {
- dir = opendir("/sys/class/mic");
+ dir = hwloc_opendir("/sys/class/mic", root_fd);
if (!dir)
return 0;
}
@@ -4919,12 +5188,14 @@ hwloc_linux_component_instantiate(struct hwloc_disc_component *component,
}
backend->private_data = data;
+ backend->flags = HWLOC_BACKEND_FLAG_NEED_LEVELS;
backend->discover = hwloc_look_linuxfs;
backend->get_obj_cpuset = hwloc_linux_backend_get_obj_cpuset;
backend->notify_new_object = hwloc_linux_backend_notify_new_object;
backend->disable = hwloc_linux_backend_disable;
/* default values */
+ data->is_knl = 0;
data->is_real_fsroot = 1;
if (!fsroot_path)
fsroot_path = "/";
@@ -4964,6 +5235,10 @@ hwloc_linux_component_instantiate(struct hwloc_disc_component *component,
}
#endif
+ data->dumped_hwdata_dirname = getenv("HWLOC_DUMPED_HWDATA_DIR");
+ if (!data->dumped_hwdata_dirname)
+ data->dumped_hwdata_dirname = "/var/run/hwloc/";
+
data->deprecated_classlinks_model = -2; /* never tried */
data->mic_need_directlookup = -1; /* not initialized */
data->mic_directlookup_id_max = -1; /* not initialized */
@@ -5134,7 +5409,8 @@ hwloc_look_linuxfs_pci(struct hwloc_backend *backend)
fclose(file);
/* is this a bridge? */
- hwloc_pci_prepare_bridge(obj, config_space_cache);
+ if (hwloc_pci_prepare_bridge(obj, config_space_cache) < 0)
+ continue;
/* get the revision */
attr->revision = config_space_cache[HWLOC_PCI_REVISION_ID];
@@ -5170,10 +5446,8 @@ hwloc_look_linuxfs_pci(struct hwloc_backend *backend)
while (obj) {
if (obj->attr->pcidev.domain == domain
&& obj->attr->pcidev.bus == bus
- && obj->attr->pcidev.dev == dev
- && obj->attr->pcidev.func == 0) {
+ && obj->attr->pcidev.dev == dev) {
hwloc_obj_add_info(obj, "PCISlot", dirent->d_name);
- break;
}
obj = obj->next_sibling;
}
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-osf.c b/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-osf.c
index 5715888..b403d13 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-osf.c
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-osf.c
@@ -1,6 +1,6 @@
/*
* Copyright © 2009 CNRS
- * Copyright © 2009-2014 Inria. All rights reserved.
+ * Copyright © 2009-2015 Inria. All rights reserved.
* Copyright © 2009-2011 Université Bordeaux
* Copyright © 2011 Cisco Systems, Inc. All rights reserved.
* See COPYING in top-level directory.
@@ -234,7 +234,7 @@ hwloc_osf_alloc_membind(hwloc_topology_t topology, size_t len, hwloc_const_nodes
ptr = nmmap(NULL, len, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1,
0, &mattr);
radsetdestroy(&mattr.mattr_radset);
- return ptr;
+ return ptr == MAP_FAILED ? NULL : ptr;
}
static int
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 3a3ad6b..779bf17 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
@@ -1,8 +1,10 @@
/*
* Copyright © 2009 CNRS
- * Copyright © 2009-2014 Inria. All rights reserved.
+ * Copyright © 2009-2015 Inria. All rights reserved.
* Copyright © 2009-2011, 2013 Université Bordeaux
* Copyright © 2014 Cisco Systems, Inc. All rights reserved.
+ * Copyright © 2015 Research Organization for Information Science
+ * and Technology (RIST). All rights reserved.
* See COPYING in top-level directory.
*/
@@ -206,7 +208,8 @@ hwloc_look_pci(struct hwloc_backend *backend)
if (offset > 0 && offset + 20 /* size of PCI express block up to link status */ <= CONFIG_SPACE_CACHESIZE)
hwloc_pci_find_linkspeed(config_space_cache, offset, &obj->attr->pcidev.linkspeed);
- hwloc_pci_prepare_bridge(obj, config_space_cache);
+ if (hwloc_pci_prepare_bridge(obj, config_space_cache) < 0)
+ continue;
if (obj->type == HWLOC_OBJ_PCI_DEVICE) {
memcpy(&tmp16, &config_space_cache[PCI_SUBSYSTEM_VENDOR_ID], sizeof(tmp16));
@@ -273,10 +276,8 @@ hwloc_look_pci(struct hwloc_backend *backend)
while (obj) {
if (obj->attr->pcidev.domain == domain
&& obj->attr->pcidev.bus == bus
- && obj->attr->pcidev.dev == dev
- && obj->attr->pcidev.func == 0) {
+ && obj->attr->pcidev.dev == dev) {
hwloc_obj_add_info(obj, "PCISlot", dirent->d_name);
- break;
}
obj = obj->next_sibling;
}
@@ -305,7 +306,12 @@ hwloc_pci_component_instantiate(struct hwloc_disc_component *component,
if (!backend)
return NULL;
backend->flags = HWLOC_BACKEND_FLAG_NEED_LEVELS;
- backend->discover = hwloc_look_pci;
+#ifdef HWLOC_SOLARIS_SYS
+ if ((uid_t)0 != geteuid())
+ backend->discover = NULL;
+ else
+#endif
+ backend->discover = hwloc_look_pci;
return backend;
}
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 cd0e5aa..255c5fc 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
@@ -732,7 +732,6 @@ hwloc_look_solaris(struct hwloc_backend *backend)
hwloc_look_lgrp(topology);
#endif /* HAVE_LIBLGRP */
#ifdef HAVE_LIBKSTAT
- nbprocs = 0;
if (hwloc_look_kstat(topology) > 0)
alreadypus = 1;
#endif /* HAVE_LIBKSTAT */
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 db7087b..5e7a426 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
@@ -60,7 +60,7 @@ hwloc_synthetic_process_level_indexes(struct hwloc_synthetic_backend_data_s *dat
unsigned long length = curlevel->index_string_length;
unsigned *array = NULL;
struct hwloc_synthetic_intlv_loop_s * loops = NULL;
- unsigned long i;
+ size_t i;
if (!attr)
return;
@@ -198,7 +198,7 @@ hwloc_synthetic_process_level_indexes(struct hwloc_synthetic_backend_data_s *dat
&& cachetypeattr != (hwloc_obj_cache_type_t) -1
&& cachetypeattr != data->level[i].cachetype)
continue;
- loops[cur_loop].level_depth = i;
+ loops[cur_loop].level_depth = (unsigned)i;
break;
}
if (i == curleveldepth) {
@@ -326,7 +326,7 @@ hwloc_synthetic_parse_level_attrs(const char *attrs, const char **next_posp,
const char *next_pos;
hwloc_uint64_t memorysize = 0;
const char *index_string = NULL;
- unsigned long index_string_length = 0;
+ size_t index_string_length = 0;
next_pos = (const char *) strchr(attrs, ')');
if (!next_pos) {
@@ -368,7 +368,7 @@ hwloc_synthetic_parse_level_attrs(const char *attrs, const char **next_posp,
curlevel->memorysize = memorysize;
curlevel->index_string = index_string;
- curlevel->index_string_length = index_string_length;
+ curlevel->index_string_length = (unsigned long)index_string_length;
*next_posp = next_pos+1;
return 0;
}
@@ -428,7 +428,7 @@ hwloc_backend_synthetic_init(struct hwloc_synthetic_backend_data_s *data,
errno = EINVAL;
goto error;
}
- if (type == HWLOC_OBJ_MISC || type == HWLOC_OBJ_BRIDGE || type == HWLOC_OBJ_PCI_DEVICE || type == HWLOC_OBJ_OS_DEVICE) {
+ if (type == HWLOC_OBJ_SYSTEM || type == HWLOC_OBJ_MISC || type == HWLOC_OBJ_BRIDGE || type == HWLOC_OBJ_PCI_DEVICE || type == HWLOC_OBJ_OS_DEVICE) {
if (verbose)
fprintf(stderr, "Synthetic string with disallowed object type at '%s'\n", pos);
errno = EINVAL;
@@ -455,6 +455,12 @@ hwloc_backend_synthetic_init(struct hwloc_synthetic_backend_data_s *data,
errno = EINVAL;
goto error;
}
+ if (!item) {
+ if (verbose)
+ fprintf(stderr,"Synthetic string with disallow 0 number of objects at '%s'\n", pos);
+ errno = EINVAL;
+ goto error;
+ }
data->level[count-1].arity = (unsigned)item;
totalarity *= item;
@@ -497,6 +503,19 @@ hwloc_backend_synthetic_init(struct hwloc_synthetic_backend_data_s *data,
type = curlevel->type;
+ if (i == count-1 && type != HWLOC_OBJ_TYPE_UNKNOWN && type != HWLOC_OBJ_PU) {
+ if (verbose)
+ fprintf(stderr, "Synthetic string cannot use non-PU type for last level\n");
+ errno = EINVAL;
+ return -1;
+ }
+ if (i != count-1 && type == HWLOC_OBJ_PU) {
+ if (verbose)
+ fprintf(stderr, "Synthetic string cannot use PU type for non-last level\n");
+ errno = EINVAL;
+ return -1;
+ }
+
if (type == HWLOC_OBJ_TYPE_UNKNOWN) {
if (i == count-1)
type = HWLOC_OBJ_PU;
@@ -908,7 +927,7 @@ static int hwloc_topology_export_synthetic_indexes(struct hwloc_topology * topol
}
ret += res;
if (res >= tmplen)
- res = tmplen>0 ? tmplen - 1 : 0;
+ res = tmplen>0 ? (int)tmplen - 1 : 0;
tmp += res;
tmplen -= res;
}
@@ -931,7 +950,7 @@ static int hwloc_topology_export_synthetic_indexes(struct hwloc_topology * topol
return -1;
ret += res;
if (res >= tmplen)
- res = tmplen>0 ? tmplen - 1 : 0;
+ res = tmplen>0 ? (int)tmplen - 1 : 0;
tmp += res;
tmplen -= res;
cur = cur->next_cousin;
@@ -979,7 +998,7 @@ static int hwloc_topology_export_synthetic_obj_attr(struct hwloc_topology * topo
return -1;
ret += res;
if (res >= tmplen)
- res = tmplen>0 ? tmplen - 1 : 0;
+ res = tmplen>0 ? (int)tmplen - 1 : 0;
tmp += res;
tmplen -= res;
@@ -989,7 +1008,7 @@ static int hwloc_topology_export_synthetic_obj_attr(struct hwloc_topology * topo
return -1;
ret += res;
if (res >= tmplen)
- res = tmplen>0 ? tmplen - 1 : 0;
+ res = tmplen>0 ? (int)tmplen - 1 : 0;
tmp += res;
tmplen -= res;
@@ -998,7 +1017,7 @@ static int hwloc_topology_export_synthetic_obj_attr(struct hwloc_topology * topo
return -1;
ret += res;
if (res >= tmplen)
- res = tmplen>0 ? tmplen - 1 : 0;
+ res = tmplen>0 ? (int)tmplen - 1 : 0;
tmp += res;
tmplen -= res;
}
@@ -1053,7 +1072,7 @@ hwloc_topology_export_synthetic(struct hwloc_topology * topology,
if (ret > 0)
prefix = separator;
if (res >= tmplen)
- res = tmplen>0 ? tmplen - 1 : 0;
+ res = tmplen>0 ? (int)tmplen - 1 : 0;
tmp += res;
tmplen -= res;
}
@@ -1073,7 +1092,7 @@ hwloc_topology_export_synthetic(struct hwloc_topology * topology,
return -1;
ret += res;
if (res >= tmplen)
- res = tmplen>0 ? tmplen - 1 : 0;
+ res = tmplen>0 ? (int)tmplen - 1 : 0;
tmp += res;
tmplen -= res;
@@ -1084,7 +1103,7 @@ hwloc_topology_export_synthetic(struct hwloc_topology * topology,
return -1;
ret += res;
if (res >= tmplen)
- res = tmplen>0 ? tmplen - 1 : 0;
+ res = tmplen>0 ? (int)tmplen - 1 : 0;
tmp += res;
tmplen -= res;
}
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 371aaa1..83b5492 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
@@ -33,6 +33,10 @@ typedef enum _PROCESSOR_CACHE_TYPE {
#define CACHE_FULLY_ASSOCIATIVE 0xFF
#endif
+#ifndef MAXIMUM_PROC_PER_GROUP /* missing in MinGW */
+#define MAXIMUM_PROC_PER_GROUP 64
+#endif
+
#ifndef HAVE_CACHE_DESCRIPTOR
typedef struct _CACHE_DESCRIPTOR {
BYTE Level;
@@ -172,34 +176,259 @@ typedef struct _PSAPI_WORKING_SET_EX_INFORMATION {
} PSAPI_WORKING_SET_EX_INFORMATION;
#endif
+#ifndef HAVE_PROCESSOR_NUMBER
+typedef struct _PROCESSOR_NUMBER {
+ WORD Group;
+ BYTE Number;
+ BYTE Reserved;
+} PROCESSOR_NUMBER, *PPROCESSOR_NUMBER;
+#endif
+
+/* Function pointers */
+
+typedef WORD (WINAPI *PFN_GETACTIVEPROCESSORGROUPCOUNT)(void);
+static PFN_GETACTIVEPROCESSORGROUPCOUNT GetActiveProcessorGroupCountProc;
+
+static unsigned long nr_processor_groups = 1;
+
+typedef WORD (WINAPI *PFN_GETACTIVEPROCESSORCOUNT)(WORD);
+static PFN_GETACTIVEPROCESSORCOUNT GetActiveProcessorCountProc;
+
+typedef DWORD (WINAPI *PFN_GETCURRENTPROCESSORNUMBER)(void);
+static PFN_GETCURRENTPROCESSORNUMBER GetCurrentProcessorNumberProc;
+
+typedef VOID (WINAPI *PFN_GETCURRENTPROCESSORNUMBEREX)(PPROCESSOR_NUMBER);
+static PFN_GETCURRENTPROCESSORNUMBEREX GetCurrentProcessorNumberExProc;
+
+typedef BOOL (WINAPI *PFN_GETLOGICALPROCESSORINFORMATION)(PSYSTEM_LOGICAL_PROCESSOR_INFORMATION Buffer, PDWORD ReturnLength);
+static PFN_GETLOGICALPROCESSORINFORMATION GetLogicalProcessorInformationProc;
+
+typedef BOOL (WINAPI *PFN_GETLOGICALPROCESSORINFORMATIONEX)(LOGICAL_PROCESSOR_RELATIONSHIP relationship, PSYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX Buffer, PDWORD ReturnLength);
+static PFN_GETLOGICALPROCESSORINFORMATIONEX GetLogicalProcessorInformationExProc;
+
+typedef BOOL (WINAPI *PFN_SETTHREADGROUPAFFINITY)(HANDLE hThread, const GROUP_AFFINITY *GroupAffinity, PGROUP_AFFINITY PreviousGroupAffinity);
+static PFN_SETTHREADGROUPAFFINITY SetThreadGroupAffinityProc;
+
+typedef BOOL (WINAPI *PFN_GETTHREADGROUPAFFINITY)(HANDLE hThread, PGROUP_AFFINITY GroupAffinity);
+static PFN_GETTHREADGROUPAFFINITY GetThreadGroupAffinityProc;
+
+typedef BOOL (WINAPI *PFN_GETNUMAAVAILABLEMEMORYNODE)(UCHAR Node, PULONGLONG AvailableBytes);
+static PFN_GETNUMAAVAILABLEMEMORYNODE GetNumaAvailableMemoryNodeProc;
+
+typedef BOOL (WINAPI *PFN_GETNUMAAVAILABLEMEMORYNODEEX)(USHORT Node, PULONGLONG AvailableBytes);
+static PFN_GETNUMAAVAILABLEMEMORYNODEEX GetNumaAvailableMemoryNodeExProc;
+
+typedef LPVOID (WINAPI *PFN_VIRTUALALLOCEXNUMA)(HANDLE hProcess, LPVOID lpAddress, SIZE_T dwSize, DWORD flAllocationType, DWORD flProtect, DWORD nndPreferred);
+static PFN_VIRTUALALLOCEXNUMA VirtualAllocExNumaProc;
+
+typedef BOOL (WINAPI *PFN_VIRTUALFREEEX)(HANDLE hProcess, LPVOID lpAddress, SIZE_T dwSize, DWORD dwFreeType);
+static PFN_VIRTUALFREEEX VirtualFreeExProc;
+
+typedef BOOL (WINAPI *PFN_QUERYWORKINGSETEX)(HANDLE hProcess, PVOID pv, DWORD cb);
+static PFN_QUERYWORKINGSETEX QueryWorkingSetExProc;
+
+static void hwloc_win_get_function_ptrs(void)
+{
+ static int done = 0;
+ if (!done) {
+ HMODULE kernel32;
+
+ kernel32 = LoadLibrary("kernel32.dll");
+ if (kernel32) {
+ GetActiveProcessorGroupCountProc =
+ (PFN_GETACTIVEPROCESSORGROUPCOUNT) GetProcAddress(kernel32, "GetActiveProcessorGroupCount");
+ GetActiveProcessorCountProc =
+ (PFN_GETACTIVEPROCESSORCOUNT) GetProcAddress(kernel32, "GetActiveProcessorCount");
+ GetLogicalProcessorInformationProc =
+ (PFN_GETLOGICALPROCESSORINFORMATION) GetProcAddress(kernel32, "GetLogicalProcessorInformation");
+ GetCurrentProcessorNumberProc =
+ (PFN_GETCURRENTPROCESSORNUMBER) GetProcAddress(kernel32, "GetCurrentProcessorNumber");
+ GetCurrentProcessorNumberExProc =
+ (PFN_GETCURRENTPROCESSORNUMBEREX) GetProcAddress(kernel32, "GetCurrentProcessorNumberEx");
+ SetThreadGroupAffinityProc =
+ (PFN_SETTHREADGROUPAFFINITY) GetProcAddress(kernel32, "SetThreadGroupAffinity");
+ GetThreadGroupAffinityProc =
+ (PFN_GETTHREADGROUPAFFINITY) GetProcAddress(kernel32, "GetThreadGroupAffinity");
+ GetNumaAvailableMemoryNodeProc =
+ (PFN_GETNUMAAVAILABLEMEMORYNODE) GetProcAddress(kernel32, "GetNumaAvailableMemoryNode");
+ GetNumaAvailableMemoryNodeExProc =
+ (PFN_GETNUMAAVAILABLEMEMORYNODEEX) GetProcAddress(kernel32, "GetNumaAvailableMemoryNodeEx");
+ GetLogicalProcessorInformationExProc =
+ (PFN_GETLOGICALPROCESSORINFORMATIONEX)GetProcAddress(kernel32, "GetLogicalProcessorInformationEx");
+ VirtualAllocExNumaProc =
+ (PFN_VIRTUALALLOCEXNUMA) GetProcAddress(kernel32, "K32QueryWorkingSetEx");
+ VirtualAllocExNumaProc =*
+ (PFN_VIRTUALALLOCEXNUMA) GetProcAddress(kernel32, "VirtualAllocExNuma");
+ VirtualFreeExProc =
+ (PFN_VIRTUALFREEEX) GetProcAddress(kernel32, "VirtualFreeEx");
+ }
+
+ if (GetActiveProcessorGroupCountProc)
+ nr_processor_groups = GetActiveProcessorGroupCountProc();
+
+ if (!VirtualAllocExNumaProc) {
+ HMODULE psapi = LoadLibrary("psapi.dll");
+ if (psapi)
+ VirtualAllocExNumaProc = (PFN_VIRTUALALLOCEXNUMA) GetProcAddress(psapi, "QueryWorkingSetEx");
+ }
+
+ done = 1;
+ }
+}
+
+/*
+ * ULONG_PTR and DWORD_PTR are 64/32bits depending on the arch
+ * while bitmaps use unsigned long (always 32bits)
+ */
+
+static void hwloc_bitmap_from_ULONG_PTR(hwloc_bitmap_t set, ULONG_PTR mask)
+{
+#if SIZEOF_VOID_P == 8
+ hwloc_bitmap_from_ulong(set, mask & 0xffffffff);
+ hwloc_bitmap_set_ith_ulong(set, 1, mask >> 32);
+#else
+ hwloc_bitmap_from_ulong(set, mask);
+#endif
+}
+
+static void hwloc_bitmap_from_ith_ULONG_PTR(hwloc_bitmap_t set, unsigned i, ULONG_PTR mask)
+{
+#if SIZEOF_VOID_P == 8
+ hwloc_bitmap_from_ith_ulong(set, 2*i, mask & 0xffffffff);
+ hwloc_bitmap_set_ith_ulong(set, 2*i+1, mask >> 32);
+#else
+ hwloc_bitmap_from_ith_ulong(set, i, mask);
+#endif
+}
+
static void hwloc_bitmap_set_ith_ULONG_PTR(hwloc_bitmap_t set, unsigned i, ULONG_PTR mask)
{
- /* ULONG_PTR is 64/32bits depending on the arch
- * while unsigned long is always 32bits */
#if SIZEOF_VOID_P == 8
- hwloc_bitmap_set_ith_ulong(set, 2*i, mask & 0xffffffff);
- hwloc_bitmap_set_ith_ulong(set, 2*i+1, mask >> 32);
+ hwloc_bitmap_set_ith_ulong(set, 2*i, mask & 0xffffffff);
+ hwloc_bitmap_set_ith_ulong(set, 2*i+1, mask >> 32);
#else
- hwloc_bitmap_set_ith_ulong(set, i, mask);
+ hwloc_bitmap_set_ith_ulong(set, i, mask);
#endif
}
-/* TODO: SetThreadIdealProcessor */
+static ULONG_PTR hwloc_bitmap_to_ULONG_PTR(hwloc_const_bitmap_t set)
+{
+#if SIZEOF_VOID_P == 8
+ ULONG_PTR up = hwloc_bitmap_to_ith_ulong(set, 1);
+ up <<= 32;
+ up |= hwloc_bitmap_to_ulong(set);
+ return up;
+#else
+ return hwloc_bitmap_to_ulong(set);
+#endif
+}
+
+static ULONG_PTR hwloc_bitmap_to_ith_ULONG_PTR(hwloc_const_bitmap_t set, unsigned i)
+{
+#if SIZEOF_VOID_P == 8
+ ULONG_PTR up = hwloc_bitmap_to_ith_ulong(set, 2*i+1);
+ up <<= 32;
+ up |= hwloc_bitmap_to_ith_ulong(set, 2*i);
+ return up;
+#else
+ return hwloc_bitmap_to_ith_ulong(set, i);
+#endif
+}
+
+/* convert set into index+mask if all set bits are in the same ULONG.
+ * otherwise return -1.
+ */
+static int hwloc_bitmap_to_single_ULONG_PTR(hwloc_const_bitmap_t set, unsigned *index, ULONG_PTR *mask)
+{
+ unsigned first_ulp, last_ulp;
+ if (hwloc_bitmap_weight(set) == -1)
+ return -1;
+ first_ulp = hwloc_bitmap_first(set) / (sizeof(ULONG_PTR)*8);
+ last_ulp = hwloc_bitmap_last(set) / (sizeof(ULONG_PTR)*8);
+ if (first_ulp != last_ulp)
+ return -1;
+ *mask = hwloc_bitmap_to_ith_ULONG_PTR(set, first_ulp);
+ *index = first_ulp;
+ return 0;
+}
+
+/**************************************************************
+ * hwloc PU numbering with respect to Windows processor groups
+ *
+ * Everywhere below we reserve 64 physical indexes per processor groups because that's
+ * the maximum (MAXIMUM_PROC_PER_GROUP). Windows may actually use less bits than that
+ * in some groups (either to avoid splitting NUMA nodes across groups, or because of OS
+ * tweaks such as "bcdedit /set groupsize 8") but we keep some unused indexes for simplicity.
+ * That means PU physical indexes and cpusets may be non-contigous.
+ * That also means hwloc_fallback_nbprocessors() below must return the last PU index + 1
+ * instead the actual number of processors.
+ */
+
+/********************
+ * last_cpu_location
+ */
+
+static int
+hwloc_win_get_thisthread_last_cpu_location(hwloc_topology_t topology __hwloc_attribute_unused, hwloc_cpuset_t set, int flags __hwloc_attribute_unused)
+{
+ assert(GetCurrentProcessorNumberExProc || (GetCurrentProcessorNumberProc && nr_processor_groups == 1));
+
+ if (nr_processor_groups > 1 || !GetCurrentProcessorNumberProc) {
+ PROCESSOR_NUMBER num;
+ GetCurrentProcessorNumberExProc(&num);
+ hwloc_bitmap_from_ith_ULONG_PTR(set, num.Group, ((ULONG_PTR)1) << num.Number);
+ return 0;
+ }
+
+ hwloc_bitmap_from_ith_ULONG_PTR(set, 0, ((ULONG_PTR)1) << GetCurrentProcessorNumberProc());
+ return 0;
+}
+
+/* TODO: hwloc_win_get_thisproc_last_cpu_location() using
+ * CreateToolhelp32Snapshot(), Thread32First/Next()
+ * th.th32OwnerProcessID == GetCurrentProcessId() for filtering within process
+ * OpenThread(THREAD_SET_INFORMATION|THREAD_QUERY_INFORMATION, FALSE, te32.th32ThreadID) to get a handle.
+ */
+
+
+/******************************
+ * set cpu/membind for threads
+ */
+
+/* TODO: SetThreadIdealProcessor{,Ex} */
static int
hwloc_win_set_thread_cpubind(hwloc_topology_t topology __hwloc_attribute_unused, hwloc_thread_t thread, hwloc_const_bitmap_t hwloc_set, int flags)
{
- DWORD mask;
+ DWORD_PTR mask;
+ unsigned group;
if (flags & HWLOC_CPUBIND_NOMEMBIND) {
errno = ENOSYS;
return -1;
}
- /* TODO: groups SetThreadGroupAffinity */
- /* The resulting binding is always strict */
- mask = hwloc_bitmap_to_ulong(hwloc_set);
- if (!SetThreadAffinityMask(thread, mask))
+
+ if (hwloc_bitmap_to_single_ULONG_PTR(hwloc_set, &group, &mask) < 0) {
+ errno = ENOSYS;
return -1;
+ }
+
+ assert(nr_processor_groups == 1 || SetThreadGroupAffinityProc);
+
+ if (nr_processor_groups > 1) {
+ GROUP_AFFINITY aff;
+ memset(&aff, 0, sizeof(aff)); /* we get Invalid Parameter error if Reserved field isn't cleared */
+ aff.Group = group;
+ aff.Mask = mask;
+ if (!SetThreadGroupAffinityProc(thread, &aff, NULL))
+ return -1;
+
+ } else {
+ /* SetThreadAffinityMask() only changes the mask inside the current processor group */
+ /* The resulting binding is always strict */
+ if (!SetThreadAffinityMask(thread, mask))
+ return -1;
+ }
return 0;
}
@@ -230,24 +459,85 @@ hwloc_win_set_thisthread_membind(hwloc_topology_t topology, hwloc_const_nodeset_
return ret;
}
+
+/******************************
+ * get cpu/membind for threads
+ */
+
+ static int
+hwloc_win_get_thread_cpubind(hwloc_topology_t topology __hwloc_attribute_unused, hwloc_thread_t thread, hwloc_cpuset_t set, int flags __hwloc_attribute_unused)
+{
+ GROUP_AFFINITY aff;
+
+ assert(GetThreadGroupAffinityProc);
+
+ if (!GetThreadGroupAffinityProc(thread, &aff))
+ return -1;
+ hwloc_bitmap_from_ith_ULONG_PTR(set, aff.Group, aff.Mask);
+ return 0;
+}
+
+static int
+hwloc_win_get_thisthread_cpubind(hwloc_topology_t topology __hwloc_attribute_unused, hwloc_cpuset_t set, int flags __hwloc_attribute_unused)
+{
+ return hwloc_win_get_thread_cpubind(topology, GetCurrentThread(), set, flags);
+}
+
+static int
+hwloc_win_get_thisthread_membind(hwloc_topology_t topology, hwloc_nodeset_t nodeset, hwloc_membind_policy_t * policy, int flags)
+{
+ int ret;
+ hwloc_cpuset_t cpuset = hwloc_bitmap_alloc();
+ ret = hwloc_win_get_thread_cpubind(topology, GetCurrentThread(), cpuset, flags);
+ if (!ret) {
+ *policy = HWLOC_MEMBIND_BIND;
+ hwloc_cpuset_to_nodeset(topology, cpuset, nodeset);
+ }
+ hwloc_bitmap_free(cpuset);
+ return ret;
+}
+
+
+/********************************
+ * set cpu/membind for processes
+ */
+
static int
hwloc_win_set_proc_cpubind(hwloc_topology_t topology __hwloc_attribute_unused, hwloc_pid_t proc, hwloc_const_bitmap_t hwloc_set, int flags)
{
- DWORD mask;
+ DWORD_PTR mask;
+
+ assert(nr_processor_groups == 1);
+
if (flags & HWLOC_CPUBIND_NOMEMBIND) {
errno = ENOSYS;
return -1;
}
- /* TODO: groups, hard: has to manually bind all threads into the other group,
- * and the bind the process inside the group */
+
+ /* TODO: SetThreadGroupAffinity() for all threads doesn't enforce the whole process affinity,
+ * maybe because of process-specific resource locality */
+ /* TODO: if we are in a single group (check with GetProcessGroupAffinity()),
+ * SetProcessAffinityMask() changes the binding within that same group.
+ */
+ /* TODO: NtSetInformationProcess() works very well for binding to any mask in a single group,
+ * but it's an internal routine.
+ */
+ /* TODO: checks whether hwloc-bind.c needs to pass INHERIT_PARENT_AFFINITY to CreateProcess() instead of execvp(). */
+
/* The resulting binding is always strict */
- mask = hwloc_bitmap_to_ulong(hwloc_set);
+ mask = hwloc_bitmap_to_ULONG_PTR(hwloc_set);
if (!SetProcessAffinityMask(proc, mask))
return -1;
return 0;
}
static int
+hwloc_win_set_thisproc_cpubind(hwloc_topology_t topology, hwloc_const_bitmap_t hwloc_set, int flags)
+{
+ return hwloc_win_set_proc_cpubind(topology, GetCurrentProcess(), hwloc_set, flags);
+}
+
+static int
hwloc_win_set_proc_membind(hwloc_topology_t topology, hwloc_pid_t pid, hwloc_const_nodeset_t nodeset, hwloc_membind_policy_t policy, int flags)
{
int ret;
@@ -267,17 +557,41 @@ hwloc_win_set_proc_membind(hwloc_topology_t topology, hwloc_pid_t pid, hwloc_con
}
static int
+hwloc_win_set_thisproc_membind(hwloc_topology_t topology, hwloc_const_nodeset_t nodeset, hwloc_membind_policy_t policy, int flags)
+{
+ return hwloc_win_set_proc_membind(topology, GetCurrentProcess(), nodeset, policy, flags);
+}
+
+
+/********************************
+ * get cpu/membind for processes
+ */
+
+static int
hwloc_win_get_proc_cpubind(hwloc_topology_t topology __hwloc_attribute_unused, hwloc_pid_t proc, hwloc_bitmap_t hwloc_set, int flags)
{
DWORD_PTR proc_mask, sys_mask;
+
+ assert(nr_processor_groups == 1);
+
if (flags & HWLOC_CPUBIND_NOMEMBIND) {
errno = ENOSYS;
return -1;
}
- /* TODO: groups, GetProcessGroupAffinity, or merge SetThreadGroupAffinity for all threads */
+
+ /* TODO: if we are in a single group (check with GetProcessGroupAffinity()),
+ * GetProcessAffinityMask() gives the mask within that group.
+ */
+ /* TODO: if we are in multiple groups, GetProcessGroupAffinity() gives their IDs,
+ * but we don't know their masks.
+ */
+ /* TODO: GetThreadGroupAffinity() for all threads can be smaller than the whole process affinity,
+ * maybe because of process-specific resource locality.
+ */
+
if (!GetProcessAffinityMask(proc, &proc_mask, &sys_mask))
return -1;
- hwloc_bitmap_from_ulong(hwloc_set, proc_mask);
+ hwloc_bitmap_from_ULONG_PTR(hwloc_set, proc_mask);
return 0;
}
@@ -296,18 +610,6 @@ hwloc_win_get_proc_membind(hwloc_topology_t topology, hwloc_pid_t pid, hwloc_nod
}
static int
-hwloc_win_set_thisproc_cpubind(hwloc_topology_t topology, hwloc_const_bitmap_t hwloc_set, int flags)
-{
- return hwloc_win_set_proc_cpubind(topology, GetCurrentProcess(), hwloc_set, flags);
-}
-
-static int
-hwloc_win_set_thisproc_membind(hwloc_topology_t topology, hwloc_const_nodeset_t nodeset, hwloc_membind_policy_t policy, int flags)
-{
- return hwloc_win_set_proc_membind(topology, GetCurrentProcess(), nodeset, policy, flags);
-}
-
-static int
hwloc_win_get_thisproc_cpubind(hwloc_topology_t topology, hwloc_bitmap_t hwloc_cpuset, int flags)
{
return hwloc_win_get_proc_cpubind(topology, GetCurrentProcess(), hwloc_cpuset, flags);
@@ -319,36 +621,10 @@ hwloc_win_get_thisproc_membind(hwloc_topology_t topology, hwloc_nodeset_t nodese
return hwloc_win_get_proc_membind(topology, GetCurrentProcess(), nodeset, policy, flags);
}
-static LPVOID (WINAPI *VirtualAllocExNumaProc)(HANDLE hProcess, LPVOID lpAddress, SIZE_T dwSize, DWORD flAllocationType, DWORD flProtect, DWORD nndPreferred);
-static BOOL (WINAPI *VirtualFreeExProc)(HANDLE hProcess, LPVOID lpAddress, SIZE_T dwSize, DWORD dwFreeType);
-static BOOL (WINAPI *QueryWorkingSetExProc)(HANDLE hProcess, PVOID pv, DWORD cb);
-
-static int hwloc_win_get_VirtualAllocExNumaProc(void) {
- if (VirtualAllocExNumaProc == NULL) {
- FARPROC alloc_fun = NULL, free_fun = NULL;
- HMODULE kernel32;
-
- kernel32 = LoadLibrary("kernel32.dll");
- if (kernel32) {
- alloc_fun = GetProcAddress(kernel32, "VirtualAllocExNuma");
- free_fun = GetProcAddress(kernel32, "VirtualFreeEx");
- }
-
- if (!alloc_fun || !free_fun) {
- VirtualAllocExNumaProc = (FARPROC) -1;
- errno = ENOSYS;
- return -1;
- }
- VirtualAllocExNumaProc = alloc_fun;
- VirtualFreeExProc = free_fun;
- } else if ((FARPROC) VirtualAllocExNumaProc == (FARPROC)-1) {
- errno = ENOSYS;
- return -1;
- }
-
- return 0;
-}
+/************************
+ * membind alloc/free
+ */
static void *
hwloc_win_alloc(hwloc_topology_t topology __hwloc_attribute_unused, size_t len) {
@@ -392,34 +668,10 @@ hwloc_win_free_membind(hwloc_topology_t topology __hwloc_attribute_unused, void
return 0;
}
-static int hwloc_win_get_QueryWorkingSetExProc(void) {
- if (QueryWorkingSetExProc == NULL) {
- FARPROC fun = NULL;
- HMODULE kernel32, psapi;
- kernel32 = LoadLibrary("kernel32.dll");
- if (kernel32)
- fun = GetProcAddress(kernel32, "K32QueryWorkingSetEx");
- if (!fun) {
- psapi = LoadLibrary("psapi.dll");
- if (psapi)
- fun = GetProcAddress(psapi, "QueryWorkingSetEx");
- }
-
- if (!fun) {
- QueryWorkingSetExProc = (FARPROC) -1;
- errno = ENOSYS;
- return -1;
- }
-
- QueryWorkingSetExProc = fun;
- } else if ((FARPROC) QueryWorkingSetExProc == (FARPROC)-1) {
- errno = ENOSYS;
- return -1;
- }
-
- return 0;
-}
+/**********************
+ * membind for areas
+ */
static int
hwloc_win_get_area_membind(hwloc_topology_t topology __hwloc_attribute_unused, const void *addr, size_t len, hwloc_nodeset_t nodeset, hwloc_membind_policy_t * policy, int flags)
@@ -433,7 +685,7 @@ hwloc_win_get_area_membind(hwloc_topology_t topology __hwloc_attribute_unused, c
page_size = SystemInfo.dwPageSize;
start = (((uintptr_t) addr) / page_size) * page_size;
- nb = (((uintptr_t) addr + len - start) + page_size - 1) / page_size;
+ nb = (unsigned)((((uintptr_t) addr + len - start) + page_size - 1) / page_size);
if (!nb)
nb = 1;
@@ -472,19 +724,20 @@ hwloc_win_get_area_membind(hwloc_topology_t topology __hwloc_attribute_unused, c
}
}
+
+/*************************
+ * discovery
+ */
+
static int
hwloc_look_windows(struct hwloc_backend *backend)
{
struct hwloc_topology *topology = backend->topology;
- BOOL (WINAPI *GetLogicalProcessorInformationProc)(PSYSTEM_LOGICAL_PROCESSOR_INFORMATION Buffer, PDWORD ReturnLength);
- BOOL (WINAPI *GetLogicalProcessorInformationExProc)(LOGICAL_PROCESSOR_RELATIONSHIP relationship, PSYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX Buffer, PDWORD ReturnLength);
- BOOL (WINAPI *GetNumaAvailableMemoryNodeProc)(UCHAR Node, PULONGLONG AvailableBytes);
- BOOL (WINAPI *GetNumaAvailableMemoryNodeExProc)(USHORT Node, PULONGLONG AvailableBytes);
+ hwloc_bitmap_t groups_pu_set = NULL;
SYSTEM_INFO SystemInfo;
-
DWORD length;
- HMODULE kernel32;
+ hwloc_win_get_function_ptrs();
if (topology->levels[0][0]->cpuset)
/* somebody discovered things */
@@ -494,14 +747,7 @@ hwloc_look_windows(struct hwloc_backend *backend)
GetSystemInfo(&SystemInfo);
- kernel32 = LoadLibrary("kernel32.dll");
- if (kernel32) {
- GetLogicalProcessorInformationProc = GetProcAddress(kernel32, "GetLogicalProcessorInformation");
- GetNumaAvailableMemoryNodeProc = GetProcAddress(kernel32, "GetNumaAvailableMemoryNode");
- GetNumaAvailableMemoryNodeExProc = GetProcAddress(kernel32, "GetNumaAvailableMemoryNodeEx");
- GetLogicalProcessorInformationExProc = GetProcAddress(kernel32, "GetLogicalProcessorInformationEx");
-
- if (!GetLogicalProcessorInformationExProc && GetLogicalProcessorInformationProc) {
+ if (!GetLogicalProcessorInformationExProc && GetLogicalProcessorInformationProc) {
PSYSTEM_LOGICAL_PROCESSOR_INFORMATION procInfo;
unsigned id;
unsigned i;
@@ -608,9 +854,9 @@ hwloc_look_windows(struct hwloc_backend *backend)
}
free(procInfo);
- }
+ }
- if (GetLogicalProcessorInformationExProc) {
+ if (GetLogicalProcessorInformationExProc) {
PSYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX procInfoTotal, procInfo;
unsigned id;
@@ -676,6 +922,12 @@ hwloc_look_windows(struct hwloc_backend *backend)
/* KAFFINITY is ULONG_PTR */
hwloc_bitmap_set_ith_ULONG_PTR(obj->cpuset, id, mask);
hwloc_debug_2args_bitmap("group %u %d bitmap %s\n", id, procInfo->Group.GroupInfo[id].ActiveProcessorCount, obj->cpuset);
+
+ /* save the set of PUs so that we can create them at the end */
+ if (!groups_pu_set)
+ groups_pu_set = hwloc_bitmap_alloc();
+ hwloc_bitmap_or(groups_pu_set, groups_pu_set, obj->cpuset);
+
hwloc_insert_object_by_cpuset(topology, obj);
}
continue;
@@ -692,7 +944,7 @@ hwloc_look_windows(struct hwloc_backend *backend)
/* GROUP_AFFINITY.Mask is KAFFINITY, which is ULONG_PTR */
hwloc_bitmap_set_ith_ULONG_PTR(obj->cpuset, GroupMask[i].Group, GroupMask[i].Mask);
}
- hwloc_debug("%s#%u bitmap %s\n", hwloc_obj_type_string(type), id, obj->cpuset);
+ hwloc_debug_2args_bitmap("%s#%u bitmap %s\n", hwloc_obj_type_string(type), id, obj->cpuset);
switch (type) {
case HWLOC_OBJ_NUMANODE:
@@ -739,11 +991,39 @@ hwloc_look_windows(struct hwloc_backend *backend)
hwloc_insert_object_by_cpuset(topology, obj);
}
free(procInfoTotal);
- }
}
- /* add PU objects */
- hwloc_setup_pu_level(topology, hwloc_fallback_nbprocessors(topology));
+ if (groups_pu_set) {
+ /* the system supports multiple Groups.
+ * PU indexes may be discontiguous, especially if Groups contain less than 64 procs.
+ */
+ hwloc_obj_t obj;
+ unsigned idx;
+ hwloc_bitmap_foreach_begin(idx, groups_pu_set) {
+ obj = hwloc_alloc_setup_object(HWLOC_OBJ_PU, idx);
+ obj->cpuset = hwloc_bitmap_alloc();
+ hwloc_bitmap_only(obj->cpuset, idx);
+ hwloc_debug_1arg_bitmap("cpu %u has cpuset %s\n",
+ idx, obj->cpuset);
+ hwloc_insert_object_by_cpuset(topology, obj);
+ } hwloc_bitmap_foreach_end();
+ hwloc_bitmap_free(groups_pu_set);
+ } else {
+ /* no processor groups */
+ SYSTEM_INFO sysinfo;
+ hwloc_obj_t obj;
+ unsigned idx;
+ GetSystemInfo(&sysinfo);
+ for(idx=0; idx<32; idx++)
+ if (sysinfo.dwActiveProcessorMask & (((DWORD_PTR)1)<<idx)) {
+ obj = hwloc_alloc_setup_object(HWLOC_OBJ_PU, idx);
+ obj->cpuset = hwloc_bitmap_alloc();
+ hwloc_bitmap_only(obj->cpuset, idx);
+ hwloc_debug_1arg_bitmap("cpu %u has cpuset %s\n",
+ idx, obj->cpuset);
+ hwloc_insert_object_by_cpuset(topology, obj);
+ }
+ }
hwloc_obj_add_info(topology->levels[0][0], "Backend", "Windows");
if (topology->is_thissystem)
@@ -755,28 +1035,40 @@ void
hwloc_set_windows_hooks(struct hwloc_binding_hooks *hooks,
struct hwloc_topology_support *support)
{
- hooks->set_proc_cpubind = hwloc_win_set_proc_cpubind;
- hooks->get_proc_cpubind = hwloc_win_get_proc_cpubind;
- hooks->set_thread_cpubind = hwloc_win_set_thread_cpubind;
- hooks->set_thisproc_cpubind = hwloc_win_set_thisproc_cpubind;
- hooks->get_thisproc_cpubind = hwloc_win_get_thisproc_cpubind;
- hooks->set_thisthread_cpubind = hwloc_win_set_thisthread_cpubind;
- /* TODO: get_last_cpu_location: use GetCurrentProcessorNumber */
-
- hooks->set_proc_membind = hwloc_win_set_proc_membind;
- hooks->get_proc_membind = hwloc_win_get_proc_membind;
- hooks->set_thisproc_membind = hwloc_win_set_thisproc_membind;
- hooks->get_thisproc_membind = hwloc_win_get_thisproc_membind;
- hooks->set_thisthread_membind = hwloc_win_set_thisthread_membind;
-
- if (!hwloc_win_get_VirtualAllocExNumaProc()) {
+ hwloc_win_get_function_ptrs();
+
+ if (GetCurrentProcessorNumberExProc || (GetCurrentProcessorNumberProc && nr_processor_groups == 1))
+ hooks->get_thisthread_last_cpu_location = hwloc_win_get_thisthread_last_cpu_location;
+
+ if (nr_processor_groups == 1) {
+ hooks->set_proc_cpubind = hwloc_win_set_proc_cpubind;
+ hooks->get_proc_cpubind = hwloc_win_get_proc_cpubind;
+ hooks->set_thisproc_cpubind = hwloc_win_set_thisproc_cpubind;
+ hooks->get_thisproc_cpubind = hwloc_win_get_thisproc_cpubind;
+ hooks->set_proc_membind = hwloc_win_set_proc_membind;
+ hooks->get_proc_membind = hwloc_win_get_proc_membind;
+ hooks->set_thisproc_membind = hwloc_win_set_thisproc_membind;
+ hooks->get_thisproc_membind = hwloc_win_get_thisproc_membind;
+ }
+ if (nr_processor_groups == 1 || SetThreadGroupAffinityProc) {
+ hooks->set_thread_cpubind = hwloc_win_set_thread_cpubind;
+ hooks->set_thisthread_cpubind = hwloc_win_set_thisthread_cpubind;
+ hooks->set_thisthread_membind = hwloc_win_set_thisthread_membind;
+ }
+ if (GetThreadGroupAffinityProc) {
+ hooks->get_thread_cpubind = hwloc_win_get_thread_cpubind;
+ hooks->get_thisthread_cpubind = hwloc_win_get_thisthread_cpubind;
+ hooks->get_thisthread_membind = hwloc_win_get_thisthread_membind;
+ }
+
+ if (VirtualAllocExNumaProc) {
hooks->alloc_membind = hwloc_win_alloc_membind;
hooks->alloc = hwloc_win_alloc;
hooks->free_membind = hwloc_win_free_membind;
support->membind->bind_membind = 1;
}
- if (!hwloc_win_get_QueryWorkingSetExProc())
+ if (QueryWorkingSetExProc)
hooks->get_area_membind = hwloc_win_get_area_membind;
}
@@ -810,3 +1102,30 @@ const struct hwloc_component hwloc_windows_component = {
0,
&hwloc_windows_disc_component
};
+
+unsigned
+hwloc_fallback_nbprocessors(struct hwloc_topology *topology) {
+ int n;
+ SYSTEM_INFO sysinfo;
+
+ /* by default, ignore groups (return only the number in the current group) */
+ GetSystemInfo(&sysinfo);
+ n = sysinfo.dwNumberOfProcessors; /* FIXME could be non-contigous, rather return a mask from dwActiveProcessorMask? */
+
+ hwloc_win_get_function_ptrs();
+
+ if (nr_processor_groups > 1) {
+ /* assume n-1 groups are complete, since that's how we store things in cpusets */
+ if (GetActiveProcessorCountProc)
+ n = MAXIMUM_PROC_PER_GROUP*(nr_processor_groups-1)
+ + GetActiveProcessorCountProc((WORD)nr_processor_groups-1);
+ else
+ n = MAXIMUM_PROC_PER_GROUP*nr_processor_groups;
+ }
+
+ if (n >= 1)
+ topology->support.discovery->pu = 1;
+ else
+ n = 1;
+ return n;
+}
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-x86.c b/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-x86.c
index db91a5e..ab6de7c 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-x86.c
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-x86.c
@@ -26,6 +26,7 @@ struct hwloc_x86_backend_data_s {
unsigned nbprocs;
hwloc_bitmap_t apicid_set;
int apicid_unique;
+ int is_knl;
};
#define has_topoext(features) ((features)[6] & (1 << 22))
@@ -35,9 +36,11 @@ struct cacheinfo {
unsigned type;
unsigned level;
unsigned nbthreads_sharing;
+ unsigned cacheid;
unsigned linesize;
unsigned linepart;
+ int inclusive;
int ways;
unsigned sets;
unsigned long size;
@@ -99,6 +102,8 @@ static void fill_amd_cache(struct procinfo *infos, unsigned level, int type, uns
cache->nbthreads_sharing = infos->max_log_proc;
cache->linesize = cpuid & 0xff;
cache->linepart = 0;
+ cache->inclusive = 0; /* old AMD (K8-K10) supposed to have exclusive caches */
+
if (level == 1) {
cache->ways = (cpuid >> 16) & 0xff;
if (cache->ways == 0xff)
@@ -169,6 +174,9 @@ static void look_proc(struct hwloc_backend *backend, struct procinfo *infos, uns
}
infos->cpustepping = eax & 0xf;
+ if (cpuid_type == intel && infos->cpufamilynumber == 0x6 && infos->cpumodelnumber == 0x57)
+ data->is_knl = 1;
+
/* Get cpu vendor string from cpuid 0x00 */
memset(regs, 0, sizeof(regs));
regs[0] = 0;
@@ -283,6 +291,7 @@ static void look_proc(struct hwloc_backend *backend, struct procinfo *infos, uns
cache->ways = ways;
cache->sets = sets = ecx + 1;
cache->size = linesize * linepart * ways * sets;
+ cache->inclusive = edx & 0x2;
hwloc_debug("cache %u type %u L%u t%u c%u linesize %lu linepart %lu ways %lu sets %lu, size %uKB\n", cachenum, cache->type, cache->level, cache->nbthreads_sharing, infos->max_nbcores, linesize, linepart, ways, sets, cache->size >> 10);
@@ -310,9 +319,6 @@ static void look_proc(struct hwloc_backend *backend, struct procinfo *infos, uns
fill_amd_cache(infos, 2, 3, ecx); /* L2u */
if (edx & 0xf000)
fill_amd_cache(infos, 3, 3, edx); /* L3u */
- /* FIXME: AMD MagnyCours family 0x10 model 0x9 with 8 cores or more actually
- * have the L3 split in two halves, and associativity is divided as well (48)
- */
}
}
@@ -320,6 +326,7 @@ static void look_proc(struct hwloc_backend *backend, struct procinfo *infos, uns
* (not supported on AMD)
*/
if (cpuid_type != amd && highest_cpuid >= 0x04) {
+ unsigned level;
for (cachenum = 0; ; cachenum++) {
unsigned type;
eax = 0x04;
@@ -332,6 +339,10 @@ static void look_proc(struct hwloc_backend *backend, struct procinfo *infos, uns
if (type == 0)
break;
+ level = (eax >> 5) & 0x7;
+ if (data->is_knl && level == 3)
+ /* KNL reports wrong L3 information (size always 0, cpuset always the entire machine, ignore it */
+ break;
infos->numcaches++;
if (!cachenum) {
@@ -358,9 +369,13 @@ static void look_proc(struct hwloc_backend *backend, struct procinfo *infos, uns
if (type == 0)
break;
+ level = (eax >> 5) & 0x7;
+ if (data->is_knl && level == 3)
+ /* KNL reports wrong L3 information (size always 0, cpuset always the entire machine, ignore it */
+ break;
cache->type = type;
- cache->level = (eax >> 5) & 0x7;
+ cache->level = level;
cache->nbthreads_sharing = ((eax >> 14) & 0xfff) + 1;
cache->linesize = linesize = (ebx & 0xfff) + 1;
@@ -373,6 +388,7 @@ static void look_proc(struct hwloc_backend *backend, struct procinfo *infos, uns
cache->ways = ways;
cache->sets = sets = ecx + 1;
cache->size = linesize * linepart * ways * sets;
+ cache->inclusive = edx & 0x2;
hwloc_debug("cache %u type %u L%u t%u c%u linesize %lu linepart %lu ways %lu sets %lu, size %uKB\n", cachenum, cache->type, cache->level, cache->nbthreads_sharing, infos->max_nbcores, linesize, linepart, ways, sets, cache->size >> 10);
@@ -430,6 +446,48 @@ static void look_proc(struct hwloc_backend *backend, struct procinfo *infos, uns
}
}
+ /* Now that we have all info, compute cacheids and apply quirks */
+ for (cachenum = 0; cachenum < infos->numcaches; cachenum++) {
+ struct cacheinfo *cache = &infos->cache[cachenum];
+
+ /* default cacheid value */
+ cache->cacheid = infos->apicid / cache->nbthreads_sharing;
+
+ /* AMD quirk */
+ if (cpuid_type == amd
+ && infos->cpufamilynumber== 0x10 && infos->cpumodelnumber == 0x9
+ && cache->level == 3
+ && (cache->ways == -1 || (cache->ways % 2 == 0)) && cache->nbthreads_sharing >= 8) {
+ /* Fix AMD family 0x10 model 0x9 (Magny-Cours) with 8 or 12 cores.
+ * The L3 (and its associativity) is actually split into two halves).
+ */
+ if (cache->nbthreads_sharing == 16)
+ cache->nbthreads_sharing = 12; /* nbthreads_sharing is a power of 2 but the processor actually has 8 or 12 cores */
+ cache->nbthreads_sharing /= 2;
+ cache->size /= 2;
+ if (cache->ways != -1)
+ cache->ways /= 2;
+ /* AMD Magny-Cours 12-cores processor reserve APIC ids as AAAAAABBBBBB....
+ * among first L3 (A), second L3 (B), and unexisting cores (.).
+ * On multi-socket servers, L3 in non-first sockets may have APIC id ranges
+ * such as [16-21] that are not aligned on multiple of nbthreads_sharing (6).
+ * That means, we can't just compare apicid/nbthreads_sharing to identify siblings.
+ */
+ cache->cacheid = (infos->apicid % infos->max_log_proc) / cache->nbthreads_sharing /* cacheid within the package */
+ + 2 * (infos->apicid / infos->max_log_proc); /* add 2 caches per previous package */
+
+ } else if (cpuid_type == amd
+ && infos->cpufamilynumber == 0x15
+ && (infos->cpumodelnumber == 0x1 /* Bulldozer */ || infos->cpumodelnumber == 0x2 /* Piledriver */)
+ && cache->level == 3 && cache->nbthreads_sharing == 6) {
+ /* AMD Bulldozer and Piledriver 12-core processors have same APIC ids as Magny-Cours above,
+ * but we can't merge the checks because the original nbthreads_sharing must be exactly 6 here.
+ */
+ cache->cacheid = (infos->apicid % infos->max_log_proc) / cache->nbthreads_sharing /* cacheid within the package */
+ + 2 * (infos->apicid / infos->max_log_proc); /* add 2 cache per previous package */
+ }
+ }
+
if (hwloc_bitmap_isset(data->apicid_set, infos->apicid))
data->apicid_unique = 0;
else
@@ -620,6 +678,7 @@ static void summarize(struct hwloc_backend *backend, struct procinfo *infos, int
}
unit = hwloc_alloc_setup_object(HWLOC_OBJ_GROUP, unitid);
unit->cpuset = unit_cpuset;
+ hwloc_obj_add_info(unit, "Type", "ComputeUnit");
hwloc_debug_1arg_bitmap("os unit %u has cpuset %s\n",
unitid, unit_cpuset);
hwloc_insert_object_by_cpuset(topology, unit);
@@ -696,6 +755,20 @@ static void summarize(struct hwloc_backend *backend, struct procinfo *infos, int
hwloc_bitmap_free(cores_cpuset);
}
+ /* Look for PUs */
+ if (fulldiscovery) {
+ unsigned i;
+ hwloc_debug("%s", "\n\n * CPU cpusets *\n\n");
+ for (i=0; i<nbprocs; i++)
+ if(infos[i].present) { /* Only add present PU. We don't know if others actually exist */
+ struct hwloc_obj *obj = hwloc_alloc_setup_object(HWLOC_OBJ_PU, i);
+ obj->cpuset = hwloc_bitmap_alloc();
+ hwloc_bitmap_only(obj->cpuset, i);
+ hwloc_debug_1arg_bitmap("PU %u has cpuset %s\n", i, obj->cpuset);
+ hwloc_insert_object_by_cpuset(topology, obj);
+ }
+ }
+
/* Look for caches */
/* First find max level */
level = 0;
@@ -703,18 +776,14 @@ static void summarize(struct hwloc_backend *backend, struct procinfo *infos, int
for (j = 0; j < infos[i].numcaches; j++)
if (infos[i].cache[j].level > level)
level = infos[i].cache[j].level;
-
- /* Look for known types */
- if (fulldiscovery) while (level > 0) {
+ while (level > 0) {
for (type = 1; type <= 3; type++) {
/* Look for caches of that type at level level */
{
hwloc_bitmap_t caches_cpuset = hwloc_bitmap_dup(complete_cpuset);
- hwloc_bitmap_t cache_cpuset;
hwloc_obj_t cache;
while ((i = hwloc_bitmap_first(caches_cpuset)) != (unsigned) -1) {
- unsigned packageid = infos[i].packageid;
for (l = 0; l < infos[i].numcaches; l++) {
if (infos[i].cache[l].level == level && infos[i].cache[l].type == type)
@@ -726,9 +795,12 @@ static void summarize(struct hwloc_backend *backend, struct procinfo *infos, int
continue;
}
- /* Found a matching cache, now look for others sharing it */
- {
- unsigned cacheid = infos[i].apicid / infos[i].cache[l].nbthreads_sharing;
+ if (fulldiscovery) {
+ /* Add caches */
+ hwloc_bitmap_t cache_cpuset;
+ unsigned packageid = infos[i].packageid;
+ unsigned cacheid = infos[i].cache[l].cacheid;
+ /* Found a matching cache, now look for others sharing it */
cache_cpuset = hwloc_bitmap_alloc();
for (j = i; j < nbprocs; j++) {
@@ -742,7 +814,7 @@ static void summarize(struct hwloc_backend *backend, struct procinfo *infos, int
hwloc_bitmap_clr(caches_cpuset, j);
continue;
}
- if (infos[j].packageid == packageid && infos[j].apicid / infos[j].cache[l2].nbthreads_sharing == cacheid) {
+ if (infos[j].packageid == packageid && infos[j].cache[l2].cacheid == cacheid) {
hwloc_bitmap_set(cache_cpuset, j);
hwloc_bitmap_clr(caches_cpuset, j);
}
@@ -764,9 +836,31 @@ static void summarize(struct hwloc_backend *backend, struct procinfo *infos, int
break;
}
cache->cpuset = cache_cpuset;
+ hwloc_obj_add_info(cache, "Inclusive", infos[i].cache[l].inclusive ? "1" : "0");
hwloc_debug_2args_bitmap("os L%u cache %u has cpuset %s\n",
level, cacheid, cache_cpuset);
hwloc_insert_object_by_cpuset(topology, cache);
+
+ } else {
+ /* Annotate existing caches */
+ hwloc_bitmap_t set = hwloc_bitmap_alloc();
+ hwloc_obj_t cache = NULL;
+ int depth;
+ hwloc_bitmap_set(set, i);
+ depth = hwloc_get_cache_type_depth(topology, level,
+ type == 1 ? HWLOC_OBJ_CACHE_DATA : type == 2 ? HWLOC_OBJ_CACHE_INSTRUCTION : HWLOC_OBJ_CACHE_UNIFIED);
+ if (depth != HWLOC_TYPE_DEPTH_UNKNOWN)
+ cache = hwloc_get_next_obj_covering_cpuset_by_depth(topology, set, depth, NULL);
+ hwloc_bitmap_free(set);
+ if (cache) {
+ /* Found cache above that PU, annotate if no such attribute yet */
+ if (!hwloc_obj_get_info_by_name(cache, "Inclusive"))
+ hwloc_obj_add_info(cache, "Inclusive", infos[i].cache[l].inclusive ? "1" : "0");
+ hwloc_bitmap_andnot(caches_cpuset, caches_cpuset, cache->cpuset);
+ } else {
+ /* No cache above that PU?! */
+ hwloc_bitmap_clr(caches_cpuset, i);
+ }
}
}
hwloc_bitmap_free(caches_cpuset);
@@ -948,6 +1042,7 @@ int hwloc_look_x86(struct hwloc_backend *backend, int fulldiscovery)
if (highest_cpuid >= 0x7) {
eax = 0x7;
+ ecx = 0;
hwloc_x86_cpuid(&eax, &ebx, &ecx, &edx);
features[9] = ebx;
}
@@ -1021,11 +1116,11 @@ hwloc_x86_discover(struct hwloc_backend *backend)
}
fulldiscovery:
- hwloc_look_x86(backend, 1);
- /* if failed, just continue and create PUs */
-
- if (!alreadypus)
- hwloc_setup_pu_level(topology, data->nbprocs);
+ if (hwloc_look_x86(backend, 1) < 0) {
+ /* if failed, create PUs */
+ if (!alreadypus)
+ hwloc_setup_pu_level(topology, data->nbprocs);
+ }
hwloc_obj_add_info(topology->levels[0][0], "Backend", "x86");
@@ -1075,6 +1170,7 @@ hwloc_x86_component_instantiate(struct hwloc_disc_component *component,
backend->disable = hwloc_x86_backend_disable;
/* default values */
+ data->is_knl = 0;
data->apicid_set = hwloc_bitmap_alloc();
data->apicid_unique = 1;
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 ce3250c..46fe4ae 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
@@ -257,7 +257,8 @@ hwloc_libxml_import_diff(struct hwloc__xml_import_state_s *state, const char *xm
if (state->global->next_attr(state, &attrname, &attrvalue) < 0)
break;
if (!strcmp(attrname, "refname")) {
- free(refname);
+ if (refname)
+ free(refname);
refname = strdup(attrvalue);
} else
goto out_with_doc;
@@ -266,13 +267,15 @@ hwloc_libxml_import_diff(struct hwloc__xml_import_state_s *state, const char *xm
ret = hwloc__xml_import_diff(state, firstdiffp);
if (refnamep && !ret)
*refnamep = refname;
- else
+ else if (refname)
free(refname);
xmlFreeDoc(doc);
return ret;
out_with_doc:
+ if (refname)
+ free(refname);
xmlFreeDoc(doc);
out:
return -1; /* failed */
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 a93d9d4..ba52208 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-2014 Inria. All rights reserved.
+ * Copyright © 2009-2015 Inria. All rights reserved.
* Copyright © 2009-2011 Université Bordeaux
* Copyright © 2009-2011 Cisco Systems, Inc. All rights reserved.
* See COPYING in top-level directory.
@@ -48,7 +48,7 @@ static int
hwloc__nolibxml_import_next_attr(hwloc__xml_import_state_t state, char **namep, char **valuep)
{
hwloc__nolibxml_import_state_data_t nstate = (void*) state->data;
- int namelen;
+ size_t namelen;
size_t len, escaped;
char *buffer, *value, *end;
@@ -116,7 +116,7 @@ hwloc__nolibxml_import_find_child(hwloc__xml_import_state_t state,
hwloc__nolibxml_import_state_data_t nchildstate = (void*) childstate->data;
char *buffer = nstate->tagbuffer;
char *end;
- int namelen;
+ size_t namelen;
childstate->parent = state;
childstate->global = state->global;
@@ -502,7 +502,7 @@ hwloc__nolibxml_export_update_buffer(hwloc__nolibxml_export_state_data_t ndata,
if (res >= 0) {
ndata->written += res;
if (res >= (int) ndata->remaining)
- res = ndata->remaining>0 ? ndata->remaining-1 : 0;
+ res = ndata->remaining>0 ? (int)ndata->remaining-1 : 0;
ndata->buffer += res;
ndata->remaining -= res;
}
@@ -511,7 +511,7 @@ hwloc__nolibxml_export_update_buffer(hwloc__nolibxml_export_state_data_t ndata,
static char *
hwloc__nolibxml_export_escape_string(const char *src)
{
- int fulllen, sublen;
+ size_t fulllen, sublen;
char *escaped, *dst;
fulllen = strlen(src);
@@ -675,15 +675,15 @@ hwloc_nolibxml_export_buffer(hwloc_topology_t topology, char **bufferp, int *buf
bufferlen = 16384; /* random guess for large enough default */
buffer = malloc(bufferlen);
- res = hwloc___nolibxml_prepare_export(topology, buffer, bufferlen);
+ res = hwloc___nolibxml_prepare_export(topology, buffer, (int)bufferlen);
if (res > bufferlen) {
buffer = realloc(buffer, res);
- hwloc___nolibxml_prepare_export(topology, buffer, res);
+ hwloc___nolibxml_prepare_export(topology, buffer, (int)res);
}
*bufferp = buffer;
- *buflenp = res;
+ *buflenp = (int)res;
return 0;
}
@@ -709,7 +709,7 @@ hwloc_nolibxml_export_file(hwloc_topology_t topology, const char *filename)
}
}
- ret = fwrite(buffer, 1, bufferlen-1 /* don't write the ending \0 */, file);
+ ret = (int)fwrite(buffer, 1, bufferlen-1 /* don't write the ending \0 */, file);
if (ret == bufferlen-1) {
ret = 0;
} else {
@@ -767,15 +767,15 @@ hwloc_nolibxml_export_diff_buffer(hwloc_topology_diff_t diff, const char *refnam
bufferlen = 16384; /* random guess for large enough default */
buffer = malloc(bufferlen);
- res = hwloc___nolibxml_prepare_export_diff(diff, refname, buffer, bufferlen);
+ res = hwloc___nolibxml_prepare_export_diff(diff, refname, buffer, (int)bufferlen);
if (res > bufferlen) {
buffer = realloc(buffer, res);
- hwloc___nolibxml_prepare_export_diff(diff, refname, buffer, res);
+ hwloc___nolibxml_prepare_export_diff(diff, refname, buffer, (int)res);
}
*bufferp = buffer;
- *buflenp = res;
+ *buflenp = (int)res;
return 0;
}
@@ -801,7 +801,7 @@ hwloc_nolibxml_export_diff_file(hwloc_topology_diff_t diff, const char *refname,
}
}
- ret = fwrite(buffer, 1, bufferlen-1 /* don't write the ending \0 */, file);
+ ret = (int)fwrite(buffer, 1, bufferlen-1 /* don't write the ending \0 */, file);
if (ret == bufferlen-1) {
ret = 0;
} else {
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 8cf584d..52b7ddc 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
@@ -998,6 +998,7 @@ hwloc_topology_diff_load_xml(hwloc_topology_t topology __hwloc_attribute_unused,
fakedata.msgprefix = strdup(basename);
if (!hwloc_libxml_callbacks && !hwloc_nolibxml_callbacks) {
+ free(fakedata.msgprefix);
errno = ENOSYS;
return -1;
}
@@ -1040,6 +1041,7 @@ hwloc_topology_diff_load_xmlbuffer(hwloc_topology_t topology __hwloc_attribute_u
fakedata.msgprefix = strdup("xmldiffbuffer");
if (!hwloc_libxml_callbacks && !hwloc_nolibxml_callbacks) {
+ free(fakedata.msgprefix);
errno = ENOSYS;
return -1;
}
@@ -1061,6 +1063,7 @@ hwloc_topology_diff_load_xmlbuffer(hwloc_topology_t topology __hwloc_attribute_u
}
hwloc_localeswitch_fini();
+
free(fakedata.msgprefix);
return ret;
}
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 1636730..028c226 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology.c
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology.c
@@ -132,6 +132,7 @@ int hwloc_get_sysctl(int name[], unsigned namelen, int *ret)
reading sysfs on Linux, this method is not virtualizable; thus it's only
used as a fall-back method, allowing `hwloc_set_fsroot ()' to
have the desired effect. */
+#ifndef HWLOC_WIN_SYS /* The windows implementation is in topology-windows.c */
unsigned
hwloc_fallback_nbprocessors(struct hwloc_topology *topology) {
int n;
@@ -157,10 +158,6 @@ hwloc_fallback_nbprocessors(struct hwloc_topology *topology) {
static int name[2] = {CTL_HW, HW_NPCU};
if (hwloc_get_sysctl(name, sizeof(name)/sizeof(*name)), &n)
n = -1;
-#elif defined(HWLOC_WIN_SYS)
- SYSTEM_INFO sysinfo;
- GetSystemInfo(&sysinfo);
- n = sysinfo.dwNumberOfProcessors;
#else
#ifdef __GNUC__
#warning No known way to discover number of available processors on this system
@@ -174,6 +171,7 @@ hwloc_fallback_nbprocessors(struct hwloc_topology *topology) {
n = 1;
return n;
}
+#endif /* !HWLOC_WIN_SYS */
/*
* Use the given number of processors and the optional online cpuset if given
@@ -351,9 +349,8 @@ void hwloc_obj_add_info_nodup(hwloc_obj_t obj, const char *name, const char *val
/* Get pointer to next childect. */ \
child = *pchild)
-/* Free an object and all its content. */
-void
-hwloc_free_unlinked_object(hwloc_obj_t obj)
+static void
+hwloc__free_object_contents(hwloc_obj_t obj)
{
switch (obj->type) {
default:
@@ -372,9 +369,34 @@ hwloc_free_unlinked_object(hwloc_obj_t obj)
hwloc_bitmap_free(obj->nodeset);
hwloc_bitmap_free(obj->complete_nodeset);
hwloc_bitmap_free(obj->allowed_nodeset);
+}
+
+/* Free an object and all its content. */
+void
+hwloc_free_unlinked_object(hwloc_obj_t obj)
+{
+ hwloc__free_object_contents(obj);
free(obj);
}
+/* Replace old with contents of new object, and make new freeable by the caller.
+ * Only updates next_sibling/first_child pointers,
+ * so may only be used during early discovery.
+ */
+static void
+hwloc_replace_linked_object(hwloc_obj_t old, hwloc_obj_t new)
+{
+ /* drop old fields */
+ hwloc__free_object_contents(old);
+ /* copy old tree pointers to new */
+ new->next_sibling = old->next_sibling;
+ new->first_child = old->first_child;
+ /* copy new contents to old now that tree pointers are OK */
+ memcpy(old, new, sizeof(*old));
+ /* clear new to that we may free it */
+ memset(new, 0,sizeof(*new));
+}
+
/* insert the (non-empty) list of sibling starting at firstnew as new children of newparent,
* and return the address of the pointer to the next one
*/
@@ -755,21 +777,56 @@ static int
hwloc_obj_cmp_sets(hwloc_obj_t obj1, hwloc_obj_t obj2)
{
hwloc_bitmap_t set1, set2;
+ int res = HWLOC_OBJ_DIFFERENT;
- /* compare cpusets if possible, or fallback to nodeset, or return */
- if (obj1->cpuset && !hwloc_bitmap_iszero(obj1->cpuset)
- && obj2->cpuset && !hwloc_bitmap_iszero(obj2->cpuset)) {
+ /* compare cpusets first */
+ if (obj1->complete_cpuset && obj2->complete_cpuset) {
+ set1 = obj1->complete_cpuset;
+ set2 = obj2->complete_cpuset;
+ } else {
set1 = obj1->cpuset;
set2 = obj2->cpuset;
- } else if (obj1->nodeset && !hwloc_bitmap_iszero(obj1->nodeset)
- && obj2->nodeset && !hwloc_bitmap_iszero(obj2->nodeset)) {
+ }
+ if (set1 && set2 && !hwloc_bitmap_iszero(set1) && !hwloc_bitmap_iszero(set2)) {
+ res = hwloc_bitmap_compare_inclusion(set1, set2);
+ if (res == HWLOC_OBJ_INTERSECTS)
+ return HWLOC_OBJ_INTERSECTS;
+ }
+
+ /* then compare nodesets, and combine the results */
+ if (obj1->complete_nodeset && obj2->complete_nodeset) {
+ set1 = obj1->complete_nodeset;
+ set2 = obj2->complete_nodeset;
+ } else {
set1 = obj1->nodeset;
set2 = obj2->nodeset;
- } else {
- return HWLOC_OBJ_DIFFERENT;
}
+ if (set1 && set2 && !hwloc_bitmap_iszero(set1) && !hwloc_bitmap_iszero(set2)) {
+ int noderes = hwloc_bitmap_compare_inclusion(set1, set2);
+ /* deal with conflicting cpusets/nodesets inclusions */
+ if (noderes == HWLOC_OBJ_INCLUDED) {
+ if (res == HWLOC_OBJ_CONTAINS)
+ /* contradicting order for cpusets and nodesets */
+ return HWLOC_OBJ_INTERSECTS;
+ res = HWLOC_OBJ_INCLUDED;
- return hwloc_bitmap_compare_inclusion(set1, set2);
+ } else if (noderes == HWLOC_OBJ_CONTAINS) {
+ if (res == HWLOC_OBJ_INCLUDED)
+ /* contradicting order for cpusets and nodesets */
+ return HWLOC_OBJ_INTERSECTS;
+ res = HWLOC_OBJ_CONTAINS;
+
+ } else if (noderes == HWLOC_OBJ_INTERSECTS) {
+ return HWLOC_OBJ_INTERSECTS;
+
+ } else {
+ /* nodesets are different, keep the cpuset order */
+ /* FIXME: with upcoming multiple levels of NUMA, we may have to report INCLUDED or CONTAINED here */
+
+ }
+ }
+
+ return res;
}
/* Compare object cpusets based on complete_cpuset if defined (always correctly ordered),
@@ -849,9 +906,7 @@ merge_insert_equal(hwloc_obj_t new, hwloc_obj_t old)
&new->infos, &new->infos_count);
}
- if (new->name) {
- if (old->name)
- free(old->name);
+ if (new->name && !old->name) {
old->name = new->name;
new->name = NULL;
}
@@ -860,21 +915,17 @@ merge_insert_equal(hwloc_obj_t new, hwloc_obj_t old)
switch(new->type) {
case HWLOC_OBJ_NUMANODE:
- /* Do not check these, it may change between calls */
- merge_sizes(new, old, memory.local_memory);
- merge_sizes(new, old, memory.total_memory);
- /* if both newects have a page_types array, just keep the biggest one for now */
- if (new->memory.page_types_len && old->memory.page_types_len)
- hwloc_debug("%s", "merging page_types by keeping the biggest one only\n");
- if (new->memory.page_types_len < old->memory.page_types_len) {
- free(new->memory.page_types);
- } else {
- free(old->memory.page_types);
+ if (new->memory.local_memory && !old->memory.local_memory) {
+ /* no memory in old, use new memory */
+ old->memory.local_memory = new->memory.local_memory;
+ if (old->memory.page_types)
+ free(old->memory.page_types);
old->memory.page_types_len = new->memory.page_types_len;
old->memory.page_types = new->memory.page_types;
new->memory.page_types = NULL;
new->memory.page_types_len = 0;
}
+ /* old->memory.total_memory will be updated by propagate_total_memory() */
break;
case HWLOC_OBJ_CACHE:
merge_sizes(new, old, attr->cache.size);
@@ -920,12 +971,22 @@ hwloc___insert_object_by_cpuset(struct hwloc_topology *topology, hwloc_obj_t cur
if (res == HWLOC_OBJ_EQUAL) {
if (obj->type == HWLOC_OBJ_GROUP) {
- /* Group are ignored keep_structure. ignored always are handled earlier. Non-ignored Groups isn't possible. */
- assert(topology->ignored_types[HWLOC_OBJ_GROUP] == HWLOC_IGNORE_TYPE_KEEP_STRUCTURE);
+ /* Groups are ignored keep_structure or always. Non-ignored Groups isn't possible. */
+ assert(topology->ignored_types[HWLOC_OBJ_GROUP] != HWLOC_IGNORE_TYPE_NEVER);
/* Remove the Group now. The normal ignore code path wouldn't tell us whether the Group was removed or not.
*
- * Keep EQUAL so that the Group gets merged.
+ * The Group doesn't contain anything to keep, just let the caller free it.
*/
+ return child;
+
+ } else if (child->type == HWLOC_OBJ_GROUP) {
+
+ /* Replace the Group with the new object contents
+ * and let the caller free the new object
+ */
+ hwloc_replace_linked_object(child, obj);
+ return child;
+
} else {
/* otherwise compare actual types to decide of the inclusion */
res = hwloc_type_cmp(obj, child);
@@ -952,7 +1013,9 @@ hwloc___insert_object_by_cpuset(struct hwloc_topology *topology, hwloc_obj_t cur
}
return NULL;
}
- /* Can be two objects with same type. Or one Group and anything else. */
+ /* Two objects with same type.
+ * Groups are handled above.
+ */
if (obj->type == child->type
&& (obj->type == HWLOC_OBJ_PU || obj->type == HWLOC_OBJ_NUMANODE)
&& obj->os_index != child->os_index) {
@@ -2131,6 +2194,12 @@ hwloc_level_filter_objects(hwloc_topology_t topology,
/* count interesting objects and allocate the new array */
for(i=0, nnew=0; i<nold; i++)
nnew += hwloc_level_filter_object(topology, NULL, old[i]);
+ if (!nnew) {
+ *objs = NULL;
+ *n_objs = 0;
+ free(old);
+ return 0;
+ }
new = malloc(nnew * sizeof(hwloc_obj_t));
if (!new) {
free(old);
@@ -2197,7 +2266,7 @@ hwloc_connect_levels(hwloc_topology_t topology)
/* don't touch next_group_depth, the Group objects are still here */
/* initialize all depth to unknown */
- for (l = HWLOC_OBJ_SYSTEM; l < HWLOC_OBJ_TYPE_MAX; l++)
+ for (l = HWLOC_OBJ_SYSTEM; l < HWLOC_OBJ_MISC; l++)
topology->type_depth[l] = HWLOC_TYPE_DEPTH_UNKNOWN;
/* initialize root type depth */
topology->type_depth[topology->levels[0][0]->type] = 0;
@@ -2207,17 +2276,14 @@ hwloc_connect_levels(hwloc_topology_t topology)
topology->bridge_level = NULL;
topology->bridge_nbobjects = 0;
topology->first_bridge = topology->last_bridge = NULL;
- topology->type_depth[HWLOC_OBJ_BRIDGE] = HWLOC_TYPE_DEPTH_BRIDGE;
free(topology->pcidev_level);
topology->pcidev_level = NULL;
topology->pcidev_nbobjects = 0;
topology->first_pcidev = topology->last_pcidev = NULL;
- topology->type_depth[HWLOC_OBJ_PCI_DEVICE] = HWLOC_TYPE_DEPTH_PCI_DEVICE;
free(topology->osdev_level);
topology->osdev_level = NULL;
topology->osdev_nbobjects = 0;
topology->first_osdev = topology->last_osdev = NULL;
- topology->type_depth[HWLOC_OBJ_OS_DEVICE] = HWLOC_TYPE_DEPTH_OS_DEVICE;
/* Start with children of the whole system. */
n_objs = topology->levels[0][0]->arity;
@@ -2345,13 +2411,20 @@ hwloc_connect_levels(hwloc_topology_t topology)
void hwloc_alloc_obj_cpusets(hwloc_obj_t obj)
{
- obj->cpuset = hwloc_bitmap_alloc_full();
- obj->complete_cpuset = hwloc_bitmap_alloc();
- obj->online_cpuset = hwloc_bitmap_alloc_full();
- obj->allowed_cpuset = hwloc_bitmap_alloc_full();
- obj->nodeset = hwloc_bitmap_alloc();
- obj->complete_nodeset = hwloc_bitmap_alloc();
- obj->allowed_nodeset = hwloc_bitmap_alloc_full();
+ if (!obj->cpuset)
+ obj->cpuset = hwloc_bitmap_alloc_full();
+ if (!obj->complete_cpuset)
+ obj->complete_cpuset = hwloc_bitmap_alloc();
+ if (!obj->online_cpuset)
+ obj->online_cpuset = hwloc_bitmap_alloc_full();
+ if (!obj->allowed_cpuset)
+ obj->allowed_cpuset = hwloc_bitmap_alloc_full();
+ if (!obj->nodeset)
+ obj->nodeset = hwloc_bitmap_alloc();
+ if (!obj->complete_nodeset)
+ obj->complete_nodeset = hwloc_bitmap_alloc();
+ if (!obj->allowed_nodeset)
+ obj->allowed_nodeset = hwloc_bitmap_alloc_full();
}
/* Main discovery loop */
@@ -2597,6 +2670,7 @@ void
hwloc_topology_setup_defaults(struct hwloc_topology *topology)
{
struct hwloc_obj *root_obj;
+ unsigned l;
/* reset support */
memset(&topology->binding_hooks, 0, sizeof(topology->binding_hooks));
@@ -2617,6 +2691,12 @@ hwloc_topology_setup_defaults(struct hwloc_topology *topology)
topology->first_bridge = topology->last_bridge = NULL;
topology->first_pcidev = topology->last_pcidev = NULL;
topology->first_osdev = topology->last_osdev = NULL;
+ /* sane values to type_depth */
+ for (l = HWLOC_OBJ_SYSTEM; l < HWLOC_OBJ_MISC; l++)
+ topology->type_depth[l] = HWLOC_TYPE_DEPTH_UNKNOWN;
+ topology->type_depth[HWLOC_OBJ_BRIDGE] = HWLOC_TYPE_DEPTH_BRIDGE;
+ topology->type_depth[HWLOC_OBJ_PCI_DEVICE] = HWLOC_TYPE_DEPTH_PCI_DEVICE;
+ topology->type_depth[HWLOC_OBJ_OS_DEVICE] = HWLOC_TYPE_DEPTH_OS_DEVICE;
/* Create the actual machine object, but don't touch its attributes yet
* since the OS backend may still change the object into something else
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 97b3e5b..e28bba1 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/src/traversal.c
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/src/traversal.c
@@ -207,7 +207,7 @@ hwloc_obj_type_of_string (const char * string)
if (!strcasecmp(string, "Cache")) return HWLOC_OBJ_CACHE;
if (!strcasecmp(string, "Core")) return HWLOC_OBJ_CORE;
if (!strcasecmp(string, "PU")) return HWLOC_OBJ_PU;
- if (!strcasecmp(string, "Bridge")) return HWLOC_OBJ_BRIDGE;
+ if (!strcasecmp(string, "Bridge") || !strcasecmp(string, "HostBridge") || !strcasecmp(string, "PCIBridge")) return HWLOC_OBJ_BRIDGE;
if (!strcasecmp(string, "PCIDev")) return HWLOC_OBJ_PCI_DEVICE;
if (!strcasecmp(string, "OSDev")) return HWLOC_OBJ_OS_DEVICE;
return (hwloc_obj_type_t) -1;
@@ -238,7 +238,9 @@ hwloc_obj_type_sscanf(const char *string, hwloc_obj_type_t *typep, int *depthatt
type = HWLOC_OBJ_PU;
} else if (!hwloc_strncasecmp(string, "misc", 2)) {
type = HWLOC_OBJ_MISC;
- } else if (!hwloc_strncasecmp(string, "bridge", 2)) {
+ } else if (!hwloc_strncasecmp(string, "bridge", 2)
+ || !hwloc_strncasecmp(string, "hostbridge", 6)
+ || !hwloc_strncasecmp(string, "pcibridge", 5)) {
type = HWLOC_OBJ_BRIDGE;
} else if (!hwloc_strncasecmp(string, "pci", 2)) {
type = HWLOC_OBJ_PCI_DEVICE;
@@ -261,7 +263,7 @@ hwloc_obj_type_sscanf(const char *string, hwloc_obj_type_t *typep, int *depthatt
}
} else if (!hwloc_strncasecmp(string, "group", 2)) {
- int length;
+ size_t length;
type = HWLOC_OBJ_GROUP;
length = strcspn(string, "0123456789");
if (length <= 5 && !hwloc_strncasecmp(string, "group", length)
@@ -499,7 +501,8 @@ hwloc_obj_type_snprintf(char * __hwloc_restrict string, size_t size, hwloc_obj_t
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';
+ if (size > 0)
+ *string = '\0';
return 0;
}
break;
@@ -552,7 +555,7 @@ hwloc_obj_attr_snprintf(char * __hwloc_restrict string, size_t size, hwloc_obj_t
if (ret > 0)
prefix = separator;
if (res >= tmplen)
- res = tmplen>0 ? tmplen - 1 : 0;
+ res = tmplen>0 ? (int)tmplen - 1 : 0;
tmp += res;
tmplen -= res;
@@ -626,7 +629,7 @@ hwloc_obj_attr_snprintf(char * __hwloc_restrict string, size_t size, hwloc_obj_t
if (ret > 0)
prefix = separator;
if (res >= tmplen)
- res = tmplen>0 ? tmplen - 1 : 0;
+ res = tmplen>0 ? (int)tmplen - 1 : 0;
tmp += res;
tmplen -= res;
@@ -648,7 +651,7 @@ hwloc_obj_attr_snprintf(char * __hwloc_restrict string, size_t size, hwloc_obj_t
return -1;
ret += res;
if (res >= tmplen)
- res = tmplen>0 ? tmplen - 1 : 0;
+ res = tmplen>0 ? (int)tmplen - 1 : 0;
tmp += res;
tmplen -= res;
if (ret > 0)
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/hwloc_backends.c b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/hwloc_backends.c
index 3f71dc6..53e3f0c 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/hwloc_backends.c
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/hwloc_backends.c
@@ -15,8 +15,15 @@
#include <errno.h>
#include <assert.h>
-#ifdef HWLOC_WIN_SYS
-#define mkstemp mktemp
+#if defined(HWLOC_WIN_SYS) && !defined(__CYGWIN__)
+#include <fcntl.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+static inline int mkstemp(char *name)
+{
+ mktemp(name);
+ return open(name, O_RDWR|O_CREAT, S_IRWXU);
+}
#endif
/* mostly useful with valgrind, to check if backend cleanup properly */
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/linux/32em64t-2n8c+1mic.output b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/linux/32em64t-2n8c+1mic.output
index e50dfb8..d00b2ad 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/linux/32em64t-2n8c+1mic.output
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/linux/32em64t-2n8c+1mic.output
@@ -116,6 +116,11 @@
</object>
</object>
</object>
+ <object type="PCIDev" os_index="32" pci_busid="0000:00:02.0" pci_type="0108 [8086:0953] [8086:3709] 01" pci_link_speed="0.000000">
+ <object type="OSDev" name="nvme0n1" osdev_type="0">
+ <info name="LinuxDeviceID" value="259:0"/>
+ </object>
+ </object>
<object type="PCIDev" os_index="64" pci_busid="0000:00:04.0" pci_type="0880 [8086:3c20] [1028:0518] 07" pci_link_speed="0.000000">
<object type="OSDev" name="dma0chan0" osdev_type="4"/>
</object>
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/linux/32em64t-2n8c+1mic.tar.bz2 b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/linux/32em64t-2n8c+1mic.tar.bz2
index 09d7bb9..efc086a 100644
Binary files a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/linux/32em64t-2n8c+1mic.tar.bz2 and b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/linux/32em64t-2n8c+1mic.tar.bz2 differ
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
index 4b67abb..e029466 100644
--- 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
@@ -1,5 +1,5 @@
/*
- * Copyright © 2013 Inria. All rights reserved.
+ * Copyright © 2013-2015 Inria. All rights reserved.
* See COPYING in top-level directory.
*/
@@ -11,4 +11,10 @@
uint32_t Kernel_ProcessorID( void );
uint32_t Kernel_MyTcoord( void );
+/* don't try to cross-build BGQ port on old Linux platforms */
+#if (!HAVE_DECL_PTHREAD_GETAFFINITY_NP) || (!HAVE_DECL_PTHREAD_SETAFFINITY_NP) || (!defined HWLOC_HAVE_CPU_SET)
+#warning Disabling BGQ port cross-build on old Linux platform
+#define HWLOC_DISABLE_BGQ_PORT_TEST
+#endif
+
#endif /* HWLOC_PORT_BGQ_KERNEL_LOCATION_H */
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/windows/windows.h b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/windows/windows.h
index eaf23e1..242b162 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/windows/windows.h
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/windows/windows.h
@@ -1,5 +1,5 @@
/*
- * Copyright © 2009 inria. All rights reserved.
+ * Copyright © 2009-2015 Inria. All rights reserved.
* Copyright © 2009-2012 Université Bordeaux
* See COPYING in top-level directory.
*/
@@ -20,8 +20,9 @@ typedef unsigned char BYTE, UCHAR;
typedef unsigned short WORD, USHORT;
typedef unsigned long ULONG_PTR, DWORD_PTR, DWORD, *PDWORD, *PDWORD_PTR;
typedef const char *LPCSTR;
-typedef int (*FARPROC)();
+typedef int (*FARPROC)(void);
typedef void *PVOID,*LPVOID;
+typedef void VOID;
typedef ULONG_PTR SIZE_T;
/* This is to cope with linux using integers for hwloc_pid_t and hwloc_thread_t
@@ -65,6 +66,8 @@ BOOL GetNumaAvailableMemoryNode(UCHAR Node, PULONGLONG AvailableBytes);
typedef struct _SYSTEM_INFO {
DWORD dwPageSize;
+ DWORD_PTR dwActiveProcessorMask;
+ DWORD dwNumberOfProcessors;
} SYSTEM_INFO, *LPSYSTEM_INFO;
void WINAPI GetSystemInfo(LPSYSTEM_INFO lpSystemInfo);
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 0519ceb..0c9ea0a 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
@@ -65,6 +65,7 @@ needed: dirs include/hwloc/autogen/config.h include/private/autogen/config.h
@if cpp $(CPPFLAGS) $(TEST_CPPFLAGS) -Iinclude -I$(HWLOC_top_srcdir)/include -I$(HWLOC_top_builddir)/include $(srcdir)/main.c \
| sed -e 's/foobar_ ## hwloc_ ## /foobar_hwloc_/g' \
| sed -e 's/FOOBAR_ ## hwloc_ ## /FOOBAR_hwloc_/g' \
+ | grep -vw HWLOC_DEBUG_VERBOSE \
| grep -vw hwloc_uint64_t \
| egrep -i '(^| |\*)hwloc_' ; then false ; else true ; fi
@echo "# done"
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc/Makefile.am b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc/Makefile.am
index 08b3204..6983e7a 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc/Makefile.am
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc/Makefile.am
@@ -36,6 +36,16 @@ bin_PROGRAMS = \
hwloc-patch \
hwloc-ps
+if HWLOC_HAVE_LINUX
+if HWLOC_HAVE_X86
+sbin_PROGRAMS = hwloc-dump-hwdata
+endif HWLOC_HAVE_X86
+endif HWLOC_HAVE_LINUX
+
+hwloc_dump_hwdata_SOURCES = \
+ hwloc-dump-hwdata.c \
+ hwloc-dump-hwdata-knl.c
+
hwloc_calc_SOURCES = \
hwloc-calc.h \
hwloc-calc.c
@@ -78,6 +88,13 @@ man1_pages = \
hwloc-info.1 \
hwloc-patch.1 \
hwloc-ps.1
+
+if HWLOC_HAVE_LINUX
+if HWLOC_HAVE_X86
+man1_pages += hwloc-dump-hwdata.1in
+endif HWLOC_HAVE_X86
+endif HWLOC_HAVE_LINUX
+
EXTRA_DIST += $(man1_pages:.1=.1in)
nodist_man_MANS += $(man1_pages)
@@ -90,6 +107,16 @@ if HWLOC_HAVE_LINUX
nodist_man_MANS += $(hgt_page)
endif HWLOC_HAVE_LINUX
+# Same for dump-hwdata page on Linux/x86
+hdh_page = hwloc-dump-hwdata.1
+EXTRA_DIST += $(hdh_page:.1=.1in)
+if HWLOC_HAVE_LINUX
+if HWLOC_HAVE_X86
+nodist_man_MANS += $(hdh_page)
+endif HWLOC_HAVE_X86
+endif HWLOC_HAVE_LINUX
+
+
.1in.1:
@ echo Creating $@ man page...
@ $(SED) -e 's/#PACKAGE_NAME#/@PACKAGE_NAME@/g' \
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc/hwloc-annotate.c b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc/hwloc-annotate.c
index 102821b..9ba283d 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc/hwloc-annotate.c
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc/hwloc-annotate.c
@@ -7,11 +7,13 @@
#include <hwloc-calc.h>
#include <hwloc.h>
+#include "misc.h"
+
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
-static void usage(const char *callname __hwloc_attribute_unused, FILE *where)
+void usage(const char *callname __hwloc_attribute_unused, FILE *where)
{
fprintf(where, "Usage: hwloc-annotate [options] <input.xml> <output.xml> <location> <annotation>\n");
fprintf(where, " <location> may be:\n");
@@ -165,7 +167,7 @@ int main(int argc, char *argv[])
}
hwloc_topology_init(&topology);
- hwloc_topology_set_flags(topology, HWLOC_TOPOLOGY_FLAG_WHOLE_IO|HWLOC_TOPOLOGY_FLAG_ICACHES);
+ hwloc_topology_set_flags(topology, HWLOC_TOPOLOGY_FLAG_WHOLE_SYSTEM | HWLOC_TOPOLOGY_FLAG_WHOLE_IO | HWLOC_TOPOLOGY_FLAG_ICACHES);
err = hwloc_topology_set_xml(topology, input);
if (err < 0)
goto out;
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc/hwloc-assembler.c b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc/hwloc-assembler.c
index 65f8ede..2dbf11c 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc/hwloc-assembler.c
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc/hwloc-assembler.c
@@ -6,11 +6,13 @@
#include <private/autogen/config.h>
#include <hwloc.h>
+#include "misc.h"
+
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
-static void usage(char *name, FILE *where)
+void usage(const char *name, FILE *where)
{
fprintf (where, "Usage: %s [options] <output>.xml [-n <name1] <input1>.xml [-n name2] <input2>.xml ...\n", name);
fprintf (where, "Options:\n");
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc/hwloc-bind.c b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc/hwloc-bind.c
index 3cddf1b..9191d14 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc/hwloc-bind.c
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc/hwloc-bind.c
@@ -1,6 +1,6 @@
/*
* Copyright © 2009 CNRS
- * Copyright © 2009-2014 Inria. All rights reserved.
+ * Copyright © 2009-2015 Inria. All rights reserved.
* Copyright © 2009-2010, 2012 Université Bordeaux
* Copyright © 2009 Cisco Systems, Inc. All rights reserved.
* See COPYING in top-level directory.
@@ -17,6 +17,11 @@
#include "misc.h"
+#if defined(HWLOC_WIN_SYS) && !defined(__CYGWIN__)
+#include <process.h>
+#define execvp(a,b) (int)_execvp((a), (const char * const *)(b))
+#endif
+
void usage(const char *name, FILE *where)
{
fprintf(where, "Usage: %s [options] <location> -- command ...\n", name);
@@ -338,9 +343,11 @@ int main(int argc, char *argv[])
char *s;
hwloc_bitmap_asprintf(&s, membind_set);
if (pid_number > 0)
- fprintf(stderr, "hwloc_set_proc_membind %s %d failed (errno %d %s)\n", s, pid_number, bind_errno, errmsg);
+ fprintf(stderr, "hwloc_set_proc_membind %s (policy %u flags %x) PID %d failed (errno %d %s)\n",
+ s, membind_policy, membind_flags, pid_number, bind_errno, errmsg);
else
- fprintf(stderr, "hwloc_set_membind %s failed (errno %d %s)\n", s, bind_errno, errmsg);
+ fprintf(stderr, "hwloc_set_membind %s (policy %u flags %x) failed (errno %d %s)\n",
+ s, membind_policy, membind_flags, bind_errno, errmsg);
free(s);
}
if (ret && !force)
@@ -360,6 +367,11 @@ int main(int argc, char *argv[])
fprintf(stderr, "binding on cpu set %s\n", s);
free(s);
}
+ if (got_membind && !hwloc_bitmap_isequal(membind_set, cpubind_set)) {
+ if (verbose)
+ fprintf(stderr, "Conflicting CPU and memory binding requested, adding HWLOC_CPUBIND_NOMEMBIND flag.\n");
+ cpubind_flags |= HWLOC_CPUBIND_NOMEMBIND;
+ }
if (single)
hwloc_bitmap_singlify(cpubind_set);
if (pid_number > 0)
@@ -372,9 +384,11 @@ int main(int argc, char *argv[])
char *s;
hwloc_bitmap_asprintf(&s, cpubind_set);
if (pid_number > 0)
- fprintf(stderr, "hwloc_set_proc_cpubind %s %d failed (errno %d %s)\n", s, pid_number, bind_errno, errmsg);
+ fprintf(stderr, "hwloc_set_proc_cpubind %s (flags %x) PID %d failed (errno %d %s)\n",
+ s, cpubind_flags, pid_number, bind_errno, errmsg);
else
- fprintf(stderr, "hwloc_set_cpubind %s failed (errno %d %s)\n", s, bind_errno, errmsg);
+ fprintf(stderr, "hwloc_set_cpubind %s (flags %x) failed (errno %d %s)\n",
+ s, cpubind_flags, bind_errno, errmsg);
free(s);
}
if (ret && !force)
@@ -396,6 +410,10 @@ int main(int argc, char *argv[])
return EXIT_FAILURE;
}
+ /* FIXME: check whether Windows execvp() passes INHERIT_PARENT_AFFINITY to CreateProcess()
+ * because we need to propagate processor group affinity. However process-wide affinity
+ * isn't supported with processor groups so far.
+ */
ret = execvp(argv[0], argv);
if (ret) {
fprintf(stderr, "%s: Failed to launch executable \"%s\"\n",
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc/hwloc-calc.c b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc/hwloc-calc.c
index 3b4aa41..afdda1b 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc/hwloc-calc.c
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc/hwloc-calc.c
@@ -465,7 +465,7 @@ int main(int argc, char *argv[])
char *current, *tmpline;
/* stop if line is empty */
- if (!fgets(line, len, stdin))
+ if (!fgets(line, (int)len, stdin))
break;
/* keep reading until we get EOL */
@@ -473,7 +473,7 @@ int main(int argc, char *argv[])
while (!strchr(tmpline, '\n')) {
line = realloc(line, len*2);
tmpline = line + len-1;
- if (!fgets(tmpline, len+1, stdin))
+ if (!fgets(tmpline, (int)(len+1), stdin))
break;
len *= 2;
}
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc/hwloc-diff.c b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc/hwloc-diff.c
index f6b9d69..8f0ba64 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc/hwloc-diff.c
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc/hwloc-diff.c
@@ -1,5 +1,5 @@
/*
- * Copyright © 2013-2014 Inria. All rights reserved.
+ * Copyright © 2013-2015 Inria. All rights reserved.
* See COPYING in top-level directory.
*/
@@ -7,7 +7,9 @@
#include <hwloc.h>
#include <hwloc/diff.h>
-static void usage(const char *callname __hwloc_attribute_unused, FILE *where)
+#include "misc.h"
+
+void usage(const char *callname __hwloc_attribute_unused, FILE *where)
{
fprintf(where, "Usage: hwloc-diff [options] <old.xml> <new.xml> [<output.diff.xml>]\n");
fprintf(where, "Options:\n");
@@ -20,7 +22,7 @@ int main(int argc, char *argv[])
{
hwloc_topology_t topo1, topo2;
hwloc_topology_diff_t firstdiff = NULL, diff;
- unsigned long flags = HWLOC_TOPOLOGY_FLAG_WHOLE_IO | HWLOC_TOPOLOGY_FLAG_ICACHES;
+ unsigned long flags = HWLOC_TOPOLOGY_FLAG_WHOLE_SYSTEM | HWLOC_TOPOLOGY_FLAG_WHOLE_IO | HWLOC_TOPOLOGY_FLAG_ICACHES;
char *callname, *input1, *input2, *output, *outputname, *refname = NULL;
char *xmlbuffer;
int xmlbuflen;
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc/hwloc-dump-hwdata-knl.c b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc/hwloc-dump-hwdata-knl.c
new file mode 100644
index 0000000..ac88845
--- /dev/null
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc/hwloc-dump-hwdata-knl.c
@@ -0,0 +1,462 @@
+/*
+ * Copyright © 2015-2016, 2015 Intel
+ * Copyright © 2015 Inria. All rights reserved.
+ * See COPYING in top-level directory.
+ */
+
+#include <private/autogen/config.h>
+#include <stdio.h>
+#include <stdint.h>
+#include <dirent.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+
+#define KERNEL_SMBIOS_SYSFS "/sys/firmware/dmi/entries"
+
+#define KNL_SMBIOS_GROUP_STRING "Group: Knights Landing Information"
+
+/* Header is common part of all SMBIOS entries */
+struct smbios_header
+{
+ uint8_t type;
+ uint8_t length;
+ uint16_t handle;
+};
+
+struct smbios_group
+{
+ uint8_t group_name;
+};
+
+/* This structrures are padded by compiler
+ * So we hardcode size of the struct and use it
+ * instead of sizeof() */
+#define GROUP_ENTRY_SIZE 3
+struct smbios_group_entry
+{
+ uint8_t type;
+ uint16_t handle;
+};
+
+/* KNL header is similar as SMBIOS header
+ * decided to add it for readability */
+#define SMBIOS_KNL_HEADER_SIZE 7
+struct knl_smbios_header
+{
+ uint8_t type;
+ uint8_t length;
+ uint16_t handle;
+ uint16_t member_id;
+ uint8_t member_name;
+};
+
+/* general info data */
+#define SMBIOS_KNL_GENERAL_INFO_SIZE 5
+struct knl_general_info
+{
+ uint8_t supp_cluster_mode;
+ uint8_t cluster_mode;
+ uint8_t supp_memory_mode;
+ uint8_t memory_mode;
+ uint8_t cache_info;
+};
+
+/* memory info */
+#define SMBIOS_KNL_EDC_INFO_SIZE 9
+struct knl_edc_info
+{
+ uint8_t mcdram_present;
+ uint8_t mcdram_enabled;
+ uint8_t allowed_channels;
+ uint8_t reserved[4];
+ uint8_t mcdram_info_size;
+ uint8_t mcdram_info_count;
+};
+
+/* mcdram controller structure */
+struct knl_mcdram_info {
+ uint32_t status;
+ uint8_t controller;
+ uint8_t channel;
+ uint16_t size64MB;
+ uint8_t product_revision;
+ uint8_t fwmajor_revision;
+ uint8_t fwminor_revision;
+ uint8_t fwpatch_revision;
+};
+
+/* internal data */
+struct parser_data
+{
+ uint64_t mcdram_regular;
+ uint64_t mcdram_cache;
+ int cluster_mode;
+ int memory_mode;
+ int cache_info;
+ int type_count;
+ int knl_types[64];
+};
+
+enum cluster_mode
+{
+ QUADRANT = 1,
+ HEMISPHERE = 2,
+ SNC4 = 4,
+ SNC2 = 8,
+ ALL2ALL = 16
+};
+
+enum memory_mode
+{
+ CACHE = 1,
+ FLAT = 2,
+ HYBRID = 4
+};
+
+
+static int get_file_buffer(const char *file, char *buffer, int size)
+{
+ FILE *f;
+
+ if (!buffer) {
+ fprintf(stderr, "Unable to allocate buffer\n");
+ return 0;
+ }
+
+ f = fopen(file, "rb");
+ if (!f) {
+ fprintf(stderr, "Unable to open %s (%s)\n", file, strerror(errno));
+ return 0;
+ }
+
+ printf(" File = %s, size = %d\n", file, size);
+
+ size = fread(buffer, 1, size, f);
+ if (size == 0) {
+ fprintf(stderr, "Unable to read file\n");
+ fclose(f);
+ return 0;
+ }
+
+ fclose(f);
+ return size;
+}
+
+static int is_knl_entry(struct smbios_header *h, const char *end, const char *query)
+{
+ char *group_strings = (char*)h + h->length;
+ do {
+ int len = strlen(group_strings);
+ if (!strncmp(group_strings, query, len))
+ return 1;
+ /* SMBIOS string entries end with "\0\0"
+ * if length is 0 break and return
+ * */
+ if (len == 0)
+ break;
+ group_strings += len;
+ } while(group_strings < end);
+
+ return 0;
+}
+
+static int is_knl_group(struct smbios_header *h, const char *end)
+{
+ if (h->type != 14) {
+ fprintf(stderr, "SMBIOS table is not group table\n");
+ return -1;
+ }
+
+ return is_knl_entry(h, end, KNL_SMBIOS_GROUP_STRING);
+}
+
+#define KNL_MEMBER_ID_GENERAL 0x1
+#define KNL_MEMBER_ID_EDC 0x2
+
+#define PATH_SIZE 512
+#define SMBIOS_FILE_BUF_SIZE 4096
+
+static int process_smbios_group(const char *input_fsroot, char *dir_name, struct parser_data *data)
+{
+ char path[PATH_SIZE];
+ char file_buf[SMBIOS_FILE_BUF_SIZE];
+ struct smbios_header *h;
+ char *p;
+ char *end;
+ int size;
+ int i;
+ snprintf(path, PATH_SIZE-1, "%s/" KERNEL_SMBIOS_SYSFS "/%s/raw", input_fsroot, dir_name);
+ path[PATH_SIZE-1] = 0;
+
+ size = get_file_buffer(path, file_buf, SMBIOS_FILE_BUF_SIZE);
+ if (!size) {
+ fprintf(stderr, "Unable to read raw table file\n");
+ return -1;
+ }
+
+ h = (struct smbios_header*)file_buf;
+ end = file_buf+size;
+ if (!is_knl_group(h, end)) {
+ fprintf(stderr, "SMBIOS table does not contain KNL entries\n");
+ return -1;
+ }
+
+ p = file_buf + sizeof(struct smbios_header) + sizeof(struct smbios_group);
+ if ((char*)p >= end) {
+ fprintf(stderr, "SMBIOS table does not have entries\n");
+ return -1;
+ }
+
+ end = file_buf+h->length;
+
+ i = 0;
+ for (; p < end; i++, p+=3) {
+ struct smbios_group_entry *e = (struct smbios_group_entry*)p;
+ data->knl_types[i] = e->type;
+ printf(" Found KNL type = %d\n", e->type);
+ }
+
+ data->type_count = i;
+ return 0;
+}
+
+static int process_knl_entry(const char *input_fsroot, char *dir_name, struct parser_data *data)
+{
+ char path[PATH_SIZE];
+ char file_buf[SMBIOS_FILE_BUF_SIZE];
+ char *end;
+ int size;
+ struct knl_smbios_header *h;
+
+ snprintf(path, PATH_SIZE-1, "%s/" KERNEL_SMBIOS_SYSFS "/%s/raw", input_fsroot, dir_name);
+ path[PATH_SIZE-1] = 0;
+
+ size = get_file_buffer(path, file_buf, SMBIOS_FILE_BUF_SIZE);
+ if (!size) {
+ fprintf(stderr, "Unable to read raw table file\n");
+ return -1;
+ }
+
+ end = file_buf+size;
+ h = (struct knl_smbios_header*)file_buf;
+ if (h->member_id & KNL_MEMBER_ID_GENERAL) {
+ struct knl_general_info *info =
+ (struct knl_general_info*) (file_buf+SMBIOS_KNL_HEADER_SIZE);
+ printf(" Getting general KNL info\n");
+ data->cluster_mode = info->cluster_mode;
+ data->memory_mode = info->memory_mode;
+ data->cache_info = info->cache_info;
+ } else if (h->member_id & KNL_MEMBER_ID_EDC) {
+ struct knl_edc_info *info = (struct knl_edc_info*)(file_buf+SMBIOS_KNL_HEADER_SIZE);
+ if (info->mcdram_present && info->mcdram_enabled) {
+ struct knl_mcdram_info *mi = (struct knl_mcdram_info*)(info + 1);
+ /* we use always smbios size not struct size
+ * as it can change in future.*/
+ int struct_size = info->mcdram_info_size;
+ int i = 0;
+
+ if (0 == struct_size) {
+ printf(" MCDRAM info size is set to 0, falling back to known size\n");
+ struct_size = sizeof(*mi);
+ }
+ printf(" Getting MCDRAM KNL info. Count=%d struct size=%d\n",
+ (int)info->mcdram_info_count, struct_size);
+ for ( ; i < info->mcdram_info_count; i++) {
+ if ((char*)mi >= end) {
+ fprintf(stderr, "SMBIOS KNL entry is too small\n");
+ return -1;
+ }
+ printf(" MCDRAM controller %d\n", mi->controller);
+ if (mi->status & 0x1) {
+ printf(" Controller fused\n");
+ } else {
+ data->mcdram_regular += mi->size64MB;
+ printf(" Size = %d MB\n", (int)mi->size64MB*64);
+ }
+ mi = (struct knl_mcdram_info*)(((char*)mi)+struct_size);
+ }
+ /* convert to bytes */
+ printf(" Total MCDRAM %llu MB\n", (long long unsigned int)data->mcdram_regular*64);
+ data->mcdram_regular *= 64*1024*1024;
+ } else {
+ data->mcdram_regular = 0;
+ data->mcdram_cache = 0;
+ }
+
+ } else {
+ /* We skip unknown table */
+ fprintf(stderr, "Ignoring unknown SMBIOS entry type=%x\n", h->member_id);
+ }
+
+ return 0;
+}
+
+static int print_result(struct parser_data *data, const char *out_file)
+{
+ int node_count = 0;
+ int fd;
+ FILE *f;
+
+ switch (data->cluster_mode) {
+ case QUADRANT:
+ node_count = 1;
+ printf(" Cluster mode: Quadrant\n");
+ break;
+ case HEMISPHERE:
+ node_count = 1;
+ printf(" Cluster mode: Hemisphere\n");
+ break;
+ case ALL2ALL:
+ node_count = 1;
+ printf(" Cluster mode: All2All\n");
+ break;
+ case SNC2:
+ node_count = 2;
+ printf(" Cluster mode: SNC-2\n");
+ break;
+ case SNC4:
+ node_count = 4;
+ printf(" Cluster mode: SNC-4\n");
+ break;
+ default:
+ fprintf(stderr, "Incorrect cluster mode %d\n", data->cluster_mode);
+ return -1;
+ }
+
+ switch (data->memory_mode) {
+ case CACHE:
+ printf(" Memory Mode: Cache\n");
+ data->mcdram_cache = data->mcdram_regular;
+ data->mcdram_regular = 0;
+ break;
+ case FLAT:
+ printf(" Memory Mode: Flat\n");
+ printf(" Flat Mode: No MCDRAM cache available, nothing to dump.\n");
+ return 0;
+ case HYBRID:
+ printf(" Memory Mode: Hybrid");
+
+ if (data->cache_info == 0x1) {
+ printf("25\n");
+ data->mcdram_cache = data->mcdram_regular/4;
+ } else if (data->cache_info == 0x2) {
+ printf("50\n");
+ data->mcdram_cache = data->mcdram_regular/2;
+ } else if (data->cache_info == 0x4) {
+ printf("100\n");
+ data->mcdram_cache = data->mcdram_regular;
+ } else {
+ fprintf(stderr, "SMBIOS reserved cache info value %d\n", data->cache_info);
+ return -1;
+ }
+ data->mcdram_regular -= data->mcdram_cache;
+ break;
+ default:
+ fprintf(stderr, "Incorrect memory mode %d\n", data->memory_mode);
+ return -1;
+ }
+
+ printf(" MCDRAM total = %llu bytes, cache = %llu bytes\n",
+ (long long unsigned int)data->mcdram_regular,
+ (long long unsigned int)data->mcdram_cache);
+ data->mcdram_regular /= node_count;
+ data->mcdram_cache /= node_count;
+ printf(" MCDRAM total = %llu bytes, cache = %llu bytes per node\n",
+ (long long unsigned int)data->mcdram_regular, (long long unsigned int)data->mcdram_cache);
+
+ /* Now we can start printing stuff */
+ /* use open+fdopen so that we can specify the file creation mode */
+ fd = open(out_file, O_WRONLY|O_CREAT|O_TRUNC, S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH);
+ if (fd < 0) {
+ fprintf(stderr, "Unable to open file `%s' (%s).\n", out_file, strerror(errno));
+ return -1;
+ }
+ f = fdopen(fd, "w");
+ if (!f) {
+ fprintf(stderr, "Unable to fdopen file `%s' (%s).\n", out_file, strerror(errno));
+ close(fd);
+ return -1;
+ }
+
+ fprintf(f, "version: 1\n");
+ /* We cache is equal for node */
+ fprintf(f, "cache_size: %llu\n",
+ (long long unsigned int)data->mcdram_cache);
+ fprintf(f, "associativity: 1\n");// direct-mapped cache
+ fprintf(f, "inclusiveness: 1\n");// inclusive cache
+ fprintf(f, "line_size: 64\n");
+ fflush(f);
+ fclose(f);
+ close(fd);
+ return 0;
+}
+
+/**
+* Seeks SMBIOS sysfs for entry with type
+*/
+int hwloc_dump_hwdata_knl_smbios(const char *input_fsroot, const char *outfile);
+
+int hwloc_dump_hwdata_knl_smbios(const char *input_fsroot, const char *outfile)
+{
+ DIR *d;
+ int i;
+ struct dirent *dir;
+ struct parser_data data = { 0 };
+ char path[PATH_SIZE];
+ int err;
+
+ printf("Dumping KNL SMBIOS Memory-Side Cache information:\n");
+
+ snprintf(path, PATH_SIZE-1, "%s/" KERNEL_SMBIOS_SYSFS, input_fsroot);
+ path[PATH_SIZE-1] = 0;
+
+ d = opendir(path);
+ if (!d)
+ return -1;
+
+ /* process KNL entries
+ * start with group (type 14, dash os to omit 140 types) then find SMBIOS types for
+ * Knights Landing mcdram indofrmation
+ */
+ while ((dir = readdir(d))) {
+ if (strncmp("14-", dir->d_name, 3) == 0) {
+ err = process_smbios_group(input_fsroot, dir->d_name, &data);
+ if (err < 0) {
+ closedir(d);
+ return err;
+ }
+ }
+ }
+
+ if (!data.type_count) {
+ printf (" Couldn't find any KNL information.\n");
+ closedir(d);
+ return 0;
+ }
+
+ /* We probably have KNL type identifiers here */
+ for (i = 0; i < data.type_count; i++) {
+ char tab[16] = {0};
+ int l = snprintf(tab, sizeof(tab)-1, "%d-", data.knl_types[i]);
+ printf (" Seeking dir ̀`%s' %d\n", tab, l);
+ rewinddir(d);
+ while ((dir = readdir(d))) {
+ if (strncmp(dir->d_name, tab, l) == 0) {
+ err = process_knl_entry(input_fsroot, dir->d_name, &data);
+ if (err < 0) {
+ closedir(d);
+ return err;
+ }
+ }
+ }
+ }
+
+ closedir(d);
+
+ return print_result(&data, outfile);
+}
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc/hwloc-dump-hwdata.1in b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc/hwloc-dump-hwdata.1in
new file mode 100644
index 0000000..5c6ec3a
--- /dev/null
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc/hwloc-dump-hwdata.1in
@@ -0,0 +1,69 @@
+.\" -*- nroff -*-
+.\" Copyright © 2015 Inria. All rights reserved.
+.\" See COPYING in top-level directory.
+.TH HWLOC-DUMP-HWDATA "1" "#HWLOC_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#"
+.SH NAME
+hwloc-dump-hwdata \- Dump topology and locality information from hardware tables
+.
+.\" **************************
+.\" Synopsis Section
+.\" **************************
+.SH SYNOPSIS
+.
+.B hwloc-dump-hwdata
+[\fIoptions\fR]
+.
+.\" **************************
+.\" Options Section
+.\" **************************
+.SH OPTIONS
+.
+.TP 10
+\fB\-o <dir>\fR
+save output files to directory <dir> instead of the default
+\fI/var/run/hwloc/\fR.
+.
+.\" **************************
+.\" Description Section
+.\" **************************
+.SH DESCRIPTION
+.
+hwloc may benefit from some locality and topology information from
+SMBIOS or ACPI tables.
+They are accessible from raw hardware files under directories such
+/sys/firmware/dmi/ or /sys/firmware/acpi/ on Linux.
+These files are usually only accessible to root.
+.
+.PP
+The hwloc-dump-hwdata tool dumps the useful contents of such files into
+human-readable and world-accessible files. The intent is to run the tool
+once during boot and have the main (non-privileged) hwloc library gather
+information from these human-readable files.
+.
+.PP
+\fBhwloc-dump-hwdata is currently only useful on Intel Knights Landing
+Xeon Phi platforms\fR.
+.
+.PP
+The current list of dumped information is:
+.
+.TP 5
+\fBIntel Knights Landing memory-side cache characteristics\fR
+gathered from specific SMBIOS entries such as
+\fI/sys/firmware/dmi/entries/14-*\fR and
+\fI/sys/firmware/dmi/entries/160-*\fR,
+and saved in file \fIknl_memoryside_cache\fR.
+.
+.PP
+If the output directory is changed, you may want to set the
+HWLOC_DUMPED_HWDATA_DIR environment variable accordingly so that
+the hwloc library finds the dumped files.
+.
+.\" **************************
+.\" See also section
+.\" **************************
+.SH SEE ALSO
+.
+.ft R
+hwloc(7), lstopo(1)
+.sp
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc/hwloc-dump-hwdata.c b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc/hwloc-dump-hwdata.c
new file mode 100644
index 0000000..b372c1f
--- /dev/null
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc/hwloc-dump-hwdata.c
@@ -0,0 +1,82 @@
+/*
+ * Copyright © 2015 Intel, Inc. All rights reserved.
+ * Copyright © 2015 Inria. All rights reserved.
+ * See COPYING in top-level directory.
+ */
+
+#include <private/autogen/config.h>
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <fcntl.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <errno.h>
+#include <assert.h>
+
+#define DEFAULT_DUMP_DIR "/var/run/hwloc"
+
+extern int hwloc_dump_hwdata_knl_smbios(const char *input_fsroot, const char *filename);
+
+static void usage(const char *name, FILE *where)
+{
+ fprintf (where, "Usage: %s [ options ] ...\n", name);
+ fprintf (where, "Options:\n");
+ fprintf (where, " -o <dir> Output files to directory <dir> instead of /var/run/hwloc/\n");
+}
+
+int main(int argc, char *argv[])
+{
+ const char *callname = argv[0];
+ char *dirname = DEFAULT_DUMP_DIR;
+ char *input_fsroot;
+ char *filename;
+ int err;
+
+ argv++; argc--;
+ while (argc) {
+ if (!strcmp(argv[0], "-h") || !strcmp(argv[0], "--help")) {
+ usage(callname, stdout);
+ exit(EXIT_SUCCESS);
+ } else if (!strcmp(argv[0], "-o")) {
+ if (argc == 1) {
+ fprintf(stderr, "Missing output directory name.\n");
+ usage(callname, stderr);
+ exit(EXIT_FAILURE);
+ }
+ dirname = argv[1];
+ argc -= 2;
+ argv += 2;
+ } else {
+ fprintf(stderr, "Unknown option: %s\n", argv[0]);
+ usage(callname, stderr);
+ exit(EXIT_FAILURE);
+ }
+ }
+
+ err = mkdir(dirname, S_IRWXU|S_IRGRP|S_IXGRP|S_IROTH|S_IXOTH);
+ if (err < 0) {
+ if (errno == EEXIST) {
+ if (access(dirname, X_OK|W_OK)) {
+ fprintf(stderr, "Cannot enter and modify output directory `%s'.\n", dirname);
+ exit(EXIT_FAILURE);
+ }
+ } else {
+ fprintf(stderr, "Failed to create output directory `%s' (%s).\n", dirname, strerror(errno));
+ exit(EXIT_FAILURE);
+ }
+ }
+
+ input_fsroot = getenv("HWLOC_FSROOT");
+ if (!input_fsroot)
+ input_fsroot = "/";
+
+ err = asprintf(&filename, "%s/knl_memoryside_cache", dirname);
+ assert(err >= 0);
+ hwloc_dump_hwdata_knl_smbios(input_fsroot, filename);
+ free(filename);
+ printf("\n");
+
+ return EXIT_SUCCESS;
+}
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc/hwloc-gather-topology.1in b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc/hwloc-gather-topology.1in
index 1cba9b3..aff7a9b 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc/hwloc-gather-topology.1in
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc/hwloc-gather-topology.1in
@@ -23,6 +23,9 @@ and the lstopo output for later (possibly offline) usage
\fB\-\-io\fR
Also gather I/O related files.
The gathering may be much slower, and the generated archive may be much bigger.
+\fB\-\-dmi\fR
+Also gather DMI/SMBIOS related files.
+The gathering requires root access, and the dmi-sysfs kernel module should be loaded.
.TP
\fB\-h\fR \fB\-\-help\fR
Display help message and exit
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc/hwloc-gather-topology.in b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc/hwloc-gather-topology.in
index 9956208..655a83e 100755
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc/hwloc-gather-topology.in
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc/hwloc-gather-topology.in
@@ -21,6 +21,7 @@ LC_ALL=C
export LANG LC_ALL
gatherio=0
+gatherdmi=0
if [ ! -x "$lstopo" ]
then
@@ -40,6 +41,7 @@ usage()
echo " and the corresponding lstopo verbose output under <savepath>.output"
echo "Options:"
echo " --io Gather I/O files (takes much longer and generates much larger tarball)"
+ echo " --dmi Gather SMBIOS files. Works only when run as root. Requires dmi-sysfs kernel module"
echo "Example:"
echo " $0 /tmp/\$(uname -n)"
}
@@ -47,6 +49,7 @@ usage()
while [ x`echo "$1" | cut -c1` = x- ] ; do
case $1 in
--io) gatherio=1;;
+ --dmi) gatherdmi=1;;
*) echo "Unrecognized option: $1"; usage; exit 1;;
esac
shift
@@ -77,9 +80,11 @@ destdir=`mktemp -d`
savefile() {
local dest="$1"
local file="$2"
- dir=`dirname "$file"`
- mkdir -p "$dest/$dir" 2>/dev/null
- cat "$file" > "$dest/$file" 2>/dev/null
+ if test -r "$file"; then
+ dir=`dirname "$file"`
+ mkdir -p "$dest/$dir" 2>/dev/null
+ cat "$file" > "$dest/$file" 2>/dev/null
+ fi
}
savelink() {
@@ -132,6 +137,12 @@ cat << EOF | while read -r path ; do savedir "$destdir/$basename" "$path" ; done
/proc/device-tree/cpus/
EOF
+if test "x$HWLOC_DUMPED_HWDATA_DIR" = x; then
+ savedir "$destdir/$basename" /var/run/hwloc/
+else
+ savedir "$destdir/$basename" "$HWLOC_DUMPED_HWDATA_DIR"
+fi
+
# Optionally gather I/O directories too
if [ x$gatherio = x1 ]; then
cat << EOF | while read -r path ; do savedir "$destdir/$basename" "$path" ; done
@@ -145,9 +156,12 @@ if [ x$gatherio = x1 ]; then
/sys/class/net/
/sys/class/mic/
EOF
- ls -d /sys/devices/pci* | sed -e 's@$@/@' | while read -r path ; do savedir "$destdir/$basename" "$path" ; done
- ls -d /run/udev/data/b* | while read -r path ; do savefile "$destdir/$basename" "$path" ; done
- ls -d /sys/firmware/dmi/entries/17-* | sed -e 's@$@/@' | while read -r path ; do savedir "$destdir/$basename" "$path" ; done
+ ls -d /sys/devices/pci* 2>/dev/null | sed -e 's@$@/@' | while read -r path ; do savedir "$destdir/$basename" "$path" ; done
+ ls -d /run/udev/data/b* 2>/dev/null | while read -r path ; do savefile "$destdir/$basename" "$path" ; done
+fi
+
+if [ x$gatherdmi = x1 ]; then
+ savedir "$destdir/$basename" /sys/firmware/dmi/
fi
# Get an entire mount point, after decoding its path
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc/hwloc-info.1in b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc/hwloc-info.1in
index 01a2281..d772281 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc/hwloc-info.1in
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc/hwloc-info.1in
@@ -89,6 +89,9 @@ 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\-icaches\fR
+Do not show Instruction caches, only Data and Unified caches are considered.
+.TP
\fB\-\-no\-io\fB
Do not show any I/O device or bridge.
By default, common devices (GPUs, NICs, block devices, ...) and
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc/hwloc-info.c b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc/hwloc-info.c
index bc3fc09..2d9f29a 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc/hwloc-info.c
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc/hwloc-info.c
@@ -41,6 +41,7 @@ void usage(const char *name, FILE *where)
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-icaches Do not show instruction caches\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");
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc/hwloc-patch.c b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc/hwloc-patch.c
index 616dff4..74afefa 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc/hwloc-patch.c
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc/hwloc-patch.c
@@ -1,5 +1,5 @@
/*
- * Copyright © 2013-2014 Inria. All rights reserved.
+ * Copyright © 2013-2015 Inria. All rights reserved.
* See COPYING in top-level directory.
*/
@@ -7,7 +7,9 @@
#include <hwloc.h>
#include <hwloc/diff.h>
-static void usage(const char *callname __hwloc_attribute_unused, FILE *where)
+#include "misc.h"
+
+void usage(const char *callname __hwloc_attribute_unused, FILE *where)
{
fprintf(where, "Usage: hwloc-patch [options] [<old.xml> | refname] [<diff.xml> | -] [<output.xml>]\n");
fprintf(where, "Options:\n");
@@ -48,7 +50,7 @@ static int hwloc_diff_read(hwloc_topology_t topo, const char *inputdiff,
readlen = buflen/2;
}
- err = hwloc_topology_diff_load_xmlbuffer(topo, buffer, offset+1, firstdiffp, refnamep);
+ err = hwloc_topology_diff_load_xmlbuffer(topo, buffer, (int)(offset+1), firstdiffp, refnamep);
free(buffer);
return err;
@@ -62,7 +64,7 @@ int main(int argc, char *argv[])
{
hwloc_topology_t topo;
hwloc_topology_diff_t firstdiff = NULL;
- unsigned long flags = HWLOC_TOPOLOGY_FLAG_WHOLE_IO | HWLOC_TOPOLOGY_FLAG_ICACHES;
+ unsigned long flags = HWLOC_TOPOLOGY_FLAG_WHOLE_SYSTEM | HWLOC_TOPOLOGY_FLAG_WHOLE_IO | HWLOC_TOPOLOGY_FLAG_ICACHES;
unsigned long patchflags = 0;
char *callname, *input, *inputdiff, *output = NULL, *refname = NULL;
int err;
@@ -126,14 +128,14 @@ int main(int argc, char *argv[])
err = hwloc_topology_set_xml(topo, refname);
if (err < 0) {
fprintf(stderr, "Failed to load XML topology %s (from input diff %s refname)\n", refname, inputdiff);
- goto out;
+ goto out_with_diff;
}
} else {
/* use the given input */
err = hwloc_topology_set_xml(topo, input);
if (err < 0) {
fprintf(stderr, "Failed to load XML topology %s\n", input);
- goto out;
+ goto out_with_diff;
}
}
@@ -162,6 +164,5 @@ out_with_diff:
hwloc_topology_diff_destroy(topo, firstdiff);
out_with_topo:
hwloc_topology_destroy(topo);
-out:
exit(EXIT_FAILURE);
}
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc/misc.h b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc/misc.h
index e0175ca..ef7b59b 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc/misc.h
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc/misc.h
@@ -140,6 +140,11 @@ hwloc_utils_enable_input_format(struct hwloc_topology *topology,
enum hwloc_utils_input_format input_format,
int verbose, const char *callname)
{
+ if (input_format == HWLOC_UTILS_INPUT_DEFAULT && !strcmp(input, "-.xml")) {
+ input_format = HWLOC_UTILS_INPUT_XML;
+ input = "-";
+ }
+
if (input_format == HWLOC_UTILS_INPUT_DEFAULT) {
struct stat inputst;
int err;
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/lstopo/Makefile.am b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/lstopo/Makefile.am
index 3f89ee3..1eb4f32 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/lstopo/Makefile.am
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/lstopo/Makefile.am
@@ -37,7 +37,7 @@ lstopo_LDADD = $(lstopo_no_graphics_LDADD)
if HWLOC_HAVE_CAIRO
bin_PROGRAMS += lstopo
lstopo_SOURCES += lstopo-cairo.c
-lstopo_CPPFLAGS += -DLSTOPO_HAVE_GRAPHICS
+lstopo_CPPFLAGS += -DLSTOPO_HAVE_GRAPHICS $(HWLOC_X11_CPPFLAGS)
lstopo_CFLAGS = $(lstopo_no_graphics_CFLAGS) $(HWLOC_CAIRO_CFLAGS)
lstopo_LDADD += $(HWLOC_CAIRO_LIBS) $(HWLOC_X11_LIBS)
endif
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/lstopo/lstopo-ascii.c b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/lstopo/lstopo-ascii.c
index 218304a..f81e38a 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/lstopo/lstopo-ascii.c
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/lstopo/lstopo-ascii.c
@@ -80,7 +80,7 @@ ascii_init(void *_output)
{
struct lstopo_ascii_output *disp = _output;
unsigned width, height;
- int j, i;
+ unsigned j, i;
/* compute the required size */
disp->drawing = 0;
@@ -344,13 +344,13 @@ ascii_box(void *output, int r, int g, int b, unsigned depth __hwloc_attribute_un
y2 = y1 + height - 1;
if (!disp->drawing) {
- if (x1 >= disp->width)
+ if ((int)x1 >= disp->width)
disp->width = x1+1;
- if (x2 >= disp->width)
+ if ((int)x2 >= disp->width)
disp->width = x2+1;
- if (y1 >= disp->height)
+ if ((int)y1 >= disp->height)
disp->height = y1+1;
- if (y2 >= disp->height)
+ if ((int)y2 >= disp->height)
disp->height = y2+1;
return;
}
@@ -403,9 +403,9 @@ ascii_line(void *output, int r __hwloc_attribute_unused, int g __hwloc_attribute
}
if (!disp->drawing) {
- if (x2 >= disp->width)
+ if ((int)x2 >= disp->width)
disp->width = x2+1;
- if (y2 >= disp->height)
+ if ((int)y2 >= disp->height)
disp->height = y2+1;
return;
}
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/lstopo/lstopo-cairo.c b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/lstopo/lstopo-cairo.c
index 1bc84aa..4edb52b 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/lstopo/lstopo-cairo.c
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/lstopo/lstopo-cairo.c
@@ -63,17 +63,17 @@ topo_cairo_box(void *_output, int r, int g, int b, unsigned depth __hwloc_attrib
struct lstopo_cairo_output *coutput = _output;
cairo_t *c = coutput->context;
- if (!coutput->drawing) {
- if (x > coutput->max_x)
- coutput->max_x = x;
- if (x + width > coutput->max_x)
- coutput->max_x = x + width;
- if (y > coutput->max_y)
- coutput->max_y = y;
- if (y + height > coutput->max_y)
- coutput->max_y = y + height;
+ if (x > coutput->max_x)
+ coutput->max_x = x;
+ if (x + width > coutput->max_x)
+ coutput->max_x = x + width;
+ if (y > coutput->max_y)
+ coutput->max_y = y;
+ if (y + height > coutput->max_y)
+ coutput->max_y = y + height;
+
+ if (!coutput->drawing)
return;
- }
cairo_rectangle(c, x, y, width, height);
cairo_set_source_rgb(c, (float)r / 255, (float) g / 255, (float) b / 255);
@@ -91,17 +91,17 @@ topo_cairo_line(void *_output, int r, int g, int b, unsigned depth __hwloc_attri
struct lstopo_cairo_output *coutput = _output;
cairo_t *c = coutput->context;
- if (!coutput->drawing) {
- if (x1 > coutput->max_x)
- coutput->max_x = x1;
- if (x2 > coutput->max_x)
- coutput->max_x = x2;
- if (y1 > coutput->max_y)
- coutput->max_y = y1;
- if (y2 > coutput->max_y)
- coutput->max_y = y2;
+ if (x1 > coutput->max_x)
+ coutput->max_x = x1;
+ if (x2 > coutput->max_x)
+ coutput->max_x = x2;
+ if (y1 > coutput->max_y)
+ coutput->max_y = y1;
+ if (y2 > coutput->max_y)
+ coutput->max_y = y2;
+
+ if (!coutput->drawing)
return;
- }
cairo_move_to(c, x1, y1);
cairo_set_source_rgb(c, (float) r / 255, (float) g / 255, (float) b / 255);
@@ -177,6 +177,7 @@ struct lstopo_x11_output {
int last_screen_width, last_screen_height; /** last visible part size */
int width, height; /** total normal display size */
int x, y; /** top left corner of the visible part */
+ float scale, last_scale;
};
static void
@@ -252,10 +253,24 @@ x11_init(void *_disp)
disp->orig_gridsize = gridsize;
disp->x = 0;
disp->y = 0;
+ disp->scale = disp->last_scale = 1.0f;
+ /* TODO: if window got truncated, scale down? */
x11_create(disp, coutput->max_x, coutput->max_y);
XMapWindow(dpy, top);
+
+ printf("\n");
+ printf("Keyboard shortcuts:\n");
+ printf(" Zoom-in or out .................... + -\n");
+ printf(" Try to fit scale to window ........ f F\n");
+ printf(" Reset scale to default ............ 1\n");
+ printf(" Scroll vertically ................. Up Down PageUp PageDown\n");
+ printf(" Scroll horizontally ............... Left Right Ctrl+PageUp/Down\n");
+ printf(" Scroll to the top-left corner ..... Home\n");
+ printf(" Scroll to the bottom-right corner . End\n");
+ printf(" Exit .............................. q Q Esc\n");
+ printf("\n\n");
}
static struct draw_methods x11_draw_methods = {
@@ -271,6 +286,36 @@ static struct draw_methods x11_draw_methods = {
static void
move_x11(struct lstopo_x11_output *disp)
{
+ if (disp->scale != disp->last_scale) {
+ disp->x = disp->scale / disp->last_scale * (float)disp->x;
+ disp->y = disp->scale / disp->last_scale * (float)disp->y;
+ }
+
+ if (disp->screen_width != disp->last_screen_width
+ || disp->screen_height != disp->last_screen_height
+ || disp->scale != disp->last_scale) {
+ disp->last_screen_width = disp->screen_width;
+ disp->last_screen_height = disp->screen_height;
+ disp->last_scale = disp->scale;
+ fontsize = disp->orig_fontsize * disp->scale;
+ gridsize = disp->orig_gridsize * disp->scale;
+
+ x11_destroy(disp);
+
+ x11_create(disp, disp->width, disp->height);
+ disp->coutput.max_x = 0;
+ disp->coutput.max_y = 0;
+ topo_cairo_paint(&disp->coutput);
+ if (disp->coutput.max_x > disp->width || disp->coutput.max_y > disp->height) {
+ /* need to extend the window and redraw */
+ x11_destroy(disp);
+ x11_create(disp, disp->coutput.max_x, disp->coutput.max_y);
+ topo_cairo_paint(&disp->coutput);
+ }
+ disp->width = disp->coutput.max_x;
+ disp->height = disp->coutput.max_y;
+ }
+
if (disp->width <= disp->screen_width) {
disp->x = 0;
} else {
@@ -288,31 +333,6 @@ move_x11(struct lstopo_x11_output *disp)
if (disp->y >= disp->height - disp->screen_height)
disp->y = disp->height - disp->screen_height;
}
-
- if (disp->screen_width > disp->width && disp->screen_height > disp->height
- && (disp->screen_width != disp->last_screen_width
- || disp->screen_height != disp->last_screen_height)) {
- disp->last_screen_width = disp->screen_width;
- disp->last_screen_height = disp->screen_height;
- fontsize = disp->orig_fontsize;
- gridsize = disp->orig_gridsize;
- if (disp->screen_width > disp->width) {
- fontsize = disp->orig_fontsize * disp->screen_width / disp->width;
- gridsize = disp->orig_gridsize * disp->screen_width / disp->width;
- }
- if (disp->screen_height > disp->height) {
- unsigned int new_fontsize = disp->orig_fontsize * disp->screen_height / disp->height;
- unsigned int new_gridsize = disp->orig_gridsize * disp->screen_height / disp->height;
- if (new_fontsize < fontsize)
- fontsize = new_fontsize;
- if (new_gridsize < gridsize)
- gridsize = new_gridsize;
- }
-
- x11_destroy(disp);
- x11_create(disp, disp->screen_width, disp->screen_height);
- topo_cairo_paint(&disp->coutput);
- }
}
void
@@ -358,16 +378,23 @@ output_x11(struct lstopo_output *loutput, const char *filename)
disp->y -= e.xmotion.y_root - y;
x = e.xmotion.x_root;
y = e.xmotion.y_root;
- move_x11(disp);
+ move_x11(disp);
}
break;
- case ConfigureNotify:
+ case ConfigureNotify: {
+ float wscale, hscale;
disp->screen_width = e.xconfigure.width;
disp->screen_height = e.xconfigure.height;
- move_x11(disp);
+ wscale = disp->screen_width / (float)disp->width;
+ hscale = disp->screen_height / (float)disp->height;
+ disp->scale *= wscale > hscale ? hscale : wscale;
+ if (disp->scale < 1.0f)
+ disp->scale = 1.0f;
+ move_x11(disp);
if (disp->x != lastx || disp->y != lasty)
XMoveWindow(disp->dpy, disp->win, -disp->x, -disp->y);
break;
+ }
case ButtonPress:
if (e.xbutton.button == Button1) {
state = 1;
@@ -435,8 +462,30 @@ output_x11(struct lstopo_output *loutput, const char *filename)
disp->y = INT_MAX;
move_x11(disp);
break;
- }
- break;
+ case XK_f:
+ case XK_F: {
+ float wscale = disp->screen_width / (float)disp->width;
+ float hscale = disp->screen_height / (float)disp->height;
+ disp->scale *= wscale > hscale ? hscale : wscale;
+ move_x11(disp);
+ break;
+ }
+ case XK_plus:
+ case XK_KP_Add:
+ disp->scale *= 1.2f;
+ move_x11(disp);
+ break;
+ case XK_minus:
+ case XK_KP_Subtract:
+ disp->scale /= 1.2f;
+ move_x11(disp);
+ break;
+ case XK_1:
+ case XK_KP_1:
+ disp->scale = 1.0f;
+ move_x11(disp);
+ break;
+ }
}
}
}
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/lstopo/lstopo-draw.c b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/lstopo/lstopo-draw.c
index 38b87bb..0db863b 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/lstopo/lstopo-draw.c
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/lstopo/lstopo-draw.c
@@ -771,8 +771,8 @@ os_device_draw(hwloc_topology_t topology __hwloc_attribute_unused, struct draw_m
n = lstopo_obj_snprintf(text, sizeof(text), level, logical);
textwidth = get_textwidth(output, methods, text, n, fontsize, gridsize);
for(i=0; i<nmorelines; i++) {
- int nn = strlen(morelines[i]);
- int ntextwidth = get_textwidth(output, methods, morelines[i], nn, fontsize, gridsize);
+ unsigned nn = (unsigned)strlen(morelines[i]);
+ unsigned ntextwidth = get_textwidth(output, methods, morelines[i], nn, fontsize, gridsize);
if (ntextwidth > textwidth)
textwidth = ntextwidth;
}
@@ -1326,6 +1326,8 @@ get_type_fun(hwloc_obj_type_t type)
case HWLOC_OBJ_MISC: return misc_draw;
case HWLOC_OBJ_TYPE_MAX: assert(0);
}
+ /* for dumb compilers */
+ return misc_draw;
}
void
@@ -1365,7 +1367,7 @@ output_compute_pu_min_textwidth(struct lstopo_output *output)
if (output->logical) {
unsigned depth = hwloc_get_type_depth(topology, HWLOC_OBJ_PU);
- lastpu = hwloc_get_obj_by_depth(topology, HWLOC_OBJ_PU, hwloc_get_nbobjs_by_depth(topology, depth)-1);
+ lastpu = hwloc_get_obj_by_depth(topology, depth, hwloc_get_nbobjs_by_depth(topology, depth)-1);
} else {
unsigned lastidx = hwloc_bitmap_last(hwloc_topology_get_topology_cpuset(topology));
lastpu = hwloc_get_pu_obj_by_os_index(topology, lastidx);
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/lstopo/lstopo-fig.c b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/lstopo/lstopo-fig.c
index 020df03..76f7602 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/lstopo/lstopo-fig.c
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/lstopo/lstopo-fig.c
@@ -103,7 +103,7 @@ fig_text(void *loutput_, int r, int g, int b, int size, unsigned depth, unsigned
{
struct lstopo_output *loutput = loutput_;
FILE *file = loutput->file;
- unsigned len = strlen(text);
+ int len = (int)strlen(text);
int color = rgb_to_fig(r, g, b);
x *= FIG_FACTOR;
y *= FIG_FACTOR;
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/lstopo/lstopo-no-graphics.1in b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/lstopo/lstopo-no-graphics.1in
index 8ae0fc9..1789c31 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/lstopo/lstopo-no-graphics.1in
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/lstopo/lstopo-no-graphics.1in
@@ -115,6 +115,7 @@ Do not show caches.
.TP
\fB\-\-no\-useless\-caches\fR
Do not show caches which do not have a hierarchical impact.
+This calls hwloc_topology_ignore_type_keep_structure() for cache objects.
.TP
\fB\-\-no\-icaches\fR
Do not show Instruction caches, only Data and Unified caches are displayed.
@@ -124,6 +125,7 @@ Do not consider administration limitations.
.TP
\fB\-\-merge\fR
Do not show levels that do not have a hierarchical impact.
+This calls hwloc_topology_ignore_all_keep_structure().
.TP
\fB\-\-no\-collapse\fR
Do not collapse identical PCI devices.
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/lstopo/lstopo-windows.c b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/lstopo/lstopo-windows.c
index e41515b..f90fbec 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/lstopo/lstopo-windows.c
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/lstopo/lstopo-windows.c
@@ -60,6 +60,7 @@ static int finish;
static int the_width, the_height;
static int win_width, win_height;
static unsigned int the_fontsize, the_gridsize;
+static float the_scale;
static void
windows_box(void *output, int r, int g, int b, unsigned depth __hwloc_attribute_unused, unsigned x, unsigned width, unsigned y, unsigned height);
@@ -69,13 +70,48 @@ WndProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam)
{
int redraw = 0;
switch (message) {
+ case WM_CHAR: {
+ switch (wparam) {
+ case '+':
+ the_scale *= 1.2f;
+ redraw = 1;
+ break;
+ case '-':
+ the_scale /= 1.2f;
+ redraw = 1;
+ break;
+ case 'f':
+ case 'F': {
+ float wscale, hscale;
+ wscale = win_width / (float)the_width;
+ hscale = win_height / (float)the_height;
+ the_scale *= wscale > hscale ? hscale : wscale;
+ redraw = 1;
+ break;
+ }
+ case '1':
+ the_scale = 1.0;
+ redraw = 1;
+ break;
+ case 'q':
+ case 'Q':
+ finish = 1;
+ break;
+ }
+ break;
+ }
+
case WM_PAINT: {
HFONT font;
BeginPaint(hwnd, &the_output.ps);
font = CreateFont(fontsize, 0, 0, 0, 0, FALSE, FALSE, FALSE, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH, NULL);
SelectObject(the_output.ps.hdc, (HGDIOBJ) font);
windows_box(&the_output, 0xff, 0xff, 0xff, 0, 0, win_width, 0, win_height);
+ the_output.max_x = 0;
+ the_output.max_y = 0;
output_draw(&the_output.loutput);
+ the_width = the_output.max_x;
+ the_height = the_output.max_y;
DeleteObject(font);
EndPaint(hwnd, &the_output.ps);
break;
@@ -103,8 +139,6 @@ WndProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam)
break;
case WM_KEYDOWN:
switch (wparam) {
- case 'q':
- case 'Q':
case VK_ESCAPE:
finish = 1;
break;
@@ -169,11 +203,18 @@ WndProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam)
if (hwnd == the_output.toplevel)
PostQuitMessage(0);
return 0;
- case WM_SIZE:
+ case WM_SIZE: {
+ float wscale, hscale;
win_width = LOWORD(lparam);
win_height = HIWORD(lparam);
+ wscale = win_width / (float)the_width;
+ hscale = win_height / (float)the_height;
+ the_scale *= wscale > hscale ? hscale : wscale;
+ if (the_scale < 1.0f)
+ the_scale = 1.0f;
redraw = 1;
break;
+ }
}
if (redraw) {
if (x_delta > the_width - win_width)
@@ -184,22 +225,8 @@ WndProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam)
x_delta = 0;
if (y_delta < 0)
y_delta = 0;
- if (win_width > the_width && win_height > the_height) {
- fontsize = the_fontsize;
- gridsize = the_gridsize;
- if (win_width > the_width) {
- fontsize = the_fontsize * win_width / the_width;
- gridsize = the_gridsize * win_width / the_width;
- }
- if (win_height > the_height) {
- unsigned int new_fontsize = the_fontsize * win_height / the_height;
- unsigned int new_gridsize = the_gridsize * win_height / the_height;
- if (new_fontsize < fontsize)
- fontsize = new_fontsize;
- if (new_gridsize < gridsize)
- gridsize = new_gridsize;
- }
- }
+ fontsize = (unsigned)(the_fontsize * the_scale);
+ gridsize = (unsigned)(the_gridsize * the_scale);
RedrawWindow(hwnd, NULL, NULL, RDW_INVALIDATE);
}
return DefWindowProc(hwnd, message, wparam, lparam);
@@ -264,11 +291,25 @@ windows_init(void *output)
the_width = width;
the_height = height;
+ the_scale = 1.0f;
+
the_fontsize = fontsize;
the_gridsize = gridsize;
/* and display the window */
ShowWindow(toplevel, SW_SHOWDEFAULT);
+
+ printf("\n");
+ printf("Keyboard shortcuts:\n");
+ printf(" Zoom-in or out .................... + -\n");
+ printf(" Try to fit scale to window ........ f F\n");
+ printf(" Reset scale to default ............ 1\n");
+ printf(" Scroll vertically ................. Up Down PageUp PageDown\n");
+ printf(" Scroll horizontally ............... Left Right Ctrl+PageUp/Down\n");
+ printf(" Scroll to the top-left corner ..... Home\n");
+ printf(" Scroll to the bottom-right corner . End\n");
+ printf(" Exit .............................. q Q Esc\n");
+ printf("\n\n");
}
static void
@@ -302,17 +343,17 @@ windows_box(void *output, int r, int g, int b, unsigned depth __hwloc_attribute_
struct lstopo_windows_output *woutput = output;
PAINTSTRUCT *ps = &woutput->ps;
- if (!woutput->drawing) {
- if (x > woutput->max_x)
- woutput->max_x = x;
- if (x+width > woutput->max_x)
- woutput->max_x = x + width;
- if (y > woutput->max_y)
- woutput->max_y = y;
- if (y + height > woutput->max_y)
- woutput->max_y = y + height;
+ if (x > woutput->max_x)
+ woutput->max_x = x;
+ if (x+width > woutput->max_x)
+ woutput->max_x = x + width;
+ if (y > woutput->max_y)
+ woutput->max_y = y;
+ if (y + height > woutput->max_y)
+ woutput->max_y = y + height;
+
+ if (!woutput->drawing)
return;
- }
SelectObject(ps->hdc, rgb_to_brush(r, g, b));
SetBkColor(ps->hdc, RGB(r, g, b));
@@ -325,17 +366,17 @@ windows_line(void *output, int r, int g, int b, unsigned depth __hwloc_attribute
struct lstopo_windows_output *woutput = output;
PAINTSTRUCT *ps = &woutput->ps;
- if (!woutput->drawing) {
- if (x1 > woutput->max_x)
- woutput->max_x = x1;
- if (x2 > woutput->max_x)
- woutput->max_x = x2;
- if (y1 > woutput->max_y)
- woutput->max_y = y1;
- if (y2 > woutput->max_y)
- woutput->max_y = y2;
+ if (x1 > woutput->max_x)
+ woutput->max_x = x1;
+ if (x2 > woutput->max_x)
+ woutput->max_x = x2;
+ if (y1 > woutput->max_y)
+ woutput->max_y = y1;
+ if (y2 > woutput->max_y)
+ woutput->max_y = y2;
+
+ if (!woutput->drawing)
return;
- }
SelectObject(ps->hdc, rgb_to_brush(r, g, b));
MoveToEx(ps->hdc, x1 - x_delta, y1 - y_delta, NULL);
@@ -352,7 +393,7 @@ windows_text(void *output, int r, int g, int b, int size __hwloc_attribute_unuse
return;
SetTextColor(ps->hdc, RGB(r, g, b));
- TextOut(ps->hdc, x - x_delta, y - y_delta, text, strlen(text));
+ TextOut(ps->hdc, x - x_delta, y - y_delta, text, (int)strlen(text));
}
static void
-----------------------------------------------------------------------
Summary of changes:
src/pm/hydra/tools/topo/hwloc/hwloc/.gitignore | 30 +-
src/pm/hydra/tools/topo/hwloc/hwloc/AUTHORS | 8 +-
src/pm/hydra/tools/topo/hwloc/hwloc/Makefile.am | 2 +-
src/pm/hydra/tools/topo/hwloc/hwloc/NEWS | 89 +++-
src/pm/hydra/tools/topo/hwloc/hwloc/README | 2 +-
src/pm/hydra/tools/topo/hwloc/hwloc/VERSION | 6 +-
.../hydra/tools/topo/hwloc/hwloc/config/hwloc.m4 | 25 +-
.../hwloc/contrib/ci.inria.fr/job-0-tarball.sh | 37 ++
.../hwloc/hwloc/contrib/ci.inria.fr/job-1-check.sh | 54 ++
.../hwloc/hwloc/contrib/ci.inria.fr/job-3-mingw.sh | 150 ++++++
.../contrib/ci.inria.fr/job-3-visualstudio.bat | 33 ++
.../tools/topo/hwloc/hwloc/contrib/windows/README | 3 +
.../hwloc/contrib/windows/hwloc-annotate.vcxproj | 6 +-
.../contrib/windows/hwloc-annotate.vcxproj.filters | 5 +-
.../hwloc/contrib/windows/hwloc-assembler.vcxproj | 5 +-
.../hwloc/hwloc/contrib/windows/hwloc-bind.vcxproj | 8 +-
.../contrib/windows/hwloc-bind.vcxproj.filters | 3 -
.../hwloc/hwloc/contrib/windows/hwloc-calc.vcxproj | 8 +-
.../contrib/windows/hwloc-calc.vcxproj.filters | 3 -
.../hwloc/hwloc/contrib/windows/hwloc-diff.vcxproj | 6 +-
.../contrib/windows/hwloc-diff.vcxproj.filters | 3 -
.../hwloc/contrib/windows/hwloc-distances.vcxproj | 6 +-
.../windows/hwloc-distances.vcxproj.filters | 3 -
.../hwloc/contrib/windows/hwloc-distrib.vcxproj | 6 +-
.../contrib/windows/hwloc-distrib.vcxproj.filters | 3 -
.../hwloc/hwloc/contrib/windows/hwloc-info.vcxproj | 8 +-
.../contrib/windows/hwloc-info.vcxproj.filters | 3 -
.../hwloc/contrib/windows/hwloc-patch.vcxproj | 6 +-
.../contrib/windows/hwloc-patch.vcxproj.filters | 3 -
.../topo/hwloc/hwloc/contrib/windows/hwloc.sln | 60 ++-
.../hwloc/hwloc/contrib/windows/libhwloc.vcxproj | 20 +-
.../hwloc/contrib/windows/libhwloc.vcxproj.filters | 4 +-
.../contrib/windows/lstopo-no-graphics.vcxproj | 5 +-
.../windows/lstopo-no-graphics.vcxproj.filters | 6 +-
.../hwloc/hwloc/contrib/windows/lstopo-win.vcxproj | 7 +-
.../contrib/windows/lstopo-win.vcxproj.filters | 6 +-
.../hwloc/hwloc/contrib/windows/lstopo.vcxproj | 7 +-
.../hwloc/contrib/windows/lstopo.vcxproj.filters | 6 +-
.../hwloc/hwloc/contrib/windows/private_config.h | 18 +-
src/pm/hydra/tools/topo/hwloc/hwloc/doc/hwloc.doxy | 406 ++++++++++-----
.../hydra/tools/topo/hwloc/hwloc/include/hwloc.h | 113 +++--
.../tools/topo/hwloc/hwloc/include/hwloc/bitmap.h | 24 +-
.../topo/hwloc/hwloc/include/hwloc/deprecated.h | 2 +-
.../tools/topo/hwloc/hwloc/include/hwloc/diff.h | 32 +-
.../tools/topo/hwloc/hwloc/include/hwloc/helper.h | 16 +-
.../tools/topo/hwloc/hwloc/include/hwloc/linux.h | 6 +-
.../tools/topo/hwloc/hwloc/include/hwloc/plugins.h | 12 +-
.../tools/topo/hwloc/hwloc/include/hwloc/rename.h | 7 +-
.../topo/hwloc/hwloc/include/private/cpuid-x86.h | 5 +-
.../tools/topo/hwloc/hwloc/include/private/debug.h | 31 +-
.../topo/hwloc/hwloc/include/private/private.h | 9 +
.../hydra/tools/topo/hwloc/hwloc/src/Makefile.am | 2 +-
src/pm/hydra/tools/topo/hwloc/hwloc/src/base64.c | 4 +-
src/pm/hydra/tools/topo/hwloc/hwloc/src/bind.c | 54 ++-
src/pm/hydra/tools/topo/hwloc/hwloc/src/bitmap.c | 12 +-
.../hydra/tools/topo/hwloc/hwloc/src/components.c | 6 +-
.../hydra/tools/topo/hwloc/hwloc/src/pci-common.c | 26 +-
.../tools/topo/hwloc/hwloc/src/topology-aix.c | 2 +-
.../tools/topo/hwloc/hwloc/src/topology-bgq.c | 4 +
.../topo/hwloc/hwloc/src/topology-hardwired.c | 191 +++++++
.../tools/topo/hwloc/hwloc/src/topology-hpux.c | 4 +-
.../tools/topo/hwloc/hwloc/src/topology-linux.c | 466 +++++++++++++----
.../tools/topo/hwloc/hwloc/src/topology-osf.c | 4 +-
.../tools/topo/hwloc/hwloc/src/topology-pci.c | 18 +-
.../tools/topo/hwloc/hwloc/src/topology-solaris.c | 1 -
.../topo/hwloc/hwloc/src/topology-synthetic.c | 45 ++-
.../tools/topo/hwloc/hwloc/src/topology-windows.c | 563 +++++++++++++++-----
.../tools/topo/hwloc/hwloc/src/topology-x86.c | 132 ++++-
.../topo/hwloc/hwloc/src/topology-xml-libxml.c | 7 +-
.../topo/hwloc/hwloc/src/topology-xml-nolibxml.c | 26 +-
.../tools/topo/hwloc/hwloc/src/topology-xml.c | 3 +
src/pm/hydra/tools/topo/hwloc/hwloc/src/topology.c | 166 +++++--
.../hydra/tools/topo/hwloc/hwloc/src/traversal.c | 17 +-
.../tools/topo/hwloc/hwloc/tests/hwloc_backends.c | 11 +-
.../hwloc/tests/linux/32em64t-2n8c+1mic.output | 5 +
.../hwloc/tests/linux/32em64t-2n8c+1mic.tar.bz2 | Bin 68952 -> 70952 bytes
.../include/bgq/spi/include/kernel/location.h | 8 +-
.../hwloc/tests/ports/include/windows/windows.h | 7 +-
.../topo/hwloc/hwloc/tests/rename/Makefile.am | 1 +
.../tools/topo/hwloc/hwloc/utils/hwloc/Makefile.am | 27 +
.../topo/hwloc/hwloc/utils/hwloc/hwloc-annotate.c | 6 +-
.../topo/hwloc/hwloc/utils/hwloc/hwloc-assembler.c | 4 +-
.../topo/hwloc/hwloc/utils/hwloc/hwloc-bind.c | 28 +-
.../topo/hwloc/hwloc/utils/hwloc/hwloc-calc.c | 4 +-
.../topo/hwloc/hwloc/utils/hwloc/hwloc-diff.c | 8 +-
.../hwloc/utils/hwloc/hwloc-dump-hwdata-knl.c | 462 ++++++++++++++++
.../hwloc/hwloc/utils/hwloc/hwloc-dump-hwdata.1in | 69 +++
.../hwloc/hwloc/utils/hwloc/hwloc-dump-hwdata.c | 82 +++
.../hwloc/utils/hwloc/hwloc-gather-topology.1in | 3 +
.../hwloc/utils/hwloc/hwloc-gather-topology.in | 26 +-
.../topo/hwloc/hwloc/utils/hwloc/hwloc-info.1in | 3 +
.../topo/hwloc/hwloc/utils/hwloc/hwloc-info.c | 1 +
.../topo/hwloc/hwloc/utils/hwloc/hwloc-patch.c | 15 +-
.../tools/topo/hwloc/hwloc/utils/hwloc/misc.h | 5 +
.../topo/hwloc/hwloc/utils/lstopo/Makefile.am | 2 +-
.../topo/hwloc/hwloc/utils/lstopo/lstopo-ascii.c | 14 +-
.../topo/hwloc/hwloc/utils/lstopo/lstopo-cairo.c | 149 ++++--
.../topo/hwloc/hwloc/utils/lstopo/lstopo-draw.c | 8 +-
.../topo/hwloc/hwloc/utils/lstopo/lstopo-fig.c | 2 +-
.../hwloc/utils/lstopo/lstopo-no-graphics.1in | 2 +
.../topo/hwloc/hwloc/utils/lstopo/lstopo-windows.c | 121 +++--
101 files changed, 3293 insertions(+), 859 deletions(-)
create mode 100755 src/pm/hydra/tools/topo/hwloc/hwloc/contrib/ci.inria.fr/job-0-tarball.sh
create mode 100755 src/pm/hydra/tools/topo/hwloc/hwloc/contrib/ci.inria.fr/job-1-check.sh
create mode 100755 src/pm/hydra/tools/topo/hwloc/hwloc/contrib/ci.inria.fr/job-3-mingw.sh
create mode 100644 src/pm/hydra/tools/topo/hwloc/hwloc/contrib/ci.inria.fr/job-3-visualstudio.bat
create mode 100644 src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-hardwired.c
create mode 100644 src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc/hwloc-dump-hwdata-knl.c
create mode 100644 src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc/hwloc-dump-hwdata.1in
create mode 100644 src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc/hwloc-dump-hwdata.c
hooks/post-receive
--
MPICH primary repository
More information about the commits
mailing list