From 2887fe77c5c25bf706c7dbc359d73f3679853d34 Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Wed, 9 Jun 2010 19:56:18 +0000 Subject: [PATCH] Refresh hwloc to an as-yet unreleased tarball from the hwloc 1.0 release branch in order to fix some Solaris bugs. This commit was SVN r23265. --- opal/mca/paffinity/hwloc/hwloc/NEWS | 24 ++- opal/mca/paffinity/hwloc/hwloc/README | 2 + opal/mca/paffinity/hwloc/hwloc/VERSION | 12 +- .../mca/paffinity/hwloc/hwloc/config/hwloc.m4 | 30 +++- opal/mca/paffinity/hwloc/hwloc/configure | 151 ++++++++++-------- opal/mca/paffinity/hwloc/hwloc/configure.ac | 1 + .../mca/paffinity/hwloc/hwloc/doc/Makefile.in | 2 + opal/mca/paffinity/hwloc/hwloc/doc/hwloc.doxy | 10 +- .../mca/paffinity/hwloc/hwloc/include/hwloc.h | 3 + .../hwloc/hwloc/include/hwloc/config.h.in | 17 +- .../hwloc/hwloc/include/private/config.h.in | 12 +- .../hwloc/hwloc/include/private/private.h | 6 +- .../hwloc/hwloc/src/topology-darwin.c | 44 ++++- .../hwloc/hwloc/src/topology-solaris.c | 79 +++++---- opal/mca/paffinity/hwloc/hwloc/src/topology.c | 22 ++- .../paffinity/hwloc/hwloc/tests/Makefile.in | 2 + .../hwloc/hwloc/tests/linux/Makefile.in | 2 + .../hwloc/hwloc/tests/ports/Makefile.in | 2 + .../hwloc/hwloc/tests/xml/Makefile.in | 2 + .../paffinity/hwloc/hwloc/utils/Makefile.in | 2 + .../hwloc/hwloc/utils/lstopo-cairo.c | 2 +- .../paffinity/hwloc/hwloc/utils/lstopo-draw.c | 2 +- .../paffinity/hwloc/hwloc/utils/lstopo.1in | 10 ++ 23 files changed, 305 insertions(+), 134 deletions(-) diff --git a/opal/mca/paffinity/hwloc/hwloc/NEWS b/opal/mca/paffinity/hwloc/hwloc/NEWS index e492d4f8bc..037b52fee8 100644 --- a/opal/mca/paffinity/hwloc/hwloc/NEWS +++ b/opal/mca/paffinity/hwloc/hwloc/NEWS @@ -1,5 +1,5 @@ Copyright © 2009 CNRS, INRIA, Université Bordeaux 1 -Copyright © 2009 Cisco Systems, Inc. All rights reserved. +Copyright © 2009-2010 Cisco Systems, Inc. All rights reserved. $COPYRIGHT$ @@ -14,6 +14,28 @@ bug fixes (and other actions) for each version of hwloc since version 0.9 (as initially released as "libtopology", then re-branded to "hwloc" in v0.9.1). +Version 1.0.2 +------------- + +* Solaris fix for non-contiguous cpu numbers. Thanks to Rolf vandeVaart for + reporting the issue. +* Darwin 10.4 fix. Thanks to Olivier Cessenat for reporting the issue. + +Version 1.0.1 +------------- + +* Various Solaris fixes. Thanks to Yannick Martin for reporting the issue. +* Fix "non-native" builds on x86 platforms (e.g., when building 32 + bit executables with compilers that natively build 64 bit). +* Ignore sockets with unknown ID values (which fixes issues on POWER7 + machines). Thanks to Greg Bauer for reporting the issue. +* Various man page clarifications and minor updates. +* Fixed memory leaks in hwloc_setup_group_from_min_distance_clique(). +* Fix cache type filtering on MS Windows 7. Thanks to Αλέξανδρος + Παπαδογιαννάκ for reporting the issue. +* Fixed warnings when compiling with -DNDEBUG. + + Version 1.0.0 ------------- diff --git a/opal/mca/paffinity/hwloc/hwloc/README b/opal/mca/paffinity/hwloc/hwloc/README index ee3fa1289f..60ed10aade 100644 --- a/opal/mca/paffinity/hwloc/hwloc/README +++ b/opal/mca/paffinity/hwloc/hwloc/README @@ -407,6 +407,8 @@ does not solve your problem, you may also want to ensure that you are running the most recent version of the BIOS for your machine. If those things fail, contact us on the mailing list for additional help. +Please attach the output of lstopo after having given the --enable-debug option +to ./configure and rebuilt completely, to get debugging output. History / credits diff --git a/opal/mca/paffinity/hwloc/hwloc/VERSION b/opal/mca/paffinity/hwloc/hwloc/VERSION index 35467ec929..9515eb4f9d 100644 --- a/opal/mca/paffinity/hwloc/hwloc/VERSION +++ b/opal/mca/paffinity/hwloc/hwloc/VERSION @@ -7,7 +7,7 @@ major=1 minor=0 -release=1 +release=2 # greek is used for alpha or beta release tags. If it is non-empty, # it will be appended to the version number. It does not have to be @@ -16,12 +16,12 @@ release=1 # requirement is that it must be entirely printable ASCII characters # and have no white space. -greek=rc1 +greek=a1 # If want_svn=1, then the SVN r number will be included in the overall # hwloc version number in some form. -want_svn=0 +want_svn=1 # If svn_r=-1, then the SVN r numbere will be obtained dynamically at # run time, either 1) via the "svnversion" command (if this is a @@ -33,11 +33,11 @@ want_svn=0 # distribution tarball is being made from an SVN checkout, the value # of svn_r in this file is replaced with the output of "svnversion". -svn_r=r2165 +svn_r=r2214 # The date when this release was created -date="May 28, 2010" +date="Unreleased developer copy" # The shared library version of hwloc's public library. This version # is maintained in accordance with the "Library Interface Versions" @@ -50,4 +50,4 @@ date="May 28, 2010" # 2. Version numbers are described in the Libtool current:revision:age # format. -libhwloc_so_version=0:0:0 +libhwloc_so_version=0:1:0 diff --git a/opal/mca/paffinity/hwloc/hwloc/config/hwloc.m4 b/opal/mca/paffinity/hwloc/hwloc/config/hwloc.m4 index 09078ec31b..62794346f6 100644 --- a/opal/mca/paffinity/hwloc/hwloc/config/hwloc.m4 +++ b/opal/mca/paffinity/hwloc/hwloc/config/hwloc.m4 @@ -320,6 +320,10 @@ AC_DEFUN([HWLOC_SETUP_CORE_AFTER_C99],[ ]) AC_DEFINE_UNQUOTED(hwloc_strncasecmp, $hwloc_strncasecmp, [Define this to either strncasecmp or strncmp]) + AC_CHECK_HEADER([stdint.h], [ + AC_DEFINE([HWLOC_HAVE_STDINT_H], [1], [Define to 1 if you have the header file.]) + ]) + AC_CHECK_TYPES([wchar_t], [ AC_CHECK_FUNCS([putwc]) ], [], [[#include ]]) @@ -330,7 +334,7 @@ AC_DEFUN([HWLOC_SETUP_CORE_AFTER_C99],[ AC_CHECK_HEADERS([langinfo.h], [ AC_CHECK_FUNCS([nl_langinfo]) ]) - old_LIBS="$LIBS" + hwloc_old_LIBS="$LIBS" LIBS= AC_CHECK_HEADERS([curses.h], [ AC_CHECK_HEADERS([term.h], [ @@ -341,7 +345,8 @@ AC_DEFUN([HWLOC_SETUP_CORE_AFTER_C99],[ ]) ], [], [[#include ]]) ]) - LIBS="$old_LIBS" + LIBS="$hwloc_old_LIBS" + unset hwloc_old_LIBS AC_CHECK_TYPES([KAFFINITY, PROCESSOR_CACHE_TYPE, @@ -356,21 +361,29 @@ AC_DEFUN([HWLOC_SETUP_CORE_AFTER_C99],[ GROUP_RELATIONSHIP, SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX], [],[],[[#include ]]) - AC_HAVE_LIBRARY(gdi32) + AC_CHECK_LIB([gdi32], [main], + [HWLOC_LIBS="-lgdi32 $HWLOC_LIBS" + AC_DEFINE([HAVE_LIBGDI32], 1, [Define to 1 if we have -lgdi32])]) AC_CHECK_HEADER([windows.h], [ AC_DEFINE([HWLOC_HAVE_WINDOWS_H], [1], [Define to 1 if you have the `windows.h' header.]) ]) AC_CHECK_HEADERS([sys/lgrp_user.h], [ - AC_HAVE_LIBRARY([lgrp]) + AC_CHECK_LIB([lgrp], [lgrp_latency_cookie], + [HWLOC_LIBS="-llgrp $HWLOC_LIBS" + AC_DEFINE([HAVE_LIBLGRP], 1, [Define to 1 if we have -llgrp])]) ]) AC_CHECK_HEADERS([kstat.h], [ - AC_HAVE_LIBRARY([kstat]) + AC_CHECK_LIB([kstat], [main], + [HWLOC_LIBS="-lkstat $HWLOC_LIBS" + AC_DEFINE([HAVE_LIBKSTAT], 1, [Define to 1 if we have -lkstat])]) ]) AC_CHECK_HEADERS([infiniband/verbs.h], [ - AC_HAVE_LIBRARY([ibverbs], [hwloc_have_libibverbs=yes]) + AC_CHECK_LIB([ibverbs], [ibv_open_device], + [HWLOC_LIBS="-libverbs $HWLOC_LIBS" + AC_DEFINE([HAVE_LIBIBVERBS], 1, [Define to 1 if we have -libverbs])]) ]) AC_CHECK_DECLS([_SC_NPROCESSORS_ONLN, @@ -529,13 +542,14 @@ AC_DEFUN([HWLOC_SETUP_CORE_AFTER_C99],[ AC_CHECK_FUNC([sched_setaffinity], [hwloc_have_sched_setaffinity=yes]) AC_CHECK_HEADERS([sys/cpuset.h],,,[[#include ]]) - # Setup HWLOC's C, CPP, and LD flags + # Setup HWLOC's C, CPP, and LD flags, and LIBS HWLOC_CFLAGS="$hwloc_CC_c99_flags $HWLOC_CFLAGS" AC_SUBST(HWLOC_CFLAGS) HWLOC_CPPFLAGS='-I$(HWLOC_top_srcdir)/include -I$(HWLOC_top_builddir)/include' AC_SUBST(HWLOC_CPPFLAGS) HWLOC_LDFLAGS='-L$(HWLOC_top_builddir)/src' AC_SUBST(HWLOC_LDFLAGS) + AC_SUBST(HWLOC_LIBS) # Set these values explicitly for embedded builds. Exporting # these values through *_EMBEDDED_* values gives us the freedom to @@ -546,6 +560,8 @@ AC_DEFUN([HWLOC_SETUP_CORE_AFTER_C99],[ AC_SUBST(HWLOC_EMBEDDED_CPPFLAGS) HWLOC_EMBEDDED_LDADD='$(HWLOC_top_builddir)/src/libhwloc_embedded.la' AC_SUBST(HWLOC_EMBEDDED_LDADD) + HWLOC_EMBEDDED_LIBS=$HWLOC_LIBS + AC_SUBST(HWLOC_EMBEDDED_LIBS) # Try to compile the cpuid inlines AC_MSG_CHECKING([for cpuid]) diff --git a/opal/mca/paffinity/hwloc/hwloc/configure b/opal/mca/paffinity/hwloc/hwloc/configure index be547ebbd2..6ae47363f8 100755 --- a/opal/mca/paffinity/hwloc/hwloc/configure +++ b/opal/mca/paffinity/hwloc/hwloc/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.65 for hwloc 1.0.1rc1. +# Generated by GNU Autoconf 2.65 for hwloc 1.0.2a1. # # Report bugs to . # @@ -701,8 +701,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='hwloc' PACKAGE_TARNAME='hwloc' -PACKAGE_VERSION='1.0.1rc1' -PACKAGE_STRING='hwloc 1.0.1rc1' +PACKAGE_VERSION='1.0.2a1' +PACKAGE_STRING='hwloc 1.0.2a1' PACKAGE_BUGREPORT='http://www.open-mpi.org/community/help/' PACKAGE_URL='' @@ -841,9 +841,11 @@ FIG2DEV MAKEINDEX PDFLATEX DOXYGEN +HWLOC_EMBEDDED_LIBS HWLOC_EMBEDDED_LDADD HWLOC_EMBEDDED_CPPFLAGS HWLOC_EMBEDDED_CFLAGS +HWLOC_LIBS HWLOC_LDFLAGS HWLOC_CPPFLAGS HWLOC_CFLAGS @@ -1541,7 +1543,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures hwloc 1.0.1rc1 to adapt to many kinds of systems. +\`configure' configures hwloc 1.0.2a1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1616,7 +1618,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of hwloc 1.0.1rc1:";; + short | recursive ) echo "Configuration of hwloc 1.0.2a1:";; esac cat <<\_ACEOF @@ -1770,7 +1772,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -hwloc configure 1.0.1rc1 +hwloc configure 1.0.2a1 generated by GNU Autoconf 2.65 Copyright (C) 2009 Free Software Foundation, Inc. @@ -2412,7 +2414,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by hwloc $as_me 1.0.1rc1, which was +It was created by hwloc $as_me 1.0.2a1, which was generated by GNU Autoconf 2.65. Invocation command line was $ $0 $@ @@ -3346,7 +3348,7 @@ fi # Define the identity of the package. PACKAGE='hwloc' - VERSION='1.0.1rc1' + VERSION='1.0.2a1' cat >>confdefs.h <<_ACEOF @@ -8574,6 +8576,17 @@ cat >>confdefs.h <<_ACEOF _ACEOF + ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default" +if test "x$ac_cv_header_stdint_h" = x""yes; then : + + +$as_echo "#define HWLOC_HAVE_STDINT_H 1" >>confdefs.h + + +fi + + + ac_fn_c_check_type "$LINENO" "wchar_t" "ac_cv_type_wchar_t" "#include " if test "x$ac_cv_type_wchar_t" = x""yes; then : @@ -8646,7 +8659,7 @@ fi done - old_LIBS="$LIBS" + hwloc_old_LIBS="$LIBS" LIBS= for ac_header in curses.h do : @@ -8737,7 +8750,8 @@ fi done - LIBS="$old_LIBS" + LIBS="$hwloc_old_LIBS" + unset hwloc_old_LIBS ac_fn_c_check_type "$LINENO" "KAFFINITY" "ac_cv_type_KAFFINITY" "#include " @@ -8891,14 +8905,11 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gdi32_main" >&5 $as_echo "$ac_cv_lib_gdi32_main" >&6; } if test "x$ac_cv_lib_gdi32_main" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBGDI32 1 -_ACEOF + HWLOC_LIBS="-lgdi32 $HWLOC_LIBS" - LIBS="-lgdi32 $LIBS" +$as_echo "#define HAVE_LIBGDI32 1" >>confdefs.h fi -ac_cv_lib_gdi32=ac_cv_lib_gdi32_main ac_fn_c_check_header_mongrel "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default" @@ -8920,9 +8931,9 @@ if test "x$ac_cv_header_sys_lgrp_user_h" = x""yes; then : #define HAVE_SYS_LGRP_USER_H 1 _ACEOF - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -llgrp" >&5 -$as_echo_n "checking for main in -llgrp... " >&6; } -if test "${ac_cv_lib_lgrp_main+set}" = set; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lgrp_latency_cookie in -llgrp" >&5 +$as_echo_n "checking for lgrp_latency_cookie in -llgrp... " >&6; } +if test "${ac_cv_lib_lgrp_lgrp_latency_cookie+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -8930,35 +8941,38 @@ LIBS="-llgrp $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char lgrp_latency_cookie (); int main () { -return main (); +return lgrp_latency_cookie (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_lgrp_main=yes + ac_cv_lib_lgrp_lgrp_latency_cookie=yes else - ac_cv_lib_lgrp_main=no + ac_cv_lib_lgrp_lgrp_latency_cookie=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lgrp_main" >&5 -$as_echo "$ac_cv_lib_lgrp_main" >&6; } -if test "x$ac_cv_lib_lgrp_main" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBLGRP 1 -_ACEOF +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lgrp_lgrp_latency_cookie" >&5 +$as_echo "$ac_cv_lib_lgrp_lgrp_latency_cookie" >&6; } +if test "x$ac_cv_lib_lgrp_lgrp_latency_cookie" = x""yes; then : + HWLOC_LIBS="-llgrp $HWLOC_LIBS" - LIBS="-llgrp $LIBS" +$as_echo "#define HAVE_LIBLGRP 1" >>confdefs.h fi -ac_cv_lib_lgrp=ac_cv_lib_lgrp_main fi @@ -9004,14 +9018,11 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kstat_main" >&5 $as_echo "$ac_cv_lib_kstat_main" >&6; } if test "x$ac_cv_lib_kstat_main" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBKSTAT 1 -_ACEOF + HWLOC_LIBS="-lkstat $HWLOC_LIBS" - LIBS="-lkstat $LIBS" +$as_echo "#define HAVE_LIBKSTAT 1" >>confdefs.h fi -ac_cv_lib_kstat=ac_cv_lib_kstat_main fi @@ -9027,9 +9038,9 @@ if test "x$ac_cv_header_infiniband_verbs_h" = x""yes; then : #define HAVE_INFINIBAND_VERBS_H 1 _ACEOF - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -libverbs" >&5 -$as_echo_n "checking for main in -libverbs... " >&6; } -if test "${ac_cv_lib_ibverbs_main+set}" = set; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ibv_open_device in -libverbs" >&5 +$as_echo_n "checking for ibv_open_device in -libverbs... " >&6; } +if test "${ac_cv_lib_ibverbs_ibv_open_device+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -9037,30 +9048,38 @@ LIBS="-libverbs $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char ibv_open_device (); int main () { -return main (); +return ibv_open_device (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_ibverbs_main=yes + ac_cv_lib_ibverbs_ibv_open_device=yes else - ac_cv_lib_ibverbs_main=no + ac_cv_lib_ibverbs_ibv_open_device=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ibverbs_main" >&5 -$as_echo "$ac_cv_lib_ibverbs_main" >&6; } -if test "x$ac_cv_lib_ibverbs_main" = x""yes; then : - hwloc_have_libibverbs=yes +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ibverbs_ibv_open_device" >&5 +$as_echo "$ac_cv_lib_ibverbs_ibv_open_device" >&6; } +if test "x$ac_cv_lib_ibverbs_ibv_open_device" = x""yes; then : + HWLOC_LIBS="-libverbs $HWLOC_LIBS" + +$as_echo "#define HAVE_LIBIBVERBS 1" >>confdefs.h + fi -ac_cv_lib_ibverbs=ac_cv_lib_ibverbs_main fi @@ -9999,7 +10018,7 @@ fi done - # Setup HWLOC's C, CPP, and LD flags + # Setup HWLOC's C, CPP, and LD flags, and LIBS HWLOC_CFLAGS="$hwloc_CC_c99_flags $HWLOC_CFLAGS" HWLOC_CPPFLAGS='-I$(HWLOC_top_srcdir)/include -I$(HWLOC_top_builddir)/include' @@ -10007,6 +10026,7 @@ done HWLOC_LDFLAGS='-L$(HWLOC_top_builddir)/src' + # Set these values explicitly for embedded builds. Exporting # these values through *_EMBEDDED_* values gives us the freedom to # do something different someday if we ever need to. @@ -10016,6 +10036,8 @@ done HWLOC_EMBEDDED_LDADD='$(HWLOC_top_builddir)/src/libhwloc_embedded.la' + HWLOC_EMBEDDED_LIBS=$HWLOC_LIBS + # Try to compile the cpuid inlines { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cpuid" >&5 @@ -12142,6 +12164,7 @@ fi # Set the final flags CFLAGS="$HWLOC_EMBEDDED_CFLAGS $CFLAGS" CPPFLAGS="$HWLOC_EMBEDDED_CPPFLAGS $CPPFLAGS" +LIBS="$HWLOC_EMBEDDED_LIBS $LIBS" # Setup libtool, but disable C++, F77, Java and Windows Resource # Compiler support -- we don't need that stuff. @@ -12686,13 +12709,13 @@ if test "${lt_cv_nm_interface+set}" = set; then : else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:12689: $ac_compile\"" >&5) + (eval echo "\"\$as_me:12712: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 - (eval echo "\"\$as_me:12692: $NM \\\"conftest.$ac_objext\\\"\"" >&5) + (eval echo "\"\$as_me:12715: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 - (eval echo "\"\$as_me:12695: output\"" >&5) + (eval echo "\"\$as_me:12718: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" @@ -13894,7 +13917,7 @@ ia64-*-hpux*) ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 13897 "configure"' > conftest.$ac_ext + echo '#line 13920 "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -15394,11 +15417,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15397: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15420: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:15401: \$? = $ac_status" >&5 + echo "$as_me:15424: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -15733,11 +15756,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15736: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15759: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:15740: \$? = $ac_status" >&5 + echo "$as_me:15763: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -15838,11 +15861,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15841: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15864: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:15845: \$? = $ac_status" >&5 + echo "$as_me:15868: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -15893,11 +15916,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15896: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15919: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:15900: \$? = $ac_status" >&5 + echo "$as_me:15923: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -18260,7 +18283,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 18263 "configure" +#line 18286 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -18356,7 +18379,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 18359 "configure" +#line 18382 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -19219,7 +19242,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by hwloc $as_me 1.0.1rc1, which was +This file was extended by hwloc $as_me 1.0.2a1, which was generated by GNU Autoconf 2.65. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -19289,7 +19312,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -hwloc config.status 1.0.1rc1 +hwloc config.status 1.0.2a1 configured by $0, generated by GNU Autoconf 2.65, with options \\"\$ac_cs_config\\" diff --git a/opal/mca/paffinity/hwloc/hwloc/configure.ac b/opal/mca/paffinity/hwloc/hwloc/configure.ac index 85ba51e239..ee32368435 100644 --- a/opal/mca/paffinity/hwloc/hwloc/configure.ac +++ b/opal/mca/paffinity/hwloc/hwloc/configure.ac @@ -138,6 +138,7 @@ HWLOC_DO_AM_CONDITIONALS # Set the final flags CFLAGS="$HWLOC_EMBEDDED_CFLAGS $CFLAGS" CPPFLAGS="$HWLOC_EMBEDDED_CPPFLAGS $CPPFLAGS" +LIBS="$HWLOC_EMBEDDED_LIBS $LIBS" # Setup libtool, but disable C++, F77, Java and Windows Resource # Compiler support -- we don't need that stuff. diff --git a/opal/mca/paffinity/hwloc/hwloc/doc/Makefile.in b/opal/mca/paffinity/hwloc/hwloc/doc/Makefile.in index 50cbeda9e1..47a825cafa 100644 --- a/opal/mca/paffinity/hwloc/hwloc/doc/Makefile.in +++ b/opal/mca/paffinity/hwloc/hwloc/doc/Makefile.in @@ -167,10 +167,12 @@ HWLOC_DIFF_U = @HWLOC_DIFF_U@ HWLOC_EMBEDDED_CFLAGS = @HWLOC_EMBEDDED_CFLAGS@ HWLOC_EMBEDDED_CPPFLAGS = @HWLOC_EMBEDDED_CPPFLAGS@ HWLOC_EMBEDDED_LDADD = @HWLOC_EMBEDDED_LDADD@ +HWLOC_EMBEDDED_LIBS = @HWLOC_EMBEDDED_LIBS@ HWLOC_HAVE_XML = @HWLOC_HAVE_XML@ HWLOC_KERRIGHED_CFLAGS = @HWLOC_KERRIGHED_CFLAGS@ HWLOC_KERRIGHED_LIBS = @HWLOC_KERRIGHED_LIBS@ HWLOC_LDFLAGS = @HWLOC_LDFLAGS@ +HWLOC_LIBS = @HWLOC_LIBS@ HWLOC_MS_LIB = @HWLOC_MS_LIB@ HWLOC_PKG_CONFIG = @HWLOC_PKG_CONFIG@ HWLOC_RELEASE_DATE = @HWLOC_RELEASE_DATE@ diff --git a/opal/mca/paffinity/hwloc/hwloc/doc/hwloc.doxy b/opal/mca/paffinity/hwloc/hwloc/doc/hwloc.doxy index 4d60255a4d..daa1443162 100644 --- a/opal/mca/paffinity/hwloc/hwloc/doc/hwloc.doxy +++ b/opal/mca/paffinity/hwloc/hwloc/doc/hwloc.doxy @@ -327,7 +327,9 @@ solve your problem, you may also want to ensure that you are running the most recent version of the BIOS for your machine. If those things fail, contact us on the mailing list for additional -help. +help. Please attach the output of lstopo after having given the +--enable-debug option to ./configure and rebuilt completely, to get +debugging output. \htmlonly
@@ -759,7 +761,11 @@ shell$ cp -r /somewhere/else/hwloc- my-embedded-hwloc shell$ edit Makefile.am 1. Add "-Imy-embedded-hwloc/config" to ACLOCAL_AMFLAGS 2. Add "my-embedded-hwloc" to SUBDIRS - 3. Add "$(HWLOC_EMBEDDED_LDADD)" to sandbox's executable's LDADD line + 3. Add "$(HWLOC_EMBEDDED_LDADD)" and "$(HWLOC_EMBEDDED_LIBS)" to + sandbox's executable's LDADD line. The former is the name of the + Libtool convenience library that hwloc will generate. The latter + is any dependent support libraries that may be needed by + $(HWLOC_EMBEDDED_LDADD). 4. Add "$(HWLOC_EMBEDDED_CPPFLAGS)" to AM_CPPFLAGS shell$ edit configure.ac 1. Add "HWLOC_SET_SYMBOL_PREFIX(sandbox_hwloc_)" line diff --git a/opal/mca/paffinity/hwloc/hwloc/include/hwloc.h b/opal/mca/paffinity/hwloc/hwloc/include/hwloc.h index 2b3409155f..255e360f15 100644 --- a/opal/mca/paffinity/hwloc/hwloc/include/hwloc.h +++ b/opal/mca/paffinity/hwloc/hwloc/include/hwloc.h @@ -14,10 +14,13 @@ #ifndef HWLOC_H #define HWLOC_H +#include #include #include #include +#ifdef HWLOC_HAVE_STDINT_H #include +#endif /* * Symbol transforms diff --git a/opal/mca/paffinity/hwloc/hwloc/include/hwloc/config.h.in b/opal/mca/paffinity/hwloc/hwloc/include/hwloc/config.h.in index bc11337c81..c681b64359 100644 --- a/opal/mca/paffinity/hwloc/hwloc/include/hwloc/config.h.in +++ b/opal/mca/paffinity/hwloc/hwloc/include/hwloc/config.h.in @@ -89,17 +89,23 @@ # define HWLOC_DECLSPEC #endif -/* Define to 1 on Linux */ +/* Defined to 1 on Linux */ #undef HWLOC_LINUX_SYS -/* Define to 1 if the CPU_SET macro works */ +/* Defined to 1 if the CPU_SET macro works */ #undef HWLOC_HAVE_CPU_SET #define HWLOC_NBMAXCPUS 1024 +/* The size of `unsigned long', as computed by sizeof */ #undef HWLOC_SIZEOF_UNSIGNED_LONG + +/* The size of `unsigned int', as computed by sizeof */ #undef HWLOC_SIZEOF_UNSIGNED_INT +/* Defined to 1 if you have the header file. */ +#undef HWLOC_HAVE_STDINT_H + #define HWLOC_BITS_PER_LONG (HWLOC_SIZEOF_UNSIGNED_LONG * 8) #define HWLOC_BITS_PER_INT (HWLOC_SIZEOF_UNSIGNED_INT * 8) @@ -114,6 +120,7 @@ #include +/* Defined to 1 if you have the `windows.h' header. */ #undef HWLOC_HAVE_WINDOWS_H #undef hwloc_pid_t #undef hwloc_thread_t @@ -126,11 +133,13 @@ # endif /* hwloc_thread_t */ #endif /* HWLOC_HAVE_WINDOWS_H */ -/* Do we need to transform all the hwloc public symbol names? */ +/* Whether we need to re-define all the hwloc public symbols or not */ #undef HWLOC_SYM_TRANSFORM -/* If we are transforming, what are the prefixes? */ +/* The hwloc symbol prefix */ #undef HWLOC_SYM_PREFIX + +/* The hwloc symbol prefix in all caps */ #undef HWLOC_SYM_PREFIX_CAPS #endif /* HWLOC_CONFIG_H */ diff --git a/opal/mca/paffinity/hwloc/hwloc/include/private/config.h.in b/opal/mca/paffinity/hwloc/hwloc/include/private/config.h.in index 0f4e03bacc..6b1f4e2227 100644 --- a/opal/mca/paffinity/hwloc/hwloc/include/private/config.h.in +++ b/opal/mca/paffinity/hwloc/hwloc/include/private/config.h.in @@ -108,13 +108,16 @@ /* Define to 1 if you have the header file. */ #undef HAVE_LANGINFO_H -/* Define to 1 if you have the `gdi32' library (-lgdi32). */ +/* Define to 1 if we have -lgdi32 */ #undef HAVE_LIBGDI32 -/* Define to 1 if you have the `kstat' library (-lkstat). */ +/* Define to 1 if we have -libverbs */ +#undef HAVE_LIBIBVERBS + +/* Define to 1 if we have -lkstat */ #undef HAVE_LIBKSTAT -/* Define to 1 if you have the `lgrp' library (-llgrp). */ +/* Define to 1 if we have -llgrp */ #undef HAVE_LIBLGRP /* Define to 1 if you have the header file. */ @@ -353,6 +356,9 @@ /* Define to 1 if glibc provides the old prototype of sched_setaffinity() */ #undef HWLOC_HAVE_OLD_SCHED_SETAFFINITY +/* Define to 1 if you have the header file. */ +#undef HWLOC_HAVE_STDINT_H + /* Define to 1 if you have the `windows.h' header. */ #undef HWLOC_HAVE_WINDOWS_H diff --git a/opal/mca/paffinity/hwloc/hwloc/include/private/private.h b/opal/mca/paffinity/hwloc/hwloc/include/private/private.h index 404eb0b591..8dcba23feb 100644 --- a/opal/mca/paffinity/hwloc/hwloc/include/private/private.h +++ b/opal/mca/paffinity/hwloc/hwloc/include/private/private.h @@ -14,6 +14,10 @@ #include #include #include +#include +#ifdef HAVE_STDINT_H +#include +#endif #include @@ -108,7 +112,7 @@ struct hwloc_topology { extern void hwloc_setup_pu_level(struct hwloc_topology *topology, unsigned nb_pus); extern void hwloc_setup_misc_level_from_distances(struct hwloc_topology *topology, unsigned nbobjs, struct hwloc_obj **objs, unsigned *_distances/*[nbnobjs][nbobjs]*/); -extern int hwloc_get_sysctlbyname(const char *name, int *n); +extern int hwloc_get_sysctlbyname(const char *name, int64_t *n); extern int hwloc_get_sysctl(int name[], unsigned namelen, int *n); extern unsigned hwloc_fallback_nbprocessors(struct hwloc_topology *topology); diff --git a/opal/mca/paffinity/hwloc/hwloc/src/topology-darwin.c b/opal/mca/paffinity/hwloc/hwloc/src/topology-darwin.c index 5d2d1577ae..196eb20757 100644 --- a/opal/mca/paffinity/hwloc/hwloc/src/topology-darwin.c +++ b/opal/mca/paffinity/hwloc/hwloc/src/topology-darwin.c @@ -23,12 +23,15 @@ void hwloc_look_darwin(struct hwloc_topology *topology) { - int _nprocs; + int64_t _nprocs; unsigned nprocs; - int _npackages; + int64_t _npackages; unsigned i, j, cpu; struct hwloc_obj *obj; size_t size; + int64_t l1cachesize; + int64_t l2cachesize; + int64_t memsize; if (hwloc_get_sysctlbyname("hw.ncpu", &_nprocs) || _nprocs <= 0) return; @@ -39,8 +42,8 @@ hwloc_look_darwin(struct hwloc_topology *topology) if (!hwloc_get_sysctlbyname("hw.packages", &_npackages) && _npackages > 0) { unsigned npackages = _npackages; - int _cores_per_package; - int _logical_per_package; + int64_t _cores_per_package; + int64_t _logical_per_package; unsigned logical_per_package; hwloc_debug("%u packages\n", npackages); @@ -86,25 +89,54 @@ hwloc_look_darwin(struct hwloc_topology *topology) } } + if (hwloc_get_sysctlbyname("hw.l1dcachesize", &l1cachesize)) + l1cachesize = 0; + + if (hwloc_get_sysctlbyname("hw.l2cachesize", &l2cachesize)) + l2cachesize = 0; + + if (hwloc_get_sysctlbyname("hw.memsize", &memsize)) + memsize = 0; + if (!sysctlbyname("hw.cacheconfig", NULL, &size, NULL, 0)) { - unsigned n = size / sizeof(uint64_t); + unsigned n = size / sizeof(uint32_t); uint64_t cacheconfig[n]; + uint32_t cacheconfig32[n]; uint64_t cachesize[n]; if ((!sysctlbyname("hw.cacheconfig", cacheconfig, &size, NULL, 0))) { + /* Yeech. Darwin seemingly has changed from 32bit to 64bit integers for + * cacheconfig, with apparently no way for detection. Assume the machine + * won't have more than 4 billion cpus */ + if (cacheconfig[0] > 0xFFFFFFFFUL) { + memcpy(cacheconfig32, cacheconfig, size); + for (i = 0 ; i < size / sizeof(uint32_t); i++) + cacheconfig[i] = cacheconfig32[i]; + } + memset(cachesize, 0, sizeof(cachesize)); size = sizeof(cachesize); - sysctlbyname("hw.cachesize", cachesize, &size, NULL, 0); + if (sysctlbyname("hw.cachesize", cachesize, &size, NULL, 0)) { + if (n > 0) + cachesize[0] = memsize; + if (n > 1) + cachesize[1] = l1cachesize; + if (n > 2) + cachesize[2] = l2cachesize; + } hwloc_debug("%s", "caches"); for (i = 0; i < n && cacheconfig[i]; i++) hwloc_debug(" %"PRIu64"(%"PRIu64"kB)", cacheconfig[i], cachesize[i] / 1024); + cacheconfig[i] = cacheconfig32[i]; /* Now we know how many caches there are */ n = i; hwloc_debug("\n%u cache levels\n", n - 1); + /* For each cache level (0 is memory) */ for (i = 0; i < n; i++) { + /* cacheconfig tells us how many cpus share it, let's iterate on each cache */ for (j = 0; j < (nprocs / cacheconfig[i]); j++) { obj = hwloc_alloc_setup_object(i?HWLOC_OBJ_CACHE:HWLOC_OBJ_NODE, j); if (!i) { diff --git a/opal/mca/paffinity/hwloc/hwloc/src/topology-solaris.c b/opal/mca/paffinity/hwloc/hwloc/src/topology-solaris.c index 03a1f53ae5..12eeb08748 100644 --- a/opal/mca/paffinity/hwloc/hwloc/src/topology-solaris.c +++ b/opal/mca/paffinity/hwloc/hwloc/src/topology-solaris.c @@ -74,7 +74,7 @@ browse(struct hwloc_topology *topology, lgrp_cookie_t cookie, lgrp_id_t lgrp, hw hwloc_obj_t obj; lgrp_mem_size_t mem_size; - n = lgrp_cpus(cookie, lgrp, NULL, 0, LGRP_CONTENT_ALL); + n = lgrp_cpus(cookie, lgrp, NULL, 0, LGRP_CONTENT_HIERARCHY); if (n == -1) return; @@ -89,7 +89,7 @@ browse(struct hwloc_topology *topology, lgrp_cookie_t cookie, lgrp_id_t lgrp, hw obj->cpuset = hwloc_cpuset_alloc(); glob_lgrps[(*curlgrp)++] = obj; - lgrp_cpus(cookie, lgrp, cpuids, n, LGRP_CONTENT_ALL); + lgrp_cpus(cookie, lgrp, cpuids, n, LGRP_CONTENT_HIERARCHY); for (i = 0; i < n ; i++) { hwloc_debug("node %ld's cpu %d is %d\n", lgrp, i, cpuids[i]); hwloc_cpuset_set(obj->cpuset, cpuids[i]); @@ -147,6 +147,7 @@ hwloc_look_lgrp(struct hwloc_topology *topology) { hwloc_obj_t glob_lgrps[nlgrps]; browse(topology, cookie, root, glob_lgrps, &curlgrp); +#ifdef HAVE_LGRP_LATENCY_COOKIE { unsigned distances[curlgrp][curlgrp]; unsigned i, j; @@ -155,6 +156,7 @@ hwloc_look_lgrp(struct hwloc_topology *topology) distances[i][j] = lgrp_latency_cookie(cookie, glob_lgrps[i]->os_index, glob_lgrps[j]->os_index, LGRP_LAT_CPU_TO_MEM); hwloc_setup_misc_level_from_distances(topology, curlgrp, glob_lgrps, (unsigned*) distances); } +#endif /* HAVE_LGRP_LATENCY_COOKIE */ } lgrp_fini(cookie); } @@ -162,33 +164,45 @@ hwloc_look_lgrp(struct hwloc_topology *topology) #ifdef HAVE_LIBKSTAT #include -static void -hwloc_look_kstat(struct hwloc_topology *topology, unsigned *nbprocs) +static int +hwloc_look_kstat(struct hwloc_topology *topology) { kstat_ctl_t *kc = kstat_open(); kstat_t *ksp; kstat_named_t *stat; unsigned look_cores = 1, look_chips = 1; + unsigned numsockets = 0; unsigned proc_physids[HWLOC_NBMAXCPUS]; unsigned proc_osphysids[HWLOC_NBMAXCPUS]; unsigned osphysids[HWLOC_NBMAXCPUS]; + unsigned numcores = 0; unsigned proc_coreids[HWLOC_NBMAXCPUS]; unsigned oscoreids[HWLOC_NBMAXCPUS]; unsigned core_osphysids[HWLOC_NBMAXCPUS]; + unsigned numprocs = 0; + unsigned proc_procids[HWLOC_NBMAXCPUS]; + unsigned osprocids[HWLOC_NBMAXCPUS]; + unsigned physid, coreid, cpuid; unsigned procid_max = 0; - unsigned numsockets = 0; - unsigned numcores = 0; unsigned i; + for (cpuid = 0; cpuid < HWLOC_NBMAXCPUS; cpuid++) + { + proc_procids[cpuid] = -1; + proc_physids[cpuid] = -1; + proc_osphysids[cpuid] = -1; + proc_coreids[cpuid] = -1; + } + if (!kc) { hwloc_debug("kstat_open failed: %s\n", strerror(errno)); - return; + return 0; } for (ksp = kc->kc_chain; ksp; ksp = ksp->ks_next) @@ -203,36 +217,32 @@ hwloc_look_kstat(struct hwloc_topology *topology, unsigned *nbprocs) continue; } - proc_physids[cpuid] = -1; - proc_osphysids[cpuid] = -1; - proc_coreids[cpuid] = -1; - if (kstat_read(kc, ksp, NULL) == -1) { fprintf(stderr, "kstat_read failed for CPU%u: %s\n", cpuid, strerror(errno)); - goto out; + continue; } + hwloc_debug("cpu%u\n", cpuid); + proc_procids[cpuid] = numprocs; + osprocids[numprocs] = cpuid; + numprocs++; + + if (cpuid >= procid_max) + procid_max = cpuid + 1; + stat = (kstat_named_t *) kstat_data_lookup(ksp, "state"); if (!stat) - { - hwloc_debug("could not read state for CPU%u: %s\n", cpuid, strerror(errno)); - continue; - } - if (stat->data_type != KSTAT_DATA_CHAR) - { - hwloc_debug("unknown kstat type %d for cpu state\n", stat->data_type); - continue; - } - - procid_max++; - hwloc_debug("cpu%u's state is %s\n", cpuid, stat->value.c); - if (strcmp(stat->value.c, "on-line")) - /* not online */ - hwloc_cpuset_clr(topology->levels[0][0]->online_cpuset, cpuid); - - (*nbprocs)++; - + hwloc_debug("could not read state for CPU%u: %s\n", cpuid, strerror(errno)); + else if (stat->data_type != KSTAT_DATA_CHAR) + hwloc_debug("unknown kstat type %d for cpu state\n", stat->data_type); + else + { + hwloc_debug("cpu%u's state is %s\n", cpuid, stat->value.c); + if (strcmp(stat->value.c, "on-line")) + /* not online */ + hwloc_cpuset_clr(topology->levels[0][0]->online_cpuset, cpuid); + } if (look_chips) do { /* Get Chip ID */ @@ -331,8 +341,12 @@ hwloc_look_kstat(struct hwloc_topology *topology, unsigned *nbprocs) if (look_cores) hwloc_setup_level(procid_max, numcores, oscoreids, proc_coreids, topology, HWLOC_OBJ_CORE); - out: + if (numprocs) + hwloc_setup_level(procid_max, numprocs, osprocids, proc_procids, topology, HWLOC_OBJ_PU); + kstat_close(kc); + + return numprocs > 0; } #endif /* LIBKSTAT */ @@ -345,7 +359,8 @@ hwloc_look_solaris(struct hwloc_topology *topology) #endif /* HAVE_LIBLGRP */ #ifdef HAVE_LIBKSTAT nbprocs = 0; - hwloc_look_kstat(topology, &nbprocs); + if (hwloc_look_kstat(topology)) + return; #endif /* HAVE_LIBKSTAT */ hwloc_setup_pu_level(topology, nbprocs); } diff --git a/opal/mca/paffinity/hwloc/hwloc/src/topology.c b/opal/mca/paffinity/hwloc/hwloc/src/topology.c index ee65be237a..b86b9ca4ec 100644 --- a/opal/mca/paffinity/hwloc/hwloc/src/topology.c +++ b/opal/mca/paffinity/hwloc/hwloc/src/topology.c @@ -45,15 +45,25 @@ static void hwloc_topology_clear (struct hwloc_topology *topology); #if defined(HAVE_SYSCTLBYNAME) -int hwloc_get_sysctlbyname(const char *name, int *ret) +int hwloc_get_sysctlbyname(const char *name, int64_t *ret) { - int n; + union { + int32_t i32; + int64_t i64; + } n; size_t size = sizeof(n); if (sysctlbyname(name, &n, &size, NULL, 0)) return -1; - if (size != sizeof(n)) - return -1; - *ret = n; + switch (size) { + case sizeof(n.i32): + *ret = n.i32; + break; + case sizeof(n.i64): + *ret = n.i64; + break; + default: + return -1; + } return 0; } #endif @@ -93,7 +103,7 @@ hwloc_fallback_nbprocessors(struct hwloc_topology *topology) { host_info(mach_host_self(), HOST_BASIC_INFO, (integer_t*) &info, &count); n = info.avail_cpus; #elif defined(HAVE_SYSCTLBYNAME) - int n; + int64_t n; if (hwloc_get_sysctlbyname("hw.ncpu", &n)) n = -1; #elif defined(HAVE_SYSCTL) && HAVE_DECL_CTL_HW && HAVE_DECL_HW_NCPU diff --git a/opal/mca/paffinity/hwloc/hwloc/tests/Makefile.in b/opal/mca/paffinity/hwloc/hwloc/tests/Makefile.in index c93c9796e4..20454d555b 100644 --- a/opal/mca/paffinity/hwloc/hwloc/tests/Makefile.in +++ b/opal/mca/paffinity/hwloc/hwloc/tests/Makefile.in @@ -302,10 +302,12 @@ HWLOC_DIFF_U = @HWLOC_DIFF_U@ HWLOC_EMBEDDED_CFLAGS = @HWLOC_EMBEDDED_CFLAGS@ HWLOC_EMBEDDED_CPPFLAGS = @HWLOC_EMBEDDED_CPPFLAGS@ HWLOC_EMBEDDED_LDADD = @HWLOC_EMBEDDED_LDADD@ +HWLOC_EMBEDDED_LIBS = @HWLOC_EMBEDDED_LIBS@ HWLOC_HAVE_XML = @HWLOC_HAVE_XML@ HWLOC_KERRIGHED_CFLAGS = @HWLOC_KERRIGHED_CFLAGS@ HWLOC_KERRIGHED_LIBS = @HWLOC_KERRIGHED_LIBS@ HWLOC_LDFLAGS = @HWLOC_LDFLAGS@ +HWLOC_LIBS = @HWLOC_LIBS@ HWLOC_MS_LIB = @HWLOC_MS_LIB@ HWLOC_PKG_CONFIG = @HWLOC_PKG_CONFIG@ HWLOC_RELEASE_DATE = @HWLOC_RELEASE_DATE@ diff --git a/opal/mca/paffinity/hwloc/hwloc/tests/linux/Makefile.in b/opal/mca/paffinity/hwloc/hwloc/tests/linux/Makefile.in index 0479a1ba23..f7419720c5 100644 --- a/opal/mca/paffinity/hwloc/hwloc/tests/linux/Makefile.in +++ b/opal/mca/paffinity/hwloc/hwloc/tests/linux/Makefile.in @@ -108,10 +108,12 @@ HWLOC_DIFF_U = @HWLOC_DIFF_U@ HWLOC_EMBEDDED_CFLAGS = @HWLOC_EMBEDDED_CFLAGS@ HWLOC_EMBEDDED_CPPFLAGS = @HWLOC_EMBEDDED_CPPFLAGS@ HWLOC_EMBEDDED_LDADD = @HWLOC_EMBEDDED_LDADD@ +HWLOC_EMBEDDED_LIBS = @HWLOC_EMBEDDED_LIBS@ HWLOC_HAVE_XML = @HWLOC_HAVE_XML@ HWLOC_KERRIGHED_CFLAGS = @HWLOC_KERRIGHED_CFLAGS@ HWLOC_KERRIGHED_LIBS = @HWLOC_KERRIGHED_LIBS@ HWLOC_LDFLAGS = @HWLOC_LDFLAGS@ +HWLOC_LIBS = @HWLOC_LIBS@ HWLOC_MS_LIB = @HWLOC_MS_LIB@ HWLOC_PKG_CONFIG = @HWLOC_PKG_CONFIG@ HWLOC_RELEASE_DATE = @HWLOC_RELEASE_DATE@ diff --git a/opal/mca/paffinity/hwloc/hwloc/tests/ports/Makefile.in b/opal/mca/paffinity/hwloc/hwloc/tests/ports/Makefile.in index 51778b42fe..de3d503335 100644 --- a/opal/mca/paffinity/hwloc/hwloc/tests/ports/Makefile.in +++ b/opal/mca/paffinity/hwloc/hwloc/tests/ports/Makefile.in @@ -149,10 +149,12 @@ HWLOC_DIFF_U = @HWLOC_DIFF_U@ HWLOC_EMBEDDED_CFLAGS = @HWLOC_EMBEDDED_CFLAGS@ HWLOC_EMBEDDED_CPPFLAGS = @HWLOC_EMBEDDED_CPPFLAGS@ HWLOC_EMBEDDED_LDADD = @HWLOC_EMBEDDED_LDADD@ +HWLOC_EMBEDDED_LIBS = @HWLOC_EMBEDDED_LIBS@ HWLOC_HAVE_XML = @HWLOC_HAVE_XML@ HWLOC_KERRIGHED_CFLAGS = @HWLOC_KERRIGHED_CFLAGS@ HWLOC_KERRIGHED_LIBS = @HWLOC_KERRIGHED_LIBS@ HWLOC_LDFLAGS = @HWLOC_LDFLAGS@ +HWLOC_LIBS = @HWLOC_LIBS@ HWLOC_MS_LIB = @HWLOC_MS_LIB@ HWLOC_PKG_CONFIG = @HWLOC_PKG_CONFIG@ HWLOC_RELEASE_DATE = @HWLOC_RELEASE_DATE@ diff --git a/opal/mca/paffinity/hwloc/hwloc/tests/xml/Makefile.in b/opal/mca/paffinity/hwloc/hwloc/tests/xml/Makefile.in index cecd10d80b..45b7fe31bb 100644 --- a/opal/mca/paffinity/hwloc/hwloc/tests/xml/Makefile.in +++ b/opal/mca/paffinity/hwloc/hwloc/tests/xml/Makefile.in @@ -108,10 +108,12 @@ HWLOC_DIFF_U = @HWLOC_DIFF_U@ HWLOC_EMBEDDED_CFLAGS = @HWLOC_EMBEDDED_CFLAGS@ HWLOC_EMBEDDED_CPPFLAGS = @HWLOC_EMBEDDED_CPPFLAGS@ HWLOC_EMBEDDED_LDADD = @HWLOC_EMBEDDED_LDADD@ +HWLOC_EMBEDDED_LIBS = @HWLOC_EMBEDDED_LIBS@ HWLOC_HAVE_XML = @HWLOC_HAVE_XML@ HWLOC_KERRIGHED_CFLAGS = @HWLOC_KERRIGHED_CFLAGS@ HWLOC_KERRIGHED_LIBS = @HWLOC_KERRIGHED_LIBS@ HWLOC_LDFLAGS = @HWLOC_LDFLAGS@ +HWLOC_LIBS = @HWLOC_LIBS@ HWLOC_MS_LIB = @HWLOC_MS_LIB@ HWLOC_PKG_CONFIG = @HWLOC_PKG_CONFIG@ HWLOC_RELEASE_DATE = @HWLOC_RELEASE_DATE@ diff --git a/opal/mca/paffinity/hwloc/hwloc/utils/Makefile.in b/opal/mca/paffinity/hwloc/hwloc/utils/Makefile.in index 4a2f35abf0..eda92415c3 100644 --- a/opal/mca/paffinity/hwloc/hwloc/utils/Makefile.in +++ b/opal/mca/paffinity/hwloc/hwloc/utils/Makefile.in @@ -199,10 +199,12 @@ HWLOC_DIFF_U = @HWLOC_DIFF_U@ HWLOC_EMBEDDED_CFLAGS = @HWLOC_EMBEDDED_CFLAGS@ HWLOC_EMBEDDED_CPPFLAGS = @HWLOC_EMBEDDED_CPPFLAGS@ HWLOC_EMBEDDED_LDADD = @HWLOC_EMBEDDED_LDADD@ +HWLOC_EMBEDDED_LIBS = @HWLOC_EMBEDDED_LIBS@ HWLOC_HAVE_XML = @HWLOC_HAVE_XML@ HWLOC_KERRIGHED_CFLAGS = @HWLOC_KERRIGHED_CFLAGS@ HWLOC_KERRIGHED_LIBS = @HWLOC_KERRIGHED_LIBS@ HWLOC_LDFLAGS = @HWLOC_LDFLAGS@ +HWLOC_LIBS = @HWLOC_LIBS@ HWLOC_MS_LIB = @HWLOC_MS_LIB@ HWLOC_PKG_CONFIG = @HWLOC_PKG_CONFIG@ HWLOC_RELEASE_DATE = @HWLOC_RELEASE_DATE@ diff --git a/opal/mca/paffinity/hwloc/hwloc/utils/lstopo-cairo.c b/opal/mca/paffinity/hwloc/hwloc/utils/lstopo-cairo.c index 24abd8d13c..6b2a8784a4 100644 --- a/opal/mca/paffinity/hwloc/hwloc/utils/lstopo-cairo.c +++ b/opal/mca/paffinity/hwloc/hwloc/utils/lstopo-cairo.c @@ -215,7 +215,7 @@ output_x11(hwloc_topology_t topology, const char *filename __hwloc_attribute_unu while (!finish) { XEvent e; - if (!XEventsQueued(disp->dpy, QueuedAlready)) { + if (!XEventsQueued(disp->dpy, QueuedAfterFlush)) { /* No pending event, flush moving windows before waiting for next event */ if (disp->x != lastx || disp->y != lasty) { XMoveWindow(disp->dpy, disp->win, -disp->x, -disp->y); diff --git a/opal/mca/paffinity/hwloc/hwloc/utils/lstopo-draw.c b/opal/mca/paffinity/hwloc/hwloc/utils/lstopo-draw.c index 76d5f1210e..fa973b22a7 100644 --- a/opal/mca/paffinity/hwloc/hwloc/utils/lstopo-draw.c +++ b/opal/mca/paffinity/hwloc/hwloc/utils/lstopo-draw.c @@ -217,7 +217,7 @@ RECURSE_BEGIN(obj, border) \ /* Total area for subobjects */ \ area = (obj_maxwidth + (separator)) * (obj_maxheight + (separator)) * numsubobjs; \ /* Ideal total height for spreading that area with RATIO */ \ - idealtotheight = sqrtf(area/RATIO); \ + idealtotheight = (float) sqrt(area/RATIO); \ /* Underestimated number of rows */ \ rows = idealtotheight / (obj_maxheight + (separator)); \ columns = rows ? (numsubobjs + rows - 1) / rows : 1; \ diff --git a/opal/mca/paffinity/hwloc/hwloc/utils/lstopo.1in b/opal/mca/paffinity/hwloc/hwloc/utils/lstopo.1in index c057d69341..76d09e87bc 100644 --- a/opal/mca/paffinity/hwloc/hwloc/utils/lstopo.1in +++ b/opal/mca/paffinity/hwloc/hwloc/utils/lstopo.1in @@ -175,6 +175,9 @@ support, lstopo outputs an SVG representation of the map. .B .xml If the filename ends in ".xml" and lstopo was compiled with the proper support, lstopo outputs an XML representation of the map. +It may be reused later, even on another machine, with lstopo \-\-xml, +the HWLOC_XMLFILE environment variable, or the hwloc_topology_set_xml() +function. . .PP See the output of "lstopo \-\-help" for a specific list of what @@ -241,6 +244,13 @@ To export the topology to a PNG file: lstopo file.png +To export a XML file on a machine and later display the corresponding +graphic output on another machine: + + machine1$ lstopo file.xml + + machine2$ lstopo --xml file.xml + To display a summary of the topology: lstopo -s