Skip to content

Commit 5c09ceb

Browse files
committed
hwloc: add hwloc2x
internal hwloc 2x is used with --with-hwloc=future Signed-off-by: Gilles Gouaillardet <[email protected]>
1 parent 6347f98 commit 5c09ceb

File tree

155 files changed

+49967
-2
lines changed

Some content is hidden

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

155 files changed

+49967
-2
lines changed

opal/mca/hwloc/external/configure.m4

+2-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,8 @@ AC_DEFUN([MCA_opal_hwloc_external_CONFIG],[
103103
AS_IF([test "$with_hwloc" = "external"], [opal_hwloc_external_want=yes])
104104
AS_IF([test "$with_hwloc" != "" && \
105105
test "$with_hwloc" != "no" && \
106-
test "$with_hwloc" != "internal"], [opal_hwloc_external_want=yes])
106+
test "$with_hwloc" != "internal" && \
107+
test "$with_hwloc" != "future"], [opal_hwloc_external_want=yes])
107108
AS_IF([test "$with_hwloc" = "no"], [opal_hwloc_external_want=no])
108109

109110
# If we still want external support, try it

opal/mca/hwloc/hwloc1116/configure.m4

+2-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,8 @@ AC_DEFUN([MCA_opal_hwloc_hwloc1116_CONFIG],[
8888

8989
# Run the hwloc configuration - if no external hwloc, then set the prefixi
9090
# to minimize the chance that someone will use the internal symbols
91-
AS_IF([test "$opal_hwloc_external" = "no"],
91+
AS_IF([test "$opal_hwloc_external" = "no" &&
92+
test "$with_hwloc" != "future"],
9293
[HWLOC_SET_SYMBOL_PREFIX([opal_hwloc1116_])])
9394

9495
# save XML or graphical options

opal/mca/hwloc/hwloc2x/Makefile.am

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
#
2+
# Copyright (c) 2011-2016 Cisco Systems, Inc. All rights reserved.
3+
# Copyright (c) 2014-2015 Intel, Inc. All right reserved.
4+
# Copyright (c) 2016 Los Alamos National Security, LLC. All rights
5+
# reserved.
6+
# Copyright (c) 2017 Research Organization for Information Science
7+
# and Technology (RIST). All rights reserved.
8+
# $COPYRIGHT$
9+
#
10+
# Additional copyrights may follow
11+
#
12+
# $HEADER$
13+
#
14+
15+
EXTRA_DIST = autogen.subdirs
16+
17+
SUBDIRS = hwloc
18+
DIST_SUBDIRS=hwloc
19+
20+
# Headers and sources
21+
headers = hwloc2x.h
22+
sources = hwloc2x_component.c
23+
24+
libs = hwloc/hwloc/libhwloc_embedded.la
25+
26+
# We only ever build this component statically
27+
noinst_LTLIBRARIES = libmca_hwloc_hwloc2x.la
28+
libmca_hwloc_hwloc2x_la_SOURCES = $(headers) $(sources)
29+
nodist_libmca_hwloc_hwloc2x_la_SOURCES = $(nodist_headers)
30+
libmca_hwloc_hwloc2x_la_LDFLAGS = -module -avoid-version
31+
libmca_hwloc_hwloc2x_la_LIBADD = $(libs)
32+
libmca_hwloc_hwloc2x_la_DEPENDENCIES = $(libs)
33+
34+
# Conditionally install the header files
35+
if WANT_INSTALL_HEADERS
36+
opaldir = $(opalincludedir)/$(subdir)
37+
nobase_opal_HEADERS = $(headers)
38+
nobase_nodist_opal_HEADERS = $(nodist_headers)
39+
endif
+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
hwloc

opal/mca/hwloc/hwloc2x/configure.m4

+111
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
# -*- shell-script -*-
2+
#
3+
# Copyright (c) 2009-2017 Cisco Systems, Inc. All rights reserved
4+
# Copyright (c) 2014-2015 Intel, Inc. All rights reserved.
5+
# Copyright (c) 2015-2017 Research Organization for Information Science
6+
# and Technology (RIST). All rights reserved.
7+
# Copyright (c) 2016 Los Alamos National Security, LLC. All rights
8+
# reserved.
9+
#
10+
# $COPYRIGHT$
11+
#
12+
# Additional copyrights may follow
13+
#
14+
# $HEADER$
15+
#
16+
17+
#
18+
# Priority
19+
#
20+
AC_DEFUN([MCA_opal_hwloc_hwloc2x_PRIORITY], [90])
21+
22+
#
23+
# Force this component to compile in static-only mode
24+
#
25+
AC_DEFUN([MCA_opal_hwloc_hwloc2x_COMPILE_MODE], [
26+
AC_MSG_CHECKING([for MCA component $2:$3 compile mode])
27+
$4="static"
28+
AC_MSG_RESULT([$$4])
29+
])
30+
31+
# MCA_hwloc_hwloc2x_POST_CONFIG()
32+
# ---------------------------------
33+
AC_DEFUN([MCA_opal_hwloc_hwloc2x_POST_CONFIG],[
34+
OPAL_VAR_SCOPE_PUSH([opal_hwloc_hwloc2x_basedir])
35+
36+
# If we won, then do all the rest of the setup
37+
AS_IF([test "$1" = "1" && test "$opal_hwloc_hwloc2x_support" = "yes"],
38+
[
39+
# Set this variable so that the framework m4 knows what
40+
# file to include in opal/mca/hwloc/hwloc-internal.h
41+
opal_hwloc_hwloc2x_basedir=opal/mca/hwloc/hwloc2x
42+
opal_hwloc_base_include="$opal_hwloc_hwloc2x_basedir/hwloc2x.h"
43+
44+
# Add some stuff to CPPFLAGS so that the rest of the source
45+
# tree can be built
46+
file=$opal_hwloc_hwloc2x_basedir/hwloc
47+
CPPFLAGS="-I$OPAL_TOP_SRCDIR/$file/include $CPPFLAGS"
48+
AS_IF([test "$OPAL_TOP_BUILDDIR" != "$OPAL_TOP_SRCDIR"],
49+
[CPPFLAGS="-I$OPAL_TOP_BUILDDIR/$file/include $CPPFLAGS"])
50+
unset file
51+
])
52+
OPAL_VAR_SCOPE_POP
53+
])dnl
54+
55+
56+
# MCA_hwloc_hwloc2x_CONFIG([action-if-found], [action-if-not-found])
57+
# --------------------------------------------------------------------
58+
AC_DEFUN([MCA_opal_hwloc_hwloc2x_CONFIG],[
59+
# Hwloc needs to know if we have Verbs support
60+
AC_REQUIRE([OPAL_CHECK_VERBS_DIR])
61+
62+
AC_CONFIG_FILES([opal/mca/hwloc/hwloc2x/Makefile])
63+
64+
OPAL_VAR_SCOPE_PUSH([HWLOC_VERSION opal_hwloc_hwloc2x_flags opal_hwloc_hwloc2x_save_CPPFLAGS opal_hwloc_hwloc2x_basedir opal_hwloc_hwloc2x_file opal_hwloc_future])
65+
66+
# default to this component not providing support
67+
opal_hwloc_hwloc2x_basedir=opal/mca/hwloc/hwloc2x
68+
opal_hwloc_hwloc2x_support=no
69+
70+
AS_IF([test "$with_hwloc" = "future"],
71+
[opal_hwloc_future="yes"],
72+
[opal_hwloc_future="no"])
73+
74+
opal_hwloc_hwloc2x_save_CPPFLAGS=$CPPFLAGS
75+
76+
# Run the hwloc configuration - if no external hwloc, then set the prefixi
77+
# to minimize the chance that someone will use the internal symbols
78+
79+
opal_hwloc_hwloc2x_flags="--enable-embedded-mode --with-hwloc-symbol-prefix=opal_hwloc2x_ --disable-cairo --disable-pugins --enable-static --enable-xml"
80+
AS_IF([test "$opal_check_cuda_happy" = "yes"],
81+
[CPPFLAGS="$CPPFLAGS $opal_datatype_cuda_CPPFLAGS",
82+
opal_hwloc_hwloc2x_flags="$opal_hwloc_hwloc2x_flags --enable-nvml CPPFLAGS=\"$CPPFLAGS\""]
83+
[opal_hwloc_hwloc2x_flags="$opal_hwloc_hwloc2x_flags --disable-nvml"])
84+
85+
OPAL_CONFIG_SUBDIR([opal/mca/hwloc/hwloc2x/hwloc],
86+
[$opal_hwloc_hwloc2x_flags],
87+
[opal_hwloc_hwloc2x_support="yes"],
88+
[opal_hwloc_hwloc2x_support="no"])
89+
90+
CPPFLAGS=$opal_hwloc_hwloc2x_save_CPPFLAGS
91+
92+
# If we are not building the internal hwloc, then indicate that
93+
# this component should not be built. NOTE: we still did all the
94+
# above configury so that all the proper GNU Autotools
95+
# infrastructure is setup properly (e.g., w.r.t. SUBDIRS=hwloc in
96+
# this directory's Makefile.am, we still need the Autotools "make
97+
# distclean" infrastructure to work properly).
98+
AS_IF([test "$opal_hwloc_future" != "yes"],
99+
[AC_MSG_WARN([not using future hwloc; disqualifying this component])
100+
opal_hwloc_hwloc2x_support=no])
101+
102+
# Done!
103+
AS_IF([test "$opal_hwloc_hwloc2x_support" = "yes"],
104+
[AC_DEFINE_UNQUOTED([HWLOC_SYM_PREFIX],[opal_hwloc2x_])
105+
AC_DEFINE_UNQUOTED([HWLOC_SYM_PREFIX_CAPS], [OPAL_HWLOC2X_])
106+
AC_DEFINE_UNQUOTED([HWLOC_SYM_TRANSFORM], [1])
107+
$1],
108+
[$2])
109+
110+
OPAL_VAR_SCOPE_POP
111+
])dnl

opal/mca/hwloc/hwloc2x/hwloc/AUTHORS

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
netloc Authors
2+
==============
3+
4+
The following cumulative list contains the names of most individuals who
5+
have committed code to the hwloc repository.
6+
7+
Name Affiliation(s)
8+
--------------------------- --------------------
9+
Cédric Augonnet University of Bordeaux
10+
Guillaume Beauchamp Inria
11+
Ahmad Boissetri Binzagr Inria
12+
Cyril Bordage Inria
13+
Nicholas Buroker UWL
14+
Jérôme Clet-Ortega University of Bordeaux
15+
Ludovic Courtès Inria
16+
Nathalie Furmento CNRS
17+
Brice Goglin Inria
18+
Joshua Hursey UWL
19+
Alexey Kardashevskiy IBM
20+
Douglas MacFarland UWL
21+
Antoine Rougier intern from University of Bordeaux
22+
Jeff Squyres Cisco
23+
Samuel Thibault University of Bordeaux
24+
25+
Affiliaion abbreviations:
26+
-------------------------
27+
Cisco = Cisco Systems, Inc.
28+
CNRS = Centre national de la recherche scientifique (France)
29+
UWL = University of Wisconsin-La Crosse

opal/mca/hwloc/hwloc2x/hwloc/COPYING

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
Copyright © 2004-2006 The Trustees of Indiana University and Indiana University Research and Technology Corporation. All rights reserved.
2+
Copyright © 2004-2005 The University of Tennessee and The University of Tennessee Research Foundation. All rights reserved.
3+
Copyright © 2004-2005 High Performance Computing Center Stuttgart, University of Stuttgart. All rights reserved.
4+
Copyright © 2004-2005 The Regents of the University of California. All rights reserved.
5+
Copyright © 2009 CNRS
6+
Copyright © 2009-2016 Inria. All rights reserved.
7+
Copyright © 2009-2015 Université Bordeaux
8+
Copyright © 2009-2015 Cisco Systems, Inc. All rights reserved.
9+
Copyright © 2009-2012 Oracle and/or its affiliates. All rights reserved.
10+
Copyright © 2010 IBM
11+
Copyright © 2010 Jirka Hladky
12+
Copyright © 2012 Aleksej Saushev, The NetBSD Foundation
13+
Copyright © 2012 Blue Brain Project, EPFL. All rights reserved.
14+
Copyright © 2013-2014 University of Wisconsin-La Crosse. All rights reserved.
15+
Copyright © 2015 Research Organization for Information Science and Technology (RIST). All rights reserved.
16+
Copyright © 2015-2016 Intel, Inc. All rights reserved.
17+
See COPYING in top-level directory.
18+
19+
Redistribution and use in source and binary forms, with or without
20+
modification, are permitted provided that the following conditions
21+
are met:
22+
1. Redistributions of source code must retain the above copyright
23+
notice, this list of conditions and the following disclaimer.
24+
2. Redistributions in binary form must reproduce the above copyright
25+
notice, this list of conditions and the following disclaimer in the
26+
documentation and/or other materials provided with the distribution.
27+
3. The name of the author may not be used to endorse or promote products
28+
derived from this software without specific prior written permission.
29+
30+
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
31+
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
32+
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
33+
IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
34+
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
35+
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
36+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
37+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
38+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
39+
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+89
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
# Copyright © 2009-2016 Inria. All rights reserved.
2+
# Copyright © 2009 Université Bordeaux
3+
# Copyright © 2009-2014 Cisco Systems, Inc. All rights reserved.
4+
# See COPYING in top-level directory.
5+
6+
# Note that the -I directory must *exactly* match what was specified
7+
# via AC_CONFIG_MACRO_DIR in configure.ac.
8+
ACLOCAL_AMFLAGS = -I ./config
9+
10+
#
11+
# "make distcheck" requires that tarballs are able to be able to "make
12+
# dist", so we have to include config/distscript.sh.
13+
#
14+
EXTRA_DIST = \
15+
README VERSION COPYING AUTHORS \
16+
config/hwloc_get_version.sh \
17+
config/distscript.sh
18+
19+
SUBDIRS = include hwloc
20+
21+
if BUILD_NETLOC
22+
SUBDIRS += netloc
23+
endif
24+
25+
if HWLOC_BUILD_STANDALONE
26+
SUBDIRS += utils tests contrib/systemd contrib/misc
27+
# We need doc/ if HWLOC_BUILD_DOXYGEN, or during make install if HWLOC_INSTALL_DOXYGEN.
28+
# There's no INSTALL_SUBDIRS, so always enter doc/ and check HWLOC_BUILD/INSTALL_DOXYGEN there
29+
SUBDIRS += doc
30+
endif
31+
32+
# Do not let automake automatically add the non-standalone dirs to the
33+
# distribution tarball if we're building in embedded mode.
34+
DIST_SUBDIRS = $(SUBDIRS)
35+
36+
# Only install the pkg file if we're building in standalone mode (and not on Windows)
37+
if HWLOC_BUILD_STANDALONE
38+
pkgconfigdir = $(libdir)/pkgconfig
39+
pkgconfig_DATA = hwloc.pc
40+
if BUILD_NETLOC
41+
# JMS Need to compare hwloc.pc and netloc.pc -- I think netloc.pc is
42+
# missing some things.
43+
# pkgconfig_DATA += netloc.pc Disabled until the netloc API is public
44+
EXTRA_DIST += netloc.pc
45+
if BUILD_NETLOCSCOTCH
46+
pkgconfig_DATA += netlocscotch.pc
47+
endif BUILD_NETLOCSCOTCH
48+
endif BUILD_NETLOC
49+
endif HWLOC_BUILD_STANDALONE
50+
51+
# Only install the valgrind suppressions file if we're building in
52+
# standalone mode
53+
if HWLOC_BUILD_STANDALONE
54+
dist_pkgdata_DATA = contrib/hwloc-valgrind.supp
55+
endif
56+
57+
# Only install entire visual studio subdirectory if we're building in
58+
# standalone mode
59+
if HWLOC_BUILD_STANDALONE
60+
EXTRA_DIST += contrib/windows
61+
endif
62+
63+
if HWLOC_BUILD_STANDALONE
64+
dist-hook:
65+
sh "$(top_srcdir)/config/distscript.sh" "$(top_srcdir)" "$(distdir)" "$(HWLOC_VERSION)"
66+
endif HWLOC_BUILD_STANDALONE
67+
68+
if HWLOC_BUILD_STANDALONE
69+
if HWLOC_HAVE_WINDOWS
70+
#
71+
# Winball specific rules
72+
#
73+
install-data-local:
74+
sed -e 's/$$/'$$'\015'/ < $(srcdir)/README > $(DESTDIR)$(prefix)/README.txt
75+
sed -e 's/$$/'$$'\015'/ < $(srcdir)/NEWS > $(DESTDIR)$(prefix)/NEWS.txt
76+
sed -e 's/$$/'$$'\015'/ < $(srcdir)/COPYING > $(DESTDIR)$(prefix)/COPYING.txt
77+
uninstall-local:
78+
rm -f $(DESTDIR)$(prefix)/README.txt $(DESTDIR)$(prefix)/NEWS.txt $(DESTDIR)$(prefix)/COPYING.txt
79+
endif HWLOC_HAVE_WINDOWS
80+
endif HWLOC_BUILD_STANDALONE
81+
82+
#
83+
# Build the documenation and top-level README file
84+
#
85+
if HWLOC_BUILD_STANDALONE
86+
.PHONY: doc readme
87+
doc readme:
88+
$(MAKE) -C doc
89+
endif HWLOC_BUILD_STANDALONE

0 commit comments

Comments
 (0)