diff --git a/opal/mca/hwloc/hwloc1110/configure.m4 b/opal/mca/hwloc/hwloc1110/configure.m4 deleted file mode 100644 index d81fed0d56..0000000000 --- a/opal/mca/hwloc/hwloc1110/configure.m4 +++ /dev/null @@ -1,170 +0,0 @@ -# -*- shell-script -*- -# -# Copyright (c) 2009-2015 Cisco Systems, Inc. All rights reserved. -# Copyright (c) 2014-2015 Intel, Inc. All rights reserved. -# -# $COPYRIGHT$ -# -# Additional copyrights may follow -# -# $HEADER$ -# - -# -# Priority -# -AC_DEFUN([MCA_opal_hwloc_hwloc1110_PRIORITY], [90]) - -# -# Force this component to compile in static-only mode -# -AC_DEFUN([MCA_opal_hwloc_hwloc1110_COMPILE_MODE], [ - AC_MSG_CHECKING([for MCA component $2:$3 compile mode]) - $4="static" - AC_MSG_RESULT([$$4]) -]) - -# Include hwloc m4 files -m4_include(opal/mca/hwloc/hwloc1110/hwloc/config/hwloc.m4) -m4_include(opal/mca/hwloc/hwloc1110/hwloc/config/hwloc_pkg.m4) -m4_include(opal/mca/hwloc/hwloc1110/hwloc/config/hwloc_check_attributes.m4) -m4_include(opal/mca/hwloc/hwloc1110/hwloc/config/hwloc_check_visibility.m4) -m4_include(opal/mca/hwloc/hwloc1110/hwloc/config/hwloc_check_vendor.m4) -m4_include(opal/mca/hwloc/hwloc1110/hwloc/config/hwloc_components.m4) - -# MCA_hwloc_hwloc1110_POST_CONFIG() -# --------------------------------- -AC_DEFUN([MCA_opal_hwloc_hwloc1110_POST_CONFIG],[ - OPAL_VAR_SCOPE_PUSH([opal_hwloc_hwloc1110_basedir]) - - # If we won, then do all the rest of the setup - AS_IF([test "$1" = "1" && test "$opal_hwloc_hwloc1110_support" = "yes"], - [ - # Set this variable so that the framework m4 knows what - # file to include in opal/mca/hwloc/hwloc.h - opal_hwloc_hwloc1110_basedir=opal/mca/hwloc/hwloc1110 - opal_hwloc_base_include="$opal_hwloc_hwloc1110_basedir/hwloc1110.h" - - # Add some stuff to CPPFLAGS so that the rest of the source - # tree can be built - file=$opal_hwloc_hwloc1110_basedir/hwloc - CPPFLAGS="$CPPFLAGS -I$OPAL_TOP_SRCDIR/$file/include" - AS_IF([test "$OPAL_TOP_BUILDDIR" != "$OPAL_TOP_SRCDIR"], - [CPPFLAGS="$CPPFLAGS -I$OPAL_TOP_BUILDDIR/$file/include"]) - unset file - ]) - OPAL_VAR_SCOPE_POP - - # This must be run unconditionally - HWLOC_DO_AM_CONDITIONALS -])dnl - - -# MCA_hwloc_hwloc1110_CONFIG([action-if-found], [action-if-not-found]) -# -------------------------------------------------------------------- -AC_DEFUN([MCA_opal_hwloc_hwloc1110_CONFIG],[ - # Hwloc needs to know if we have Verbs support - AC_REQUIRE([OPAL_CHECK_VERBS_DIR]) - - AC_CONFIG_FILES([opal/mca/hwloc/hwloc1110/Makefile]) - - OPAL_VAR_SCOPE_PUSH([HWLOC_VERSION opal_hwloc_hwloc1110_save_CPPFLAGS opal_hwloc_hwloc1110_save_LDFLAGS opal_hwloc_hwloc1110_save_LIBS opal_hwloc_hwloc1110_save_cairo opal_hwloc_hwloc1110_save_xml opal_hwloc_hwloc1110_basedir opal_hwloc_hwloc1110_file opal_hwloc_hwloc1110_save_cflags CPPFLAGS_save LIBS_save]) - - # default to this component not providing support - opal_hwloc_hwloc1110_basedir=opal/mca/hwloc/hwloc1110 - opal_hwloc_hwloc1110_support=no - - if test "$with_hwloc" = "internal" -o "$with_hwloc" = "" -o "$with_hwloc" = "yes"; then - opal_hwloc_hwloc1110_save_CPPFLAGS=$CPPFLAGS - opal_hwloc_hwloc1110_save_LDFLAGS=$LDFLAGS - opal_hwloc_hwloc1110_save_LIBS=$LIBS - - # Run the hwloc configuration - set the prefix to minimize - # the chance that someone will use the internal symbols - HWLOC_SET_SYMBOL_PREFIX([opal_hwloc1110_]) - - # save XML or graphical options - opal_hwloc_hwloc1110_save_cairo=$enable_cairo - opal_hwloc_hwloc1110_save_xml=$enable_xml - opal_hwloc_hwloc1110_save_static=$enable_static - opal_hwloc_hwloc1110_save_shared=$enable_shared - opal_hwloc_hwloc1110_save_plugins=$enable_plugins - - # never enable hwloc's graphical option - enable_cairo=no - - # never enable hwloc's plugin system - enable_plugins=no - enable_static=yes - enable_shared=no - - # Override -- disable hwloc's libxml2 support, but enable the - # native hwloc XML support - enable_libxml2=no - enable_xml=yes - - # hwloc checks for compiler visibility, and its needs to do - # this without "picky" flags. - opal_hwloc_hwloc1110_save_cflags=$CFLAGS - CFLAGS=$OPAL_CFLAGS_BEFORE_PICKY - HWLOC_SETUP_CORE([opal/mca/hwloc/hwloc1110/hwloc], - [AC_MSG_CHECKING([whether hwloc configure succeeded]) - AC_MSG_RESULT([yes]) - HWLOC_VERSION="internal v`$srcdir/$opal_hwloc_hwloc1110_basedir/hwloc/config/hwloc_get_version.sh $srcdir/$opal_hwloc_hwloc1110_basedir/hwloc/VERSION`" - - # Build flags for our Makefile.am - opal_hwloc_hwloc1110_LDFLAGS='$(HWLOC_EMBEDDED_LDFLAGS)' - opal_hwloc_hwloc1110_LIBS='$(OPAL_TOP_BUILDDIR)/'"$opal_hwloc_hwloc1110_basedir"'/hwloc/src/libhwloc_embedded.la $(HWLOC_EMBEDDED_LIBS)' - opal_hwloc_hwloc1110_support=yes - - AC_DEFINE_UNQUOTED([HWLOC_HWLOC1110_HWLOC_VERSION], - ["$HWLOC_VERSION"], - [Version of hwloc]) - - # Do we have verbs support? - CPPFLAGS_save=$CPPFLAGS - AS_IF([test "$opal_want_verbs" = "yes"], - [CPPFLAGS="-I$opal_verbs_dir/include $CPPFLAGS"]) - AC_CHECK_HEADERS([infiniband/verbs.h]) - CPPFLAGS=$CPPFLAGS_save - ], - [AC_MSG_CHECKING([whether hwloc configure succeeded]) - AC_MSG_RESULT([no]) - opal_hwloc_hwloc1110_support=no]) - CFLAGS=$opal_hwloc_hwloc1110_save_cflags - - # Restore some env variables, if necessary - AS_IF([test -n "$opal_hwloc_hwloc1110_save_cairo"], - [enable_cairo=$opal_hwloc_hwloc1110_save_cairo]) - AS_IF([test -n "$opal_hwloc_hwloc1110_save_xml"], - [enable_xml=$opal_hwloc_hwloc1110_save_xml]) - AS_IF([test -n "$opal_hwloc_hwloc1110_save_static"], - [enable_static=$opal_hwloc_hwloc1110_save_static]) - AS_IF([test -n "$opal_hwloc_hwloc1110_save_shared"], - [enable_shared=$opal_hwloc_hwloc1110_save_shared]) - AS_IF([test -n "$opal_hwloc_hwloc1110_save_plugins"], - [enable_plugins=$opal_hwloc_hwloc1110_save_shared]) - - CPPFLAGS=$opal_hwloc_hwloc1110_save_CPPFLAGS - LDFLAGS=$opal_hwloc_hwloc1110_save_LDFLAGS - LIBS=$opal_hwloc_hwloc1110_save_LIBS - - AC_SUBST([opal_hwloc_hwloc1110_CFLAGS]) - AC_SUBST([opal_hwloc_hwloc1110_CPPFLAGS]) - AC_SUBST([opal_hwloc_hwloc1110_LDFLAGS]) - AC_SUBST([opal_hwloc_hwloc1110_LIBS]) - - # Finally, add some flags to the wrapper compiler so that our - # headers can be found. - hwloc_hwloc1110_WRAPPER_EXTRA_LDFLAGS="$HWLOC_EMBEDDED_LDFLAGS" - hwloc_hwloc1110_WRAPPER_EXTRA_LIBS="$HWLOC_EMBEDDED_LIBS" - hwloc_hwloc1110_WRAPPER_EXTRA_CPPFLAGS='-I${pkgincludedir}/'"$opal_hwloc_hwloc1110_basedir/hwloc/include" - fi - - # Done! - AS_IF([test "$opal_hwloc_hwloc1110_support" = "yes"], - [$1], - [$2]) - - OPAL_VAR_SCOPE_POP -])dnl diff --git a/opal/mca/hwloc/hwloc1110/Makefile.am b/opal/mca/hwloc/hwloc1111/Makefile.am similarity index 85% rename from opal/mca/hwloc/hwloc1110/Makefile.am rename to opal/mca/hwloc/hwloc1111/Makefile.am index 9329bb8827..c070422512 100644 --- a/opal/mca/hwloc/hwloc1110/Makefile.am +++ b/opal/mca/hwloc/hwloc1111/Makefile.am @@ -25,16 +25,16 @@ EXTRA_DIST = \ SUBDIRS = hwloc # Headers and sources -headers = hwloc1110.h -sources = hwloc1110_component.c +headers = hwloc1111.h +sources = hwloc1111_component.c # We only ever build this component statically -noinst_LTLIBRARIES = libmca_hwloc_hwloc1110.la -libmca_hwloc_hwloc1110_la_SOURCES = $(headers) $(sources) -nodist_libmca_hwloc_hwloc1110_la_SOURCES = $(nodist_headers) -libmca_hwloc_hwloc1110_la_LDFLAGS = -module -avoid-version $(opal_hwloc_hwloc1110_LDFLAGS) -libmca_hwloc_hwloc1110_la_LIBADD = $(opal_hwloc_hwloc1110_LIBS) -libmca_hwloc_hwloc1110_la_DEPENDENCIES = \ +noinst_LTLIBRARIES = libmca_hwloc_hwloc1111.la +libmca_hwloc_hwloc1111_la_SOURCES = $(headers) $(sources) +nodist_libmca_hwloc_hwloc1111_la_SOURCES = $(nodist_headers) +libmca_hwloc_hwloc1111_la_LDFLAGS = -module -avoid-version $(opal_hwloc_hwloc1111_LDFLAGS) +libmca_hwloc_hwloc1111_la_LIBADD = $(opal_hwloc_hwloc1111_LIBS) +libmca_hwloc_hwloc1111_la_DEPENDENCIES = \ $(HWLOC_top_builddir)/src/libhwloc_embedded.la # Since the rest of the code base includes the underlying hwloc.h, we diff --git a/opal/mca/hwloc/hwloc1110/README-ompi.txt b/opal/mca/hwloc/hwloc1111/README-ompi.txt similarity index 66% rename from opal/mca/hwloc/hwloc1110/README-ompi.txt rename to opal/mca/hwloc/hwloc1111/README-ompi.txt index ba333aa5da..60d73d103a 100644 --- a/opal/mca/hwloc/hwloc1110/README-ompi.txt +++ b/opal/mca/hwloc/hwloc1111/README-ompi.txt @@ -1,3 +1,4 @@ Applied the following patches from the upstream hwloc 1.11 branch after -the v1.11.0 release: +the v1.11.1 release: +...none yet... diff --git a/opal/mca/hwloc/hwloc1111/configure.m4 b/opal/mca/hwloc/hwloc1111/configure.m4 new file mode 100644 index 0000000000..5a61bd7d0d --- /dev/null +++ b/opal/mca/hwloc/hwloc1111/configure.m4 @@ -0,0 +1,170 @@ +# -*- shell-script -*- +# +# Copyright (c) 2009-2015 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2014-2015 Intel, Inc. All rights reserved. +# +# $COPYRIGHT$ +# +# Additional copyrights may follow +# +# $HEADER$ +# + +# +# Priority +# +AC_DEFUN([MCA_opal_hwloc_hwloc1111_PRIORITY], [90]) + +# +# Force this component to compile in static-only mode +# +AC_DEFUN([MCA_opal_hwloc_hwloc1111_COMPILE_MODE], [ + AC_MSG_CHECKING([for MCA component $2:$3 compile mode]) + $4="static" + AC_MSG_RESULT([$$4]) +]) + +# Include hwloc m4 files +m4_include(opal/mca/hwloc/hwloc1111/hwloc/config/hwloc.m4) +m4_include(opal/mca/hwloc/hwloc1111/hwloc/config/hwloc_pkg.m4) +m4_include(opal/mca/hwloc/hwloc1111/hwloc/config/hwloc_check_attributes.m4) +m4_include(opal/mca/hwloc/hwloc1111/hwloc/config/hwloc_check_visibility.m4) +m4_include(opal/mca/hwloc/hwloc1111/hwloc/config/hwloc_check_vendor.m4) +m4_include(opal/mca/hwloc/hwloc1111/hwloc/config/hwloc_components.m4) + +# MCA_hwloc_hwloc1111_POST_CONFIG() +# --------------------------------- +AC_DEFUN([MCA_opal_hwloc_hwloc1111_POST_CONFIG],[ + OPAL_VAR_SCOPE_PUSH([opal_hwloc_hwloc1111_basedir]) + + # If we won, then do all the rest of the setup + AS_IF([test "$1" = "1" && test "$opal_hwloc_hwloc1111_support" = "yes"], + [ + # Set this variable so that the framework m4 knows what + # file to include in opal/mca/hwloc/hwloc.h + opal_hwloc_hwloc1111_basedir=opal/mca/hwloc/hwloc1111 + opal_hwloc_base_include="$opal_hwloc_hwloc1111_basedir/hwloc1111.h" + + # Add some stuff to CPPFLAGS so that the rest of the source + # tree can be built + file=$opal_hwloc_hwloc1111_basedir/hwloc + CPPFLAGS="$CPPFLAGS -I$OPAL_TOP_SRCDIR/$file/include" + AS_IF([test "$OPAL_TOP_BUILDDIR" != "$OPAL_TOP_SRCDIR"], + [CPPFLAGS="$CPPFLAGS -I$OPAL_TOP_BUILDDIR/$file/include"]) + unset file + ]) + OPAL_VAR_SCOPE_POP + + # This must be run unconditionally + HWLOC_DO_AM_CONDITIONALS +])dnl + + +# MCA_hwloc_hwloc1111_CONFIG([action-if-found], [action-if-not-found]) +# -------------------------------------------------------------------- +AC_DEFUN([MCA_opal_hwloc_hwloc1111_CONFIG],[ + # Hwloc needs to know if we have Verbs support + AC_REQUIRE([OPAL_CHECK_VERBS_DIR]) + + AC_CONFIG_FILES([opal/mca/hwloc/hwloc1111/Makefile]) + + OPAL_VAR_SCOPE_PUSH([HWLOC_VERSION opal_hwloc_hwloc1111_save_CPPFLAGS opal_hwloc_hwloc1111_save_LDFLAGS opal_hwloc_hwloc1111_save_LIBS opal_hwloc_hwloc1111_save_cairo opal_hwloc_hwloc1111_save_xml opal_hwloc_hwloc1111_basedir opal_hwloc_hwloc1111_file opal_hwloc_hwloc1111_save_cflags CPPFLAGS_save LIBS_save]) + + # default to this component not providing support + opal_hwloc_hwloc1111_basedir=opal/mca/hwloc/hwloc1111 + opal_hwloc_hwloc1111_support=no + + if test "$with_hwloc" = "internal" -o "$with_hwloc" = "" -o "$with_hwloc" = "yes"; then + opal_hwloc_hwloc1111_save_CPPFLAGS=$CPPFLAGS + opal_hwloc_hwloc1111_save_LDFLAGS=$LDFLAGS + opal_hwloc_hwloc1111_save_LIBS=$LIBS + + # Run the hwloc configuration - set the prefix to minimize + # the chance that someone will use the internal symbols + HWLOC_SET_SYMBOL_PREFIX([opal_hwloc1111_]) + + # save XML or graphical options + opal_hwloc_hwloc1111_save_cairo=$enable_cairo + opal_hwloc_hwloc1111_save_xml=$enable_xml + opal_hwloc_hwloc1111_save_static=$enable_static + opal_hwloc_hwloc1111_save_shared=$enable_shared + opal_hwloc_hwloc1111_save_plugins=$enable_plugins + + # never enable hwloc's graphical option + enable_cairo=no + + # never enable hwloc's plugin system + enable_plugins=no + enable_static=yes + enable_shared=no + + # Override -- disable hwloc's libxml2 support, but enable the + # native hwloc XML support + enable_libxml2=no + enable_xml=yes + + # hwloc checks for compiler visibility, and its needs to do + # this without "picky" flags. + opal_hwloc_hwloc1111_save_cflags=$CFLAGS + CFLAGS=$OPAL_CFLAGS_BEFORE_PICKY + HWLOC_SETUP_CORE([opal/mca/hwloc/hwloc1111/hwloc], + [AC_MSG_CHECKING([whether hwloc configure succeeded]) + AC_MSG_RESULT([yes]) + HWLOC_VERSION="internal v`$srcdir/$opal_hwloc_hwloc1111_basedir/hwloc/config/hwloc_get_version.sh $srcdir/$opal_hwloc_hwloc1111_basedir/hwloc/VERSION`" + + # Build flags for our Makefile.am + opal_hwloc_hwloc1111_LDFLAGS='$(HWLOC_EMBEDDED_LDFLAGS)' + opal_hwloc_hwloc1111_LIBS='$(OPAL_TOP_BUILDDIR)/'"$opal_hwloc_hwloc1111_basedir"'/hwloc/src/libhwloc_embedded.la $(HWLOC_EMBEDDED_LIBS)' + opal_hwloc_hwloc1111_support=yes + + AC_DEFINE_UNQUOTED([HWLOC_HWLOC1111_HWLOC_VERSION], + ["$HWLOC_VERSION"], + [Version of hwloc]) + + # Do we have verbs support? + CPPFLAGS_save=$CPPFLAGS + AS_IF([test "$opal_want_verbs" = "yes"], + [CPPFLAGS="-I$opal_verbs_dir/include $CPPFLAGS"]) + AC_CHECK_HEADERS([infiniband/verbs.h]) + CPPFLAGS=$CPPFLAGS_save + ], + [AC_MSG_CHECKING([whether hwloc configure succeeded]) + AC_MSG_RESULT([no]) + opal_hwloc_hwloc1111_support=no]) + CFLAGS=$opal_hwloc_hwloc1111_save_cflags + + # Restore some env variables, if necessary + AS_IF([test -n "$opal_hwloc_hwloc1111_save_cairo"], + [enable_cairo=$opal_hwloc_hwloc1111_save_cairo]) + AS_IF([test -n "$opal_hwloc_hwloc1111_save_xml"], + [enable_xml=$opal_hwloc_hwloc1111_save_xml]) + AS_IF([test -n "$opal_hwloc_hwloc1111_save_static"], + [enable_static=$opal_hwloc_hwloc1111_save_static]) + AS_IF([test -n "$opal_hwloc_hwloc1111_save_shared"], + [enable_shared=$opal_hwloc_hwloc1111_save_shared]) + AS_IF([test -n "$opal_hwloc_hwloc1111_save_plugins"], + [enable_plugins=$opal_hwloc_hwloc1111_save_shared]) + + CPPFLAGS=$opal_hwloc_hwloc1111_save_CPPFLAGS + LDFLAGS=$opal_hwloc_hwloc1111_save_LDFLAGS + LIBS=$opal_hwloc_hwloc1111_save_LIBS + + AC_SUBST([opal_hwloc_hwloc1111_CFLAGS]) + AC_SUBST([opal_hwloc_hwloc1111_CPPFLAGS]) + AC_SUBST([opal_hwloc_hwloc1111_LDFLAGS]) + AC_SUBST([opal_hwloc_hwloc1111_LIBS]) + + # Finally, add some flags to the wrapper compiler so that our + # headers can be found. + hwloc_hwloc1111_WRAPPER_EXTRA_LDFLAGS="$HWLOC_EMBEDDED_LDFLAGS" + hwloc_hwloc1111_WRAPPER_EXTRA_LIBS="$HWLOC_EMBEDDED_LIBS" + hwloc_hwloc1111_WRAPPER_EXTRA_CPPFLAGS='-I${pkgincludedir}/'"$opal_hwloc_hwloc1111_basedir/hwloc/include" + fi + + # Done! + AS_IF([test "$opal_hwloc_hwloc1111_support" = "yes"], + [$1], + [$2]) + + OPAL_VAR_SCOPE_POP +])dnl diff --git a/opal/mca/hwloc/hwloc1110/hwloc/AUTHORS b/opal/mca/hwloc/hwloc1111/hwloc/AUTHORS similarity index 77% rename from opal/mca/hwloc/hwloc1110/hwloc/AUTHORS rename to opal/mca/hwloc/hwloc1111/hwloc/AUTHORS index 837b27f2ca..0e52215789 100644 --- a/opal/mca/hwloc/hwloc1110/hwloc/AUTHORS +++ b/opal/mca/hwloc/hwloc1111/hwloc/AUTHORS @@ -1,8 +1,10 @@ Cédric Augonnet +Guillaume Beauchamp Jérôme Clet-Ortega Ludovic Courtès -Brice Goglin Nathalie Furmento -Samuel Thibault -Jeff Squyres +Brice Goglin Alexey Kardashevskiy +Antoine Rougier (University of Bordeaux intern) +Jeff Squyres +Samuel Thibault diff --git a/opal/mca/hwloc/hwloc1110/hwloc/COPYING b/opal/mca/hwloc/hwloc1111/hwloc/COPYING similarity index 100% rename from opal/mca/hwloc/hwloc1110/hwloc/COPYING rename to opal/mca/hwloc/hwloc1111/hwloc/COPYING diff --git a/opal/mca/hwloc/hwloc1110/hwloc/Makefile.am b/opal/mca/hwloc/hwloc1111/hwloc/Makefile.am similarity index 100% rename from opal/mca/hwloc/hwloc1110/hwloc/Makefile.am rename to opal/mca/hwloc/hwloc1111/hwloc/Makefile.am diff --git a/opal/mca/hwloc/hwloc1110/hwloc/NEWS b/opal/mca/hwloc/hwloc1111/hwloc/NEWS similarity index 95% rename from opal/mca/hwloc/hwloc1110/hwloc/NEWS rename to opal/mca/hwloc/hwloc1111/hwloc/NEWS index df246fe0db..9638d63f0c 100644 --- a/opal/mca/hwloc/hwloc1110/hwloc/NEWS +++ b/opal/mca/hwloc/hwloc1111/hwloc/NEWS @@ -17,6 +17,51 @@ bug fixes (and other actions) for each version of hwloc since version in v0.9.1). +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 +78,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/opal/mca/hwloc/hwloc1110/hwloc/README b/opal/mca/hwloc/hwloc1111/hwloc/README similarity index 99% rename from opal/mca/hwloc/hwloc1110/hwloc/README rename to opal/mca/hwloc/hwloc1111/hwloc/README index f9b2e6c161..6332fbce93 100644 --- a/opal/mca/hwloc/hwloc1110/hwloc/README +++ b/opal/mca/hwloc/hwloc1111/hwloc/README @@ -349,7 +349,7 @@ of the source tree. #include #include -static void print_children(hwloc_topology_t topology, hwloc_obj_t obj, +static void print_children(hwloc_topology_t topology, hwloc_obj_t obj, int depth) { char type[32], attr[1024]; @@ -384,7 +384,7 @@ int main(void) hwloc_topology_init(&topology); /* ... Optionally, put detection configuration here to ignore - some objects types, define a synthetic topology, etc.... + some objects types, define a synthetic topology, etc.... The default is to detect all the objects of the machine that the caller is allowed to access. See Configure Topology @@ -404,7 +404,7 @@ int main(void) *****************************************************************/ for (depth = 0; depth < topodepth; depth++) { printf("*** Objects at level %d\n", depth); - for (i = 0; i < hwloc_get_nbobjs_by_depth(topology, depth); + for (i = 0; i < hwloc_get_nbobjs_by_depth(topology, depth); i++) { hwloc_obj_type_snprintf(string, sizeof(string), hwloc_get_obj_by_depth @@ -446,7 +446,7 @@ int main(void) levels++; size += obj->attr->cache.size; } - printf("*** Logical processor 0 has %d caches totaling %luKB\n", + printf("*** Logical processor 0 has %d caches totaling %luKB\n", levels, size / 1024); /***************************************************************** @@ -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/opal/mca/hwloc/hwloc1110/hwloc/VERSION b/opal/mca/hwloc/hwloc1111/hwloc/VERSION similarity index 96% rename from opal/mca/hwloc/hwloc1110/hwloc/VERSION rename to opal/mca/hwloc/hwloc1111/hwloc/VERSION index 243693b065..b1361597cf 100644 --- a/opal/mca/hwloc/hwloc1110/hwloc/VERSION +++ b/opal/mca/hwloc/hwloc1111/hwloc/VERSION @@ -7,7 +7,7 @@ major=1 minor=11 -release=0 +release=1 # 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 @@ -20,7 +20,7 @@ greek= # The date when this release was created -date="Jun 18, 2015" +date="Oct 15, 2015" # If snapshot=1, then use the value from snapshot_version as the # entire hwloc version (i.e., ignore major, minor, release, and @@ -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:7:6 diff --git a/opal/mca/hwloc/hwloc1110/hwloc/config/distscript.sh b/opal/mca/hwloc/hwloc1111/hwloc/config/distscript.sh similarity index 100% rename from opal/mca/hwloc/hwloc1110/hwloc/config/distscript.sh rename to opal/mca/hwloc/hwloc1111/hwloc/config/distscript.sh diff --git a/opal/mca/hwloc/hwloc1110/hwloc/config/hwloc.m4 b/opal/mca/hwloc/hwloc1111/hwloc/config/hwloc.m4 similarity index 98% rename from opal/mca/hwloc/hwloc1110/hwloc/config/hwloc.m4 rename to opal/mca/hwloc/hwloc1111/hwloc/config/hwloc.m4 index 8c1a766538..e364e6c0e9 100644 --- a/opal/mca/hwloc/hwloc1110/hwloc/config/hwloc.m4 +++ b/opal/mca/hwloc/hwloc1111/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. @@ -367,7 +367,7 @@ EOF]) AC_CHECK_HEADERS([dirent.h]) AC_CHECK_HEADERS([strings.h]) AC_CHECK_HEADERS([ctype.h]) - + AC_CHECK_FUNCS([strncasecmp], [ _HWLOC_CHECK_DECL([strncasecmp], [ AC_DEFINE([HWLOC_HAVE_DECL_STRNCASECMP], [1], [Define to 1 if function `strncasecmp' is declared by system headers]) @@ -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 ]]) 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 - #include - #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 + #include + ]], [[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 ]) ]) ]) diff --git a/opal/mca/hwloc/hwloc1110/hwloc/config/hwloc_check_attributes.m4 b/opal/mca/hwloc/hwloc1111/hwloc/config/hwloc_check_attributes.m4 similarity index 100% rename from opal/mca/hwloc/hwloc1110/hwloc/config/hwloc_check_attributes.m4 rename to opal/mca/hwloc/hwloc1111/hwloc/config/hwloc_check_attributes.m4 diff --git a/opal/mca/hwloc/hwloc1110/hwloc/config/hwloc_check_vendor.m4 b/opal/mca/hwloc/hwloc1111/hwloc/config/hwloc_check_vendor.m4 similarity index 100% rename from opal/mca/hwloc/hwloc1110/hwloc/config/hwloc_check_vendor.m4 rename to opal/mca/hwloc/hwloc1111/hwloc/config/hwloc_check_vendor.m4 diff --git a/opal/mca/hwloc/hwloc1110/hwloc/config/hwloc_check_visibility.m4 b/opal/mca/hwloc/hwloc1111/hwloc/config/hwloc_check_visibility.m4 similarity index 100% rename from opal/mca/hwloc/hwloc1110/hwloc/config/hwloc_check_visibility.m4 rename to opal/mca/hwloc/hwloc1111/hwloc/config/hwloc_check_visibility.m4 diff --git a/opal/mca/hwloc/hwloc1110/hwloc/config/hwloc_components.m4 b/opal/mca/hwloc/hwloc1111/hwloc/config/hwloc_components.m4 similarity index 100% rename from opal/mca/hwloc/hwloc1110/hwloc/config/hwloc_components.m4 rename to opal/mca/hwloc/hwloc1111/hwloc/config/hwloc_components.m4 diff --git a/opal/mca/hwloc/hwloc1110/hwloc/config/hwloc_get_version.sh b/opal/mca/hwloc/hwloc1111/hwloc/config/hwloc_get_version.sh similarity index 100% rename from opal/mca/hwloc/hwloc1110/hwloc/config/hwloc_get_version.sh rename to opal/mca/hwloc/hwloc1111/hwloc/config/hwloc_get_version.sh diff --git a/opal/mca/hwloc/hwloc1110/hwloc/config/hwloc_internal.m4 b/opal/mca/hwloc/hwloc1111/hwloc/config/hwloc_internal.m4 similarity index 100% rename from opal/mca/hwloc/hwloc1110/hwloc/config/hwloc_internal.m4 rename to opal/mca/hwloc/hwloc1111/hwloc/config/hwloc_internal.m4 diff --git a/opal/mca/hwloc/hwloc1110/hwloc/config/hwloc_pkg.m4 b/opal/mca/hwloc/hwloc1111/hwloc/config/hwloc_pkg.m4 similarity index 100% rename from opal/mca/hwloc/hwloc1110/hwloc/config/hwloc_pkg.m4 rename to opal/mca/hwloc/hwloc1111/hwloc/config/hwloc_pkg.m4 diff --git a/opal/mca/hwloc/hwloc1110/hwloc/config/test-driver b/opal/mca/hwloc/hwloc1111/hwloc/config/test-driver similarity index 100% rename from opal/mca/hwloc/hwloc1110/hwloc/config/test-driver rename to opal/mca/hwloc/hwloc1111/hwloc/config/test-driver diff --git a/opal/mca/hwloc/hwloc1110/hwloc/configure.ac b/opal/mca/hwloc/hwloc1111/hwloc/configure.ac similarity index 100% rename from opal/mca/hwloc/hwloc1110/hwloc/configure.ac rename to opal/mca/hwloc/hwloc1111/hwloc/configure.ac diff --git a/opal/mca/hwloc/hwloc1110/hwloc/contrib/hwloc-valgrind.supp b/opal/mca/hwloc/hwloc1111/hwloc/contrib/hwloc-valgrind.supp similarity index 99% rename from opal/mca/hwloc/hwloc1110/hwloc/contrib/hwloc-valgrind.supp rename to opal/mca/hwloc/hwloc1111/hwloc/contrib/hwloc-valgrind.supp index 18fc8bd2c1..e5c3bf3ce4 100644 --- a/opal/mca/hwloc/hwloc1110/hwloc/contrib/hwloc-valgrind.supp +++ b/opal/mca/hwloc/hwloc1111/hwloc/contrib/hwloc-valgrind.supp @@ -126,7 +126,7 @@ obj:*libatiadl* } -# +# { libpciaccess_device_name_leak Memcheck:Leak diff --git a/opal/mca/hwloc/hwloc1111/hwloc/contrib/windows/README b/opal/mca/hwloc/hwloc1111/hwloc/contrib/windows/README new file mode 100644 index 0000000000..c7d8d472bb --- /dev/null +++ b/opal/mca/hwloc/hwloc1111/hwloc/contrib/windows/README @@ -0,0 +1,36 @@ +This Visual Studio support is experimental. +Thanks to Eloi Gaudry for contributing the first draft of files. + + +No PlatformToolset is specified, so that the default target is always +used during build. +That means your build may not be compatible with older systems. +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: + // Get the process list snapshot + HANDLE hProcessSnapShot = CreateToolhelp32Snapshot(TH32CS_SNAPALL, 0); + // Initialize the process entry structure + PROCESSENTRY32 ProcessEntry = { 0 } ; + ProcessEntry.dwSize = sizeof(ProcessEntry); + // Get the first process info + if (Process32First( hProcessSnapShot, &ProcessEntry)) { + do { + HANDLE hProcess = OpenProcess(PROCESS_QUERY_INFORMATION, FALSE, ProcessEntry.th32ProcessID) ; + if (hProcess) { + std::cerr << ProcessEntry.th32ProcessID << "(" << ProcessEntry.szExeFile << ")" << std::endl ; + } + // check the PROCESSENTRY32 for other members. + } while (Process32Next(hProcessSnapShot, &ProcessEntry)); + // Close the handle + CloseHandle( hProcessSnapShot ) ; + } diff --git a/opal/mca/hwloc/hwloc1111/hwloc/contrib/windows/hwloc-annotate.vcxproj b/opal/mca/hwloc/hwloc1111/hwloc/contrib/windows/hwloc-annotate.vcxproj new file mode 100644 index 0000000000..42e9ca0f1a --- /dev/null +++ b/opal/mca/hwloc/hwloc1111/hwloc/contrib/windows/hwloc-annotate.vcxproj @@ -0,0 +1,90 @@ + + + + {9DE76C6D-4773-4766-9F93-69C56166CB8F} + hwloc-bind + Win32Proj + + + + Release + x64 + + + + + Application + false + true + MultiByte + v110 + + + + + + + + + + false + true + $(ProjectName)-5 + $(SolutionDir)$(Platform)\$(Configuration)\ + $(SolutionDir)$(Platform)\$(Configuration)\ + + + + Level3 + + + MaxSpeed + true + MultiThreadedDLL + true + true + PSAPI_VERSION=1;WIN32;NDEBUG;WIN64;_WINDOWS;_USRDLL;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + ..\..\include;..\..\utils\hwloc + + + $(IntDir)$(TargetFileName).intermediate.manifest + false + false + false + libcmt.lib;%(IgnoreSpecificDefaultLibraries) + true + $(OutDir)$(TargetName).exe + $(OutDir)$(ProjectName).pdb + LinkVerboseLib + Console + true + MachineX64 + NoErrorReport + $(SolutionDir)$(Platform)\Release;$(AdditionalLibraryDirectories) + 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) + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/opal/mca/hwloc/hwloc1111/hwloc/contrib/windows/hwloc-annotate.vcxproj.filters b/opal/mca/hwloc/hwloc1111/hwloc/contrib/windows/hwloc-annotate.vcxproj.filters new file mode 100644 index 0000000000..8c95a9b8ea --- /dev/null +++ b/opal/mca/hwloc/hwloc1111/hwloc/contrib/windows/hwloc-annotate.vcxproj.filters @@ -0,0 +1,69 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Source Files + + + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + diff --git a/opal/mca/hwloc/hwloc1111/hwloc/contrib/windows/hwloc-assembler.vcxproj b/opal/mca/hwloc/hwloc1111/hwloc/contrib/windows/hwloc-assembler.vcxproj new file mode 100644 index 0000000000..aba819a572 --- /dev/null +++ b/opal/mca/hwloc/hwloc1111/hwloc/contrib/windows/hwloc-assembler.vcxproj @@ -0,0 +1,90 @@ + + + + {9DE76C6D-4773-4766-9F93-69C56166CB9A} + hwloc-bind + Win32Proj + + + + Release + x64 + + + + + Application + false + true + MultiByte + v110 + + + + + + + + + + false + true + $(ProjectName)-5 + $(SolutionDir)$(Platform)\$(Configuration)\ + $(SolutionDir)$(Platform)\$(Configuration)\ + + + + Level3 + + + MaxSpeed + true + MultiThreadedDLL + true + true + PSAPI_VERSION=1;WIN32;NDEBUG;WIN64;_WINDOWS;_USRDLL;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + ..\..\include;..\..\utils\hwloc + + + $(IntDir)$(TargetFileName).intermediate.manifest + false + false + false + libcmt.lib;%(IgnoreSpecificDefaultLibraries) + true + $(OutDir)$(TargetName).exe + $(OutDir)$(ProjectName).pdb + LinkVerboseLib + Console + true + MachineX64 + NoErrorReport + $(SolutionDir)$(Platform)\Release;$(AdditionalLibraryDirectories) + 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) + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/opal/mca/hwloc/hwloc1111/hwloc/contrib/windows/hwloc-assembler.vcxproj.filters b/opal/mca/hwloc/hwloc1111/hwloc/contrib/windows/hwloc-assembler.vcxproj.filters new file mode 100644 index 0000000000..2a1cb719c6 --- /dev/null +++ b/opal/mca/hwloc/hwloc1111/hwloc/contrib/windows/hwloc-assembler.vcxproj.filters @@ -0,0 +1,69 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Source Files + + + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + diff --git a/opal/mca/hwloc/hwloc1111/hwloc/contrib/windows/hwloc-bind.vcxproj b/opal/mca/hwloc/hwloc1111/hwloc/contrib/windows/hwloc-bind.vcxproj new file mode 100644 index 0000000000..a544967d80 --- /dev/null +++ b/opal/mca/hwloc/hwloc1111/hwloc/contrib/windows/hwloc-bind.vcxproj @@ -0,0 +1,91 @@ + + + + {9DE76C6D-4773-4766-9F93-69C56166CB91} + hwloc-bind + Win32Proj + + + + Release + x64 + + + + + Application + false + true + MultiByte + v110 + + + + + + + + + + false + true + $(ProjectName)-5 + $(SolutionDir)$(Platform)\$(Configuration)\ + $(SolutionDir)$(Platform)\$(Configuration)\ + + + + Level3 + + + MaxSpeed + true + MultiThreadedDLL + true + true + PSAPI_VERSION=1;WIN32;NDEBUG;WIN64;_WINDOWS;_USRDLL;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + ..\..\include;..\..\utils\hwloc + + + $(IntDir)$(TargetFileName).intermediate.manifest + false + false + false + libcmt.lib;%(IgnoreSpecificDefaultLibraries) + true + $(OutDir)$(TargetName).exe + $(OutDir)$(ProjectName).pdb + LinkVerboseLib + Console + true + MachineX64 + NoErrorReport + $(SolutionDir)$(Platform)\Release;$(AdditionalLibraryDirectories) + 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) + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/opal/mca/hwloc/hwloc1111/hwloc/contrib/windows/hwloc-bind.vcxproj.filters b/opal/mca/hwloc/hwloc1111/hwloc/contrib/windows/hwloc-bind.vcxproj.filters new file mode 100644 index 0000000000..dea4bf6ee0 --- /dev/null +++ b/opal/mca/hwloc/hwloc1111/hwloc/contrib/windows/hwloc-bind.vcxproj.filters @@ -0,0 +1,72 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Source Files + + + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + diff --git a/opal/mca/hwloc/hwloc1111/hwloc/contrib/windows/hwloc-calc.vcxproj b/opal/mca/hwloc/hwloc1111/hwloc/contrib/windows/hwloc-calc.vcxproj new file mode 100644 index 0000000000..65e172d9bf --- /dev/null +++ b/opal/mca/hwloc/hwloc1111/hwloc/contrib/windows/hwloc-calc.vcxproj @@ -0,0 +1,91 @@ + + + + {9DE76C6D-4773-4766-9F93-69C56166CB92} + hwloc-calc + Win32Proj + + + + Release + x64 + + + + + Application + false + true + MultiByte + v110 + + + + + + + + + + false + true + $(ProjectName)-5 + $(SolutionDir)$(Platform)\$(Configuration)\ + $(SolutionDir)$(Platform)\$(Configuration)\ + + + + Level3 + + + MaxSpeed + true + MultiThreadedDLL + true + true + PSAPI_VERSION=1;WIN32;NDEBUG;WIN64;_WINDOWS;_USRDLL;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + ..\..\include;..\..\utils\hwloc + + + $(IntDir)$(TargetFileName).intermediate.manifest + false + false + false + libcmt.lib;%(IgnoreSpecificDefaultLibraries) + true + $(OutDir)$(TargetName).exe + $(OutDir)$(ProjectName).pdb + LinkVerboseLib + Console + true + MachineX64 + NoErrorReport + $(SolutionDir)$(Platform)\Release;$(AdditionalLibraryDirectories) + 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) + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/opal/mca/hwloc/hwloc1111/hwloc/contrib/windows/hwloc-calc.vcxproj.filters b/opal/mca/hwloc/hwloc1111/hwloc/contrib/windows/hwloc-calc.vcxproj.filters new file mode 100644 index 0000000000..96caf5dbf6 --- /dev/null +++ b/opal/mca/hwloc/hwloc1111/hwloc/contrib/windows/hwloc-calc.vcxproj.filters @@ -0,0 +1,72 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Source Files + + + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + diff --git a/opal/mca/hwloc/hwloc1111/hwloc/contrib/windows/hwloc-diff.vcxproj b/opal/mca/hwloc/hwloc1111/hwloc/contrib/windows/hwloc-diff.vcxproj new file mode 100644 index 0000000000..c5d3750380 --- /dev/null +++ b/opal/mca/hwloc/hwloc1111/hwloc/contrib/windows/hwloc-diff.vcxproj @@ -0,0 +1,89 @@ + + + + {9DE76C6D-4773-4766-9F93-69C56166CB93} + hwloc-bind + Win32Proj + + + + Release + x64 + + + + + Application + false + true + MultiByte + v110 + + + + + + + + + + false + true + $(ProjectName)-5 + $(SolutionDir)$(Platform)\$(Configuration)\ + $(SolutionDir)$(Platform)\$(Configuration)\ + + + + Level3 + + + MaxSpeed + true + MultiThreadedDLL + true + true + PSAPI_VERSION=1;WIN32;NDEBUG;WIN64;_WINDOWS;_USRDLL;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + ..\..\include;..\..\utils\hwloc + + + $(IntDir)$(TargetFileName).intermediate.manifest + false + false + false + libcmt.lib;%(IgnoreSpecificDefaultLibraries) + true + $(OutDir)$(TargetName).exe + $(OutDir)$(ProjectName).pdb + LinkVerboseLib + Console + true + MachineX64 + NoErrorReport + $(SolutionDir)$(Platform)\Release;$(AdditionalLibraryDirectories) + 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) + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/opal/mca/hwloc/hwloc1111/hwloc/contrib/windows/hwloc-diff.vcxproj.filters b/opal/mca/hwloc/hwloc1111/hwloc/contrib/windows/hwloc-diff.vcxproj.filters new file mode 100644 index 0000000000..7b648e90e9 --- /dev/null +++ b/opal/mca/hwloc/hwloc1111/hwloc/contrib/windows/hwloc-diff.vcxproj.filters @@ -0,0 +1,66 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Source Files + + + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + diff --git a/opal/mca/hwloc/hwloc1111/hwloc/contrib/windows/hwloc-distances.vcxproj b/opal/mca/hwloc/hwloc1111/hwloc/contrib/windows/hwloc-distances.vcxproj new file mode 100644 index 0000000000..aadbb45d0e --- /dev/null +++ b/opal/mca/hwloc/hwloc1111/hwloc/contrib/windows/hwloc-distances.vcxproj @@ -0,0 +1,90 @@ + + + + {9DE76C6D-4773-4766-9F93-69C56166CB94} + hwloc-bind + Win32Proj + + + + Release + x64 + + + + + Application + false + true + MultiByte + v110 + + + + + + + + + + false + true + $(ProjectName)-5 + $(SolutionDir)$(Platform)\$(Configuration)\ + $(SolutionDir)$(Platform)\$(Configuration)\ + + + + Level3 + + + MaxSpeed + true + MultiThreadedDLL + true + true + PSAPI_VERSION=1;WIN32;NDEBUG;WIN64;_WINDOWS;_USRDLL;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + ..\..\include;..\..\utils\hwloc + + + $(IntDir)$(TargetFileName).intermediate.manifest + false + false + false + libcmt.lib;%(IgnoreSpecificDefaultLibraries) + true + $(OutDir)$(TargetName).exe + $(OutDir)$(ProjectName).pdb + LinkVerboseLib + Console + true + MachineX64 + NoErrorReport + $(SolutionDir)$(Platform)\Release;$(AdditionalLibraryDirectories) + 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) + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/opal/mca/hwloc/hwloc1111/hwloc/contrib/windows/hwloc-distances.vcxproj.filters b/opal/mca/hwloc/hwloc1111/hwloc/contrib/windows/hwloc-distances.vcxproj.filters new file mode 100644 index 0000000000..7a1af4833f --- /dev/null +++ b/opal/mca/hwloc/hwloc1111/hwloc/contrib/windows/hwloc-distances.vcxproj.filters @@ -0,0 +1,69 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Source Files + + + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + diff --git a/opal/mca/hwloc/hwloc1111/hwloc/contrib/windows/hwloc-distrib.vcxproj b/opal/mca/hwloc/hwloc1111/hwloc/contrib/windows/hwloc-distrib.vcxproj new file mode 100644 index 0000000000..5407924ef3 --- /dev/null +++ b/opal/mca/hwloc/hwloc1111/hwloc/contrib/windows/hwloc-distrib.vcxproj @@ -0,0 +1,90 @@ + + + + {9DE76C6D-4773-4766-9F93-69C56166CB95} + hwloc-bind + Win32Proj + + + + Release + x64 + + + + + Application + false + true + MultiByte + v110 + + + + + + + + + + false + true + $(ProjectName)-5 + $(SolutionDir)$(Platform)\$(Configuration)\ + $(SolutionDir)$(Platform)\$(Configuration)\ + + + + Level3 + + + MaxSpeed + true + MultiThreadedDLL + true + true + PSAPI_VERSION=1;WIN32;NDEBUG;WIN64;_WINDOWS;_USRDLL;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + ..\..\include;..\..\utils\hwloc + + + $(IntDir)$(TargetFileName).intermediate.manifest + false + false + false + libcmt.lib;%(IgnoreSpecificDefaultLibraries) + true + $(OutDir)$(TargetName).exe + $(OutDir)$(ProjectName).pdb + LinkVerboseLib + Console + true + MachineX64 + NoErrorReport + $(SolutionDir)$(Platform)\Release;$(AdditionalLibraryDirectories) + 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) + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/opal/mca/hwloc/hwloc1111/hwloc/contrib/windows/hwloc-distrib.vcxproj.filters b/opal/mca/hwloc/hwloc1111/hwloc/contrib/windows/hwloc-distrib.vcxproj.filters new file mode 100644 index 0000000000..7b77f48587 --- /dev/null +++ b/opal/mca/hwloc/hwloc1111/hwloc/contrib/windows/hwloc-distrib.vcxproj.filters @@ -0,0 +1,69 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Source Files + + + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + diff --git a/opal/mca/hwloc/hwloc1111/hwloc/contrib/windows/hwloc-info.vcxproj b/opal/mca/hwloc/hwloc1111/hwloc/contrib/windows/hwloc-info.vcxproj new file mode 100644 index 0000000000..ce01efe074 --- /dev/null +++ b/opal/mca/hwloc/hwloc1111/hwloc/contrib/windows/hwloc-info.vcxproj @@ -0,0 +1,91 @@ + + + + {9DE76C6D-4773-4766-9F93-69C56166CB96} + hwloc-info + Win32Proj + + + + Release + x64 + + + + + Application + false + true + MultiByte + v110 + + + + + + + + + + false + true + $(ProjectName)-5 + $(SolutionDir)$(Platform)\$(Configuration)\ + $(SolutionDir)$(Platform)\$(Configuration)\ + + + + Level3 + + + MaxSpeed + true + MultiThreadedDLL + true + true + PSAPI_VERSION=1;WIN32;NDEBUG;WIN64;_WINDOWS;_USRDLL;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + ..\..\include;..\..\utils\hwloc + + + $(IntDir)$(TargetFileName).intermediate.manifest + false + false + false + libcmt.lib;%(IgnoreSpecificDefaultLibraries) + true + $(OutDir)$(TargetName).exe + $(OutDir)$(ProjectName).pdb + LinkVerboseLib + Console + true + MachineX64 + NoErrorReport + $(SolutionDir)$(Platform)\Release;$(AdditionalLibraryDirectories) + 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) + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/opal/mca/hwloc/hwloc1111/hwloc/contrib/windows/hwloc-info.vcxproj.filters b/opal/mca/hwloc/hwloc1111/hwloc/contrib/windows/hwloc-info.vcxproj.filters new file mode 100644 index 0000000000..9769af14a1 --- /dev/null +++ b/opal/mca/hwloc/hwloc1111/hwloc/contrib/windows/hwloc-info.vcxproj.filters @@ -0,0 +1,72 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Source Files + + + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + diff --git a/opal/mca/hwloc/hwloc1111/hwloc/contrib/windows/hwloc-patch.vcxproj b/opal/mca/hwloc/hwloc1111/hwloc/contrib/windows/hwloc-patch.vcxproj new file mode 100644 index 0000000000..64faf426e4 --- /dev/null +++ b/opal/mca/hwloc/hwloc1111/hwloc/contrib/windows/hwloc-patch.vcxproj @@ -0,0 +1,89 @@ + + + + {9DE76C6D-4773-4766-9F93-69C56166CB97} + hwloc-bind + Win32Proj + + + + Release + x64 + + + + + Application + false + true + MultiByte + v110 + + + + + + + + + + false + true + $(ProjectName)-5 + $(SolutionDir)$(Platform)\$(Configuration)\ + $(SolutionDir)$(Platform)\$(Configuration)\ + + + + Level3 + + + MaxSpeed + true + MultiThreadedDLL + true + true + PSAPI_VERSION=1;WIN32;NDEBUG;WIN64;_WINDOWS;_USRDLL;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + ..\..\include;..\..\utils\hwloc + + + $(IntDir)$(TargetFileName).intermediate.manifest + false + false + false + libcmt.lib;%(IgnoreSpecificDefaultLibraries) + true + $(OutDir)$(TargetName).exe + $(OutDir)$(ProjectName).pdb + LinkVerboseLib + Console + true + MachineX64 + NoErrorReport + $(SolutionDir)$(Platform)\Release;$(AdditionalLibraryDirectories) + 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) + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/opal/mca/hwloc/hwloc1111/hwloc/contrib/windows/hwloc-patch.vcxproj.filters b/opal/mca/hwloc/hwloc1111/hwloc/contrib/windows/hwloc-patch.vcxproj.filters new file mode 100644 index 0000000000..de6769da89 --- /dev/null +++ b/opal/mca/hwloc/hwloc1111/hwloc/contrib/windows/hwloc-patch.vcxproj.filters @@ -0,0 +1,66 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Source Files + + + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + diff --git a/opal/mca/hwloc/hwloc1111/hwloc/contrib/windows/hwloc.sln b/opal/mca/hwloc/hwloc1111/hwloc/contrib/windows/hwloc.sln new file mode 100644 index 0000000000..bfb53e27db --- /dev/null +++ b/opal/mca/hwloc/hwloc1111/hwloc/contrib/windows/hwloc.sln @@ -0,0 +1,121 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# 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}" + ProjectSection(ProjectDependencies) = postProject + {9DE76C6D-4773-4766-9F93-69C56166CB8D} = {9DE76C6D-4773-4766-9F93-69C56166CB8D} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "hwloc-annotate", "hwloc-annotate.vcxproj", "{9DE76C6D-4773-4766-9F93-69C56166CB8F}" + ProjectSection(ProjectDependencies) = postProject + {9DE76C6D-4773-4766-9F93-69C56166CB8D} = {9DE76C6D-4773-4766-9F93-69C56166CB8D} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "hwloc-assembler", "hwloc-assembler.vcxproj", "{9DE76C6D-4773-4766-9F93-69C56166CB90}" + ProjectSection(ProjectDependencies) = postProject + {9DE76C6D-4773-4766-9F93-69C56166CB8D} = {9DE76C6D-4773-4766-9F93-69C56166CB8D} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "hwloc-bind", "hwloc-bind.vcxproj", "{9DE76C6D-4773-4766-9F93-69C56166CB91}" + ProjectSection(ProjectDependencies) = postProject + {9DE76C6D-4773-4766-9F93-69C56166CB8D} = {9DE76C6D-4773-4766-9F93-69C56166CB8D} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "hwloc-calc", "hwloc-calc.vcxproj", "{9DE76C6D-4773-4766-9F93-69C56166CB92}" + ProjectSection(ProjectDependencies) = postProject + {9DE76C6D-4773-4766-9F93-69C56166CB8D} = {9DE76C6D-4773-4766-9F93-69C56166CB8D} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "hwloc-diff", "hwloc-diff.vcxproj", "{9DE76C6D-4773-4766-9F93-69C56166CB93}" + ProjectSection(ProjectDependencies) = postProject + {9DE76C6D-4773-4766-9F93-69C56166CB8D} = {9DE76C6D-4773-4766-9F93-69C56166CB8D} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "hwloc-distances", "hwloc-distances.vcxproj", "{9DE76C6D-4773-4766-9F93-69C56166CB94}" + ProjectSection(ProjectDependencies) = postProject + {9DE76C6D-4773-4766-9F93-69C56166CB8D} = {9DE76C6D-4773-4766-9F93-69C56166CB8D} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "hwloc-distrib", "hwloc-distrib.vcxproj", "{9DE76C6D-4773-4766-9F93-69C56166CB95}" + ProjectSection(ProjectDependencies) = postProject + {9DE76C6D-4773-4766-9F93-69C56166CB8D} = {9DE76C6D-4773-4766-9F93-69C56166CB8D} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "hwloc-info", "hwloc-info.vcxproj", "{9DE76C6D-4773-4766-9F93-69C56166CB96}" + ProjectSection(ProjectDependencies) = postProject + {9DE76C6D-4773-4766-9F93-69C56166CB8D} = {9DE76C6D-4773-4766-9F93-69C56166CB8D} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "hwloc-patch", "hwloc-patch.vcxproj", "{9DE76C6D-4773-4766-9F93-69C56166CB97}" + ProjectSection(ProjectDependencies) = postProject + {9DE76C6D-4773-4766-9F93-69C56166CB8D} = {9DE76C6D-4773-4766-9F93-69C56166CB8D} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lstopo", "lstopo.vcxproj", "{9DE76C6D-4773-4766-9F93-69C56166CB98}" + ProjectSection(ProjectDependencies) = postProject + {9DE76C6D-4773-4766-9F93-69C56166CB8E} = {9DE76C6D-4773-4766-9F93-69C56166CB8E} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lstopo-win", "lstopo-win.vcxproj", "{9DE76C6D-4773-4766-9F93-69C56166CB99}" + ProjectSection(ProjectDependencies) = postProject + {9DE76C6D-4773-4766-9F93-69C56166CB98} = {9DE76C6D-4773-4766-9F93-69C56166CB98} + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Release|x64 = Release|x64 + ReleaseStatic|x64 = ReleaseStatic|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {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}.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}.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}.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}.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}.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}.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}.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}.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}.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}.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}.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 + EndGlobalSection +EndGlobal diff --git a/opal/mca/hwloc/hwloc1111/hwloc/contrib/windows/hwloc_config.h b/opal/mca/hwloc/hwloc1111/hwloc/contrib/windows/hwloc_config.h new file mode 100644 index 0000000000..49237163b0 --- /dev/null +++ b/opal/mca/hwloc/hwloc1111/hwloc/contrib/windows/hwloc_config.h @@ -0,0 +1,62 @@ +/* + * Copyright © 2009 CNRS + * Copyright © 2009-2014 Inria. All rights reserved. + * Copyright © 2009-2012 Université Bordeaux + * Copyright © 2009-2011 Cisco Systems, Inc. All rights reserved. + * See COPYING in top-level directory. + */ + +/* The configuration file */ + +#ifndef HWLOC_CONFIG_H +#define HWLOC_CONFIG_H + +#define __hwloc_restrict +#define __hwloc_inline __inline + +#define __hwloc_attribute_unused +#define __hwloc_attribute_malloc +#define __hwloc_attribute_const +#define __hwloc_attribute_pure +#define __hwloc_attribute_deprecated +#define __hwloc_attribute_may_alias + +/* Defined to 1 if you have the `windows.h' header. */ +#define HWLOC_HAVE_WINDOWS_H 1 +#define hwloc_pid_t HANDLE +#define hwloc_thread_t HANDLE + +#include +#include +typedef DWORDLONG hwloc_uint64_t; +typedef SSIZE_T ssize_t; +#define snprintf _snprintf +#define strcasecmp _stricmp +#define strncasecmp _strnicmp +#define strdup _strdup +#define strtoull _strtoui64 +#define strtoll _strtoi64 +#define S_ISREG(m) ((m)&_S_IFREG) +#define S_ISDIR( m ) (((m) & S_IFMT) == S_IFDIR) +#define putenv _putenv + +#if defined( _USRDLL ) /* dynamic linkage */ +#if defined( DECLSPEC_EXPORTS ) +#define HWLOC_DECLSPEC __declspec(dllexport) +#else +#define HWLOC_DECLSPEC __declspec(dllimport) +#endif +#else /* static linkage */ +#define HWLOC_DECLSPEC +#endif + +/* Whether we need to re-define all the hwloc public symbols or not */ +#define HWLOC_SYM_TRANSFORM 0 + +/* The hwloc symbol prefix */ +#define HWLOC_SYM_PREFIX hwloc_ + +/* The hwloc symbol prefix in all caps */ +#define HWLOC_SYM_PREFIX_CAPS HWLOC_ + +#endif /* HWLOC_CONFIG_H */ diff --git a/opal/mca/hwloc/hwloc1111/hwloc/contrib/windows/libhwloc.vcxproj b/opal/mca/hwloc/hwloc1111/hwloc/contrib/windows/libhwloc.vcxproj new file mode 100644 index 0000000000..e1475e6df9 --- /dev/null +++ b/opal/mca/hwloc/hwloc1111/hwloc/contrib/windows/libhwloc.vcxproj @@ -0,0 +1,238 @@ + + + + {9DE76C6D-4773-4766-9F93-69C56166CB8D} + libhwloc + Win32Proj + + + + DebugStatic + x64 + + + DebugDll + x64 + + + ReleaseStatic + x64 + + + Release + x64 + + + + + DynamicLibrary + true + MultiByte + v110 + + + StaticLibrary + true + MultiByte + v110 + + + DynamicLibrary + false + true + MultiByte + v110 + + + StaticLibrary + false + true + MultiByte + v110 + + + + + + + + + + + + + + + + + + + false + true + $(ProjectName)-5 + $(SolutionDir)$(Platform)\$(Configuration)\ + $(SolutionDir)$(Platform)\$(Configuration)\ + + + false + true + $(ProjectName)-5 + $(SolutionDir)$(Platform)\$(Configuration)\ + $(SolutionDir)$(Platform)\$(Configuration)\ + + + false + true + $(ProjectName)-5 + $(SolutionDir)$(Platform)\$(Configuration)\ + $(SolutionDir)$(Platform)\$(Configuration)\ + + + false + true + $(ProjectName)-5 + $(SolutionDir)$(Platform)\$(Configuration)\ + $(SolutionDir)$(Platform)\$(Configuration)\ + + + + 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 + + + + + Level3 + Disabled + WIN32;WIN64;_DEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + ..\..\include;%(AdditionalIncludeDirectories) + + + Console + true + + + + + 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 + + + + + Level3 + Disabled + WIN32;WIN64;_DEBUG;_WINDOWS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + ..\..\include;%(AdditionalIncludeDirectories) + + + Console + true + + + + + 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 + + + Level3 + + + MaxSpeed + true + MultiThreadedDLL + true + true + PSAPI_VERSION=1;WIN32;NDEBUG;WIN64;_WINDOWS;_USRDLL;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + ..\..\include;..\..\src + + + $(IntDir)$(TargetFileName).intermediate.manifest + false + false + false + libcmt.lib;%(IgnoreSpecificDefaultLibraries) + $(OutDir)$(ProjectName).lib + true + $(OutDir)$(TargetName).dll + $(OutDir)$(ProjectName).pdb + LinkVerboseLib + Console + true + MachineX64 + NoErrorReport + + + + + 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 + + + Level3 + + + MaxSpeed + true + MultiThreadedDLL + true + true + PSAPI_VERSION=1;WIN32;NDEBUG;WIN64;_WINDOWS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + ..\..\include;..\..\src + + + $(IntDir)$(TargetFileName).intermediate.manifest + false + false + false + libcmt.lib;%(IgnoreSpecificDefaultLibraries) + $(OutDir)$(ProjectName).lib + true + $(OutDir)$(TargetName).dll + $(OutDir)$(ProjectName).pdb + LinkVerboseLib + Console + true + MachineX64 + NoErrorReport + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/opal/mca/hwloc/hwloc1111/hwloc/contrib/windows/libhwloc.vcxproj.filters b/opal/mca/hwloc/hwloc1111/hwloc/contrib/windows/libhwloc.vcxproj.filters new file mode 100644 index 0000000000..77b4f77901 --- /dev/null +++ b/opal/mca/hwloc/hwloc1111/hwloc/contrib/windows/libhwloc.vcxproj.filters @@ -0,0 +1,123 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + diff --git a/opal/mca/hwloc/hwloc1111/hwloc/contrib/windows/lstopo-no-graphics.vcxproj b/opal/mca/hwloc/hwloc1111/hwloc/contrib/windows/lstopo-no-graphics.vcxproj new file mode 100644 index 0000000000..48659e8049 --- /dev/null +++ b/opal/mca/hwloc/hwloc1111/hwloc/contrib/windows/lstopo-no-graphics.vcxproj @@ -0,0 +1,97 @@ + + + + {9DE76C6D-4773-4766-9F93-69C56166CB8E} + lstopo-no-graphics + Win32Proj + + + + Release + x64 + + + + + Application + false + true + MultiByte + v110 + + + + + + + + + + false + true + $(ProjectName)-5 + $(SolutionDir)$(Platform)\$(Configuration)\ + $(SolutionDir)$(Platform)\$(Configuration)\ + + + + Level3 + + + MaxSpeed + true + MultiThreadedDLL + true + true + PSAPI_VERSION=1;WIN32;NDEBUG;WIN64;_WINDOWS;_USRDLL;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + ..\..\include;..\..\utils\hwloc;..\..\utils\lstopo + + + $(IntDir)$(TargetFileName).intermediate.manifest + false + false + false + libcmt.lib;%(IgnoreSpecificDefaultLibraries) + true + $(OutDir)$(TargetName).exe + $(OutDir)$(ProjectName).pdb + LinkVerboseLib + Console + true + MachineX64 + NoErrorReport + $(SolutionDir)$(Platform)\Release;$(AdditionalLibraryDirectories) + 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) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/opal/mca/hwloc/hwloc1111/hwloc/contrib/windows/lstopo-no-graphics.vcxproj.filters b/opal/mca/hwloc/hwloc1111/hwloc/contrib/windows/lstopo-no-graphics.vcxproj.filters new file mode 100644 index 0000000000..d888f3a183 --- /dev/null +++ b/opal/mca/hwloc/hwloc1111/hwloc/contrib/windows/lstopo-no-graphics.vcxproj.filters @@ -0,0 +1,90 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + diff --git a/opal/mca/hwloc/hwloc1111/hwloc/contrib/windows/lstopo-win.vcxproj b/opal/mca/hwloc/hwloc1111/hwloc/contrib/windows/lstopo-win.vcxproj new file mode 100644 index 0000000000..fdbefca8cc --- /dev/null +++ b/opal/mca/hwloc/hwloc1111/hwloc/contrib/windows/lstopo-win.vcxproj @@ -0,0 +1,99 @@ + + + + {9DE76C6D-4773-4766-9F93-69C56166CB99} + lstopo-no-graphics + Win32Proj + + + + Release + x64 + + + + + Application + false + true + MultiByte + v110 + + + + + + + + + + false + true + $(ProjectName)-5 + $(SolutionDir)$(Platform)\$(Configuration)\ + $(SolutionDir)$(Platform)\$(Configuration)\ + + + + Level3 + + + MaxSpeed + true + MultiThreadedDLL + true + true + LSTOPO_HAVE_GRAPHICS=1;PSAPI_VERSION=1;WIN32;NDEBUG;WIN64;_WINDOWS;_USRDLL;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + ..\..\include;..\..\utils\hwloc;..\..\utils\lstopo + + + $(IntDir)$(TargetFileName).intermediate.manifest + false + false + false + libcmt.lib;%(IgnoreSpecificDefaultLibraries) + true + $(OutDir)$(TargetName).exe + $(OutDir)$(ProjectName).pdb + LinkVerboseLib + Windows + true + MachineX64 + NoErrorReport + $(SolutionDir)$(Platform)\Release;$(AdditionalLibraryDirectories) + 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) + mainCRTStartup + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/opal/mca/hwloc/hwloc1111/hwloc/contrib/windows/lstopo-win.vcxproj.filters b/opal/mca/hwloc/hwloc1111/hwloc/contrib/windows/lstopo-win.vcxproj.filters new file mode 100644 index 0000000000..4ce0ed87fb --- /dev/null +++ b/opal/mca/hwloc/hwloc1111/hwloc/contrib/windows/lstopo-win.vcxproj.filters @@ -0,0 +1,93 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + diff --git a/opal/mca/hwloc/hwloc1111/hwloc/contrib/windows/lstopo.vcxproj b/opal/mca/hwloc/hwloc1111/hwloc/contrib/windows/lstopo.vcxproj new file mode 100644 index 0000000000..ba75246409 --- /dev/null +++ b/opal/mca/hwloc/hwloc1111/hwloc/contrib/windows/lstopo.vcxproj @@ -0,0 +1,98 @@ + + + + {9DE76C6D-4773-4766-9F93-69C56166CB98} + lstopo-no-graphics + Win32Proj + + + + Release + x64 + + + + + Application + false + true + MultiByte + v110 + + + + + + + + + + false + true + $(ProjectName)-5 + $(SolutionDir)$(Platform)\$(Configuration)\ + $(SolutionDir)$(Platform)\$(Configuration)\ + + + + Level3 + + + MaxSpeed + true + MultiThreadedDLL + true + true + LSTOPO_HAVE_GRAPHICS=1;PSAPI_VERSION=1;WIN32;NDEBUG;WIN64;_WINDOWS;_USRDLL;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + ..\..\include;..\..\utils\hwloc;..\..\utils\lstopo + + + $(IntDir)$(TargetFileName).intermediate.manifest + false + false + false + libcmt.lib;%(IgnoreSpecificDefaultLibraries) + true + $(OutDir)$(TargetName).exe + $(OutDir)$(ProjectName).pdb + LinkVerboseLib + Console + true + MachineX64 + NoErrorReport + $(SolutionDir)$(Platform)\Release;$(AdditionalLibraryDirectories) + 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) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/opal/mca/hwloc/hwloc1111/hwloc/contrib/windows/lstopo.vcxproj.filters b/opal/mca/hwloc/hwloc1111/hwloc/contrib/windows/lstopo.vcxproj.filters new file mode 100644 index 0000000000..4ce0ed87fb --- /dev/null +++ b/opal/mca/hwloc/hwloc1111/hwloc/contrib/windows/lstopo.vcxproj.filters @@ -0,0 +1,93 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + diff --git a/opal/mca/hwloc/hwloc1111/hwloc/contrib/windows/private_config.h b/opal/mca/hwloc/hwloc1111/hwloc/contrib/windows/private_config.h new file mode 100644 index 0000000000..942aed787e --- /dev/null +++ b/opal/mca/hwloc/hwloc1111/hwloc/contrib/windows/private_config.h @@ -0,0 +1,674 @@ +/* + * Copyright © 2009, 2011, 2012 CNRS. 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$ + * + * Additional copyrights may follow + * + * $HEADER$ + */ + +#ifndef HWLOC_CONFIGURE_H +#define HWLOC_CONFIGURE_H + +#define DECLSPEC_EXPORTS + +#define HWLOC_HAVE_MSVC_CPUIDEX 1 + +/* Define to 1 if the system has the type `CACHE_DESCRIPTOR'. */ +#define HAVE_CACHE_DESCRIPTOR 0 + +/* Define to 1 if the system has the type `CACHE_RELATIONSHIP'. */ +#define HAVE_CACHE_RELATIONSHIP 0 + +/* Define to 1 if you have the `clz' function. */ +/* #undef HAVE_CLZ */ + +/* Define to 1 if you have the `clzl' function. */ +/* #undef HAVE_CLZL */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_CL_CL_EXT_H */ + +/* Define to 1 if you have the `cpuset_setaffinity' function. */ +/* #undef HAVE_CPUSET_SETAFFINITY */ + +/* Define to 1 if you have the `cpuset_setid' function. */ +/* #undef HAVE_CPUSET_SETID */ + +/* Define to 1 if we have -lcuda */ +/* #undef HAVE_CUDA */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_CUDA_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_CUDA_RUNTIME_API_H */ + +/* Define to 1 if you have the declaration of `CL_DEVICE_TOPOLOGY_AMD', and to + 0 if you don't. */ +/* #undef HAVE_DECL_CL_DEVICE_TOPOLOGY_AMD */ + +/* Define to 1 if you have the declaration of `CTL_HW', and to 0 if you don't. + */ +/* #undef HAVE_DECL_CTL_HW */ + +/* Define to 1 if you have the declaration of `fabsf', and to 0 if you don't. + */ +#define HAVE_DECL_FABSF 1 + +/* Define to 1 if you have the declaration of `HW_NCPU', and to 0 if you + don't. */ +/* #undef HAVE_DECL_HW_NCPU */ + +/* Define to 1 if you have the declaration of + `nvmlDeviceGetMaxPcieLinkGeneration', and to 0 if you don't. */ +/* #undef HAVE_DECL_NVMLDEVICEGETMAXPCIELINKGENERATION */ + +/* Define to 1 if you have the declaration of `pthread_getaffinity_np', and to + 0 if you don't. */ +#define HAVE_DECL_PTHREAD_GETAFFINITY_NP 0 + +/* Define to 1 if you have the declaration of `pthread_setaffinity_np', and to + 0 if you don't. */ +#define HAVE_DECL_PTHREAD_SETAFFINITY_NP 0 + +/* Define to 1 if you have the declaration of `strtoull', and to 0 if you + don't. */ +#define HAVE_DECL_STRTOULL 1 + +/* Define to 1 if you have the declaration of `_SC_LARGE_PAGESIZE', and to 0 + if you don't. */ +#define HAVE_DECL__SC_LARGE_PAGESIZE 0 + +/* Define to 1 if you have the declaration of `_SC_NPROCESSORS_CONF', and to 0 + if you don't. */ +#define HAVE_DECL__SC_NPROCESSORS_CONF 0 + +/* Define to 1 if you have the declaration of `_SC_NPROCESSORS_ONLN', and to 0 + if you don't. */ +#define HAVE_DECL__SC_NPROCESSORS_ONLN 0 + +/* Define to 1 if you have the declaration of `_SC_NPROC_CONF', and to 0 if + you don't. */ +#define HAVE_DECL__SC_NPROC_CONF 0 + +/* Define to 1 if you have the declaration of `_SC_NPROC_ONLN', and to 0 if + you don't. */ +#define HAVE_DECL__SC_NPROC_ONLN 0 + +/* Define to 1 if you have the declaration of `_SC_PAGESIZE', and to 0 if you + don't. */ +#define HAVE_DECL__SC_PAGESIZE 0 + +/* Define to 1 if you have the declaration of `_SC_PAGE_SIZE', and to 0 if you + don't. */ +#define HAVE_DECL__SC_PAGE_SIZE 0 + +/* Define to 1 if you have the header file. */ +/* #define HAVE_DIRENT_H 1 */ +#undef HAVE_DIRENT_H + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_DLFCN_H */ + +/* Define to 1 if you have the `ffs' function. */ +/* #undef HAVE_FFS */ + +/* Define to 1 if you have the `ffsl' function. */ +/* #undef HAVE_FFSL */ + +/* Define to 1 if you have the `fls' function. */ +/* #undef HAVE_FLS */ + +/* Define to 1 if you have the `flsl' function. */ +/* #undef HAVE_FLSL */ + +/* Define to 1 if you have the `getpagesize' function. */ +#define HAVE_GETPAGESIZE 1 + +/* Define to 1 if the system has the type `GROUP_AFFINITY'. */ +#define HAVE_GROUP_AFFINITY 1 + +/* Define to 1 if the system has the type `GROUP_RELATIONSHIP'. */ +#define HAVE_GROUP_RELATIONSHIP 1 + +/* Define to 1 if you have the `host_info' function. */ +/* #undef HAVE_HOST_INFO */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_INFINIBAND_VERBS_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define to 1 if the system has the type `KAFFINITY'. */ +#define HAVE_KAFFINITY 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_KSTAT_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_LANGINFO_H */ + +/* Define to 1 if we have -lgdi32 */ +#define HAVE_LIBGDI32 1 + +/* Define to 1 if we have -libverbs */ +/* #undef HAVE_LIBIBVERBS */ + +/* Define to 1 if we have -lkstat */ +/* #undef HAVE_LIBKSTAT */ + +/* Define to 1 if we have -llgrp */ +/* #undef HAVE_LIBLGRP */ + +/* Define to 1 if you have the header file. */ +#define HAVE_LOCALE_H 1 + +/* Define to 1 if the system has the type `LOGICAL_PROCESSOR_RELATIONSHIP'. */ +#define HAVE_LOGICAL_PROCESSOR_RELATIONSHIP 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_MACH_MACH_HOST_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_MACH_MACH_INIT_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_MALLOC_H 1 + +/* Define to 1 if you have the `memalign' function. */ +/* #undef HAVE_MEMALIGN */ + +/* Define to 1 if you have the header file. */ +#define HAVE_MEMORY_H 1 + +/* Define to 1 if we have -lmyriexpress */ +/* #undef HAVE_MYRIEXPRESS */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_MYRIEXPRESS_H */ + +/* Define to 1 if you have the `nl_langinfo' function. */ +/* #undef HAVE_NL_LANGINFO */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_NUMAIF_H */ + +/* Define to 1 if the system has the type `NUMA_NODE_RELATIONSHIP'. */ +#define HAVE_NUMA_NODE_RELATIONSHIP 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_NVCTRL_NVCTRL_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_NVML_H */ + +/* Define to 1 if you have the `openat' function. */ +/* #undef HAVE_OPENAT */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_PICL_H */ + +/* Define to 1 if you have the `posix_memalign' function. */ +/* #undef HAVE_POSIX_MEMALIGN */ + +/* Define to 1 if the system has the type `PROCESSOR_CACHE_TYPE'. */ +#define HAVE_PROCESSOR_CACHE_TYPE 1 + +/* Define to 1 if the system has the type `PROCESSOR_GROUP_INFO'. */ +#define HAVE_PROCESSOR_GROUP_INFO 1 + +/* Define to 1 if the system has the type `PROCESSOR_RELATIONSHIP'. */ +#define HAVE_PROCESSOR_RELATIONSHIP 1 + +/* Define to 1 if the system has the type `PSAPI_WORKING_SET_EX_BLOCK'. */ +/* #undef HAVE_PSAPI_WORKING_SET_EX_BLOCK */ + +/* Define to 1 if the system has the type `PSAPI_WORKING_SET_EX_INFORMATION'. + */ +/* #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 header file. */ +/* #undef HAVE_PTHREAD_NP_H */ + +/* Define to 1 if the system has the type `pthread_t'. */ +/* #undef HAVE_PTHREAD_T */ +#undef HAVE_PTHREAD_T + +/* Define to 1 if you have the `putwc' function. */ +#define HAVE_PUTWC 1 + +/* Define to 1 if the system has the type `RelationProcessorPackage'. */ +/* #undef HAVE_RELATIONPROCESSORPACKAGE */ + +/* Define to 1 if you have the `setlocale' function. */ +#define HAVE_SETLOCALE 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the `strftime' function. */ +#define HAVE_STRFTIME 1 + +/* Define to 1 if you have the header file. */ +/* #define HAVE_STRINGS_H 1*/ +#undef HAVE_STRINGS_H + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the `strncasecmp' function. */ +#define HAVE_STRNCASECMP 1 + +/* Define to '1' if sysctl is present and usable */ +/* #undef HAVE_SYSCTL */ + +/* Define to '1' if sysctlbyname is present and usable */ +/* #undef HAVE_SYSCTLBYNAME */ + +/* Define to 1 if the system has the type + `SYSTEM_LOGICAL_PROCESSOR_INFORMATION'. */ +#define HAVE_SYSTEM_LOGICAL_PROCESSOR_INFORMATION 1 + +/* Define to 1 if the system has the type + `SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX'. */ +#define HAVE_SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_CPUSET_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_LGRP_USER_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_MMAN_H */ + +/* Define to 1 if you have the header file. */ +/* #define HAVE_SYS_PARAM_H 1 */ +#undef HAVE_SYS_PARAM_H + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_SYSCTL_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_UTSNAME_H */ + +/* Define to 1 if you have the `uname' function. */ +/* #undef HAVE_UNAME */ + +/* Define to 1 if you have the header file. */ +/* #define HAVE_UNISTD_H 1 */ +#undef HAVE_UNISTD_H + +/* Define to 1 if you have the `uselocale' function. */ +/* #undef HAVE_USELOCALE */ + +/* Define to 1 if the system has the type `wchar_t'. */ +#define HAVE_WCHAR_T 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_X11_KEYSYM_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_X11_XLIB_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_X11_XUTIL_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_XLOCALE_H */ + +/* Define to 1 on AIX */ +/* #undef HWLOC_AIX_SYS */ + +/* Define to 1 on BlueGene/Q */ +/* #undef HWLOC_BGQ_SYS */ + +/* Whether C compiler supports symbol visibility or not */ +#define HWLOC_C_HAVE_VISIBILITY 0 + +/* Define to 1 on Darwin */ +/* #undef HWLOC_DARWIN_SYS */ + +/* Whether we are in debugging mode or not */ +/* #undef HWLOC_DEBUG */ + +/* Define to 1 on *FREEBSD */ +/* #undef HWLOC_FREEBSD_SYS */ + +/* Whether your compiler has __attribute__ or not */ +/* #define HWLOC_HAVE_ATTRIBUTE 1 */ +#undef HWLOC_HAVE_ATTRIBUTE + +/* Whether your compiler has __attribute__ aligned or not */ +/* #define HWLOC_HAVE_ATTRIBUTE_ALIGNED 1 */ + +/* Whether your compiler has __attribute__ always_inline or not */ +/* #define HWLOC_HAVE_ATTRIBUTE_ALWAYS_INLINE 1 */ + +/* Whether your compiler has __attribute__ cold or not */ +/* #define HWLOC_HAVE_ATTRIBUTE_COLD 1 */ + +/* Whether your compiler has __attribute__ const or not */ +/* #define HWLOC_HAVE_ATTRIBUTE_CONST 1 */ + +/* Whether your compiler has __attribute__ deprecated or not */ +/* #define HWLOC_HAVE_ATTRIBUTE_DEPRECATED 1 */ + +/* Whether your compiler has __attribute__ format or not */ +/* #define HWLOC_HAVE_ATTRIBUTE_FORMAT 1 */ + +/* Whether your compiler has __attribute__ hot or not */ +/* #define HWLOC_HAVE_ATTRIBUTE_HOT 1 */ + +/* Whether your compiler has __attribute__ malloc or not */ +/* #define HWLOC_HAVE_ATTRIBUTE_MALLOC 1 */ + +/* Whether your compiler has __attribute__ may_alias or not */ +/* #define HWLOC_HAVE_ATTRIBUTE_MAY_ALIAS 1 */ + +/* Whether your compiler has __attribute__ nonnull or not */ +/* #define HWLOC_HAVE_ATTRIBUTE_NONNULL 1 */ + +/* Whether your compiler has __attribute__ noreturn or not */ +/* #define HWLOC_HAVE_ATTRIBUTE_NORETURN 1 */ + +/* Whether your compiler has __attribute__ no_instrument_function or not */ +/* #define HWLOC_HAVE_ATTRIBUTE_NO_INSTRUMENT_FUNCTION 1 */ + +/* Whether your compiler has __attribute__ packed or not */ +/* #define HWLOC_HAVE_ATTRIBUTE_PACKED 1 */ + +/* Whether your compiler has __attribute__ pure or not */ +/* #define HWLOC_HAVE_ATTRIBUTE_PURE 1 */ + +/* Whether your compiler has __attribute__ sentinel or not */ +/* #define HWLOC_HAVE_ATTRIBUTE_SENTINEL 1 */ + +/* Whether your compiler has __attribute__ unused or not */ +/* #define HWLOC_HAVE_ATTRIBUTE_UNUSED 1 */ + +/* Whether your compiler has __attribute__ warn unused result or not */ +/* #define HWLOC_HAVE_ATTRIBUTE_WARN_UNUSED_RESULT 1 */ + +/* Whether your compiler has __attribute__ weak alias or not */ +/* #define HWLOC_HAVE_ATTRIBUTE_WEAK_ALIAS 1 */ + +/* Define to 1 if your `ffs' function is known to be broken. */ +/* #undef HWLOC_HAVE_BROKEN_FFS */ + +/* Define to 1 if you have the `cairo' library. */ +/* #undef HWLOC_HAVE_CAIRO */ + +/* Define to 1 if you have the `clz' function. */ +/* #undef HWLOC_HAVE_CLZ */ + +/* Define to 1 if you have the `clzl' function. */ +/* #undef HWLOC_HAVE_CLZL */ + +/* Define to 1 if you have cpuid */ +/* #undef HWLOC_HAVE_CPUID */ + +/* Define to 1 if the CPU_SET macro works */ +/* #undef HWLOC_HAVE_CPU_SET */ + +/* Define to 1 if the CPU_SET_S macro works */ +/* #undef HWLOC_HAVE_CPU_SET_S */ + +/* Define to 1 if you have the `cudart' SDK. */ +/* #undef HWLOC_HAVE_CUDART */ + +/* Define to 1 if function `clz' is declared by system headers */ +/* #undef HWLOC_HAVE_DECL_CLZ */ + +/* Define to 1 if function `clzl' is declared by system headers */ +/* #undef HWLOC_HAVE_DECL_CLZL */ + +/* Define to 1 if function `ffs' is declared by system headers */ +/* #undef HWLOC_HAVE_DECL_FFS */ + +/* Define to 1 if function `ffsl' is declared by system headers */ +/* #undef HWLOC_HAVE_DECL_FFSL */ + +/* Define to 1 if function `fls' is declared by system headers */ +/* #undef HWLOC_HAVE_DECL_FLS */ + +/* Define to 1 if function `flsl' is declared by system headers */ +/* #undef HWLOC_HAVE_DECL_FLSL */ + +/* Define to 1 if you have the `ffs' function. */ +/* #undef HWLOC_HAVE_FFS */ + +/* Define to 1 if you have the `ffsl' function. */ +/* #undef HWLOC_HAVE_FFSL */ + +/* Define to 1 if you have the `fls' function. */ +/* #undef HWLOC_HAVE_FLS */ + +/* Define to 1 if you have the `flsl' function. */ +/* #undef HWLOC_HAVE_FLSL */ + +/* Define to 1 if you have the GL module components. */ +/* #undef HWLOC_HAVE_GL */ + +/* Define to 1 if you have a library providing the termcap interface */ +/* #undef HWLOC_HAVE_LIBTERMCAP */ + +/* Define to 1 if you have the `libxml2' library. */ +/* #undef HWLOC_HAVE_LIBXML2 */ + +/* Define to 1 if building the Linux PCI component */ +/* #undef HWLOC_HAVE_LINUXPCI */ + +/* Define to 1 if mbind is available. */ +/* #undef HWLOC_HAVE_MBIND */ + +/* Define to 1 if migrate_pages is available. */ +/* #undef HWLOC_HAVE_MIGRATE_PAGES */ + +/* Define to 1 if you have the `NVML' library. */ +/* #undef HWLOC_HAVE_NVML */ + +/* Define to 1 if glibc provides the old prototype (without length) of + sched_setaffinity() */ +/* #undef HWLOC_HAVE_OLD_SCHED_SETAFFINITY */ + +/* Define to 1 if you have the `OpenCL' library. */ +/* #undef HWLOC_HAVE_OPENCL */ + +/* Define to 1 if the hwloc library should support dynamically-loaded plugins + */ +/* #undef HWLOC_HAVE_PLUGINS */ + +/* `Define to 1 if you have pthread_getthrds_np' */ +/* #undef HWLOC_HAVE_PTHREAD_GETTHRDS_NP */ + +/* Define to 1 if pthread mutexes are available */ +/* #undef HWLOC_HAVE_PTHREAD_MUTEX */ + +/* Define to 1 if glibc provides a prototype of sched_setaffinity() */ +#define HWLOC_HAVE_SCHED_SETAFFINITY 1 + +/* Define to 1 if set_mempolicy is available. */ +/* #undef HWLOC_HAVE_SET_MEMPOLICY */ + +/* Define to 1 if you have the header file. */ +#define HWLOC_HAVE_STDINT_H 1 + +/* Define to 1 if you have the `windows.h' header. */ +#define HWLOC_HAVE_WINDOWS_H 1 + +/* Define to 1 if X11 headers including Xutil.h and keysym.h are available. */ +/* #undef HWLOC_HAVE_X11_KEYSYM */ + +/* Define to 1 if function `syscall' is available */ +/* #undef HWLOC_HAVE_SYSCALL */ + +/* Define to 1 on HP-UX */ +/* #undef HWLOC_HPUX_SYS */ + +/* Define to 1 on Irix */ +/* #undef HWLOC_IRIX_SYS */ + +/* Define to 1 on Linux */ +/* #undef HWLOC_LINUX_SYS */ + +/* Define to 1 on *NETBSD */ +/* #undef HWLOC_NETBSD_SYS */ + +/* Define to 1 on OSF */ +/* #undef HWLOC_OSF_SYS */ + +/* The size of `unsigned int', as computed by sizeof */ +#define HWLOC_SIZEOF_UNSIGNED_INT 4 + +/* The size of `unsigned long', as computed by sizeof */ +#define HWLOC_SIZEOF_UNSIGNED_LONG 4 + +/* Define to 1 on Solaris */ +/* #undef HWLOC_SOLARIS_SYS */ + +/* The hwloc symbol prefix */ +#define HWLOC_SYM_PREFIX hwloc_ + +/* The hwloc symbol prefix in all caps */ +#define HWLOC_SYM_PREFIX_CAPS HWLOC_ + +/* Whether we need to re-define all the hwloc public symbols or not */ +#define HWLOC_SYM_TRANSFORM 0 + +/* Define to 1 on unsupported systems */ +/* #undef HWLOC_UNSUPPORTED_SYS */ + +/* Define to 1 if ncurses works, preferred over curses */ +/* #undef HWLOC_USE_NCURSES */ + +/* Define to 1 on WINDOWS */ +#define HWLOC_WIN_SYS 1 + +/* Define to 1 on x86_32 */ +/* #undef HWLOC_X86_32_ARCH */ + +/* Define to 1 on x86_64 */ +#define HWLOC_X86_64_ARCH 1 + +/* Define to the sub-directory in which libtool stores uninstalled libraries. + */ +#define LT_OBJDIR ".libs/" + +/* Name of package */ +#define PACKAGE "hwloc" + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "http://www.open-mpi.org/projects/hwloc/" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "hwloc" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "hwloc" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "hwloc" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION HWLOC_VERSION + +/* The size of `unsigned int', as computed by sizeof. */ +#define SIZEOF_UNSIGNED_INT 4 + +/* The size of `unsigned long', as computed by sizeof. */ +#define SIZEOF_UNSIGNED_LONG 4 + +/* The size of `void *', as computed by sizeof. */ +#define SIZEOF_VOID_P 8 + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Enable extensions on HP-UX. */ +#ifndef _HPUX_SOURCE +# define _HPUX_SOURCE 1 +#endif + + +/* Enable extensions on AIX 3, Interix. */ +/* +#ifndef _ALL_SOURCE +# define _ALL_SOURCE 1 +#endif +*/ + +/* Enable GNU extensions on systems that have them. */ +/* +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif +*/ +/* Enable threading extensions on Solaris. */ +/* +#ifndef _POSIX_PTHREAD_SEMANTICS +# define _POSIX_PTHREAD_SEMANTICS 1 +#endif +*/ +/* Enable extensions on HP NonStop. */ +/* +#ifndef _TANDEM_SOURCE +# define _TANDEM_SOURCE 1 +#endif +*/ +/* Enable general extensions on Solaris. */ +/* +#ifndef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +#endif +*/ + + +/* Version number of package */ +#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 + +/* Define to 1 if on MINIX. */ +/* #undef _MINIX */ + +/* Define to 2 if the system does not provide POSIX.1 features except with + this defined. */ +/* #undef _POSIX_1_SOURCE */ + +/* Define to 1 if you need to in order for `stat' and other things to work. */ +/* #undef _POSIX_SOURCE */ + +/* Define this to the process ID type */ +#define hwloc_pid_t HANDLE + +/* Define this to either strncasecmp or strncmp */ +#define hwloc_strncasecmp strncasecmp + +/* Define this to the thread ID type */ +#define hwloc_thread_t HANDLE + + +#endif /* HWLOC_CONFIGURE_H */ diff --git a/opal/mca/hwloc/hwloc1110/hwloc/doc/README.txt b/opal/mca/hwloc/hwloc1111/hwloc/doc/README.txt similarity index 100% rename from opal/mca/hwloc/hwloc1110/hwloc/doc/README.txt rename to opal/mca/hwloc/hwloc1111/hwloc/doc/README.txt diff --git a/opal/mca/hwloc/hwloc1110/hwloc/hwloc.pc.in b/opal/mca/hwloc/hwloc1111/hwloc/hwloc.pc.in similarity index 100% rename from opal/mca/hwloc/hwloc1110/hwloc/hwloc.pc.in rename to opal/mca/hwloc/hwloc1111/hwloc/hwloc.pc.in diff --git a/opal/mca/hwloc/hwloc1110/hwloc/include/Makefile.am b/opal/mca/hwloc/hwloc1111/hwloc/include/Makefile.am similarity index 100% rename from opal/mca/hwloc/hwloc1110/hwloc/include/Makefile.am rename to opal/mca/hwloc/hwloc1111/hwloc/include/Makefile.am diff --git a/opal/mca/hwloc/hwloc1110/hwloc/include/hwloc.h b/opal/mca/hwloc/hwloc1111/hwloc/include/hwloc.h similarity index 96% rename from opal/mca/hwloc/hwloc1110/hwloc/include/hwloc.h rename to opal/mca/hwloc/hwloc1111/hwloc/include/hwloc.h index 66e122089c..6220dcb743 100644 --- a/opal/mca/hwloc/hwloc1110/hwloc/include/hwloc.h +++ b/opal/mca/hwloc/hwloc1111/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) */ @@ -216,7 +219,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 +257,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 +292,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 +305,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 +396,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 +419,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 +429,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 +441,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 +461,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 +473,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 +682,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 +696,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 +705,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 +721,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 +732,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 +755,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 +764,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 +773,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 +809,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 +844,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 +901,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 +929,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 +1105,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 +1113,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 +1148,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,12 +1160,14 @@ 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. */ @@ -1243,7 +1251,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 +1465,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 +1478,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 +1491,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 +1502,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 +1514,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 +1533,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 +1619,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 +2049,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 +2058,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/opal/mca/hwloc/hwloc1110/hwloc/include/hwloc/autogen/config.h.in b/opal/mca/hwloc/hwloc1111/hwloc/include/hwloc/autogen/config.h.in similarity index 97% rename from opal/mca/hwloc/hwloc1110/hwloc/include/hwloc/autogen/config.h.in rename to opal/mca/hwloc/hwloc1111/hwloc/include/hwloc/autogen/config.h.in index 557d0cd885..e101b0a479 100644 --- a/opal/mca/hwloc/hwloc1110/hwloc/include/hwloc/autogen/config.h.in +++ b/opal/mca/hwloc/hwloc1111/hwloc/include/hwloc/autogen/config.h.in @@ -69,7 +69,7 @@ /* Maybe before gcc 2.95 too */ #ifdef HWLOC_HAVE_ATTRIBUTE_UNUSED -#define __HWLOC_HAVE_ATTRIBUTE_UNUSED HWLOC_HAVE_ATTRIBUTE_UNUSED +#define __HWLOC_HAVE_ATTRIBUTE_UNUSED HWLOC_HAVE_ATTRIBUTE_UNUSED #elif defined(__GNUC__) # define __HWLOC_HAVE_ATTRIBUTE_UNUSED (GXX_ABOVE_3_4 || GCC_ABOVE_2_95) #else @@ -82,7 +82,7 @@ #endif #ifdef HWLOC_HAVE_ATTRIBUTE_MALLOC -#define __HWLOC_HAVE_ATTRIBUTE_MALLOC HWLOC_HAVE_ATTRIBUTE_MALLOC +#define __HWLOC_HAVE_ATTRIBUTE_MALLOC HWLOC_HAVE_ATTRIBUTE_MALLOC #elif defined(__GNUC__) # define __HWLOC_HAVE_ATTRIBUTE_MALLOC (GXX_ABOVE_3_4 || GCC_ABOVE_2_96) #else @@ -95,7 +95,7 @@ #endif #ifdef HWLOC_HAVE_ATTRIBUTE_CONST -#define __HWLOC_HAVE_ATTRIBUTE_CONST HWLOC_HAVE_ATTRIBUTE_CONST +#define __HWLOC_HAVE_ATTRIBUTE_CONST HWLOC_HAVE_ATTRIBUTE_CONST #elif defined(__GNUC__) # define __HWLOC_HAVE_ATTRIBUTE_CONST (GXX_ABOVE_3_4 || GCC_ABOVE_2_95) #else @@ -108,7 +108,7 @@ #endif #ifdef HWLOC_HAVE_ATTRIBUTE_PURE -#define __HWLOC_HAVE_ATTRIBUTE_PURE HWLOC_HAVE_ATTRIBUTE_PURE +#define __HWLOC_HAVE_ATTRIBUTE_PURE HWLOC_HAVE_ATTRIBUTE_PURE #elif defined(__GNUC__) # define __HWLOC_HAVE_ATTRIBUTE_PURE (GXX_ABOVE_3_4 || GCC_ABOVE_2_96) #else @@ -121,7 +121,7 @@ #endif #ifdef HWLOC_HAVE_ATTRIBUTE_DEPRECATED -#define __HWLOC_HAVE_ATTRIBUTE_DEPRECATED HWLOC_HAVE_ATTRIBUTE_DEPRECATED +#define __HWLOC_HAVE_ATTRIBUTE_DEPRECATED HWLOC_HAVE_ATTRIBUTE_DEPRECATED #elif defined(__GNUC__) # define __HWLOC_HAVE_ATTRIBUTE_DEPRECATED (GXX_ABOVE_3_4 || GCC_ABOVE_3_3) #else diff --git a/opal/mca/hwloc/hwloc1110/hwloc/include/hwloc/bitmap.h b/opal/mca/hwloc/hwloc1111/hwloc/include/hwloc/bitmap.h similarity index 96% rename from opal/mca/hwloc/hwloc1110/hwloc/include/hwloc/bitmap.h rename to opal/mca/hwloc/hwloc1111/hwloc/include/hwloc/bitmap.h index bb18f65049..5626428ba6 100644 --- a/opal/mca/hwloc/hwloc1110/hwloc/include/hwloc/bitmap.h +++ b/opal/mca/hwloc/hwloc1111/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. * - * \sa hwloc_bitmap_foreach_begin */ -#define hwloc_bitmap_foreach_end() \ + * Needs a terminating ';'. + * + * \sa hwloc_bitmap_foreach_begin() + * \hideinitializer + */ +#define hwloc_bitmap_foreach_end() \ } \ } while (0) diff --git a/opal/mca/hwloc/hwloc1110/hwloc/include/hwloc/cuda.h b/opal/mca/hwloc/hwloc1111/hwloc/include/hwloc/cuda.h similarity index 100% rename from opal/mca/hwloc/hwloc1110/hwloc/include/hwloc/cuda.h rename to opal/mca/hwloc/hwloc1111/hwloc/include/hwloc/cuda.h diff --git a/opal/mca/hwloc/hwloc1110/hwloc/include/hwloc/cudart.h b/opal/mca/hwloc/hwloc1111/hwloc/include/hwloc/cudart.h similarity index 100% rename from opal/mca/hwloc/hwloc1110/hwloc/include/hwloc/cudart.h rename to opal/mca/hwloc/hwloc1111/hwloc/include/hwloc/cudart.h diff --git a/opal/mca/hwloc/hwloc1110/hwloc/include/hwloc/deprecated.h b/opal/mca/hwloc/hwloc1111/hwloc/include/hwloc/deprecated.h similarity index 97% rename from opal/mca/hwloc/hwloc1110/hwloc/include/hwloc/deprecated.h rename to opal/mca/hwloc/hwloc1111/hwloc/include/hwloc/deprecated.h index 3d09203449..2a58120278 100644 --- a/opal/mca/hwloc/hwloc1110/hwloc/include/hwloc/deprecated.h +++ b/opal/mca/hwloc/hwloc1111/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/opal/mca/hwloc/hwloc1110/hwloc/include/hwloc/diff.h b/opal/mca/hwloc/hwloc1111/hwloc/include/hwloc/diff.h similarity index 89% rename from opal/mca/hwloc/hwloc1110/hwloc/include/hwloc/diff.h rename to opal/mca/hwloc/hwloc1111/hwloc/include/hwloc/diff.h index 3f1beb1264..8b2fe92c32 100644 --- a/opal/mca/hwloc/hwloc1110/hwloc/include/hwloc/diff.h +++ b/opal/mca/hwloc/hwloc1111/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/opal/mca/hwloc/hwloc1110/hwloc/include/hwloc/gl.h b/opal/mca/hwloc/hwloc1111/hwloc/include/hwloc/gl.h similarity index 100% rename from opal/mca/hwloc/hwloc1110/hwloc/include/hwloc/gl.h rename to opal/mca/hwloc/hwloc1111/hwloc/include/hwloc/gl.h diff --git a/opal/mca/hwloc/hwloc1110/hwloc/include/hwloc/glibc-sched.h b/opal/mca/hwloc/hwloc1111/hwloc/include/hwloc/glibc-sched.h similarity index 100% rename from opal/mca/hwloc/hwloc1110/hwloc/include/hwloc/glibc-sched.h rename to opal/mca/hwloc/hwloc1111/hwloc/include/hwloc/glibc-sched.h diff --git a/opal/mca/hwloc/hwloc1110/hwloc/include/hwloc/helper.h b/opal/mca/hwloc/hwloc1111/hwloc/include/hwloc/helper.h similarity index 98% rename from opal/mca/hwloc/hwloc1110/hwloc/include/hwloc/helper.h rename to opal/mca/hwloc/hwloc1111/hwloc/include/hwloc/helper.h index 70d7d170de..029f2a37ef 100644 --- a/opal/mca/hwloc/hwloc1110/hwloc/include/hwloc/helper.h +++ b/opal/mca/hwloc/hwloc1111/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/opal/mca/hwloc/hwloc1110/hwloc/include/hwloc/inlines.h b/opal/mca/hwloc/hwloc1111/hwloc/include/hwloc/inlines.h similarity index 100% rename from opal/mca/hwloc/hwloc1110/hwloc/include/hwloc/inlines.h rename to opal/mca/hwloc/hwloc1111/hwloc/include/hwloc/inlines.h diff --git a/opal/mca/hwloc/hwloc1110/hwloc/include/hwloc/intel-mic.h b/opal/mca/hwloc/hwloc1111/hwloc/include/hwloc/intel-mic.h similarity index 100% rename from opal/mca/hwloc/hwloc1110/hwloc/include/hwloc/intel-mic.h rename to opal/mca/hwloc/hwloc1111/hwloc/include/hwloc/intel-mic.h diff --git a/opal/mca/hwloc/hwloc1110/hwloc/include/hwloc/linux-libnuma.h b/opal/mca/hwloc/hwloc1111/hwloc/include/hwloc/linux-libnuma.h similarity index 100% rename from opal/mca/hwloc/hwloc1110/hwloc/include/hwloc/linux-libnuma.h rename to opal/mca/hwloc/hwloc1111/hwloc/include/hwloc/linux-libnuma.h diff --git a/opal/mca/hwloc/hwloc1110/hwloc/include/hwloc/linux.h b/opal/mca/hwloc/hwloc1111/hwloc/include/hwloc/linux.h similarity index 94% rename from opal/mca/hwloc/hwloc1110/hwloc/include/hwloc/linux.h rename to opal/mca/hwloc/hwloc1111/hwloc/include/hwloc/linux.h index 4ddc90090e..565bfeec2a 100644 --- a/opal/mca/hwloc/hwloc1110/hwloc/include/hwloc/linux.h +++ b/opal/mca/hwloc/hwloc1111/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/opal/mca/hwloc/hwloc1110/hwloc/include/hwloc/myriexpress.h b/opal/mca/hwloc/hwloc1111/hwloc/include/hwloc/myriexpress.h similarity index 100% rename from opal/mca/hwloc/hwloc1110/hwloc/include/hwloc/myriexpress.h rename to opal/mca/hwloc/hwloc1111/hwloc/include/hwloc/myriexpress.h diff --git a/opal/mca/hwloc/hwloc1110/hwloc/include/hwloc/nvml.h b/opal/mca/hwloc/hwloc1111/hwloc/include/hwloc/nvml.h similarity index 100% rename from opal/mca/hwloc/hwloc1110/hwloc/include/hwloc/nvml.h rename to opal/mca/hwloc/hwloc1111/hwloc/include/hwloc/nvml.h diff --git a/opal/mca/hwloc/hwloc1110/hwloc/include/hwloc/opencl.h b/opal/mca/hwloc/hwloc1111/hwloc/include/hwloc/opencl.h similarity index 100% rename from opal/mca/hwloc/hwloc1110/hwloc/include/hwloc/opencl.h rename to opal/mca/hwloc/hwloc1111/hwloc/include/hwloc/opencl.h diff --git a/opal/mca/hwloc/hwloc1110/hwloc/include/hwloc/openfabrics-verbs.h b/opal/mca/hwloc/hwloc1111/hwloc/include/hwloc/openfabrics-verbs.h similarity index 100% rename from opal/mca/hwloc/hwloc1110/hwloc/include/hwloc/openfabrics-verbs.h rename to opal/mca/hwloc/hwloc1111/hwloc/include/hwloc/openfabrics-verbs.h diff --git a/opal/mca/hwloc/hwloc1110/hwloc/include/hwloc/plugins.h b/opal/mca/hwloc/hwloc1111/hwloc/include/hwloc/plugins.h similarity index 97% rename from opal/mca/hwloc/hwloc1110/hwloc/include/hwloc/plugins.h rename to opal/mca/hwloc/hwloc1111/hwloc/include/hwloc/plugins.h index 238a6895aa..510157bcf5 100644 --- a/opal/mca/hwloc/hwloc1110/hwloc/include/hwloc/plugins.h +++ b/opal/mca/hwloc/hwloc1111/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/opal/mca/hwloc/hwloc1110/hwloc/include/hwloc/rename.h b/opal/mca/hwloc/hwloc1111/hwloc/include/hwloc/rename.h similarity index 99% rename from opal/mca/hwloc/hwloc1110/hwloc/include/hwloc/rename.h rename to opal/mca/hwloc/hwloc1111/hwloc/include/hwloc/rename.h index 7b4b8a3c22..496504a9f0 100644 --- a/opal/mca/hwloc/hwloc1110/hwloc/include/hwloc/rename.h +++ b/opal/mca/hwloc/hwloc1111/hwloc/include/hwloc/rename.h @@ -604,6 +604,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/opal/mca/hwloc/hwloc1110/hwloc/include/private/autogen/config.h.in b/opal/mca/hwloc/hwloc1111/hwloc/include/private/autogen/config.h.in similarity index 99% rename from opal/mca/hwloc/hwloc1110/hwloc/include/private/autogen/config.h.in rename to opal/mca/hwloc/hwloc1111/hwloc/include/private/autogen/config.h.in index 9a3d7094fe..d02c357936 100644 --- a/opal/mca/hwloc/hwloc1110/hwloc/include/private/autogen/config.h.in +++ b/opal/mca/hwloc/hwloc1111/hwloc/include/private/autogen/config.h.in @@ -240,6 +240,9 @@ /* Define to 1 if the system has the type `PROCESSOR_GROUP_INFO'. */ #undef HAVE_PROCESSOR_GROUP_INFO +/* Define to 1 if the system has the type `PROCESSOR_NUMBER'. */ +#undef HAVE_PROCESSOR_NUMBER + /* Define to 1 if the system has the type `PROCESSOR_RELATIONSHIP'. */ #undef HAVE_PROCESSOR_RELATIONSHIP @@ -527,6 +530,9 @@ /* Define to 1 if you have the header file. */ #undef HWLOC_HAVE_STDINT_H +/* Define to 1 if function `syscall' is available */ +#undef HWLOC_HAVE_SYSCALL + /* Define to 1 if you have the `windows.h' header. */ #undef HWLOC_HAVE_WINDOWS_H @@ -536,9 +542,6 @@ /* Define to 1 if you have x86 cpuid */ #undef HWLOC_HAVE_X86_CPUID -/* Define to 1 if the _syscall3 macro works */ -#undef HWLOC_HAVE__SYSCALL3 - /* Define to 1 on HP-UX */ #undef HWLOC_HPUX_SYS diff --git a/opal/mca/hwloc/hwloc1110/hwloc/include/private/components.h b/opal/mca/hwloc/hwloc1111/hwloc/include/private/components.h similarity index 100% rename from opal/mca/hwloc/hwloc1110/hwloc/include/private/components.h rename to opal/mca/hwloc/hwloc1111/hwloc/include/private/components.h diff --git a/opal/mca/hwloc/hwloc1110/hwloc/include/private/cpuid-x86.h b/opal/mca/hwloc/hwloc1111/hwloc/include/private/cpuid-x86.h similarity index 100% rename from opal/mca/hwloc/hwloc1110/hwloc/include/private/cpuid-x86.h rename to opal/mca/hwloc/hwloc1111/hwloc/include/private/cpuid-x86.h diff --git a/opal/mca/hwloc/hwloc1110/hwloc/include/private/debug.h b/opal/mca/hwloc/hwloc1111/hwloc/include/private/debug.h similarity index 100% rename from opal/mca/hwloc/hwloc1110/hwloc/include/private/debug.h rename to opal/mca/hwloc/hwloc1111/hwloc/include/private/debug.h diff --git a/opal/mca/hwloc/hwloc1110/hwloc/include/private/misc.h b/opal/mca/hwloc/hwloc1111/hwloc/include/private/misc.h similarity index 100% rename from opal/mca/hwloc/hwloc1110/hwloc/include/private/misc.h rename to opal/mca/hwloc/hwloc1111/hwloc/include/private/misc.h diff --git a/opal/mca/hwloc/hwloc1110/hwloc/include/private/private.h b/opal/mca/hwloc/hwloc1111/hwloc/include/private/private.h similarity index 97% rename from opal/mca/hwloc/hwloc1110/hwloc/include/private/private.h rename to opal/mca/hwloc/hwloc1111/hwloc/include/private/private.h index 441f5cadc2..dafc26670a 100644 --- a/opal/mca/hwloc/hwloc1110/hwloc/include/private/private.h +++ b/opal/mca/hwloc/hwloc1111/hwloc/include/private/private.h @@ -31,7 +31,9 @@ #ifdef HAVE_UNISTD_H #include #endif +#ifdef HAVE_STDINT_H #include +#endif #ifdef HAVE_SYS_UTSNAME_H #include #endif @@ -190,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. @@ -254,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/opal/mca/hwloc/hwloc1110/hwloc/include/private/solaris-chiptype.h b/opal/mca/hwloc/hwloc1111/hwloc/include/private/solaris-chiptype.h similarity index 100% rename from opal/mca/hwloc/hwloc1110/hwloc/include/private/solaris-chiptype.h rename to opal/mca/hwloc/hwloc1111/hwloc/include/private/solaris-chiptype.h diff --git a/opal/mca/hwloc/hwloc1110/hwloc/include/private/xml.h b/opal/mca/hwloc/hwloc1111/hwloc/include/private/xml.h similarity index 100% rename from opal/mca/hwloc/hwloc1110/hwloc/include/private/xml.h rename to opal/mca/hwloc/hwloc1111/hwloc/include/private/xml.h diff --git a/opal/mca/hwloc/hwloc1110/hwloc/src/Makefile.am b/opal/mca/hwloc/hwloc1111/hwloc/src/Makefile.am similarity index 99% rename from opal/mca/hwloc/hwloc1110/hwloc/src/Makefile.am rename to opal/mca/hwloc/hwloc1111/hwloc/src/Makefile.am index 41aa35c14e..a241d703f3 100644 --- a/opal/mca/hwloc/hwloc1110/hwloc/src/Makefile.am +++ b/opal/mca/hwloc/hwloc1111/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/opal/mca/hwloc/hwloc1110/hwloc/src/base64.c b/opal/mca/hwloc/hwloc1111/hwloc/src/base64.c similarity index 99% rename from opal/mca/hwloc/hwloc1110/hwloc/src/base64.c rename to opal/mca/hwloc/hwloc1111/hwloc/src/base64.c index 7a3392fab8..4e1976fde4 100644 --- a/opal/mca/hwloc/hwloc1110/hwloc/src/base64.c +++ b/opal/mca/hwloc/hwloc1111/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/opal/mca/hwloc/hwloc1110/hwloc/src/bind.c b/opal/mca/hwloc/hwloc1111/hwloc/src/bind.c similarity index 99% rename from opal/mca/hwloc/hwloc1110/hwloc/src/bind.c rename to opal/mca/hwloc/hwloc1111/hwloc/src/bind.c index e2b5a063e4..a0cbfd8a3a 100644 --- a/opal/mca/hwloc/hwloc1110/hwloc/src/bind.c +++ b/opal/mca/hwloc/hwloc1111/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. */ @@ -447,7 +447,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/opal/mca/hwloc/hwloc1110/hwloc/src/bitmap.c b/opal/mca/hwloc/hwloc1111/hwloc/src/bitmap.c similarity index 99% rename from opal/mca/hwloc/hwloc1110/hwloc/src/bitmap.c rename to opal/mca/hwloc/hwloc1111/hwloc/src/bitmap.c index 1e78a96bf3..d6b5c5ec5f 100644 --- a/opal/mca/hwloc/hwloc1110/hwloc/src/bitmap.c +++ b/opal/mca/hwloc/hwloc1111/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/opal/mca/hwloc/hwloc1110/hwloc/src/components.c b/opal/mca/hwloc/hwloc1111/hwloc/src/components.c similarity index 99% rename from opal/mca/hwloc/hwloc1110/hwloc/src/components.c rename to opal/mca/hwloc/hwloc1111/hwloc/src/components.c index dc656e3985..aa0c8f9398 100644 --- a/opal/mca/hwloc/hwloc1110/hwloc/src/components.c +++ b/opal/mca/hwloc/hwloc1111/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/opal/mca/hwloc/hwloc1110/hwloc/src/diff.c b/opal/mca/hwloc/hwloc1111/hwloc/src/diff.c similarity index 100% rename from opal/mca/hwloc/hwloc1110/hwloc/src/diff.c rename to opal/mca/hwloc/hwloc1111/hwloc/src/diff.c diff --git a/opal/mca/hwloc/hwloc1110/hwloc/src/distances.c b/opal/mca/hwloc/hwloc1111/hwloc/src/distances.c similarity index 100% rename from opal/mca/hwloc/hwloc1110/hwloc/src/distances.c rename to opal/mca/hwloc/hwloc1111/hwloc/src/distances.c diff --git a/opal/mca/hwloc/hwloc1110/hwloc/src/dolib.c b/opal/mca/hwloc/hwloc1111/hwloc/src/dolib.c similarity index 100% rename from opal/mca/hwloc/hwloc1110/hwloc/src/dolib.c rename to opal/mca/hwloc/hwloc1111/hwloc/src/dolib.c diff --git a/opal/mca/hwloc/hwloc1110/hwloc/src/hwloc.dtd b/opal/mca/hwloc/hwloc1111/hwloc/src/hwloc.dtd similarity index 100% rename from opal/mca/hwloc/hwloc1110/hwloc/src/hwloc.dtd rename to opal/mca/hwloc/hwloc1111/hwloc/src/hwloc.dtd diff --git a/opal/mca/hwloc/hwloc1110/hwloc/src/misc.c b/opal/mca/hwloc/hwloc1111/hwloc/src/misc.c similarity index 100% rename from opal/mca/hwloc/hwloc1110/hwloc/src/misc.c rename to opal/mca/hwloc/hwloc1111/hwloc/src/misc.c diff --git a/opal/mca/hwloc/hwloc1110/hwloc/src/pci-common.c b/opal/mca/hwloc/hwloc1111/hwloc/src/pci-common.c similarity index 93% rename from opal/mca/hwloc/hwloc1110/hwloc/src/pci-common.c rename to opal/mca/hwloc/hwloc1111/hwloc/src/pci-common.c index 01d4e79b66..367d386044 100644 --- a/opal/mca/hwloc/hwloc1110/hwloc/src/pci-common.c +++ b/opal/mca/hwloc/hwloc1111/hwloc/src/pci-common.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #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/opal/mca/hwloc/hwloc1110/hwloc/src/topology-aix.c b/opal/mca/hwloc/hwloc1111/hwloc/src/topology-aix.c similarity index 100% rename from opal/mca/hwloc/hwloc1110/hwloc/src/topology-aix.c rename to opal/mca/hwloc/hwloc1111/hwloc/src/topology-aix.c diff --git a/opal/mca/hwloc/hwloc1110/hwloc/src/topology-bgq.c b/opal/mca/hwloc/hwloc1111/hwloc/src/topology-bgq.c similarity index 98% rename from opal/mca/hwloc/hwloc1110/hwloc/src/topology-bgq.c rename to opal/mca/hwloc/hwloc1111/hwloc/src/topology-bgq.c index 1258b65420..f3aec62607 100644 --- a/opal/mca/hwloc/hwloc1110/hwloc/src/topology-bgq.c +++ b/opal/mca/hwloc/hwloc1111/hwloc/src/topology-bgq.c @@ -15,6 +15,8 @@ #include #include +#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/opal/mca/hwloc/hwloc1110/hwloc/src/topology-cuda.c b/opal/mca/hwloc/hwloc1111/hwloc/src/topology-cuda.c similarity index 100% rename from opal/mca/hwloc/hwloc1110/hwloc/src/topology-cuda.c rename to opal/mca/hwloc/hwloc1111/hwloc/src/topology-cuda.c diff --git a/opal/mca/hwloc/hwloc1110/hwloc/src/topology-custom.c b/opal/mca/hwloc/hwloc1111/hwloc/src/topology-custom.c similarity index 100% rename from opal/mca/hwloc/hwloc1110/hwloc/src/topology-custom.c rename to opal/mca/hwloc/hwloc1111/hwloc/src/topology-custom.c diff --git a/opal/mca/hwloc/hwloc1110/hwloc/src/topology-darwin.c b/opal/mca/hwloc/hwloc1111/hwloc/src/topology-darwin.c similarity index 100% rename from opal/mca/hwloc/hwloc1110/hwloc/src/topology-darwin.c rename to opal/mca/hwloc/hwloc1111/hwloc/src/topology-darwin.c diff --git a/opal/mca/hwloc/hwloc1110/hwloc/src/topology-fake.c b/opal/mca/hwloc/hwloc1111/hwloc/src/topology-fake.c similarity index 100% rename from opal/mca/hwloc/hwloc1110/hwloc/src/topology-fake.c rename to opal/mca/hwloc/hwloc1111/hwloc/src/topology-fake.c diff --git a/opal/mca/hwloc/hwloc1110/hwloc/src/topology-freebsd.c b/opal/mca/hwloc/hwloc1111/hwloc/src/topology-freebsd.c similarity index 100% rename from opal/mca/hwloc/hwloc1110/hwloc/src/topology-freebsd.c rename to opal/mca/hwloc/hwloc1111/hwloc/src/topology-freebsd.c diff --git a/opal/mca/hwloc/hwloc1110/hwloc/src/topology-gl.c b/opal/mca/hwloc/hwloc1111/hwloc/src/topology-gl.c similarity index 100% rename from opal/mca/hwloc/hwloc1110/hwloc/src/topology-gl.c rename to opal/mca/hwloc/hwloc1111/hwloc/src/topology-gl.c diff --git a/opal/mca/hwloc/hwloc1111/hwloc/src/topology-hardwired.c b/opal/mca/hwloc/hwloc1111/hwloc/src/topology-hardwired.c new file mode 100644 index 0000000000..03ffc83408 --- /dev/null +++ b/opal/mca/hwloc/hwloc1111/hwloc/src/topology-hardwired.c @@ -0,0 +1,191 @@ +/* + * Copyright © 2015 Inria. All rights reserved. + * See COPYING in top-level directory. + */ + +#include + +#include +#include + +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/opal/mca/hwloc/hwloc1110/hwloc/src/topology-hpux.c b/opal/mca/hwloc/hwloc1111/hwloc/src/topology-hpux.c similarity index 100% rename from opal/mca/hwloc/hwloc1110/hwloc/src/topology-hpux.c rename to opal/mca/hwloc/hwloc1111/hwloc/src/topology-hpux.c diff --git a/opal/mca/hwloc/hwloc1110/hwloc/src/topology-linux.c b/opal/mca/hwloc/hwloc1111/hwloc/src/topology-linux.c similarity index 97% rename from opal/mca/hwloc/hwloc1110/hwloc/src/topology-linux.c rename to opal/mca/hwloc/hwloc1111/hwloc/src/topology-linux.c index 2d9d4da9cd..b1199d3519 100644 --- a/opal/mca/hwloc/hwloc1110/hwloc/src/topology-linux.c +++ b/opal/mca/hwloc/hwloc1111/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 @@ -61,8 +61,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 # ifndef __NR_sched_setaffinity @@ -96,7 +96,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 +129,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 +347,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 +355,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 +427,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 +510,7 @@ hwloc_linux_get_tid_cpubind(hwloc_topology_t topology __hwloc_attribute_unused, for(cpu=0; cpucpuset, 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 */ @@ -3898,6 +3898,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) { @@ -3989,6 +4035,10 @@ hwloc_look_linuxfs(struct hwloc_backend *backend) } /* Gather the list of cpus now */ + err = hwloc_linux_try_hardwired_cpuinfo(backend); + if (!err) + goto done; + 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 @@ -4016,6 +4066,7 @@ hwloc_look_linuxfs(struct hwloc_backend *backend) hwloc_linux_free_cpuinfo(Lprocs, numprocs, global_infos, global_infos_count); } + done: /* 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)) @@ -4443,15 +4494,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 +4648,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 +4836,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; } @@ -5134,7 +5198,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 +5235,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/opal/mca/hwloc/hwloc1110/hwloc/src/topology-netbsd.c b/opal/mca/hwloc/hwloc1111/hwloc/src/topology-netbsd.c similarity index 100% rename from opal/mca/hwloc/hwloc1110/hwloc/src/topology-netbsd.c rename to opal/mca/hwloc/hwloc1111/hwloc/src/topology-netbsd.c diff --git a/opal/mca/hwloc/hwloc1110/hwloc/src/topology-noos.c b/opal/mca/hwloc/hwloc1111/hwloc/src/topology-noos.c similarity index 100% rename from opal/mca/hwloc/hwloc1110/hwloc/src/topology-noos.c rename to opal/mca/hwloc/hwloc1111/hwloc/src/topology-noos.c diff --git a/opal/mca/hwloc/hwloc1110/hwloc/src/topology-nvml.c b/opal/mca/hwloc/hwloc1111/hwloc/src/topology-nvml.c similarity index 100% rename from opal/mca/hwloc/hwloc1110/hwloc/src/topology-nvml.c rename to opal/mca/hwloc/hwloc1111/hwloc/src/topology-nvml.c diff --git a/opal/mca/hwloc/hwloc1110/hwloc/src/topology-opencl.c b/opal/mca/hwloc/hwloc1111/hwloc/src/topology-opencl.c similarity index 100% rename from opal/mca/hwloc/hwloc1110/hwloc/src/topology-opencl.c rename to opal/mca/hwloc/hwloc1111/hwloc/src/topology-opencl.c diff --git a/opal/mca/hwloc/hwloc1110/hwloc/src/topology-osf.c b/opal/mca/hwloc/hwloc1111/hwloc/src/topology-osf.c similarity index 100% rename from opal/mca/hwloc/hwloc1110/hwloc/src/topology-osf.c rename to opal/mca/hwloc/hwloc1111/hwloc/src/topology-osf.c diff --git a/opal/mca/hwloc/hwloc1110/hwloc/src/topology-pci.c b/opal/mca/hwloc/hwloc1111/hwloc/src/topology-pci.c similarity index 98% rename from opal/mca/hwloc/hwloc1110/hwloc/src/topology-pci.c rename to opal/mca/hwloc/hwloc1111/hwloc/src/topology-pci.c index 4698f2c9ae..779bf17ba8 100644 --- a/opal/mca/hwloc/hwloc1110/hwloc/src/topology-pci.c +++ b/opal/mca/hwloc/hwloc1111/hwloc/src/topology-pci.c @@ -208,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)); @@ -275,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; } diff --git a/opal/mca/hwloc/hwloc1110/hwloc/src/topology-solaris-chiptype.c b/opal/mca/hwloc/hwloc1111/hwloc/src/topology-solaris-chiptype.c similarity index 100% rename from opal/mca/hwloc/hwloc1110/hwloc/src/topology-solaris-chiptype.c rename to opal/mca/hwloc/hwloc1111/hwloc/src/topology-solaris-chiptype.c diff --git a/opal/mca/hwloc/hwloc1110/hwloc/src/topology-solaris.c b/opal/mca/hwloc/hwloc1111/hwloc/src/topology-solaris.c similarity index 99% rename from opal/mca/hwloc/hwloc1110/hwloc/src/topology-solaris.c rename to opal/mca/hwloc/hwloc1111/hwloc/src/topology-solaris.c index cd0e5aa339..255c5fca4d 100644 --- a/opal/mca/hwloc/hwloc1110/hwloc/src/topology-solaris.c +++ b/opal/mca/hwloc/hwloc1111/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/opal/mca/hwloc/hwloc1110/hwloc/src/topology-synthetic.c b/opal/mca/hwloc/hwloc1111/hwloc/src/topology-synthetic.c similarity index 95% rename from opal/mca/hwloc/hwloc1110/hwloc/src/topology-synthetic.c rename to opal/mca/hwloc/hwloc1111/hwloc/src/topology-synthetic.c index db7087bb92..5e7a426047 100644 --- a/opal/mca/hwloc/hwloc1110/hwloc/src/topology-synthetic.c +++ b/opal/mca/hwloc/hwloc1111/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/opal/mca/hwloc/hwloc1110/hwloc/src/topology-windows.c b/opal/mca/hwloc/hwloc1111/hwloc/src/topology-windows.c similarity index 57% rename from opal/mca/hwloc/hwloc1110/hwloc/src/topology-windows.c rename to opal/mca/hwloc/hwloc1111/hwloc/src/topology-windows.c index 371aaa1c8b..83b5492156 100644 --- a/opal/mca/hwloc/hwloc1110/hwloc/src/topology-windows.c +++ b/opal/mca/hwloc/hwloc1111/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 -static void hwloc_bitmap_set_ith_ULONG_PTR(hwloc_bitmap_t set, unsigned i, ULONG_PTR mask) +#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) { - /* 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_from_ulong(set, mask & 0xffffffff); + hwloc_bitmap_set_ith_ulong(set, 1, mask >> 32); #else - hwloc_bitmap_set_ith_ulong(set, i, mask); + hwloc_bitmap_from_ulong(set, mask); #endif } -/* TODO: SetThreadIdealProcessor */ +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) +{ +#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); +#else + hwloc_bitmap_set_ith_ulong(set, i, mask); +#endif +} + +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,23 +459,84 @@ 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) { @@ -266,18 +556,42 @@ hwloc_win_set_proc_membind(hwloc_topology_t topology, hwloc_pid_t pid, hwloc_con return ret; } +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; } @@ -295,18 +609,6 @@ hwloc_win_get_proc_membind(hwloc_topology_t topology, hwloc_pid_t pid, hwloc_nod return ret; } -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) { @@ -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)<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 */ + hwloc_win_get_function_ptrs(); - 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 (GetCurrentProcessorNumberExProc || (GetCurrentProcessorNumberProc && nr_processor_groups == 1)) + hooks->get_thisthread_last_cpu_location = hwloc_win_get_thisthread_last_cpu_location; - if (!hwloc_win_get_VirtualAllocExNumaProc()) { + 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/opal/mca/hwloc/hwloc1110/hwloc/src/topology-x86.c b/opal/mca/hwloc/hwloc1111/hwloc/src/topology-x86.c similarity index 94% rename from opal/mca/hwloc/hwloc1110/hwloc/src/topology-x86.c rename to opal/mca/hwloc/hwloc1111/hwloc/src/topology-x86.c index db91a5ef6d..624b7bf50f 100644 --- a/opal/mca/hwloc/hwloc1110/hwloc/src/topology-x86.c +++ b/opal/mca/hwloc/hwloc1111/hwloc/src/topology-x86.c @@ -112,6 +112,20 @@ static void fill_amd_cache(struct procinfo *infos, unsigned level, int type, uns cache->size = size; cache->sets = 0; + if (infos->cpufamilynumber== 0x10 && infos->cpumodelnumber == 0x9 + && 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; + } + hwloc_debug("cache L%u t%u linesize %u ways %u size %luKB\n", cache->level, cache->nbthreads_sharing, cache->linesize, cache->ways, cache->size >> 10); } @@ -310,9 +324,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) - */ } } @@ -696,6 +707,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; icpuset = 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; @@ -728,7 +753,15 @@ static void summarize(struct hwloc_backend *backend, struct procinfo *infos, int /* Found a matching cache, now look for others sharing it */ { - unsigned cacheid = infos[i].apicid / infos[i].cache[l].nbthreads_sharing; + /* 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. + * Hence we use apicid%max_log_proc instead of apicid to restore the alignment. + * Works because we also compare packageid to identify siblings. + */ + unsigned cacheid = (infos[i].apicid % infos[i].max_log_proc) / infos[i].cache[l].nbthreads_sharing; cache_cpuset = hwloc_bitmap_alloc(); for (j = i; j < nbprocs; j++) { @@ -742,7 +775,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].apicid % infos[j].max_log_proc) / infos[j].cache[l2].nbthreads_sharing == cacheid) { hwloc_bitmap_set(cache_cpuset, j); hwloc_bitmap_clr(caches_cpuset, j); } @@ -1021,11 +1054,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"); diff --git a/opal/mca/hwloc/hwloc1110/hwloc/src/topology-xml-libxml.c b/opal/mca/hwloc/hwloc1111/hwloc/src/topology-xml-libxml.c similarity index 100% rename from opal/mca/hwloc/hwloc1110/hwloc/src/topology-xml-libxml.c rename to opal/mca/hwloc/hwloc1111/hwloc/src/topology-xml-libxml.c diff --git a/opal/mca/hwloc/hwloc1110/hwloc/src/topology-xml-nolibxml.c b/opal/mca/hwloc/hwloc1111/hwloc/src/topology-xml-nolibxml.c similarity index 97% rename from opal/mca/hwloc/hwloc1110/hwloc/src/topology-xml-nolibxml.c rename to opal/mca/hwloc/hwloc1111/hwloc/src/topology-xml-nolibxml.c index a93d9d4955..ba522087fe 100644 --- a/opal/mca/hwloc/hwloc1110/hwloc/src/topology-xml-nolibxml.c +++ b/opal/mca/hwloc/hwloc1111/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/opal/mca/hwloc/hwloc1110/hwloc/src/topology-xml.c b/opal/mca/hwloc/hwloc1111/hwloc/src/topology-xml.c similarity index 99% rename from opal/mca/hwloc/hwloc1110/hwloc/src/topology-xml.c rename to opal/mca/hwloc/hwloc1111/hwloc/src/topology-xml.c index d9e2e46447..52b7ddc46b 100644 --- a/opal/mca/hwloc/hwloc1110/hwloc/src/topology-xml.c +++ b/opal/mca/hwloc/hwloc1111/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; } @@ -1037,9 +1038,10 @@ hwloc_topology_diff_load_xmlbuffer(hwloc_topology_t topology __hwloc_attribute_u int ret; state.global = &fakedata; - fakedata.msgprefix = "xmldiffbuffer"; + fakedata.msgprefix = strdup("xmldiffbuffer"); if (!hwloc_libxml_callbacks && !hwloc_nolibxml_callbacks) { + free(fakedata.msgprefix); errno = ENOSYS; return -1; } @@ -1061,6 +1063,8 @@ hwloc_topology_diff_load_xmlbuffer(hwloc_topology_t topology __hwloc_attribute_u } hwloc_localeswitch_fini(); + + free(fakedata.msgprefix); return ret; } diff --git a/opal/mca/hwloc/hwloc1110/hwloc/src/topology.c b/opal/mca/hwloc/hwloc1111/hwloc/src/topology.c similarity index 99% rename from opal/mca/hwloc/hwloc1110/hwloc/src/topology.c rename to opal/mca/hwloc/hwloc1111/hwloc/src/topology.c index 1636730a84..a25baf8cd5 100644 --- a/opal/mca/hwloc/hwloc1110/hwloc/src/topology.c +++ b/opal/mca/hwloc/hwloc1111/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 @@ -920,8 +918,8 @@ 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. diff --git a/opal/mca/hwloc/hwloc1110/hwloc/src/traversal.c b/opal/mca/hwloc/hwloc1111/hwloc/src/traversal.c similarity index 97% rename from opal/mca/hwloc/hwloc1110/hwloc/src/traversal.c rename to opal/mca/hwloc/hwloc1111/hwloc/src/traversal.c index 97b3e5b3b8..e28bba1ace 100644 --- a/opal/mca/hwloc/hwloc1110/hwloc/src/traversal.c +++ b/opal/mca/hwloc/hwloc1111/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/opal/mca/hwloc/hwloc1110/hwloc/tests/README.txt b/opal/mca/hwloc/hwloc1111/hwloc/tests/README.txt similarity index 100% rename from opal/mca/hwloc/hwloc1110/hwloc/tests/README.txt rename to opal/mca/hwloc/hwloc1111/hwloc/tests/README.txt diff --git a/opal/mca/hwloc/hwloc1110/hwloc/utils/README.txt b/opal/mca/hwloc/hwloc1111/hwloc/utils/README.txt similarity index 100% rename from opal/mca/hwloc/hwloc1110/hwloc/utils/README.txt rename to opal/mca/hwloc/hwloc1111/hwloc/utils/README.txt diff --git a/opal/mca/hwloc/hwloc1110/hwloc1110.h b/opal/mca/hwloc/hwloc1111/hwloc1111.h similarity index 93% rename from opal/mca/hwloc/hwloc1110/hwloc1110.h rename to opal/mca/hwloc/hwloc1111/hwloc1111.h index e439ad4b10..7b5c2f4124 100644 --- a/opal/mca/hwloc/hwloc1110/hwloc1110.h +++ b/opal/mca/hwloc/hwloc1111/hwloc1111.h @@ -13,8 +13,8 @@ * this header represents the public interface to this static component. */ -#ifndef MCA_OPAL_HWLOC_HWLOC1110_H -#define MCA_OPAL_HWLOC_HWLOC1110_H +#ifndef MCA_OPAL_HWLOC_HWLOC1111_H +#define MCA_OPAL_HWLOC_HWLOC1111_H BEGIN_C_DECLS @@ -42,4 +42,4 @@ BEGIN_C_DECLS END_C_DECLS -#endif /* MCA_OPAL_HWLOC_HWLOC1110_H */ +#endif /* MCA_OPAL_HWLOC_HWLOC1111_H */ diff --git a/opal/mca/hwloc/hwloc1110/hwloc1110_component.c b/opal/mca/hwloc/hwloc1111/hwloc1111_component.c similarity index 85% rename from opal/mca/hwloc/hwloc1110/hwloc1110_component.c rename to opal/mca/hwloc/hwloc1111/hwloc1111_component.c index a7234fcf5e..f40ff00258 100644 --- a/opal/mca/hwloc/hwloc1110/hwloc1110_component.c +++ b/opal/mca/hwloc/hwloc1111/hwloc1111_component.c @@ -22,20 +22,20 @@ #include "opal/constants.h" #include "opal/mca/hwloc/hwloc.h" -#include "hwloc1110.h" +#include "hwloc1111.h" /* * Public string showing the sysinfo ompi_linux component version number */ -const char *opal_hwloc_hwloc1110_component_version_string = - "OPAL hwloc1110 hwloc MCA component version " OPAL_VERSION; +const char *opal_hwloc_hwloc1111_component_version_string = + "OPAL hwloc1111 hwloc MCA component version " OPAL_VERSION; /* * Instantiate the public struct with all of our public information * and pointers to our public functions in it */ -const opal_hwloc_component_t mca_hwloc_hwloc1110_component = { +const opal_hwloc_component_t mca_hwloc_hwloc1111_component = { /* First, the mca_component_t struct containing meta information about the component itself */ @@ -44,7 +44,7 @@ const opal_hwloc_component_t mca_hwloc_hwloc1110_component = { OPAL_HWLOC_BASE_VERSION_2_0_0, /* Component name and version */ - .mca_component_name = "hwloc1110", + .mca_component_name = "hwloc1111", MCA_BASE_MAKE_VERSION(component, OPAL_MAJOR_VERSION, OPAL_MINOR_VERSION, OPAL_RELEASE_VERSION), }, diff --git a/opal/mca/hwloc/hwloc1110/owner.txt b/opal/mca/hwloc/hwloc1111/owner.txt similarity index 100% rename from opal/mca/hwloc/hwloc1110/owner.txt rename to opal/mca/hwloc/hwloc1111/owner.txt