Commit 5fd136e8 authored by Pavan Balaji's avatar Pavan Balaji
Browse files

[svn-r10739] Update to hwloc-1.6.

No reviewer.
parent 4818afac
......@@ -87,6 +87,8 @@ Building the Windows zipballs on Windows with MinGW:
http://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Automated%20Builds/
- MSYS-<date>.zip
http://sourceforge.net/projects/mingw-w64/files/External%20binary%20packages%20%28Win64%20hosted%29/MSYS%20%2832-bit%29/
- findutils-<version>-bin.zip
http://sourceforge.net/projects/ezwinports/files/
Unpack all these ZIPs in a path that does not contain spaces,
to avoid problems later.
......@@ -100,6 +102,8 @@ Building the Windows zipballs on Windows with MinGW:
- Visual C++ Express bin and IDE directories
- The bin directory of the non-cross-compiling MinGW ZIP
when building a 64bits zipball on a 32bits Windows
- The bin directory of the findutils ZIP to find the "find" command
(the Windows find command cannot be used)
- Examples of PATH (depends on where ZIPs were extracted and were Visual Studio was installed):
- For a 32bits zipball:
$ PATH=/c/hwloc/mingw32/bin:/c/hwloc/mingw32/i686-w64-mingw32/lib:”/c/Program Files/Microsoft Visual Studio 10.0/VC/bin”:”/c/Program Files/Microsoft Visual Studio 10.0/Common7/IDE”:$PATH
......
......@@ -9,7 +9,10 @@ ACLOCAL_AMFLAGS = -I ./config
SUBDIRS = src include
if HWLOC_BUILD_STANDALONE
# SUBDIRS += utils tests doc
SUBDIRS += utils tests
# We need doc/ if HWLOC_BUILD_DOXYGEN, or during make install if HWLOC_INSTALL_DOXYGEN.
# There's no INSTALL_SUBDIRS, so always enter doc/ and check HWLOC_BUILD/INSTALL_DOXYGEN there
SUBDIRS += doc
endif
# Do not let automake automatically add the non-standalone dirs to the
......
Copyright © 2009 CNRS
Copyright © 2009-2012 inria. All rights reserved.
Copyright © 2009-2012 Inria. All rights reserved.
Copyright © 2009-2012 Université Bordeaux 1
Copyright © 2009-2011 Cisco Systems, Inc. All rights reserved.
......@@ -16,6 +16,76 @@ 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.6.0
-------------
* Major changes
+ Reorganize the backend infrastructure to support dynamic selection
of components and dynamic loading of plugins. For details, see the
new documentation section Components and plugins.
- The HWLOC_COMPONENTS variable lets one replace the default discovery
components.
- Dynamic loading of plugins may be enabled with --enable-plugins
(except on AIX and Windows). It will build libxml2 and libpci
support as separated modules. This helps reducing the dependencies
of the core hwloc library when distributed as a binary package.
* Backends
+ Add CPUModel detection on Darwin and x86/FreeBSD.
Thanks to Robin Scher for providing ways to implement this.
+ The x86 backend now adds CPUModel info attributes to socket objects
created by other backends that do not natively support this attribute.
+ Fix detection on FreeBSD in case of cpuset restriction. Thanks to
Sebastian Kuzminsky for reporting the problem.
* XML
+ Add hwloc_topology_set_userdata_import/export_callback(),
hwloc_export_obj_userdata() and _userdata_base64() to let
applications specify how to save/restore the custom data they placed
in the userdata private pointer field of hwloc objects.
* Tools
+ Add hwloc-annotate program to add string info attributes to XML
topologies.
+ Add --pid-cmd to hwloc-ps to append the output of a command to each
PID line. May be used for showing Open MPI process ranks, see the
hwloc-ps(1) manpage for details.
+ hwloc-bind now exits with an error if binding fails; the executable
is not launched unless binding suceeeded or --force was given.
+ Add --quiet to hwloc-calc and hwloc-bind to hide non-fatal error
messages.
+ Fix command-line pid support in windows tools.
+ All programs accept --verbose as a synonym to -v.
* Misc
+ Fix some DIR descriptor leaks on Linux.
+ Fix I/O device lists when some were filtered out after a XML import.
+ Fix the removal of I/O objects when importing a I/O-enabled XML topology
without any I/O topology flag.
+ When merging objects with HWLOC_IGNORE_TYPE_KEEP_STRUCTURE or
lstopo --merge, compare object types before deciding which one of two
identical object to remove (e.g. keep sockets in favor of caches).
+ Add some GUID- and LID-related info attributes to OpenFabrics
OS devices.
+ Only add CPUType socket attributes on Solaris/Sparc. Other cases
don't report reliable information (Solaris/x86), and a replacement
is available as the Architecture string info in the Machine object.
+ Add missing Backend string info on Solaris in most cases.
+ Document object attributes and string infos in a new Attributes
section in the documentation.
+ Add a section about Synthetic topologies in the documentation.
Version 1.5.1
-------------
* Fix block OS device detection on Linux kernel 3.3 and later.
Thanks to Guy Streeter for reporting the problem and testing the fix.
* Fix the cpuid code in the x86 backend (for FreeBSD). Thanks to
Sebastian Kuzminsky for reporting problems and testing patches.
* Fix 64bit detection on FreeBSD.
* Fix some corner cases in the management of the thissystem flag with
respect to topology flags and environment variables.
* Fix some corner cases in command-line parsing checks in hwloc-distrib
and hwloc-distances.
* Make sure we do not miss some block OS devices on old Linux kernels
when a single PCI device has multiple IDE hosts/devices behind it.
* Do not disable I/O devices or instruction caches in hwloc-assembler output.
Version 1.5.0
-------------
......
......@@ -38,7 +38,8 @@ Since it uses standard Operating System information, hwloc's support is mostly
independant from the processor type (x86, powerpc, ...) and just relies on the
Operating System support. The only exception to this is kFreeBSD, which does
not support topology information, and hwloc thus uses an x86-only CPUID-based
backend (which could be used for other OSes too).
backend (which can be used for other OSes too, see the Components and plugins
section).
To check whether hwloc works on a particular machine, just try to build it and
run lstopo or lstopo-no-graphics. If some things do not look right (e.g. bogus
......@@ -66,7 +67,7 @@ below. It may also be used to binding applications onto certain cores or memory
nodes. Several utility programs are also provided to ease command-line
manipulation of topology objects, binding of processes, and so on.
Perl bindings are available from Bernd Kallies on CPAN:
Perl bindings are available from Bernd Kallies on CPAN.
Python bindings are available from Guy Streeter:
......@@ -111,6 +112,10 @@ The hwloc core may also benefit from the following development packages:
exported by the same hwloc release). See Importing and exporting topologies
from/to XML files for details.
libpci and libxml2 support may be statically built inside the main hwloc
library, or as separate dynamically-loaded plugins (see the Components and
plugins section).
CLI Examples
On a 4-socket 2-core machine with hyperthreading, the lstopo tool may show the
......@@ -157,55 +162,39 @@ line), and only socket #0 is shown for brevity:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE topology SYSTEM "hwloc.dtd">
<topology>
<object type="Machine" os_level="-1" os_index="0" cpuset="0x0000ffff"
<object type="Machine" os_index="0" cpuset="0x0000ffff"
complete_cpuset="0x0000ffff" online_cpuset="0x0000ffff"
allowed_cpuset="0x0000ffff"
dmi_board_vendor="Dell Computer Corporation" dmi_board_name="0RD318"
local_memory="16648183808">
<page_type size="4096" count="4064498"/>
<page_type size="2097152" count="0"/>
<object type="Socket" os_level="-1" os_index="0" cpuset="0x00001111"
complete_cpuset="0x00001111" online_cpuset="0x00001111"
allowed_cpuset="0x00001111">
<object type="Cache" os_level="-1" cpuset="0x00001111"
complete_cpuset="0x00001111" online_cpuset="0x00001111"
allowed_cpuset="0x00001111" cache_size="4194304" depth="3"
cache_linesize="64">
<object type="Cache" os_level="-1" cpuset="0x00000101"
complete_cpuset="0x00000101" online_cpuset="0x00000101"
allowed_cpuset="0x00000101" cache_size="1048576" depth="2"
cache_linesize="64">
<object type="Cache" os_level="-1" cpuset="0x00000101"
complete_cpuset="0x00000101" online_cpuset="0x00000101"
allowed_cpuset="0x00000101" cache_size="16384" depth="1"
cache_linesize="64">
<object type="Core" os_level="-1" os_index="0" cpuset="0x00000101"
complete_cpuset="0x00000101" online_cpuset="0x00000101"
allowed_cpuset="0x00000101">
<object type="PU" os_level="-1" os_index="0" cpuset="0x00000001"
<object type="Socket" os_index="0" cpuset="0x00001111" ... >
<object type="Cache" cpuset="0x00001111" ...
cache_size="4194304" depth="3" cache_linesize="64">
<object type="Cache" cpuset="0x00000101" ...
cache_size="1048576" depth="2" cache_linesize="64">
<object type="Cache" cpuset="0x00000101" ...
cache_size="16384" depth="1" cache_linesize="64">
<object type="Core" os_index="0" ... >
<object type="PU" os_index="0" cpuset="0x00000001"
complete_cpuset="0x00000001" online_cpuset="0x00000001"
allowed_cpuset="0x00000001"/>
<object type="PU" os_level="-1" os_index="8" cpuset="0x00000100"
<object type="PU" os_index="8" cpuset="0x00000100"
complete_cpuset="0x00000100" online_cpuset="0x00000100"
allowed_cpuset="0x00000100"/>
</object>
</object>
</object>
<object type="Cache" os_level="-1" cpuset="0x00001010"
complete_cpuset="0x00001010" online_cpuset="0x00001010"
allowed_cpuset="0x00001010" cache_size="1048576" depth="2"
cache_linesize="64">
<object type="Cache" os_level="-1" cpuset="0x00001010"
complete_cpuset="0x00001010" online_cpuset="0x00001010"
allowed_cpuset="0x00001010" cache_size="16384" depth="1"
cache_linesize="64">
<object type="Core" os_level="-1" os_index="1" cpuset="0x00001010"
complete_cpuset="0x00001010" online_cpuset="0x00001010"
allowed_cpuset="0x00001010">
<object type="PU" os_level="-1" os_index="4" cpuset="0x00000010"
<object type="Cache" cpuset="0x00001010" ...
cache_size="1048576" depth="2" cache_linesize="64">
<object type="Cache" cpuset="0x00001010"
cache_size="16384" depth="1" cache_linesize="64">
<object type="Core" os_index="1" cpuset="0x00001010" ... >
<object type="PU" os_index="4" cpuset="0x00000010"
complete_cpuset="0x00000010" online_cpuset="0x00000010"
allowed_cpuset="0x00000010"/>
<object type="PU" os_level="-1" os_index="12" cpuset="0x00001000"
<object type="PU" os_index="12" cpuset="0x00001000"
complete_cpuset="0x00001000" online_cpuset="0x00001000"
allowed_cpuset="0x00001000"/>
</object>
......@@ -244,40 +233,24 @@ added and only PU #0 is shown for brevity:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE topology SYSTEM "hwloc.dtd">
<topology>
<object type="Machine" os_level="-1" os_index="0" cpuset="0x000000ff"
<object type="Machine" os_index="0" cpuset="0x000000ff"
complete_cpuset="0x000000ff" online_cpuset="0x000000ff"
allowed_cpuset="0x000000ff" nodeset="0x000000ff"
complete_nodeset="0x000000ff" allowed_nodeset="0x000000ff"
dmi_board_vendor="TYAN Computer Corp" dmi_board_name="S4881 ">
<page_type size="4096" count="0"/>
<page_type size="2097152" count="0"/>
<object type="NUMANode" os_level="-1" os_index="0" cpuset="0x00000003"
complete_cpuset="0x00000003" online_cpuset="0x00000003"
allowed_cpuset="0x00000003" nodeset="0x00000001"
complete_nodeset="0x00000001" allowed_nodeset="0x00000001"
local_memory="7514177536">
<object type="NUMANode" os_index="0" cpuset="0x00000003" ...
nodeset="0x00000001" ... local_memory="7514177536">
<page_type size="4096" count="1834516"/>
<page_type size="2097152" count="0"/>
<object type="Socket" os_level="-1" os_index="0" cpuset="0x00000003"
complete_cpuset="0x00000003" online_cpuset="0x00000003"
allowed_cpuset="0x00000003" nodeset="0x00000001"
complete_nodeset="0x00000001" allowed_nodeset="0x00000001">
<object type="Cache" os_level="-1" cpuset="0x00000001"
complete_cpuset="0x00000001" online_cpuset="0x00000001"
allowed_cpuset="0x00000001" nodeset="0x00000001"
complete_nodeset="0x00000001" allowed_nodeset="0x00000001"
<object type="Socket" os_index="0" cpuset="0x00000003" ... >
<object type="Cache" cpuset="0x00000001" ...
cache_size="1048576" depth="2" cache_linesize="64">
<object type="Cache" os_level="-1" cpuset="0x00000001"
complete_cpuset="0x00000001" online_cpuset="0x00000001"
allowed_cpuset="0x00000001" nodeset="0x00000001"
complete_nodeset="0x00000001" allowed_nodeset="0x00000001"
<object type="Cache" cpuset="0x00000001" ...
cache_size="65536" depth="1" cache_linesize="64">
<object type="Core" os_level="-1" os_index="0"
cpuset="0x00000001" complete_cpuset="0x00000001"
online_cpuset="0x00000001" allowed_cpuset="0x00000001"
nodeset="0x00000001" complete_nodeset="0x00000001"
allowed_nodeset="0x00000001">
<object type="PU" os_level="-1" os_index="0" cpuset="0x00000001"
<object type="Core" os_index="0" ... >
<object type="PU" os_index="0" cpuset="0x00000001"
complete_cpuset="0x00000001" online_cpuset="0x00000001"
allowed_cpuset="0x00000001" nodeset="0x00000001"
complete_nodeset="0x00000001" allowed_nodeset="0x00000001"/>
......@@ -315,39 +288,27 @@ And the same output in XML (line breaks added, only PU #0 shown):
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE topology SYSTEM "hwloc.dtd">
<topology>
<object type="Machine" os_level="-1" os_index="0" cpuset="0x000000ff"
<object type="Machine" os_index="0" cpuset="0x000000ff"
complete_cpuset="0x000000ff" online_cpuset="0x000000ff"
allowed_cpuset="0x000000ff" dmi_board_vendor="Dell Inc."
dmi_board_name="0NR282" local_memory="16865292288">
<page_type size="4096" count="4117503"/>
<page_type size="2097152" count="0"/>
<object type="Socket" os_level="-1" os_index="0" cpuset="0x00000055"
complete_cpuset="0x00000055" online_cpuset="0x00000055"
allowed_cpuset="0x00000055">
<object type="Cache" os_level="-1" cpuset="0x00000011"
complete_cpuset="0x00000011" online_cpuset="0x00000011"
allowed_cpuset="0x00000011" cache_size="4194304" depth="2"
cache_linesize="64">
<object type="Cache" os_level="-1" cpuset="0x00000001"
complete_cpuset="0x00000001" online_cpuset="0x00000001"
allowed_cpuset="0x00000001" cache_size="32768" depth="1"
cache_linesize="64">
<object type="Core" os_level="-1" os_index="0" cpuset="0x00000001"
complete_cpuset="0x00000001" online_cpuset="0x00000001"
allowed_cpuset="0x00000001">
<object type="PU" os_level="-1" os_index="0" cpuset="0x00000001"
<object type="Socket" os_index="0" cpuset="0x00000055" ... >
<object type="Cache" cpuset="0x00000011" ...
cache_size="4194304" depth="2" cache_linesize="64">
<object type="Cache" cpuset="0x00000001" ...
cache_size="32768" depth="1" cache_linesize="64">
<object type="Core" os_index="0" ... >
<object type="PU" os_index="0" cpuset="0x00000001"
complete_cpuset="0x00000001" online_cpuset="0x00000001"
allowed_cpuset="0x00000001"/>
</object>
</object>
<object type="Cache" os_level="-1" cpuset="0x00000010"
complete_cpuset="0x00000010" online_cpuset="0x00000010"
allowed_cpuset="0x00000010" cache_size="32768" depth="1"
cache_linesize="64">
<object type="Core" os_level="-1" os_index="1" cpuset="0x00000010"
complete_cpuset="0x00000010" online_cpuset="0x00000010"
allowed_cpuset="0x00000010">
<object type="PU" os_level="-1" os_index="4" cpuset="0x00000010"
<object type="Cache" cpuset="0x00000010" ...
cache_size="32768" depth="1" cache_linesize="64">
<object type="Core" os_index="1" ... >
<object type="PU" os_index="4" cpuset="0x00000010" ...
complete_cpuset="0x00000010" online_cpuset="0x00000010"
allowed_cpuset="0x00000010"/>
</object>
......@@ -708,9 +669,11 @@ The documentation chapters include
* CPU and Memory Binding Overview
* I/O Devices
* Multi-node Topologies
* Object attributes
* Importing and exporting topologies from/to XML files
* Interoperability With Other Software
* Thread Safety
* Components and plugins
* Embedding hwloc in Other Software
* Frequently Asked Questions
......@@ -718,5 +681,5 @@ Make sure to have had a look at those too!
-------------------------------------------------------------------------------
Generated on Wed Jul 18 2012 10:50:44 for Hardware Locality (hwloc) by
Generated on Mon Nov 12 2012 03:13:56 for Hardware Locality (hwloc) by
doxygen 1.8.1.2
......@@ -6,7 +6,7 @@
# <major>.<minor>.<release>. If release is zero, then it is omitted.
major=1
minor=5
minor=6
release=0
# greek is used for alpha or beta release tags. If it is non-empty,
......@@ -58,4 +58,4 @@ date="Unreleased developer copy"
# 2. Version numbers are described in the Libtool current:revision:age
# format.
libhwloc_so_version=6:0:1
libhwloc_so_version=7:0:2
:
autoreconf ${autoreconf_args:-"-vif"}
autoreconf -ivf
......@@ -161,6 +161,12 @@ EOF])
# though the $target may indicate something different.
AC_CHECK_SIZEOF([void *])
#
# List of components to be built, either statically or dynamically.
# To be enlarged below.
#
hwloc_components="noos xml synthetic custom xml_nolibxml"
#
# Check OS support
#
......@@ -170,46 +176,55 @@ EOF])
AC_DEFINE(HWLOC_LINUX_SYS, 1, [Define to 1 on Linux])
hwloc_linux=yes
AC_MSG_RESULT([Linux])
hwloc_components="$hwloc_components linux"
;;
*-*-irix*)
AC_DEFINE(HWLOC_IRIX_SYS, 1, [Define to 1 on Irix])
hwloc_irix=yes
AC_MSG_RESULT([IRIX])
# no irix component yet
;;
*-*-darwin*)
AC_DEFINE(HWLOC_DARWIN_SYS, 1, [Define to 1 on Darwin])
hwloc_darwin=yes
AC_MSG_RESULT([Darwin])
hwloc_components="$hwloc_components darwin"
;;
*-*-solaris*)
AC_DEFINE(HWLOC_SOLARIS_SYS, 1, [Define to 1 on Solaris])
hwloc_solaris=yes
AC_MSG_RESULT([Solaris])
hwloc_components="$hwloc_components solaris"
;;
*-*-aix*)
AC_DEFINE(HWLOC_AIX_SYS, 1, [Define to 1 on AIX])
hwloc_aix=yes
AC_MSG_RESULT([AIX])
hwloc_components="$hwloc_components aix"
;;
*-*-osf*)
AC_DEFINE(HWLOC_OSF_SYS, 1, [Define to 1 on OSF])
hwloc_osf=yes
AC_MSG_RESULT([OSF])
hwloc_components="$hwloc_components osf"
;;
*-*-hpux*)
AC_DEFINE(HWLOC_HPUX_SYS, 1, [Define to 1 on HP-UX])
hwloc_hpux=yes
AC_MSG_RESULT([HP-UX])
hwloc_components="$hwloc_components hpux"
;;
*-*-mingw*|*-*-cygwin*)
AC_DEFINE(HWLOC_WIN_SYS, 1, [Define to 1 on WINDOWS])
hwloc_windows=yes
AC_MSG_RESULT([Windows])
hwloc_components="$hwloc_components windows"
;;
*-*-*freebsd*)
AC_DEFINE(HWLOC_FREEBSD_SYS, 1, [Define to 1 on *FREEBSD])
hwloc_freebsd=yes
AC_MSG_RESULT([FreeBSD])
hwloc_components="$hwloc_components freebsd"
;;
*)
AC_MSG_RESULT([Unsupported! ($target)])
......@@ -230,7 +245,7 @@ EOF])
#
AC_MSG_CHECKING([which CPU support to include])
case ${target} in
i*86-*-*|x86_64-*-*)
i*86-*-*|x86_64-*-*|amd64-*-*)
case ${ac_cv_sizeof_void_p} in
4)
AC_DEFINE(HWLOC_X86_32_ARCH, 1, [Define to 1 on x86_32])
......@@ -388,6 +403,8 @@ EOF])
_SC_NPROCESSORS_CONF,
_SC_NPROC_ONLN,
_SC_NPROC_CONF,
_SC_PAGESIZE,
_SC_PAGE_SIZE,
_SC_LARGE_PAGESIZE],,[:],[[#include <unistd.h>]])
AC_HAVE_HEADERS([mach/mach_host.h])
......@@ -556,16 +573,6 @@ EOF])
AC_CHECK_HEADERS([malloc.h])
AC_CHECK_FUNCS([getpagesize memalign posix_memalign])
# when autoheader is run, it doesn't know about
# PAC_FUNC_NEEDS_DECL, so it doesn't generate an appropriate line
# in config.h.in. We need to fool it with a dummy AC_DEFINE().
if false ; then
AC_DEFINE([NEEDS_GETPAGESIZE_DECL], 1, [Define to 1 if getpagesize needs a declaration])
fi
if test $ac_cv_func_getpagesize = "yes" ; then
PAC_FUNC_NEEDS_DECL([#include <unistd.h>],getpagesize)
fi
AC_CHECK_HEADERS([sys/utsname.h])
AC_CHECK_FUNCS([uname])
......@@ -588,6 +595,7 @@ EOF])
AC_SEARCH_LIBS([pthread_getthrds_np], [pthread],
AC_DEFINE([HWLOC_HAVE_PTHREAD_GETTHRDS_NP], 1, `Define to 1 if you have pthread_getthrds_np')
)
AC_CHECK_FUNCS([cpuset_setid])
# Linux libnuma support
hwloc_linux_libnuma_happy=no
......@@ -668,7 +676,6 @@ EOF])
])
fi
AC_SUBST(HWLOC_PCI_LIBS)
HWLOC_LIBS="$HWLOC_LIBS $HWLOC_PCI_LIBS"
# If we asked for pci support but couldn't deliver, fail
AS_IF([test "$enable_pci" = "yes" -a "$hwloc_pci_happy" = "no"],
[AC_MSG_WARN([Specified --enable-pci switch, but could not])
......@@ -704,15 +711,18 @@ EOF])
AC_DEFINE([HWLOC_HAVE_PCIDEV_DOMAIN], [1], [Define to 1 if struct pci_dev has a `domain' field.])
fi
HWLOC_REQUIRES="libpci $HWLOC_REQUIRES"
HWLOC_PCI_REQUIRES=libpci
AC_DEFINE([HWLOC_HAVE_LIBPCI], [1], [Define to 1 if you have the `libpci' library.])
AC_SUBST([HWLOC_HAVE_LIBPCI], [1])
CFLAGS="$tmp_save_CFLAGS"
LIBS="$tmp_save_LIBS"
hwloc_components="$hwloc_components libpci"
hwloc_libpci_component_maybeplugin=1
else
AC_SUBST([HWLOC_HAVE_LIBPCI], [0])
fi
HWLOC_CFLAGS="$HWLOC_CFLAGS $HWLOC_PCI_CFLAGS"
# don't add LIBS/CFLAGS/REQUIRES yet, depends on plugins
# libxml2 support
hwloc_libxml2_happy=
......@@ -722,19 +732,125 @@ EOF])
[hwloc_libxml2_happy=no])
fi
if test "x$hwloc_libxml2_happy" = "xyes"; then
HWLOC_REQUIRES="libxml-2.0 $HWLOC_REQUIRES"
HWLOC_LIBXML2_REQUIRES="libxml-2.0"
AC_DEFINE([HWLOC_HAVE_LIBXML2], [1], [Define to 1 if you have the `libxml2' library.])
AC_SUBST([HWLOC_HAVE_LIBXML2], [1])
hwloc_components="$hwloc_components xml_libxml"
hwloc_xml_libxml_component_maybeplugin=1
else
AC_SUBST([HWLOC_HAVE_LIBXML2], [0])
AS_IF([test "$enable_libxml2" = "yes"],
[AC_MSG_WARN([--enable-libxml2 requested, but libxml2 was not found])
AC_MSG_ERROR([Cannot continue])])
fi
HWLOC_CFLAGS="$HWLOC_CFLAGS $HWLOC_LIBXML2_CFLAGS"
HWLOC_LIBS="$HWLOC_LIBS $HWLOC_LIBXML2_LIBS"
# don't add LIBS/CFLAGS/REQUIRES yet, depends on plugins
# Try to compile the cpuid inlines
AC_MSG_CHECKING([for cpuid])
old_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS -I$HWLOC_top_srcdir/include"
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#include <stdio.h>
#define __hwloc_inline
#include <private/cpuid.h>
]], [[
if (hwloc_have_cpuid()) {
unsigned eax = 0, ebx, ecx = 0, edx;
hwloc_cpuid(&eax, &ebx, &ecx, &edx);
printf("highest cpuid %x\n", eax);
return 0;
}
]])],
[AC_MSG_RESULT([yes])
AC_DEFINE(HWLOC_HAVE_CPUID, 1, [Define to 1 if you have cpuid])
hwloc_have_cpuid=yes],
[AC_MSG_RESULT([no])])
if test "x$hwloc_have_cpuid" = xyes; then
hwloc_components="$hwloc_components x86"
fi
CPPFLAGS="$old_CPPFLAGS"
# Components require pthread_mutex, see if it needs -lpthread
hwloc_pthread_mutex_happy=no
# Try without explicit -lpthread first
AC_CHECK_FUNC([pthread_mutex_lock],
[hwloc_pthread_mutex_happy=yes
],
[AC_MSG_CHECKING([fot pthread_mutex_lock with -lpthread])
# Try again with explicit -lpthread, but don't use AC_CHECK_FUNC to avoid the cache
tmp_save_LIBS=$LIBS
LIBS="$LIBS -lpthread"
AC_LINK_IFELSE([AC_LANG_CALL([], [pthread_mutex_lock])],
[hwloc_pthread_mutex_happy=yes
HWLOC_LIBS="$HWLOC_LIBS -lpthread"
HWLOC_REQUIRES="$HWLOC_REQUIRES libpthread"
])
AC_MSG_RESULT([$hwloc_pthread_mutex_happy])
LIBS="$tmp_save_LIBS"
])
AS_IF([test "x$hwloc_pthread_mutex_happy" = "xyes"],
[AC_DEFINE([HWLOC_HAVE_PTHREAD_MUTEX], 1, [Define to 1 if pthread mutexes are available])])
AS_IF([test "x$hwloc_pthread_mutex_happy" != xyes -a "x$hwloc_windows" != xyes],
[AC_MSG_WARN([pthread_mutex_lock not available, required for thread-safe initialization on non-Windows platforms.])
AC_MSG_WARN([Please report this to the hwloc-devel mailing list.])
AC_MSG_ERROR([Cannot continue])])
#
# Now enable registration of listed components
#
# Plugin support
AC_MSG_CHECKING([if plugin support is enabled])
# Plugins (even core support) are totally disabled by default
AS_IF([test "x$enable_plugins" = "x"], [enable_plugins=no])
# libltdl doesn't work on AIX as of 2.4.2
AS_IF([test "x$enable_plugins" = "xyes" -a "x$hwloc_aix" = "xyes"],
[AC_MSG_WARN([libltdl does not work on AIX, plugins support cannot be enabled.])
AC_MSG_ERROR([Cannot continue])])
# posix linkers don't work well with plugins and windows dll constraints
AS_IF([test "x$enable_plugins" = "xyes" -a "x$hwloc_windows" = "xyes"],
[AC_MSG_WARN([Plugins not supported on non-native Windows build, plugins support cannot be enabled.])
AC_MSG_ERROR([Cannot continue])])
AS_IF([test "x$enable_plugins" != "xno"], [hwloc_have_plugins=yes], [hwloc_have_plugins=no])
AC_MSG_RESULT([$hwloc_have_plugins])
AS_IF([test "x$hwloc_have_plugins" = "xyes"],
[AC_DEFINE([HWLOC_HAVE_PLUGINS], 1, [Define to 1 if the hwloc library should support dynamically-loaded plugins])])
# Static components output file
hwloc_static_components_dir=${HWLOC_top_builddir}/src
mkdir -p ${hwloc_static_components_dir}
hwloc_static_components_file=${hwloc_static_components_dir}/static-components.h
rm -f ${hwloc_static_components_file}
# Make $enable_plugins easier to use (it contains either "yes" (all) or a list of <name>)
HWLOC_PREPARE_FILTER_COMPONENTS([$enable_plugins])
# Now we have some hwloc_<name>_component_wantplugin=1
# See which core components want plugin and support it
HWLOC_FILTER_COMPONENTS
# Now we have some hwloc_<name>_component=plugin/static
# and hwloc_static/plugin_components
AC_MSG_CHECKING([components to build statically])
AC_MSG_RESULT($hwloc_static_components)
HWLOC_LIST_STATIC_COMPONENTS([$hwloc_static_components_file], [$hwloc_static_components])
AC_MSG_CHECKING([components to build as plugins])
AC_MSG_RESULT([$hwloc_plugin_components])
AS_IF([test "$hwloc_libpci_component" = "static"],
[HWLOC_LIBS="$HWLOC_LIBS $HWLOC_PCI_LIBS"
HWLOC_CFLAGS="$HWLOC_CFLAGS $HWLOC_PCI_CFLAGS"
HWLOC_REQUIRES="$HWLOC_PCI_REQUIRES $HWLOC_REQUIRES"])
AS_IF([test "$hwloc_xml_libxml_component" = "static"],
[HWLOC_LIBS="$HWLOC_LIBS $HWLOC_LIBXML2_LIBS"
HWLOC_CFLAGS="$HWLOC_CFLAGS $HWLOC_LIBXML2_CFLAGS"
HWLOC_REQUIRES="$HWLOC_LIBXML2_REQUIRES $HWLOC_REQUIRES"])
#
# Setup HWLOC's C, CPP, and LD flags, and LIBS
#
AC_SUBST(HWLOC_REQUIRES)
AC_SUBST(HWLOC_CFLAGS)
HWLOC_CPPFLAGS='-I$(HWLOC_top_builddir)/include -I$(HWLOC_top_srcdir)/include'
......@@ -762,28 +878,6 @@ EOF])
AC_SUBST(HWLOC_EMBEDDED_LDADD)
AC_SUBST(HWLOC_EMBEDDED_LIBS)