Skip to content

Commit 0aeb27f

Browse files
committed
topo/treematch: silence a hwloc related warning
treematch/km_partitioning.c #include "config.h", but there is no such file when the embedded treematch is used. In order to prevent the embedded treematch from incorrectly using the config.h from the embedded hwloc, generate a dummy config.h. Signed-off-by: Gilles Gouaillardet <gilles@rist.or.jp>
1 parent c8790d2 commit 0aeb27f

File tree

2 files changed

+22
-2
lines changed

2 files changed

+22
-2
lines changed

ompi/mca/topo/treematch/Makefile.am

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
# Copyright (c) 2011-2015 INRIA. All rights reserved.
66
# Copyright (c) 2011-2015 Université Bordeaux 1
77
# Copyright (c) 2017 IBM Corporation. All rights reserved.
8+
# Copyright (c) 2019 Research Organization for Information Science
9+
# and Technology (RIST). All rights reserved.
810
# $COPYRIGHT$
911
#
1012
# Additional copyrights may follow
@@ -67,3 +69,5 @@ noinst_LTLIBRARIES = $(lib)
6769
libmca_topo_treematch_la_SOURCES = $(lib_sources)
6870
libmca_topo_treematch_la_LDFLAGS = -module -avoid-version
6971

72+
distclean-local:
73+
rm -f config.h

ompi/mca/topo/treematch/configure.m4

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@
66
# Copyright (c) 2011-2015 INRIA. All rights reserved.
77
# Copyright (c) 2011-2015 Universite Bordeaux 1
88
# Copyright (c) 2015 Cisco Systems, Inc. All rights reserved.
9-
# Copyright (c) 2015 Intel, Inc. All rights reserved.
9+
# Copyright (c) 2015 Intel, Inc. All rights reserved.
10+
# Copyright (c) 2019 Research Organization for Information Science
11+
# and Technology (RIST). All rights reserved.
1012
# $COPYRIGHT$
1113
#
1214
# Additional copyrights may follow
@@ -77,7 +79,21 @@ AC_DEFUN([MCA_ompi_topo_treematch_CONFIG], [
7779
[ompi_topo_treematch_happy=1])])])
7880

7981
AS_IF([test $ompi_topo_treematch_happy -eq 1],
80-
[$1],
82+
[AS_IF([test "x$treematch_files_local" = "xyes"],
83+
[AS_IF([! test -d $OMPI_TOP_BUILDDIR/ompi/mca/topo/treematch],
84+
[mkdir -p $OMPI_TOP_BUILDDIR/ompi/mca/topo/treematch])
85+
cat > $OMPI_TOP_BUILDDIR/ompi/mca/topo/treematch/config.h << EOF
86+
/*
87+
* This file is automatically generated by configure. Edits will be lost
88+
*
89+
* This is an dummy config.h in order to prevent the embedded treematch from using
90+
* the config.h from the embedded hwloc
91+
*
92+
* see https://github.com/open-mpi/ompi/pull/6185#issuecomment-458807930
93+
*/
94+
EOF
95+
])
96+
$1],
8197
[AS_IF([test ! -z "$with_treematch" && test "$with_treematch" != "no"],
8298
[AC_MSG_ERROR([TreeMatch support requested but not found. Aborting])])
8399
$2])

0 commit comments

Comments
 (0)