Skip to content

Latest commit

 

History

History
99 lines (60 loc) · 4.67 KB

File metadata and controls

99 lines (60 loc) · 4.67 KB

Instructions for the Installation of HDF5 Software

This file provides instructions for installing the HDF5 software.

For help with installing, questions can be posted to the HDF Forum or sent to the HDF Helpdesk:


Table of Contents


1. Obtaining HDF5

The latest supported public releases of HDF5 are available on the HDF5 GitHub repository.

2. Third-party Software Requirements

To see what compression was configured into a built HDF5 library, check the I/O filters (external): line in the libhdf5.settings file. Also, the hdf5-config.cmake file contains the list of configuration options used to build the library.

2.1. zlib

The HDF5 library includes a predefined compression filter that uses the "deflate" method for chunked datasets.

2.2. Szip (optional)

The HDF5 library includes a predefined compression filter that uses the extended-Rice lossless compression algorithm for chunked datasets.

2.3. Compression Plugins

The HDF5 plugins project provides compression libraries that can be used at runtime with the HDF5 shared library.

2.4. MPI and MPI-IO

The parallel version of the library is built upon the foundation provided by MPI and MPI-IO. If these libraries are not available when HDF5 is configured, only a serial version of HDF5 can be built.

3. HDF5 Source Code and Precompiled Binaries

The HDF Group provides source code and pre-compiled binaries from the HDF5 GitHub releases page: https://github.com/HDFGroup/hdf5/releases

3.1. Build and Install HDF5 Libraries and Tools with CMake

See the release_docs/INSTALL_CMake.md file for detailed instructions.

4. Quick Start Presets

You want to build HDF5 with CMake or use an installed HDF5 binary with CMake, but there are so many options to consider.

4.1. Solution

CMake introduced presets in version 3.19. HDF Group provides a file in the source, CMakePresets.json, requiring CMake 3.26 or higher. This file is in the HDF5 library source as well as the HDF5Examples source of the installed binary.

  • Library Source File: Builds HDF5 with the options for building a typical shared library with the common languages for a platform. The features include building the tools, examples, plugins, and the shared and static libraries.

  • HDF5Examples Source File: Builds the examples with the components that were enabled by the options selected when the install HDF5 library was built. The typical library built by HDF5 and available from the HDF5 Releases page includes C, Java, and Fortran compilers along with the tools, examples, plugins, and the shared and static libraries.

4.2. Discussion

The CMakePresets.json file is located in the root directory of the HDF5 source and the HDF5Examples source of the installed binary.

It is from here you will execute the cmake command to build HDF5. The following example shows how to build HDF5 or examples with the CMakePresets.json file:

# Change directory to the source folder
$ cd <source-folder>

# Execute the workflow
$ cmake --workflow --preset ci-StdShar-<compiler-type> --fresh

Note: <compiler-type> should be replaced with GNUC, MSVC, or Clang.

The above example will create a build folder in the source parent directory, which will contain the results of the build, including installation package files when the library is built.

4.3. Customization

See the HDF5 documentation for more on presets, especially the presets section in the release_docs/INSTALL_CMake.md file.

4.4. See Also

See CMake documentation for details on presets: https://cmake.org/cmake/help/latest/manual/cmake-presets.7.html