-
Notifications
You must be signed in to change notification settings - Fork 876
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
Fix DIR, DIR/include search for --with-pmix #4683
Conversation
Can one of the admins verify this patch? |
@jsquyres Any thoughts on this? |
ok to test |
config/opal_check_pmi.m4
Outdated
@@ -358,9 +363,9 @@ AC_DEFUN([OPAL_CHECK_PMIX],[ | |||
LDFLAGS=$opal_external_pmix_save_LDFLAGS | |||
LIBS=$opal_external_pmix_save_LIBS | |||
|
|||
opal_external_pmix_CPPFLAGS="-I$pmix_ext_install_include_dir" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we do not want -I/usr/include
in CPPFLAGS
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ggouaillardet I can filter that case, sure. When the prefix is /usr
, that var might be /usr/include
or /usr/include/pmix
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does PMIx install its headers in /usr/include/pmix
by default ?
FWIW, we handle SLURM
(that might install its headers in /usr/include/slurm
) a bit differently, and i think we should be consistent in how we handle these exceptions.
@ggouaillardet PMIx installs its multiple headers to
The above provides better include organization. I'm not changing any default behavior in any case, just supporting the above possibility. I'll make the change you suggested above, filtering |
I'm wondering if this is simply exposing a small problem in the pmix configure logic itself. We already have the ability to specify the include location separate from the lib directory. It sounds, though, like we aren't first testing the exact path given to us before appending "include" or other subdirectories. If that is true, then we should probably just fix that problem. |
@rhc54 If you're suggesting that pmix should install headers to |
FWIW, I think the way that we have handled this before is to do something like:
I.e., specify the includedir as the
The rationale was that checking for the all the corner cases and error cases for the above scenario was a royal pain, and just created yet another CLI option (i.e., the Is using EDIT AFTER THE FACT This is wrong. This comment should be ignored. |
I fear you misunderstood me - let me clarify. We are happy with how/where PMIx installs. Per @jsquyres, we do have the two options. Is the problem simply that the configure logic isn't checking the --with-pmix=path-to-include-files argument before trying it with "include" appended? |
bot:mellanox:retest |
@jsquyres if that works, that would be best for me ! @pkovacs |
Below is exactly the problem and my motivation here.
Does not work given the putative example of pmix headers installed to ompi silently appends /include, looks in |
Understood - as I said, that is a bug in the OMPI configure logic. It is supposed to first check in the exact given path, and only if not found should it append "include" |
OK, now we're on the same page! My code needs to be revised. Instead of attempting Got it! Gimme a bit to correct the code here. |
Note |
@ggouaillardet Excellent point that I totally missed. Is there a reason |
Could this be because of the many |
Errr...."many dependencies"? I'm only aware of libevent |
There's extra code in the check to discern the pmix version (1x, 2x, 3x) from the headers. Presumably |
bot:mellanox:retest |
looks like leftover in |
bot:mellanox:retest |
@jladd-mlnx @vspetrov looks like disabling hcoll helps. |
Signed-off-by: Philip Kovacs <pkdevel@yahoo.com>
Changes pushed. The Note that |
I'm not seeing the test for |
The |
Got it - thanks! |
[AS_IF([test "$dir_prefix" != ""], | ||
[$1_CPPFLAGS="$$1_CPPFLAGS -I$dir_prefix" | ||
CPPFLAGS="$CPPFLAGS -I$dir_prefix"]) | ||
AC_CHECK_HEADERS([$2], [opal_check_package_header_happy="yes"], [], [$6]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pkovacs @jsquyres @rhc54 @ggouaillardet @yosefe @jladd-mlnx This check is wrong when the package headers are installed in /usr/include but configure was called with the specific package dir. The check will pickup h file from the /usr/include and add -I$dir_prefix to the CPPFLAGS which is wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, so we can add /usr/include
and /usr/local/include
filters to the to code block above that (lines 44, 45) which will handle the --with-foo=/usr/include
and --with-foo='/usr/include/local
cases without adding unnecessary CPPFLAGS
AS_IF([test "$dir_prefix" = "/usr" || \
test "$dir_prefix" = "/usr/local || \
test "$dir_prefix" = "/usr/include || \
test "$dir_prefix" = "/usr/local/include"],
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added #4722 to correct the concern above.
This PR allows ompi to find external pmix headers that were installed to a
DIR/include/pmix
subdirectory.When packages contain multiple header files, it is common and desirable to be able to place the headers in a project-named subdirectory. Doing so with external pmix, e.g. installing headers to
/usr/include/pmix
, renders the headers unusable to ompi.To address the issue, an optional new argument (action-if-failed) was added to
OPAL_CHECK_WITHDIR
so that, instead of halting the configure immediately, the caller can, if desired, capture the failure and try a different directory. New code was added toopal_check_pmi.m4
to do just that: first try DIR/include and then try DIR/include/pmix../configure --with-pmix=/usr --with-libevent=/usr ...