Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v2.0.x: --with-hwloc=external fix #3066

Merged
merged 3 commits into from
Mar 13, 2017

Conversation

jsquyres
Copy link
Member

Fixes #2616 for v2.0.x. Thanks to @opoplawski for reporting.

Copy link
Contributor

@rhc54 rhc54 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pretty big change for the 2.0 series, isn't it?

@hppritcha
Copy link
Member

@ggouaillardet could you please review?

Copy link
Contributor

@ggouaillardet ggouaillardet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR works fine for me.
two comments

  • i made a PR to @jsquyres branch in order to add support for hwloc 1.5 (currently, hwloc from 1.8 is supported) hwloc: add support for hwloc v1.5 #3083 should be merged shortly. we might want to do this all at once.
  • yes this is a pretty big change. that being said, only internal stuff is modified, and this is what distro maintainers are expecting (e.g. --with-hwloc=external). so even if --with-hwloc=/usr seems to work, i am fine to do this in the v2.0.x branch

@jsquyres jsquyres force-pushed the pr/v2.0.x/hwloc-external-fix branch from 0b5c980 to bf87a85 Compare March 7, 2017 15:17
jsquyres and others added 3 commits March 7, 2017 10:19
Frameworks are usually required to have a framework/framework.h file.
However, this is sometimes problematic (see the hwloc use case/problem
description, below).

This commit allows frameworks to have an "autogen.options" file (i.e.,
project/mca/framework/autogen.options) that specifies things that
autogen needs to know about the framework.  Currently, the only option
recognized in autogen.options is "framework_header", which allows a
framework to specify that its header file is named something other
than "framework.h" (the framework header file must still be in the
project/mca/framework directory; it simply may be named something
other than framework.h).  More options may be introduced over time.

The use case that motivated this is the hwloc framework
(open-mpi#2616).

Per MCA framework rules, the hwloc framework is required to have an
opal/mca/hwloc/hwloc.h file.  However, the hwloc library itself *also*
has an hwloc.h file.  This causes a problem when configuring Open MPI
with --with-hwloc=external (meaning: do not use the hwloc embedded
within the Open MPI source code tree -- instead, use an hwloc
installation from outside the Open MPI source code tree).
Specifically, when in the opal/mca/hwloc directory, the presence of
"-I." in DEFAULT_INCLUDES (put there by Automake) causes a confusion
between the hwloc.h in opal/mca/hwloc/hwloc.h and the system-installed
hwloc.h.  Chaos ensues (see the GitHub issue for more detail).

The solution is to rename the opal/mca/hwloc/hwloc.h to something else
(e.g., hwloc-internal.h), and extend autogen.pl to allow frameworks to
have an alternate name for their framework header file.

This commit introduces the autogen.pl mechanism to allow the alternate
header file name.  A follow-on commit will effect this change in the
hwloc framework (and update all the places in the code base to use the
new filename).

Signed-off-by: Jeff Squyres <[email protected]>
(cherry picked from commit a065b9b)
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)
hwloc v1.5 does not support HWLOC_OBJ_OSDEV_COPROC
nor hwloc_topology_dup(), so for this version :
- do not search for coprocessors
- do not try hwloc_topology_dup(), note this is not
  used anywhere in the code base

Thanks Jeff for helping with the wording

Signed-off-by: Gilles Gouaillardet <[email protected]>

(back-ported from commit open-mpi/ompi@7e01be6)
@jsquyres jsquyres force-pushed the pr/v2.0.x/hwloc-external-fix branch from bf87a85 to 1be33d2 Compare March 7, 2017 15:19
@jsquyres jsquyres merged commit 23f41a2 into open-mpi:v2.0.x Mar 13, 2017
@jsquyres jsquyres deleted the pr/v2.0.x/hwloc-external-fix branch March 13, 2017 19:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants