Unable to Install hdf5, hdf5-devel and hdf5-static on Rocky Linux 8.7

If you are doing a dnf install on hdf5 packages, you will notice errors like the one below

nothing provides libsz.so.2()(64bit) needed by hdf5-1.10.5-4.el8.x86_64
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)

To resolve the issue, you will need to install and enable PowerTools

Step 1: Install DNF plugins package

dnf install dnf-plugins-core

Step 2: Install EPEL

The reason is that some software from its source code requires some dependencies that are available in EPEL

dnf install epel-release

Step 3: Enable PowerTools repository on Rocky Linux 8

dnf config-manager --set-enabled powertools

Step 4: Now try installing HDF5

dnf install hdf5 hdf5-devel hdf5-static
Advertisement

Compiling Parallel HDF5-1.12.0 with OpenMPI and GCC6

HDF5 Download can be found here at https://www.hdfgroup.org/downloads/hdf5/. You will need to register an account before you can download

Prerequisites

  1. GNU GCC-6.5
  2. OpenMPI-3.1.4

Compiling

% tar -zxvf hdf5-1.12.0.tar.gz
% cd hdf5-1.12.0
% CC=mpicc ./configure --prefix=/usr/local/hdf5-1.12.0-gcc6 --enable-parallel --enable-hl --with-zlib=/usr/local/zlib-1.2.11-gcc6
Features:
---------
                   Parallel HDF5: yes
Parallel Filtered Dataset Writes: yes
              Large Parallel I/O: yes
              High-level library: yes
                Build HDF5 Tests: yes
                Build HDF5 Tools: yes
                    Threadsafety: no
             Default API mapping: v112
  With deprecated public symbols: yes
          I/O filters (external): deflate(zlib)
                             MPE:
                   Map (H5M) API: no
                      Direct VFD: no
              (Read-Only) S3 VFD: no
            (Read-Only) HDFS VFD: no
                         dmalloc: no
  Packages w/ extra debug output: AC,B2,CX,D,F,HL,I,O,S,ST,T,Z
                     API tracing: yes
            Using memory checker: no
 Memory allocation sanity checks: yes
          Function stack tracing: no
       Strict file format checks: yes
    Optimization instrumentation: yes
% make check
% make install

Compiling HDF5-1.8.17 with Intel-15.0.6 and Intel-MPI-5.0.6

Step 1: Preparing the prerequisites

$ vim .bashrc
source /usr/local/intel_2015/bin/compilervars.sh intel64
source /usr/local/intel_2015/impi/5.0.3.049/bin64/mpivars.sh intel64
source /usr/local/intel_2015/mkl/bin/mklvars.sh intel64
export CC=icc
export CXX=icpc
export F77=ifort
export MPICC=mpicc
export MPICXX=mpiicpc
export CFLAGS="-O3 -xHost -fno-alias -align"
export FFLAGS="-O3 -xHost -fno-alias -align"
export CXXFLAGS="-O3 -xHost -fno-alias -align"
export FFlags="-I/usr/local/intel_2015/impi/5.0.3.049/include64 -L/usr/local/intel_2015/impi/5.0.3.049/lib64"

Step 2: Compile zlib-1

See Compile zlib-1.2.8 with Intel-15.0.6

Step 3: Configure the HDF5

$ tar -zxvf hdf5-1.8.17.tar.gz
$ cd hdf5-1.8.17
$ ./configure --prefix=/usr/local/hdf5-1.8.17 --enable-fortran --enable-cxx
$ make
$ make check
$ make install

References

  1. Building HDF5* with Intel® compilers
  2. Obtaining The Latest HDF5 Software