Skip to content

Build HDF5 2.x#108

Merged
kwabenantim merged 14 commits into
mainfrom
106-build-hdf5-2.x
May 19, 2026
Merged

Build HDF5 2.x#108
kwabenantim merged 14 commits into
mainfrom
106-build-hdf5-2.x

Conversation

@kwabenantim
Copy link
Copy Markdown
Member

Supports #106 and #90

@kwabenantim kwabenantim self-assigned this May 13, 2026
@kwabenantim
Copy link
Copy Markdown
Member Author

kwabenantim commented May 19, 2026

Error

CMake Error at /usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Could NOT find MPI (missing: MPI_C_FOUND) (found version "3.1")
Call Stack (most recent call first):
  /usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake-3.22/Modules/FindMPI.cmake:1830 (find_package_handle_standard_args)
  /usr/share/cmake-3.22/Modules/CMakeFindDependencyMacro.cmake:47 (find_package)
  /data/uizka/apps/opt/hdf5/2.1.1/cmake/hdf5-config.cmake:124 (find_dependency)
  /usr/share/cmake-3.22/Modules/FindHDF5.cmake:504 (find_package)
  CMakeLists.txt:495 (find_package)

Fix

Use CMake 3.26+ which is the minimum version supported by HDF5 2.0+

Related Issue: #90

@kwabenantim
Copy link
Copy Markdown
Member Author

Error

CMake Error at CMakeLists.txt:502 (message):
  Hdf5 library found was not build with --enable-parallel, use the HDF5_ROOT
  environment variable to specify a parallel hdf5 library.  Note: include
  dirs are /data/uizka/apps/opt/hdf5/2.1.1/include and libraries are
  hdf5-shared

Fix

HDF5_IS_PARALLEL has been renamed HDF5_PROVIDES_PARALLEL from HDF5 2.0+

https://discourse.cmake.org/t/hdf5-2-0-has-breaking-changes-cmake-doesnt-set-the-hdf5-is-parallel-variable-anymore/15444

@kwabenantim kwabenantim marked this pull request as ready for review May 19, 2026 11:36
@kwabenantim
Copy link
Copy Markdown
Member Author

HDF5 2.1.1 is now building correctly

https://github.com/Chaste/dependency-modules/actions/runs/26094162213

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds HDF5 2.x support to the custom dependency installer by selecting the newer source archive path and switching 2.x builds from autotools to CMake.

Changes:

  • Splits HDF5 archive download handling so 2.x uses a new tag/archive pattern.
  • Keeps autotools builds for pre-2.0 versions.
  • Adds a CMake build path for HDF5 2.x with MPI/parallel support enabled.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread scripts/custom/install_hdf5.sh Outdated
Comment thread scripts/custom/install_hdf5.sh
kwabenantim and others added 2 commits May 19, 2026 12:42
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

Comment thread scripts/custom/install_hdf5.sh Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

Comment thread scripts/custom/install_hdf5.sh Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

Comment thread scripts/custom/install_hdf5.sh
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

Agent-Logs-Url: https://github.com/Chaste/dependency-modules/sessions/2163e0ad-04cc-4735-8e96-776f28a15324

Co-authored-by: kwabenantim <1944963+kwabenantim@users.noreply.github.com>
Copilot AI and others added 3 commits May 19, 2026 12:22
Copy link
Copy Markdown
Contributor

Copilot AI commented May 19, 2026

Error

...

Implemented in 996bef4: setup_custom.sh now ensures CMake >= 3.26 is available (installs via pip when system CMake is older), so HDF5 2.x consumers aren’t pinned to 3.22.

Error

...

Addressed in 996bef4: HDF5 2.x installs now add a compatibility shim in hdf5-config.cmake that sets HDF5_IS_PARALLEL from HDF5_PROVIDES_PARALLEL for downstream projects still checking the legacy variable.

@kwabenantim
Copy link
Copy Markdown
Member Author

After suggested adjustments, HDF5 2.x is still building okay

https://github.com/Chaste/dependency-modules/actions/runs/26098620411

Comment thread scripts/custom/setup_custom.sh Outdated
@kwabenantim kwabenantim merged commit 264c2a4 into main May 19, 2026
@kwabenantim kwabenantim deleted the 106-build-hdf5-2.x branch May 19, 2026 13:46
@kwabenantim kwabenantim restored the 106-build-hdf5-2.x branch May 19, 2026 15:34
@kwabenantim
Copy link
Copy Markdown
Member Author

kwabenantim commented May 19, 2026

This remains tricky because VTK doesn't seem to support HDF5 2.x yet. As of 9.6.2, it hasn't adapted to the new HDF5_PROVIDES_PARALLEL flag.

#17 19.27 -- Found HDF5: hdf5-shared (found version "2.1.1") found components: C HL
#17 19.27 CMake Error at CMake/vtkModule.cmake:6196 (message):
#17 19.27   The variable `HDF5_IS_PARALLEL` was expected to have been available, but
#17 19.27   was not defined.
#17 19.27 Call Stack (most recent call first):
#17 19.27   CMake/vtkModule.cmake:5904 (vtk_module_third_party_external)
#17 19.27   ThirdParty/hdf5/CMakeLists.txt:3 (vtk_module_third_party)

https://docs.vtk.org/en/latest/release_details/9.6.html

@kwabenantim kwabenantim deleted the 106-build-hdf5-2.x branch May 19, 2026 15:51
@kwabenantim kwabenantim linked an issue May 20, 2026 that may be closed by this pull request
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.

Build HDF5 2.x

4 participants