Update HDF5 detection#4708
Merged
Merged
Conversation
Contributor
Author
|
Test this please |
Contributor
|
It would be helpful to add a comment in the cmake file, for future readers wondering why the version is checked manually vs. using the built-in version check on find_package. |
Contributor
Author
|
Added, good point Mark. Hopefully we won't have to revisit this, since the question of whether different versions of HDF5 are compatible with each other does not have a simple answer. |
mdewing
approved these changes
Aug 24, 2023
Contributor
|
Test this please |
Contributor
|
I think this also fixes #4447 |
Contributor
Author
|
@quantumsteve Note that when I checked 1.14.x it was for a serial build. Can you verify the MPI case? |
Contributor
Just built with MPI and 1.14.2. CMake configuration was successful and All deterministic tests pass. |
Contributor
Author
|
Thanks Steve |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed changes
Fix reported HDF5 detection problems. Closes #4705 .
Remove the version check from the find_package line, and enforce minimum version ourselves afterwards. HDF5 detection without the "minimum compatible version" of 1.10.0 is how we checked in QMCPACK v3.15.0, which is reported to still work reliably.
The fix solves the problem of HDF5 sometimes not being found because depending on how HDF5 was installed and is found (module vs config mode in find_package), the version check and compatibility analysis done by CMake work differently. This is described in the CMake docs but is subtle. Simplest solution is the one here; we only need to protect against 1.8.x, and even then this is old enough that I doubt it is very relevant today. 1.10.x, 1.12.x, 1.14.1 all appear to work with QMCPACK in my testing. I also verified that the FreeBSD 13.2 system HDF5 package now works.
What type(s) of changes does this code introduce?
Does this introduce a breaking change?
What systems has this change been tested on?
FreeBSD13.2, RHEL9, WSL2/Ubuntu with varous autotools, spack and cmake installs.
Checklist