Skip to content

Commit 40e6b1f

Browse files
committed
hwloc: rename opal/mca/hwloc/hwloc.h -> hwloc-internal.h
Per a prior commit, the presence of "hwloc.h" can cause ambiguity when using --with-hwloc=external (i.e., whether to include opal/mca/hwloc/hwloc.h or whether to include the system-installed hwloc.h). This commit: 1. Renames opal/mca/hwloc/hwloc.h to hwloc-internal.h. 2. Adds opal/mca/hwloc/autogen.options to tell autogen.pl to expect to find hwloc-internal.h (instead of hwloc.h) in opal/mca/hwloc. 3. s@opal/mca/hwloc/hwloc.h@opal/mca/hwloc/hwloc-internal.h@g in the rest of the code base. Thanks to Orion Poplawski (@opoplawski) for reporting the issue. Signed-off-by: Jeff Squyres <[email protected]> (cherry picked from commit fec519a)
1 parent a3655c0 commit 40e6b1f

40 files changed

+99
-79
lines changed

opal/mca/btl/openib/btl_openib.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* University of Stuttgart. All rights reserved.
1111
* Copyright (c) 2004-2005 The Regents of the University of California.
1212
* All rights reserved.
13-
* Copyright (c) 2007-2013 Cisco Systems, Inc. All rights reserved.
13+
* Copyright (c) 2007-2017 Cisco Systems, Inc. All rights reserved
1414
* Copyright (c) 2006-2015 Mellanox Technologies. All rights reserved.
1515
* Copyright (c) 2006-2016 Los Alamos National Security, LLC. All rights
1616
* reserved.
@@ -80,7 +80,7 @@
8080
#ifdef HAVE_UNISTD_H
8181
#include <unistd.h>
8282
#endif
83-
#include "opal/mca/hwloc/hwloc.h"
83+
#include "opal/mca/hwloc/hwloc-internal.h"
8484

8585
#ifndef MIN
8686
#define MIN(a,b) ((a)<(b)?(a):(b))

opal/mca/btl/openib/btl_openib_component.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* University of Stuttgart. All rights reserved.
1111
* Copyright (c) 2004-2005 The Regents of the University of California.
1212
* All rights reserved.
13-
* Copyright (c) 2006-2016 Cisco Systems, Inc. All rights reserved.
13+
* Copyright (c) 2006-2017 Cisco Systems, Inc. All rights reserved
1414
* Copyright (c) 2006-2015 Mellanox Technologies. All rights reserved.
1515
* Copyright (c) 2006-2015 Los Alamos National Security, LLC. All rights
1616
* reserved.
@@ -59,7 +59,7 @@
5959
know its exact path. We have to rely on the framework header files
6060
to find the right hwloc verbs helper file for us. */
6161
#define OPAL_HWLOC_WANT_VERBS_HELPER 1
62-
#include "opal/mca/hwloc/hwloc.h"
62+
#include "opal/mca/hwloc/hwloc-internal.h"
6363
#include "opal/mca/hwloc/base/base.h"
6464
#include "opal/mca/installdirs/installdirs.h"
6565
#include "opal_stdint.h"

opal/mca/btl/usnic/btl_usnic_hwloc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
#include "opal_config.h"
1111

12-
#include "opal/mca/hwloc/hwloc.h"
12+
#include "opal/mca/hwloc/hwloc-internal.h"
1313
#include "opal/constants.h"
1414

1515
#if BTL_IN_OPAL

opal/mca/hwloc/Makefile.am

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2011-2016 Cisco Systems, Inc. All rights reserved.
2+
# Copyright (c) 2011-2017 Cisco Systems, Inc. All rights reserved
33
# Copyright (c) 2016 Research Organization for Information Science
44
# and Technology (RIST). All rights reserved.
55
# $COPYRIGHT$
@@ -9,17 +9,12 @@
99
# $HEADER$
1010
#
1111

12-
# We do not want -I$(srcdir) in AM_CPPFLAGS, or there can be a
13-
# conflict between system hwloc.h and opal/mca/hwloc/hwloc.h. So just
14-
# set only what we need to AM_CPPFLAGS.
15-
AM_CPPFLAGS = -I$(top_builddir)/opal/include
16-
1712
# main library setup
1813
noinst_LTLIBRARIES = libmca_hwloc.la
1914
libmca_hwloc_la_SOURCES =
2015

2116
# local files
22-
headers = hwloc.h
17+
headers = hwloc-internal.h
2318
libmca_hwloc_la_SOURCES += $(headers)
2419

2520
# Conditionally install the header files

opal/mca/hwloc/autogen.options

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Copyright (c) 2017 Cisco Systems, Inc. All rights reserved
2+
# $COPYRIGHT$
3+
#
4+
5+
# Per https://github.com/open-mpi/ompi/issues/2616, we cannot have an
6+
# "hwloc.h" in the framework directory (due to conflicts of finding
7+
# the system hwloc.h file when using "--with-hwloc=external"). Hence,
8+
# we need to deviate from the framework norm of having
9+
# framework/framework.h (i.e., hwloc/hwloc.h). Instead, we'll have
10+
# hwloc/hwloc-internal.h to make sure that this header file can never
11+
# be mistaken for a system-level hwloc.h.
12+
13+
framework_header = hwloc-internal.h

opal/mca/hwloc/base/base.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
2-
* Copyright (c) 2011-2012 Cisco Systems, Inc. All rights reserved.
3-
* Copyright (c) 2013-2015 Intel, Inc. All rights reserved.
2+
* Copyright (c) 2011-2017 Cisco Systems, Inc. All rights reserved
3+
* Copyright (c) 2013-2017 Intel, Inc. All rights reserved.
44
* $COPYRIGHT$
55
*
66
* Additional copyrights may follow
@@ -15,7 +15,7 @@
1515

1616
#include "opal/dss/dss_types.h"
1717

18-
#include "opal/mca/hwloc/hwloc.h"
18+
#include "opal/mca/hwloc/hwloc-internal.h"
1919

2020
/*
2121
* Global functions for MCA overall hwloc open and close
@@ -89,7 +89,7 @@ OPAL_DECLSPEC int opal_hwloc_base_set_binding_policy(opal_binding_policy_t *poli
8989

9090
/**
9191
* Loads opal_hwloc_my_cpuset (global variable in
92-
* opal/mca/hwloc/hwloc.h) for this process. opal_hwloc_my_cpuset
92+
* opal/mca/hwloc/hwloc-internal.h) for this process. opal_hwloc_my_cpuset
9393
* will be loaded with this process' binding, or, if the process is
9494
* not bound, use the hwloc root object's (available and online)
9595
* cpuset.

opal/mca/hwloc/base/hwloc_base_frame.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
/*
2-
* Copyright (c) 2011-2014 Cisco Systems, Inc. All rights reserved.
3-
* Copyright (c) 2013-2015 Intel, Inc. All rights reserved.
2+
* Copyright (c) 2011-2017 Cisco Systems, Inc. All rights reserved
3+
* Copyright (c) 2013-2017 Intel, Inc. All rights reserved.
4+
* Copyright (c) 2016 Research Organization for Information Science
5+
* and Technology (RIST). All rights reserved.
46
* $COPYRIGHT$
57
*
68
* Additional copyrights may follow
@@ -20,7 +22,7 @@
2022
#include "opal/mca/base/base.h"
2123
#include "opal/threads/tsd.h"
2224

23-
#include "opal/mca/hwloc/hwloc.h"
25+
#include "opal/mca/hwloc/hwloc-internal.h"
2426
#include "opal/mca/hwloc/base/base.h"
2527

2628

opal/mca/hwloc/base/hwloc_base_maffinity.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/*
2-
* Copyright (c) 2011-2012 Cisco Systems, Inc. All rights reserved.
2+
* Copyright (c) 2011-2017 Cisco Systems, Inc. All rights reserved
3+
* Copyright (c) 2016 Intel, Inc. All rights reserved.
34
* $COPYRIGHT$
45
*
56
* Additional copyrights may follow
@@ -12,7 +13,7 @@
1213

1314
#include "opal/constants.h"
1415

15-
#include "opal/mca/hwloc/hwloc.h"
16+
#include "opal/mca/hwloc/hwloc-internal.h"
1617
#include "opal/mca/hwloc/base/base.h"
1718

1819

opal/mca/hwloc/base/hwloc_base_proc_mempolicy.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2011 Cisco Systems, Inc. All rights reserved.
2+
* Copyright (c) 2011-2017 Cisco Systems, Inc. All rights reserved
33
* $COPYRIGHT$
44
*
55
* Additional copyrights may follow
@@ -12,7 +12,7 @@
1212

1313
#include "opal/constants.h"
1414

15-
#include "opal/mca/hwloc/hwloc.h"
15+
#include "opal/mca/hwloc/hwloc-internal.h"
1616
#include "opal/mca/hwloc/base/base.h"
1717

1818

opal/mca/hwloc/base/hwloc_base_util.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* University of Stuttgart. All rights reserved.
1111
* Copyright (c) 2004-2005 The Regents of the University of California.
1212
* All rights reserved.
13-
* Copyright (c) 2011-2012 Cisco Systems, Inc. All rights reserved.
13+
* Copyright (c) 2011-2017 Cisco Systems, Inc. All rights reserved
1414
* Copyright (c) 2012-2015 Los Alamos National Security, LLC.
1515
* All rights reserved.
1616
* Copyright (c) 2013-2014 Intel, Inc. All rights reserved.
@@ -41,7 +41,7 @@
4141
#include "opal/util/show_help.h"
4242
#include "opal/threads/tsd.h"
4343

44-
#include "opal/mca/hwloc/hwloc.h"
44+
#include "opal/mca/hwloc/hwloc-internal.h"
4545
#include "opal/mca/hwloc/base/base.h"
4646

4747
/*

0 commit comments

Comments
 (0)