Installing HDF5
Procedure
- Download the HDF5 source package.
- Upload the source package to its installation directory on the server, for example, /path/to/download/hdf5.
- Go to the source package directory.
cd /path/to/download/hdf5
- Decompress the installation package.
tar -zxvf hdf5-1.8.20.tar.gz
- Switch to the directory of the configure script.
cd hdf5-1.8.20
- Install HDF5.
./configure --prefix=/path/to/install/HDF5 --build=aarch64-unknown-linux-gnu --enable-fortran --enable-static=yes --enable-parallel --enable-shared CC=mpicc CXX=mpicxx FC=mpifort F77=mpifort CFLAGS=-fPIC CXXFLAGS=-fPIC FCFLAGS=-fPIC
- Modify the libtool file in the current directory.
vi libtool
In line 10118, change wl="" to wl="-Wl,".
In line 10267, change wl="" to wl="-Wl,".
The line numbers may vary according to each HDF5 version. Search for wl="" to determine the line numbers.
- Perform the compilation and installation.
make -j 16 make install
- Set the environment variables.
export PATH=/path/to/install/HDF5/bin:$PATH export LD_LIBRARY_PATH=/path/to/install/HDF5/lib:$LD_LIBRARY_PATH
Parent topic: Configuring the Compilation Environment