cd /path/to/BerkeleyGW tar xf BerkeleyGW-3.0.1.tar.gz
cd BerkeleyGW-3.0.1 vim arch.mk
输入以下内容并保存退出。
COMPFLAG = -DGNU PARAFLAG = -DMPI MATHFLAG = -DUSESCALAPACK -DUSEFFTW3 FCPP = cpp -C -nostdinc F90free = /path/to/hmpi/bin/mpif90 -ffree-form -ffree-line-length-none -Wall -pedantic-errors -fopenmp LINK = /path/to/hmpi/bin/mpif90 -fuse-ld=lld FOPTS = -O3 FNOOPTS = $(FOPTS) MOD_OPT = -J INCFLAG = -I C_PARAFLAG = -DPARA CC_COMP = /path/to/hmpi/bin/mpiCC -Wall -pedantic-errors C_COMP = /path/to/hmpi/bin/mpicc -Wall -pedantic-errors C_LINK = /path/to/hmpi/bin/mpiCC -no-flang-libs -fuse-ld=lld C_OPTS = -O3 C_DEBUGFLAG = REMOVE = /bin/rm -f FFTWLIB = /path/to/fftw/lib/libfftw3.a FFTWINCLUDE = /path/to/fftw/include LAPACKLIB = /usr/lib64/liblapack.so.3 /usr/lib64/libblas.so.3 SCALAPACKLIB = /path/to/scalapack/lib/libscalapack.a $(LAPACKLIB) TESTSCRIPT = make check-parallel
make all-flavors make install INSTDIR=/path/to/BerkeleyGW
export PATH=/path/to/BerkeleyGW/bin:$PATH