Skip to content

Commit d9f2362

Browse files
author
Ralph Castain
committed
Add in hwloc 1.11.0rc1 - will overwrite with final version
1 parent 8622b34 commit d9f2362

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

95 files changed

+42167
-1
lines changed
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
#
2+
# Copyright (c) 2011-2014 Cisco Systems, Inc. All rights reserved.
3+
# Copyright (c) 2014-2015 Intel, Inc. All right reserved.
4+
# $COPYRIGHT$
5+
#
6+
# Additional copyrights may follow
7+
#
8+
# $HEADER$
9+
#
10+
11+
# Due to what might be a bug in Automake, we need to remove stamp-h?
12+
# files manually. See
13+
# http://debbugs.gnu.org/cgi/bugreport.cgi?bug=19418.
14+
DISTCLEANFILES = \
15+
hwloc/include/hwloc/autogen/stamp-h? \
16+
hwloc/include/private/autogen/stamp-h?
17+
18+
# Need to include these files so that these directories are carried in
19+
# the tarball (in case someone invokes autogen.sh on a dist tarball).
20+
EXTRA_DIST = \
21+
hwloc/doc/README.txt \
22+
hwloc/tests/README.txt \
23+
hwloc/utils/README.txt
24+
25+
SUBDIRS = hwloc
26+
27+
# Headers and sources
28+
headers = hwloc1110.h
29+
sources = hwloc1110_component.c
30+
31+
# We only ever build this component statically
32+
noinst_LTLIBRARIES = libmca_hwloc_hwloc1110.la
33+
libmca_hwloc_hwloc1110_la_SOURCES = $(headers) $(sources)
34+
nodist_libmca_hwloc_hwloc1110_la_SOURCES = $(nodist_headers)
35+
libmca_hwloc_hwloc1110_la_LDFLAGS = -module -avoid-version $(opal_hwloc_hwloc1110_LDFLAGS)
36+
libmca_hwloc_hwloc1110_la_LIBADD = $(opal_hwloc_hwloc1110_LIBS)
37+
libmca_hwloc_hwloc1110_la_DEPENDENCIES = \
38+
$(HWLOC_top_builddir)/src/libhwloc_embedded.la
39+
40+
# Since the rest of the code base includes the underlying hwloc.h, we
41+
# also have to install the underlying header files when
42+
# --with-devel-headers is specified. hwloc doesn't support this; the
43+
# least gross way to make this happen is just to list all of hwloc's
44+
# header files here. :-(
45+
headers += \
46+
hwloc/include/hwloc.h \
47+
hwloc/include/hwloc/bitmap.h \
48+
hwloc/include/hwloc/cuda.h \
49+
hwloc/include/hwloc/cudart.h \
50+
hwloc/include/hwloc/deprecated.h \
51+
hwloc/include/hwloc/diff.h \
52+
hwloc/include/hwloc/gl.h \
53+
hwloc/include/hwloc/helper.h \
54+
hwloc/include/hwloc/inlines.h \
55+
hwloc/include/hwloc/intel-mic.h \
56+
hwloc/include/hwloc/myriexpress.h \
57+
hwloc/include/hwloc/nvml.h \
58+
hwloc/include/hwloc/opencl.h \
59+
hwloc/include/hwloc/openfabrics-verbs.h \
60+
hwloc/include/hwloc/plugins.h \
61+
hwloc/include/hwloc/rename.h \
62+
hwloc/include/private/private.h \
63+
hwloc/include/private/debug.h \
64+
hwloc/include/private/misc.h \
65+
hwloc/include/private/cpuid-x86.h
66+
nodist_headers = hwloc/include/hwloc/autogen/config.h
67+
68+
if HWLOC_HAVE_LINUX
69+
headers += \
70+
hwloc/include/hwloc/linux.h \
71+
hwloc/include/hwloc/linux-libnuma.h
72+
endif HWLOC_HAVE_LINUX
73+
74+
if HWLOC_HAVE_SCHED_SETAFFINITY
75+
headers += hwloc/include/hwloc/glibc-sched.h
76+
endif HWLOC_HAVE_SCHED_SETAFFINITY
77+
78+
# Conditionally install the header files
79+
if WANT_INSTALL_HEADERS
80+
opaldir = $(opalincludedir)/$(subdir)
81+
nobase_opal_HEADERS = $(headers)
82+
nobase_nodist_opal_HEADERS = $(nodist_headers)
83+
endif
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
Applied the following patches from the upstream hwloc 1.9 branch after
2+
the v1.9.1 release:
3+
4+
All relevant commits up to open-mpi/hwloc@4e23b12 (i.e., the HEAD as
5+
of 27 March 2015). "Relevant" commits are defined as those that
6+
included files that are embedded in the Open MPI tree (e.g., updates
7+
to files in docs/, utils/, etc. aren't relevant because they are not
8+
embedded in the Open MPI tree). To be specific, the following commits
9+
have been cherry-picked over to Open MPI:
10+
11+
* open-mpi/hwloc@7c03216 v1.9.1 released, doing 1.9.2rc1 now
12+
* open-mpi/hwloc@b35ced8 misc.h: Fix hwloc_strncasecmp() build under strict flags on BSD
13+
* open-mpi/hwloc@d8c3f3d misc.h: Fix hwloc_strncasecmp() with some icc
14+
* open-mpi/hwloc@f705a23 Use gcc's __asm__ version of the asm extension, which can be used in all standards
15+
* open-mpi/hwloc@307726a configure: fix the check for X11/Xutil.h
16+
* open-mpi/hwloc@ec58c05 errors: improve the advice to send hwloc-gather-topology files in the OS error message
17+
* open-mpi/hwloc@35c743d NEWS update
18+
* open-mpi/hwloc@868170e API: clearly state that os_index isn't unique while logical_index is
19+
* open-mpi/hwloc@851532d x86 and OSF: Don't forget to set NUMA node nodeset
20+
* open-mpi/hwloc@790aa2e cpuid-x86: Fix duplicate asm labels in case of heavy inlining on x86-32
21+
* open-mpi/hwloc@dd09aa5 debug: fix an overzealous assertion about the parent cpuset vs its children
22+
* open-mpi/hwloc@769b9b5 core: fix the merging of identical objects in presence of Misc objects
23+
* open-mpi/hwloc@71da0f1 core: reorder children in merge_useless_child() as well
24+
* open-mpi/hwloc@c9cef07 hpux: improve hwloc_hpux_find_ldom() looking for NUMA node
25+
* open-mpi/hwloc@cdffea6 x86: use ulong for cache sizes, uint won't be enough in the near future
26+
* open-mpi/hwloc@55b0676 x86: use Group instead of Misc for unknown x2apic levels
27+
* open-mpi/hwloc@7764ce5 synthetic: Misc levels are not allowed in the synthetic description
28+
* open-mpi/hwloc@5b2dce1 error: point to the FAQ when displaying the big OS error message
29+
* open-mpi/hwloc@c7bd9e6 pci: fix SR-IOV VF vendor/device names
30+
* open-mpi/hwloc@a0f72ef distances: when we fail to insert an intermediate group, don't try to group further above
31+
* open-mpi/hwloc@e419811 AIX: Fix PU os_index
32+
* open-mpi/hwloc@08ab793 groups: add complete sets when inserting distance/pci groups
33+
* open-mpi/hwloc@c66e714 core: only update root->complete sets if insert succeeds
34+
* open-mpi/hwloc@01da9b9 bitmap: fix a corner case in hwloc_bitmap_isincluded() with infinite sets
35+
* open-mpi/hwloc@e7b192b pci: fix bridge depth
Lines changed: 170 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,170 @@
1+
# -*- shell-script -*-
2+
#
3+
# Copyright (c) 2009-2014 Cisco Systems, Inc. All rights reserved.
4+
# Copyright (c) 2014-2015 Intel, Inc. All rights reserved.
5+
#
6+
# $COPYRIGHT$
7+
#
8+
# Additional copyrights may follow
9+
#
10+
# $HEADER$
11+
#
12+
13+
#
14+
# Priority
15+
#
16+
AC_DEFUN([MCA_opal_hwloc_hwloc1110_PRIORITY], [90])
17+
18+
#
19+
# Force this component to compile in static-only mode
20+
#
21+
AC_DEFUN([MCA_opal_hwloc_hwloc1110_COMPILE_MODE], [
22+
AC_MSG_CHECKING([for MCA component $2:$3 compile mode])
23+
$4="static"
24+
AC_MSG_RESULT([$$4])
25+
])
26+
27+
# Include hwloc m4 files
28+
m4_include(opal/mca/hwloc/hwloc1110/hwloc/config/hwloc.m4)
29+
m4_include(opal/mca/hwloc/hwloc1110/hwloc/config/hwloc_pkg.m4)
30+
m4_include(opal/mca/hwloc/hwloc1110/hwloc/config/hwloc_check_attributes.m4)
31+
m4_include(opal/mca/hwloc/hwloc1110/hwloc/config/hwloc_check_visibility.m4)
32+
m4_include(opal/mca/hwloc/hwloc1110/hwloc/config/hwloc_check_vendor.m4)
33+
m4_include(opal/mca/hwloc/hwloc1110/hwloc/config/hwloc_components.m4)
34+
35+
# MCA_hwloc_hwloc1110_POST_CONFIG()
36+
# ---------------------------------
37+
AC_DEFUN([MCA_opal_hwloc_hwloc1110_POST_CONFIG],[
38+
OPAL_VAR_SCOPE_PUSH([opal_hwloc_hwloc1110_basedir])
39+
40+
# If we won, then do all the rest of the setup
41+
AS_IF([test "$1" = "1" && test "$opal_hwloc_hwloc1110_support" = "yes"],
42+
[
43+
# Set this variable so that the framework m4 knows what
44+
# file to include in opal/mca/hwloc/hwloc.h
45+
opal_hwloc_hwloc1110_basedir=opal/mca/hwloc/hwloc1110
46+
opal_hwloc_base_include="$opal_hwloc_hwloc1110_basedir/hwloc1110.h"
47+
48+
# Add some stuff to CPPFLAGS so that the rest of the source
49+
# tree can be built
50+
file=$opal_hwloc_hwloc1110_basedir/hwloc
51+
CPPFLAGS="$CPPFLAGS -I$OPAL_TOP_SRCDIR/$file/include"
52+
AS_IF([test "$OPAL_TOP_BUILDDIR" != "$OPAL_TOP_SRCDIR"],
53+
[CPPFLAGS="$CPPFLAGS -I$OPAL_TOP_BUILDDIR/$file/include"])
54+
unset file
55+
])
56+
OPAL_VAR_SCOPE_POP
57+
58+
# This must be run unconditionally
59+
HWLOC_DO_AM_CONDITIONALS
60+
])dnl
61+
62+
63+
# MCA_hwloc_hwloc1110_CONFIG([action-if-found], [action-if-not-found])
64+
# --------------------------------------------------------------------
65+
AC_DEFUN([MCA_opal_hwloc_hwloc1110_CONFIG],[
66+
# Hwloc needs to know if we have Verbs support
67+
AC_REQUIRE([OPAL_CHECK_VERBS_DIR])
68+
69+
AC_CONFIG_FILES([opal/mca/hwloc/hwloc1110/Makefile])
70+
71+
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])
72+
73+
# default to this component not providing support
74+
opal_hwloc_hwloc1110_basedir=opal/mca/hwloc/hwloc1110
75+
opal_hwloc_hwloc1110_support=no
76+
77+
if test "$with_hwloc" = "internal" -o "$with_hwloc" = "" -o "$with_hwloc" = "yes"; then
78+
opal_hwloc_hwloc1110_save_CPPFLAGS=$CPPFLAGS
79+
opal_hwloc_hwloc1110_save_LDFLAGS=$LDFLAGS
80+
opal_hwloc_hwloc1110_save_LIBS=$LIBS
81+
82+
# Run the hwloc configuration - set the prefix to minimize
83+
# the chance that someone will use the internal symbols
84+
HWLOC_SET_SYMBOL_PREFIX([opal_hwloc1110_])
85+
86+
# save XML or graphical options
87+
opal_hwloc_hwloc1110_save_cairo=$enable_cairo
88+
opal_hwloc_hwloc1110_save_xml=$enable_xml
89+
opal_hwloc_hwloc1110_save_static=$enable_static
90+
opal_hwloc_hwloc1110_save_shared=$enable_shared
91+
opal_hwloc_hwloc1110_save_plugins=$enable_plugins
92+
93+
# never enable hwloc's graphical option
94+
enable_cairo=no
95+
96+
# never enable hwloc's plugin system
97+
enable_plugins=no
98+
enable_static=yes
99+
enable_shared=no
100+
101+
# Override -- disable hwloc's libxml2 support, but enable the
102+
# native hwloc XML support
103+
enable_libxml2=no
104+
enable_xml=yes
105+
106+
# hwloc checks for compiler visibility, and its needs to do
107+
# this without "picky" flags.
108+
opal_hwloc_hwloc1110_save_cflags=$CFLAGS
109+
CFLAGS=$OPAL_CFLAGS_BEFORE_PICKY
110+
HWLOC_SETUP_CORE([opal/mca/hwloc/hwloc1110/hwloc],
111+
[AC_MSG_CHECKING([whether hwloc configure succeeded])
112+
AC_MSG_RESULT([yes])
113+
HWLOC_VERSION="internal v`$srcdir/$opal_hwloc_hwloc1110_basedir/hwloc/config/hwloc_get_version.sh $srcdir/$opal_hwloc_hwloc1110_basedir/hwloc/VERSION`"
114+
115+
# Build flags for our Makefile.am
116+
opal_hwloc_hwloc1110_LDFLAGS='$(HWLOC_EMBEDDED_LDFLAGS)'
117+
opal_hwloc_hwloc1110_LIBS='$(OPAL_TOP_BUILDDIR)/'"$opal_hwloc_hwloc1110_basedir"'/hwloc/src/libhwloc_embedded.la $(HWLOC_EMBEDDED_LIBS)'
118+
opal_hwloc_hwloc1110_support=yes
119+
120+
AC_DEFINE_UNQUOTED([HWLOC_HWLOC1110_HWLOC_VERSION],
121+
["$HWLOC_VERSION"],
122+
[Version of hwloc])
123+
124+
# Do we have verbs support?
125+
CPPFLAGS_save=$CPPFLAGS
126+
AS_IF([test "$opal_want_verbs" = "yes"],
127+
[CPPFLAGS="-I$opal_verbs_dir/include $CPPFLAGS"])
128+
AC_CHECK_HEADERS([infiniband/verbs.h])
129+
CPPFLAGS=$CPPFLAGS_save
130+
],
131+
[AC_MSG_CHECKING([whether hwloc configure succeeded])
132+
AC_MSG_RESULT([no])
133+
opal_hwloc_hwloc1110_support=no])
134+
CFLAGS=$opal_hwloc_hwloc1110_save_cflags
135+
136+
# Restore some env variables, if necessary
137+
AS_IF([test -n "$opal_hwloc_hwloc1110_save_cairo"],
138+
[enable_cairo=$opal_hwloc_hwloc1110_save_cairo])
139+
AS_IF([test -n "$opal_hwloc_hwloc1110_save_xml"],
140+
[enable_xml=$opal_hwloc_hwloc1110_save_xml])
141+
AS_IF([test -n "$opal_hwloc_hwloc1110_save_static"],
142+
[enable_static=$opal_hwloc_hwloc1110_save_static])
143+
AS_IF([test -n "$opal_hwloc_hwloc1110_save_shared"],
144+
[enable_shared=$opal_hwloc_hwloc1110_save_shared])
145+
AS_IF([test -n "$opal_hwloc_hwloc1110_save_plugins"],
146+
[enable_plugins=$opal_hwloc_hwloc1110_save_shared])
147+
148+
CPPFLAGS=$opal_hwloc_hwloc1110_save_CPPFLAGS
149+
LDFLAGS=$opal_hwloc_hwloc1110_save_LDFLAGS
150+
LIBS=$opal_hwloc_hwloc1110_save_LIBS
151+
152+
AC_SUBST([opal_hwloc_hwloc1110_CFLAGS])
153+
AC_SUBST([opal_hwloc_hwloc1110_CPPFLAGS])
154+
AC_SUBST([opal_hwloc_hwloc1110_LDFLAGS])
155+
AC_SUBST([opal_hwloc_hwloc1110_LIBS])
156+
157+
# Finally, add some flags to the wrapper compiler so that our
158+
# headers can be found.
159+
hwloc_hwloc1110_WRAPPER_EXTRA_LDFLAGS="$HWLOC_EMBEDDED_LDFLAGS"
160+
hwloc_hwloc1110_WRAPPER_EXTRA_LIBS="$HWLOC_EMBEDDED_LIBS"
161+
hwloc_hwloc1110_WRAPPER_EXTRA_CPPFLAGS='-I${includedir}/openmpi/'"$opal_hwloc_hwloc1110_basedir/hwloc/include"
162+
fi
163+
164+
# Done!
165+
AS_IF([test "$opal_hwloc_hwloc1110_support" = "yes"],
166+
[$1],
167+
[$2])
168+
169+
OPAL_VAR_SCOPE_POP
170+
])dnl
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
Cédric Augonnet <[email protected]>
2+
Jérôme Clet-Ortega <[email protected]>
3+
Ludovic Courtès <[email protected]>
4+
Brice Goglin <[email protected]>
5+
Nathalie Furmento <[email protected]>
6+
Samuel Thibault <[email protected]>
7+
Jeff Squyres <[email protected]>
8+
Alexey Kardashevskiy <[email protected]>
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
Copyright © 2009 CNRS
2+
Copyright © 2009 inria. All rights reserved.
3+
Copyright © 2009 Université Bordeaux
4+
Copyright © 2009 Cisco Systems, Inc. All rights reserved.
5+
Copyright © 2012 Blue Brain Project, EPFL. All rights reserved.
6+
See COPYING in top-level directory.
7+
8+
Redistribution and use in source and binary forms, with or without
9+
modification, are permitted provided that the following conditions
10+
are met:
11+
1. Redistributions of source code must retain the above copyright
12+
notice, this list of conditions and the following disclaimer.
13+
2. Redistributions in binary form must reproduce the above copyright
14+
notice, this list of conditions and the following disclaimer in the
15+
documentation and/or other materials provided with the distribution.
16+
3. The name of the author may not be used to endorse or promote products
17+
derived from this software without specific prior written permission.
18+
19+
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
20+
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
21+
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
22+
IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
23+
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
24+
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
28+
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

0 commit comments

Comments
 (0)