使用macports直接编译QE,会找不到macports的hdf5库,尝试各种flag设置无果后,改用手工编译HDF5解决
编译安装hdf5
./configure --prefix=$HOME/opt/hdf5 --enable-fortran --enable-parallel --enable-hl
make && make install
注意configure时需要添加fortran支持等flag
编译安装QE
configure
F90=gfortran CC=gcc \
BLAS_LIBS="-L/opt/local/lib -lopenblas" \
LAPACK_LIBS="-L/opt/local/lib -lopenblas" \
./configure --enable-openmp --disable-parallel --enable-debug \
--with-hdf5=$HOME/opt/hdf5
删除不支持的编译flag
生成的makefile会包含一个不支持的flag,-lrt
,需要从make.inc
中删除
make and test
make pw # only pw.x and related modules
cd test-suite
make run-tests-pw