HDF5 is a file format used for large quantities of numerical data. libhdf5 is a library that can access files in HDF5 format. There are also some commandline tools for manipulating HDF5 files.
The Ubuntu workstations come with a pre-built libhdf5 and utilities. However for bionic, this was built against GNU compilers (this matters because not all Fortran compilers are compatible) and doesn't contain the Fortran 2003 bindings. Consequently we also have a couple of locally built versions available as modules on bionic. If you aren't using Fortran, stick with the Ubuntu packages as you don't need to do anything special to access those. If you are using Fortran, load the appropriate module.
Try to use the shared library when possible. If you use the static library you may run into problems when using szipped files. The HDF5_USE_SHLIB variable is set.
This is Free Software. The licence is BSD-like. https://www.hdfgroup.org/ftp/HDF5/current/src/unpacked/COPYING
Ubuntu provide a perfectly good package of this, but it doesn't have the Fortran 2003 bindings so we also provide our own versions via modules which do. We do need the Ubuntu package installed as it is a dependency of some important packages like grace and cdo.
module purge module add szlib # not needed on >=18.04; install libsz2 package instead. bionic and focal provide a newer one than the bionic module already? time ./configure --prefix=/usr/local/shared/ubuntu-XX.XX/x86_64/hdf5/gnu/serial/X.X.X --enable-fortran --with-szlib # --enable-fortran2003 now an unrecognised option 2022-03-02 #2m10s time make && echo Success #31m19s time make check && echo Success #42m41s time sudo make install && echo Success #21s # Delete and re-extract the source tarball module purge module add icc # not icc 14.0, it fails make check time CC=icc CXX=icpc FC=ifort ./configure --prefix=/usr/local/shared/ubuntu-XX.XX/x86_64/hdf5/intel/serial/X.X.X --enable-fortran --enable-fortran2003 --with-szlib #2m30 time make && echo Success #31m35s time make check && echo Success #20m47 time sudo make install && echo Success # need to hack libtool to reload the icc module else the make install step will fail on relinking as it can't find icc: # change the line '$opt_dry_run || eval "$cmd" || {' to '$opt_dry_run || eval "source /etc/profile.d/modules.sh && module purge && module load icc && $cmd" || {' #32s
The bionic custom compiled copy of szip isn't on the standard library search path, so if you link an app that needs the szip functionality with libhdf5.a rather than libhdf5.so you won't find szip at runtime if using GNU compilers because we do not wrap them to set RPATH.