Skip to content

Define HWLOC_VERSION* in hwloc/autogen/config.h public header #324

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

Merged
merged 6 commits into from
Aug 15, 2018

Conversation

bgoglin
Copy link
Contributor

@bgoglin bgoglin commented Aug 14, 2018

OMPI would like a way to check the hwloc library version (not API version) from external configure scripts (open-mpi/ompi#5395). We currently have HWLOC_VERSION defined in private/autogen/config.h
It's only there because it wasn't prefixed with HWLOC_ in the past. Now that it's properly prefixed, there's no reason to keep it private.
Also add HWLOC_VERSION_{MAJOR,MINOR,RELEASE,GREEK} to avoid external parsing.

@bgoglin
Copy link
Contributor Author

bgoglin commented Aug 14, 2018

@ggouaillardet Do you want this in hwloc 2.0.2? My understanding is that there's no need to put this in hwloc 1.11.11 since OMPI will never use the system-wide 1.11.x unless forced to.

@ggouaillardet
Copy link
Contributor

@bgoglin thanks a lot !
as you said, starting from hwloc 2.0.2 is far enough
(and I will add a #ifdef HWLOC_VERSION this is only tested when available)

Signed-off-by: Brice Goglin <[email protected]>
So that external tools can check the hwloc version (not the API version),
without having to link with the lib (cross-compiling, etc).
Will be used by OMPI for comparing the internal and system-wide versions.

Thanks to by Gilles Gouaillardet for the suggestion.

Signed-off-by: Brice Goglin <[email protected]>
…hwloc_config.h

To match the Unix stuff

Signed-off-by: Brice Goglin <[email protected]>
@bgoglin bgoglin merged commit 906d234 into open-mpi:master Aug 15, 2018
@bgoglin bgoglin deleted the version branch August 15, 2018 08:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants