cd /path/to/VASP tar -xvf vasp.5.4.4.tar.gz
cd vasp.5.4.4
export PATH=/path/to/GNU/bin:$PATH export LD_LIBRARY_PATH=/path/to/GNU/lib64:$LD_LIBRARY_PATH export PATH=/path/to/OPENMPI/bin:$PATH export LD_LIBRARY_PATH=/path/to/OPENMPI/lib:/path/to/OPENBLAS/lib:/path/to/SCALAPACK: /path/to/FFTW/lib:$LD_LIBRARY_PATH
vi makefile.include
##Precompiler options CPP_OPTIONS= -DHOST=\"LinuxGNU\" \ -DMPI -DMPI_BLOCK=8000 \ -Duse_collective \ -DscaLAPACK \ -DCACHE_SIZE=5000 \ -Davoidalloc \ -Duse_bse_te \ -Dtbdyn \ -Duse_shmem CPP = gcc -E -P -C -w $*$(FUFFIX) >$*$(SUFFIX) $(CPP_OPTIONS) FC = mpif90 FCL = mpif90 FREE = -ffree-form -ffree-line-length-none FFLAGS = -w OFLAG = -O3 -ffp-contract=fast -fdec-math -ffpe-trap=invalid,zero,overflow -ffpe-summary=none OFLAG_IN = $(OFLAG) DEBUG = -O0 LLIBS = -L/path/to/SCALAPACK -lscalapack -L/path/to/OPENBLAS/lib -lopenblas FFTW ?= /path/to/FFTW LLIBS += -L$(FFTW)/lib -lfftw3 INCS = -I$(FFTW)/include OBJECTS = fftmpiw.o fftmpi_map.o fftw3d.o fft3dlib.o OBJECTS_O1 += fftw3d.o fftmpi.o fftmpiw.o OBJECTS_O2 += fft3dlib.o # For what used to be vasp.5.lib CPP_LIB = $(CPP) FC_LIB = $(FC) CC_LIB = mpicc CFLAGS_LIB = -O FFLAGS_LIB = -O1 FREE_LIB = $(FREE) OBJECTS_LIB= linpack_double.o getshmem.o # For the parser library CXX_PARS = g++ LIBS += parser LLIBS += -Lparser -lparser -lstdc++ # Normally no need to change this SRCDIR = ../../src BINDIR = ../../bin
行尾和“\”后不能有空格。
make std
如果客户还需要生成vasp_gam ,vasp_ncl,则执行以下命令。
make all