
一、安装HDF5

下载HDF5及相关的SZIP和ZLIB,链接如下
ZLIB: https://www.zlib.net/zlib-1.2.11.tar.gz
SZIP: https://support.hdfgroup.org/ftp/lib-external/szip/2.1.1/src/szip-2.1.1.tar.gz
HDF5: https://www.hdfgroup.org/downloads/hdf5/source-code/
安装
export CC=icc
export CXX=icpc
export FC=ifort
export CFLAGS='-O3 -xHost -ip'
export CXXFLAGS='-O3 -xHost -ip'
export FCFLAGS='-O3 -xHost -ip'
tar -zxvf szip-2.1.1.tar.gz
cd szip-2.1.1
./configure --prefix=~/bin/szip
make
make check
make install
tar -zxvf zlib-1.2.7.tar.gz
cd zlib-1.2.7
./configure --prefix=~/bin/zlib
make
make install
tar -zxvf hdf5-1.8.8.tar.gz
cd hdf5-1.8.8
./configure --prefix=~/bin/hdf5 --enable-fortran --with-szip=~/bin/szip --with-zlib=~/bin/zlib
make
make install 3. VASP编译
修改makefile.include,添加
#HDF5-support (optional but strongly recommended)
CPP_OPTIONS+= -DVASP_HDF5
HDF5_ROOT ?= ~/bin/hdf5
LLIBS += -L$(HDF5_ROOT)/lib -lhdf5_fortran
INCS += -I$(HDF5_ROOT)/include