因此,我们正在尝试在Ubuntu 14.04 LTS上编译VASP 5.4.1。遵循此处描述的类似安装步骤:如何使用GNU编译器编译Linux Debian的VASP 5.4.1。但是,在测试VASP可执行文件(VASP_STD等)时,该程序会以分段故障终止 - 无效的内存参考错误。
我们目前拥有的makefile.ixlude是:
# Precompiler options
CPP_OPTIONS= -DMPI -DHOST="IFC91_ompi" -DIFC
-DCACHE_SIZE=4000
-DMPI_BLOCK=8000 -DscaLAPACK -Duse_collective
-DnoAugXCmeta -Duse_bse_te
-Duse_shmem -Dtbdyn
CPP = gcc -E -P -C $*$(FUFFIX) >$*$(SUFFIX) $(CPP_OPTIONS)
FC = mpif90
FCL = mpif90
FREE = -ffree-form -ffree-line-length-none
FFLAGS =
OFLAG = -O2
OFLAG_IN = $(OFLAG)
DEBUG = -O0
LIBDIR = /usr/lib/x86_64-linux-gnu
BLAS = -L$(LIBDIR) -lblas
LAPACK = -L$(LIBDIR) -llapack
BLACS = -L$(LIBDIR) -lblacs-openmpi -lblacsCinit-openmpi
SCALAPACK = -L$(LIBDIR) -lscalapack-openmpi $(BLACS)
OBJECTS = fftmpiw.o fftmpi_map.o fftw3d.o fft3dlib.o
/usr/lib/x86_64-linux-gnu/libfftw3.a
INCS =-I/usr/include
LLIBS = $(SCALAPACK) $(LAPACK) $(BLAS)
OBJECTS_O1 += fft3dfurth.o fftw3d.o fftmpi.o fftmpiw.o chi.o
OBJECTS_O2 += fft3dlib.o
# For what used to be vasp.5.lib
CPP_LIB = $(CPP)
FC_LIB = $(FC)
CC_LIB = gcc
CFLAGS_LIB = -O
FFLAGS_LIB = -O1
FREE_LIB = $(FREE)
OBJECTS_LIB= linpack_double.o getshmem.o
# Normally no need to change this
SRCDIR = ../../src
BINDIR = ../../bin
运行后:
mpirun -np 8 /home/<user>/VASP/vasp.5.4.1/bin/vasp_std
该程序运行一段时间,然后用许多分割故障消息终止(我最后一次运行它给了其中8个!):
Program received signal SIGSEGV: Segmentation fault - invalid memory reference.
Backtrace for this error:
#0 0x7F62EE595777
#1 0x7F62EE595D7E
#2 0x7F62EDA95CAF
#3 0x4DE3EA in __nonl_MOD_spher
#4 0x637E84 in __msphpro_MOD_sphpro
#5 0xC1E013 in MAIN__ at main.f90:?
任何见解都将不胜感激。
实际上,它与您的VASP汇编无关,这取决于Linux系统中的某个设置。我不确定这是否有效,在您在命令行处的每个任务之前,请输入:
ulimit -s unlimited