星际之菜鸟大神安装单机vasp4.6求大神帮忙!!!!!!

小木虫 --- 500万硕博科研人员喜爱的学术科研平台
&&查看话题
【原创】vasp4.6安装过程
最近在vasp群里有很多人询问如何安装vasp的问题,这两天自己也装了一次,把安装步骤分享出来,和大家一起学习,我装的是vasp4.6,更高版本的没装过。另外,建议用ubuntu10.04及其以下版本安装,之前用10.10没装上,可能是对ifort的语法要求太高了,安装ifort提示权限不够
装之前为了方便起见,先把终端添加到右键:sudo apt-get install nautilus-open-terminal
重启一下就行了,接下来就是vasp的安装步骤了:
1. 首先,安装依赖和 g++ 编译器:
Ubuntu用户使用以下命令
user@~$ sudo apt-get install build-essential
user@~$ sudo apt-get install libstdc++5
build-essential也可以通过新立得安装
2. 安装intel编译器,这一步是最难的,可以到Intel的官网上下载非商业版的 Intel& Fortran Compiler for Linux, 这里我使用的是 11.1.059 版,这个版本好像对ubuntu10.10有权限限制,安装的时候总提醒权限不够,这也就是为什么建议别人装vasp用10.04及其以下版本的原因了。
将下好的intel fortran 编译器解压,在其解压文件夹中打开,然后右键打开终端,键入以下命令:user@/l_fc_p_11.1.059$ ./install.sh
之后会出现安装选项,选2 ;(即通过验证码安装,这个会在你下ifort的时候发到你邮箱里,即“SN=”后面的一串验证码)
因为Arch Linux不在支持的系统之列,它会问你是否安装不支持的版本,yes就可;
默认还是高级安装,选1 默认;
一路回车,到达接受条款那里,填
选择安装目录,回车默认(/opt/intel/) ;
安装完毕!
这时候intel编译器虽然已经安装成功,但是还不能用,因为还需要设置环境变量:
这时候需要回到/home中打开选项“查看”下拉菜单中的显示隐藏文件夹,然后再隐藏的文件夹中有一个.bashrc文件,
打开.bashrc文件在最后面加以下几行
# intel compiler
source /opt/intel/Compiler/11.1/059/bin/ifortvars.sh ia32
这个时候的ifort就可以用了,你可以通过随便打开一个终端,输入:ifort –v命令查看是否有安装好的ifort.
3. 到ATLAS的网页下载数学库
http://www.netlib.org/atlas/archives/linux/
根据CPU选择源文件,我的CPU是Athlon64 3000, 操作系统是x86的, 选择 atlas3.4.1_Linux_ATHLON. 千万别选错数学库,不然打死你也完不成编译;
把数学库解压到/opt/目录下( 和ifort同目录,方便管理 ),
user@~$ sudo tar -xvf atlas3.4.1_Linux_ATHLON.tgz -C /opt/
4. 安装VASP 4.6
解压 vasp4.6 和 vasp-lib
编译 vasp.4.lib, ────> 进入源码目录,根据CPU和编译器选择makefile文件,这里我用的是makefile.linux_ifc_ath,打开对其做一下修改:
& & # 19行 FC=ifc , 改为 FC=ifort
& & user@/tmp/vasp.4.lib$ make -f makefile.linux_ifc_ath
& & # 编译获得 libdmy.a
提示libdmy.a文件是最新,则删除已编译的文件 rm ×.o
编译 vasp.4.6, ────> 进入源码目录,根据CPU和编译器选择makefile文件,这里还是用makefile.linux_ifc_ath,打开对其做一下修改:
& & user@~$ cd /tmp/vasp.4.6/
& & user@/tmp/vasp.4.6$ vim makefile.linux_ifc_ath
& & # 50行 FC=ifc , 改为 FC=ifort
& & # 修改atlas数学库的路径
& & # 120行 改为 ATLASHOME= /opt/Linux_ATHLON/lib
& & # 把340行之后的参数 ‘-e95′ 全部删除,然后编译
& & user@/tmp/vasp.4.lib$ make -f makefile.linux_ifc_ath
& & 不删除参数 ‘-e95′ 会出现ERROR: “The computed GOTO statement is an obsolescent feature in Fortran 95.” ;
& &&&“-e95″ 参数会把F95编译F77程式码产生的警告(warning)改成错误(error)型式输出,造成编译强迫停止无法忽略跳过!
5. 得到vasp可执行文件,这时就可以把vasp当普通命令用了。
《《vasp安装篇完》》
你好&&,&&以前安装了vasp&&后来遇见问题,所以昨天晚上就卸载了&&,今天重新安装,编译vasp.5.lib居然也出现错误,请问你有没有遇见过啊,如何解决的呢,谢谢指导!&&我也是改得FC=ifort
compilation aborted for diolib.f (code 1)
make: ***&&Error 1
我只会装vasp4.6,你装的版本我也试过,没装上,你可以问下装过的
研究生必备与500万研究生在线互动!
扫描下载送金币小木虫 --- 500万硕博科研人员喜爱的学术科研平台
&&查看话题
【求助】求vasp.4.6 安装必备软件
大家好,经苦苦搜索,找到朋友们米人上传的vasp安装必备软件,传于09年,原因种种下载不下来,去intel 官网,注册、填写邮件后,打开非商业软件下载地址仍下载不了,只好来此求助。希望大家多多帮助&&
求DELL intel 4核 64bit系统 centos操作平台下的vasp.4.6安装必备的软件
是的&&邮件的地址打开之后&&还是下不来 我尝试了好几次 收到了好几封 还是下载不了
不是吧?那有找到下载链接吗?
打个比方:可以看到迅雷获取链接成功,开始下载。
谢谢 用迅雷也下载不了 后来在官网换了个版本下载了个ifort
可是数学库仍下不来
数学库我用的gotoblas,感觉比intel的好用点
你要MKL啊?
那待会我帮你下下咯。。
怎么给你呢?
你能上传到网盘吗&&给我个链接?
不好意思,本想用qq邮箱给你的
要是你觉得不方便,那就算啦。
研究生必备与500万研究生在线互动!
扫描下载送金币小木虫 --- 500万硕博科研人员喜爱的学术科研平台
&&查看话题
成功使用PathScale免费版编译VASP 4.6
网上传说,使用PathScale能够有效提高在AMD平台上程序的运行效率,虽然尚且不知真假(至少在Intel平台上,PathScale完败,后面会提到),但自打去年(或者是前年?)开始PathScale也玩起了开源,发布了没有使用时间限制的免费版本,这至少是给了不同平台的人更多的选择。并且,不是所有的地方都是能用intel的,比如大多数IBM的大型机,还有那些跑着Unix环境的机器,安装ifort都是项痛苦的工作,仅仅有Linux兼容层都不够(可以参考FreeBSD的一些官方社区帖)。在这些机器上,还是可以看到PathScale及PGI的身影的~
对于PGI,VASP是提供了几个编译脚本的,但是对于PathScale,就比较悲催了,不但官方没有提供任何的编译脚本模板,并且连在官方论坛里也不予回答~自己编译时碰到的问题好多都可以在官方论坛找到,但是即使是好多年前的帖,都没有任何的回复。唯一一个有回复的,还不怎么正确,不过也是给了些启发。在Google上搜索一下就更郁闷了,用中文搜,总共就两三个帖子提到了PathScale编译VASP,完全秉承了天下文章一大抄的特色。其中一个是比较PathScale、PGI和Intel在不同平台的效率,没有数据只有结论,再有一个就是什么在什么Optron Rock Linux Cluster之类的上面编译的,没有具体的参数,看和不看没什么区别。
于是只好随便抄起一个比较熟悉的脚本,开始硬着头皮查PathScale的编译器参数,一次次的编译、测试(前几个小时的结果都是运行一会儿就段错误),折腾了四个来小时,总算搞定。于是立刻来分享编译脚本。
至于有些人说不知道Fortran编译器的参数含义,那只能一个字评价,“懒”。比如当使用ifort编译器时,VASP的官方脚本中的FCFLAGS中有很多参数,这些参数的含义,完全可以轻松使用ifort --help获取。明明放在手头的信息,却只跑来开口就问……扯远了~
编译环境:
Red Hat Enterprise Linux 6.2 x86_64 Server,
PathScale 免费版 ( EKOPath 4 ),
MPICH2 1.4.1p,
BLAS、LAPACK库来源于Quantum-ESPRESSO软件包,
FFTW使用fftw3的最新版本。
4.lib的makefile文件没什么悬念,基本不设置参数也能完成,此处不表~
4.6的makefile文件(只贴出有效部分,熟悉编译的人可以看出,该脚本是修改自ifort的makefile的。那些喜欢贴上文件来问错误的兄弟们啊,你们真的每次都懒得删除那些大段大段的脚本注释,然后排一下版再贴上来么?):
.SUFFIXES: .inc .f .f90 .F
SUFFIX=.f90
CPP_ =&&./preprocess $*$(SUFFIX)
FFLAGS =&&-freeform -march=auto -m64 -align64&&( 此处后面会比较 )
OFLAG_HIGH = $(OFLAG)
OBJ_HIGH =
OBJ_NOOPT =
DEBUG&&= -freeform -O0
INLINE = $(OFLAG)
BLAS=&&./blas.a
LAPACK= ./lapack.a
CPP& & = $(CPP_) -DMPI&&-DHOST=\"PathScale\" \
& &&&-Dkind8&&-DNGZhalf -DCACHE_SIZE=9000 -Davoidalloc \
& &&&-DMPI_BLOCK=9000&&\
& & -DRPROMU_DGEMV&&-DRACCMU_DGEMV
BLACS=$(HOME)/archives/SCALAPACK/BLACS/
SCA_=$(HOME)/archives/SCALAPACK/SCALAPACK
SCA= $(SCA_)/libscalapack.a&&\
$(BLACS)/LIB/blacsF77init_MPI-LINUX-0.a $(BLACS)/LIB/blacs_MPI-LINUX-0.a $(BLACS)/LIB/blacsF77init_MPI-LINUX-0.a
LIB& &&&= -L../vasp.4.lib -ldmy&&\
& && &../vasp.4.lib/linpack_double.o $(LAPACK) \
& && &$(SCA) $(BLAS)
FFT3D& &= fftmpi.o fftmpi_map.o fft3dlib.o& &/usr/local/lib/libfftw3.a
BASIC=& &symmetry.o symlib.o& &lattlib.o&&random.o& &
SOURCE=&&base.o& &&&mpi.o& && &smart_allocate.o& && &xml.o&&\
& && && &constant.o jacobi.o& &main_mpi.o&&scala.o& &\
& && && &asa.o& && &lattice.o&&poscar.o& &ini.o& && &setex.o& &&&radial.o&&\
& && && &pseudo.o& &mgrid.o& & mkpoints.o wave.o& && &wave_mpi.o&&$(BASIC) \
& && && &nonl.o& &&&nonlr.o& & dfast.o& & choleski2.o& & \
& && && &mix.o& && &charge.o& &xcgrad.o& &xcspin.o& & potex1.o& &potex2.o&&\
& && && &metagga.o&&constrmag.o pot.o& && &cl_shift.o force.o& & dos.o& && &elf.o& && &\
& && && &tet.o& && &hamil.o& & steep.o& & \
& && && &chain.o& & dyna.o& &&&relativistic.o LDApU.o sphpro.o&&paw.o& &us.o \
& && && &ebs.o& && &wavpre.o& &wavpre_noio.o broyden.o \
& && && &dynbr.o& & rmm-diis.o reader.o& &writer.o& &tutor.o xml_writer.o \
& && && &brent.o& & stufak.o& &fileio.o& &opergrid.o stepver.o&&\
& && && &dipol.o& & xclib.o& & chgloc.o& &subrot.o& &optreal.o& &davidson.o \
& && && &edtest.o& &electron.o shm.o& && &pardens.o&&paircorrection.o \
& && && &optics.o& &constr_cell_relax.o& &stm.o& & finite_diff.o \
& && && &elpol.o& & setlocalpp.o
vasp: $(SOURCE) $(FFT3D) $(INC) main.o
& & & & rm -f vasp
& & & & $(FCL) -o vasp $(LINK) main.o&&$(SOURCE)& &$(FFT3D) $(LIB)
makeparam: $(SOURCE) $(FFT3D) makeparam.o main.F $(INC)
& & & & $(FCL) -o makeparam&&$(LINK) makeparam.o $(SOURCE) $(FFT3D) $(LIB)
zgemmtest: zgemmtest.o base.o random.o $(INC)
& & & & $(FCL) -o zgemmtest $(LINK) zgemmtest.o random.o base.o $(LIB)
dgemmtest: dgemmtest.o base.o random.o $(INC)
& & & & $(FCL) -o dgemmtest $(LINK) dgemmtest.o random.o base.o $(LIB)
ffttest: base.o smart_allocate.o mpi.o mgrid.o random.o ffttest.o $(FFT3D) $(INC)
& & & & $(FCL) -o ffttest $(LINK) ffttest.o mpi.o mgrid.o random.o smart_allocate.o base.o $(FFT3D) $(LIB)
kpoints: $(SOURCE) $(FFT3D) makekpoints.o main.F $(INC)
& & & & $(FCL) -o kpoints $(LINK) makekpoints.o $(SOURCE) $(FFT3D) $(LIB)
clean:& & & &
& & & & -rm -f *.g *.f *.o *.L *. touch *.F
main.o: main$(SUFFIX)
& & & & $(FC) $(FFLAGS)$(DEBUG)&&$(INCS) -c main$(SUFFIX)
xcgrad.o: xcgrad$(SUFFIX)
& & & & $(FC) $(FFLAGS) $(INLINE)&&$(INCS) -c xcgrad$(SUFFIX)
xcspin.o: xcspin$(SUFFIX)
& & & & $(FC) $(FFLAGS) $(INLINE)&&$(INCS) -c xcspin$(SUFFIX)
makeparam.o: makeparam$(SUFFIX)
& & & & $(FC) $(FFLAGS)$(DEBUG)&&$(INCS) -c makeparam$(SUFFIX)
makeparam$(SUFFIX): makeparam.F main.F
base.o: base.inc base.F
mgrid.o: mgrid.inc mgrid.F
constant.o: constant.inc constant.F
lattice.o: lattice.inc lattice.F
setex.o: setexm.inc setex.F
pseudo.o: pseudo.inc pseudo.F
poscar.o: poscar.inc poscar.F
mkpoints.o: mkpoints.inc mkpoints.F
wave.o: wave.inc wave.F
nonl.o: nonl.inc nonl.F
nonlr.o: nonlr.inc nonlr.F
$(OBJ_HIGH):
& & & & $(CPP)
& & & & $(FC) $(FFLAGS) $(OFLAG_HIGH) $(INCS) -c $*$(SUFFIX)
$(OBJ_NOOPT):
& & & & $(CPP)
& & & & $(FC) $(FFLAGS) $(INCS) -c $*$(SUFFIX)
fft3dlib_f77.o: fft3dlib_f77.F
& & & & $(CPP)
& & & & $(F77) $(FFLAGS_F77) -c $*$(SUFFIX)
& & & & $(CPP)
& & & & $(FC) $(FFLAGS) $(OFLAG) $(INCS) -c $*$(SUFFIX)
.F$(SUFFIX):
& & & & $(CPP)
$(SUFFIX).o:
& & & & $(FC) $(FFLAGS) $(OFLAG) $(INCS) -c $*$(SUFFIX)
fft3dlib.o : fft3dlib.F
& & & & $(CPP)
& & & & $(FC) -freeform&&-O1&&-c $*$(SUFFIX)
fft3dfurth.o : fft3dfurth.F
& & & & $(CPP)
& & & & $(FC) -freeform& &-O1 -c $*$(SUFFIX)
radial.o : radial.F
& & & & $(CPP)
& & & & $(FC) -freeform& &-O1 -c $*$(SUFFIX)
symlib.o : symlib.F
& & & & $(CPP)
& & & & $(FC) -freeform& &-O3 -c $*$(SUFFIX)
symmetry.o : symmetry.F
& & & & $(CPP)
& & & & $(FC) -freeform& &-O3 -c $*$(SUFFIX)
dynbr.o : dynbr.F
& & & & $(CPP)
& & & & $(FC) -freeform& &-O3 -c $*$(SUFFIX)
broyden.o : broyden.F
& & & & $(CPP)
& & & & $(FC) -freeform& &-O2 -c $*$(SUFFIX)
us.o : us.F
& & & & $(CPP)
& & & & $(FC) -freeform -O3 -c $*$(SUFFIX)
wave.o : wave.F
& & & & $(CPP)
& & & & $(FC) -freeform& &-O3 -c $*$(SUFFIX)
LDApU.o : LDApU.F
& & & & $(CPP)
& & & & $(FC) -freeform& &-O3 -c $*$(SUFFIX)
首先来说一说那个 -align64 参数,理论上与ifort的 -array-heap 64 差不多,在PGI中也有这样的参数。但是对于PGI来说,用这个参数就基本意味着编译出的程序挂掉(也可能可以不挂,但是还没找到方法)~而对于ifort,不使用这个参数对于大的体系有可能就会运行报错。对于PathScale呢?答案是还不清楚……
因为本人的电脑上正在使用四个核心跑着Quantum-ESPRESSO的声子计算~无法尝试大体系,只能抢用了两个核心试了个非常小的小体系来测试一下(空间群225结构碳化钛,300eV的截断能,13x13x13的K点,PAW_PW91赝势,不期待计算结果有意义,仅仅用来比较执行效率)。
没有 -align64 的计算时间: General timing and accounting informations for this job:
========================================================
& && && && && && &Total CPU time used (sec):& && &132.811
& && && && && && && && && & User time (sec):& && &131.945
& && && && && && && && &&&System time (sec):& && &&&0.866
& && && && && && && && & Elapsed time (sec):& && &198.959
& && && && && && & Maximum memory used (kb):& && & 25852.
& && && && && && & Average memory used (kb):& && && &&&0.
& && && && && && && && &&&Minor page faults:& && && &6292
& && && && && && && && &&&Major page faults:& && && && &7
& && && && && &&&Voluntary context switches:& && && &&&51使用了 -align64 的计算时间: General timing and accounting informations for this job:
========================================================
& && && && && && &Total CPU time used (sec):& && &129.723
& && && && && && && && && & User time (sec):& && &128.919
& && && && && && && && &&&System time (sec):& && &&&0.804
& && && && && && && && & Elapsed time (sec):& && &187.774
& && && && && && & Maximum memory used (kb):& && & 25788.
& && && && && && & Average memory used (kb):& && && &&&0.
& && && && && && && && &&&Minor page faults:& && && &6283
& && && && && && && && &&&Major page faults:& && && && &1
& && && && && &&&Voluntary context switches:& && && &&&14从这里看,使用 -align64 略胜不使用的3秒,考虑到由于CPU的四个核心都在被ph.x占据,3秒的差别基本可以看作是正常波动。再看看使用ifort编译的vasp,使用的依然是来自Quantum-ESPRESSO的BLAS和LAPACK,并且FFTW也是相同的: General timing and accounting informations for this job:
========================================================
& && && && && && &Total CPU time used (sec):& && & 44.583
& && && && && && && && && & User time (sec):& && & 44.135
& && && && && && && && &&&System time (sec):& && &&&0.448
& && && && && && && && & Elapsed time (sec):& && & 63.595
& && && && && && & Maximum memory used (kb):& && & 25592.
& && && && && && & Average memory used (kb):& && && &&&0.
& && && && && && && && &&&Minor page faults:& && && &5049
& && && && && && && && &&&Major page faults:& && && &&&28
& && && && && &&&Voluntary context switches:& && && &&&86好吧,跟PathScale相比,再Intel平台上,ifort是强悍到了逆天的地步了,对于小体系的计算时间居然仅仅是PathScale编译的程序的1/3稍微多2秒……当然了,最终的结果是完全一致的,甚至包括计算的过程也完全一致。
那么在其他CPU的平台上呢?
i5没有HT的~
那open64呢?
i3 i5 i7搞混了。。。
不过你一共四个核心都给用了。。。性能还是会打折扣啊。。。
不是看绝对宿舍,是看几个不同编译器的相对速度 :D
感觉这样比不科学
比如说奇瑞和QQ都能跑120码
现在均让他们负重5吨
奇瑞降到70码,奔驰还有100码
这种感觉 - -
:( 话是这么说,可我没别的电脑可以测试了啊~先凑合着看看唄~并且,名眼人都看得出,说什么不同编译器的差别也不会差到几倍的样子啊~
要不,LS的编译一下测试测试看看?
:shuai: 想做静态编译,也就是不用挂载PathScale的编译库文件,结果找不到方法~怎么这些免费版的编译器都爱搞这套呢……
:D 区长良心大大的坏了,专挑出这么一句来~
PathScale官方说:/building_code/acml.html
不过ACML的官网没有提及PathScale是真的~
有是有~不过Mac Pro都是Intel平台的,还是ifort+MKL比较给力吧~并且,PathScale在Mac平台似乎还是Beta版~成熟点的话可以考虑PGI~
开源嘛,你懂的:D
呃~ifort可以申请一个月的试用啊~反正把程序编译完了,就不管它开不开源有没有证书了~
:D 当然,也有泄露了的MacOS用ifort和icc,并且带MKL,带无下限证书的~
实在没办法就只能那样做了
:D 我觉得最好这么做,PathScale的bug比较多,编译过了也不见得能顺利运行,何况数学库方面,除了AMD平台上PathScale+ACML比较给力,其他的地方没有非常合适的库~
研究生必备与500万研究生在线互动!
扫描下载送金币小木虫 --- 500万硕博科研人员喜爱的学术科研平台
&&查看话题
求助:VASP编译问题
各位大神,VASP.5.2编译遇到问题,求帮助,谢谢大家!
系统:ubuntu-14.04-desktop-amd64;ifort, icc, icpc, mpif90都没有问题。
vasp.5.lib也没有问题(出现make: ‘libdmy.a’ is up to date)。
在编译vasp时有问题:
/home/ubuntu-1/vasp_setups/openmpi-1.6.5/bin/mpif90 -FR -lowercase -assume byterecl&&-O3&&-c base.f90
/home/ubuntu-1/vasp_setups/openmpi-1.6.5/bin/mpif90: error while loading shared libraries: libimf.so: cannot open shared object file: No such file or directory
make: ***&&Error 127
说找不到libimf.so,我查了下这个文件在:/opt/intel/composer_xe_2011_sp1.11.339/compiler/lib/intel64。加到mpi的library里面没有用,还是这个提示!
大家看看,makefile如下:
.SUFFIXES: .inc .f .f90 .F
#-----------------------------------------------------------------------
# Makefile for Intel Fortran compiler for Pentium/Athlon/Opteron
# bases systems
# we recommend this makefile for both Intel as well as AMD systems
# for AMD based systems appropriate BLAS and fftw libraries are
# however mandatory (whereas they are optional for Intel platforms)
# The makefile was tested only under Linux on Intel and AMD platforms
# the following compiler versions have been tested:
#&&- ifc.7.1&&works stable somewhat slow but reliably
#&&- ifc.8.1&&fails to compile the code properly
#&&- ifc.9.1&&recommended (both for 32 and 64 bit)
#&&- ifc.10.1 partially recommended (both for 32 and 64 bit)
#& && && && & tested build
Package ID: l_fc_p_10.1.015
#& && && && & the gamma only mpi version can not be compiles
#& && && && & using ifc.10.1
# it might be required to change some of library pathes, since
# LINUX installation vary a lot
# Hence check ***ALL*** options in this makefile very carefully
#-----------------------------------------------------------------------
# BLAS must be installed on the machine
# there are several options:
# 1) very slow but works:
#& &retrieve the lapackage from ftp.netlib.org
#& &and compile the blas routines (BLAS/SRC directory)
#& &please use g77 or f77 for the compilation. When I tried to
#& &use pgf77 or pgf90 for BLAS, VASP hang up when calling
#& &ZHEEV&&(however this was with lapack 1.1 now I use lapack 2.0)
# 2) more desirable: get an optimized BLAS
# the two most reliable packages around are presently:
# 2a) Intels own optimised BLAS (PIII, P4, PD, PC2, Itanium)
#& &&&/software/products/mkl/
#& &this is really excellent, if you use Intel CPU's
# 2b) probably fastest SSE2 (4 GFlops on P4, 2.53 GHz, 16 GFlops PD,
#& &&&around 30 GFlops on Quad core)
#& &Kazushige Goto's BLAS
#& &http://www.cs.utexas.edu/users/kgoto/signup_first.html
#& &http://www.tacc.utexas.edu/resources/software/
#-----------------------------------------------------------------------
# all CPP processed fortran files have the extension .f90
SUFFIX=.f90
#-----------------------------------------------------------------------
# fortran compiler and linker
#-----------------------------------------------------------------------
FC=/opt/intel/composer_xe_2011_sp1.11.339/bin/intel64/ifort
# fortran linker
#-----------------------------------------------------------------------
# whereis CPP ?? (I need CPP, can't use gcc with proper options)
# that's the location of gcc for SUSE 5.3
#&&CPP_& &=&&/usr/lib/gcc-lib/i486-linux/2.7.2/cpp -P -C
# that's probably the right line for some Red Hat distribution:
#&&CPP_& &=&&/usr/lib/gcc-lib/i386-redhat-linux/2.7.2.3/cpp -P -C
#&&SUSE X.X, maybe some Red Hat distributions:
CPP_ =&&./preprocess &$*.F | /usr/bin/cpp -P -C -traditional &$*$(SUFFIX)
#-----------------------------------------------------------------------
# possible options for CPP:
# NGXhalf& && && && & charge density& &reduced in X direction
# wNGXhalf& && && && &gamma point only reduced in X direction
# avoidalloc& && && & avoid ALLOCATE if possible
# PGF90& && && && && &work around some for some PGF90 / IFC bugs
# CACHE_SIZE& && && & 1000 for PII,PIII, 5000 for Athlon,
# RPROMU_DGEMV& && &&&use DGEMV instead of DGEMM in RPRO (depends on used BLAS)
# RACCMU_DGEMV& && &&&use DGEMV instead of DGEMM in RACC (depends on used BLAS)
#-----------------------------------------------------------------------
CPP& &&&= $(CPP_)&&-DHOST=\&LinuxIFC\& \
& && && & -Dkind8 -DCACHE_SIZE=12000 -DPGF90 -Davoidalloc -DNGXhalf \
& && && & -DRPROMU_DGEMV&&-DRACCMU_DGEMV \
#-----------------------------------------------------------------------
# general fortran flags&&(there must a trailing blank on this line)
# byterecl is strictly required for ifc, since otherwise
# the WAVECAR file becomes huge
#-----------------------------------------------------------------------
FFLAGS =&&-FR -lowercase -assume byterecl
#-----------------------------------------------------------------------
# optimization
# we have tested whether higher optimisation improves performance
# -axK&&SSE1 optimization,&&but also generate code executable on all mach.
#& && & xK improves performance somewhat on XP, and a is required in order
#& && & to run the code on older Athlons as well
# -xW& &SSE2 optimization
# -axW&&SSE2 optimization,&&but also generate code executable on all mach.
# -tpp6 P3 optimization
# -tpp7 P4 optimization
#-----------------------------------------------------------------------
# ifc.9.1, ifc.10.1 recommended
OFLAG_HIGH = $(OFLAG)
OBJ_HIGH =
OBJ_NOOPT =
DEBUG&&= -FR -O0
INLINE = $(OFLAG)
#-----------------------------------------------------------------------
# the following lines specify the position of BLAS&&and LAPACK
# VASP works fastest with the libgoto library
# so that's what we recommend
#-----------------------------------------------------------------------
# mkl.10.0
# set -DRPROMU_DGEMV&&-DRACCMU_DGEMV in the CPP lines
#BLAS=-L/opt/intel/mkl100/lib/em64t -lmkl -lpthread
# even faster for VASP Kazushige Goto's BLAS
# http://www.cs.utexas.edu/users/kgoto/signup_first.html
# parallel goto version requires sometimes -libverbs
BLAS=&&/home/ubuntu-1/vasp_setups/GotoBLAS2/libgoto2.so
# LAPACK, simplest use vasp.5.lib/lapack_double
LAPACK= ../vasp.5.lib/lapack_double.o
# use the mkl Intel lapack
#LAPACK= -lmkl_lapack
#-----------------------------------------------------------------------
LIB = -limf -lm -L../vasp.5.lib -ldmy \
& &&&../vasp.5.lib/linpack_double.o $(LAPACK) \
& &&&$(BLAS)
# options for linking, nothing is required (usually)
#-----------------------------------------------------------------------
# fft libraries:
# VASP.5.2 can use fftw.3.1.X (http://www.fftw.org)
# since this version is faster on P4 machines, we recommend to use it
#-----------------------------------------------------------------------
FFT3D& &= fft3dfurth.o fft3dlib.o
# alternatively: fftw.3.1.X is slighly faster and should be used if available
#FFT3D& &= fftw3d.o fft3dlib.o& &/opt/libs/fftw-3.1.2/lib/libfftw3.a
#=======================================================================
# MPI section, uncomment the following lines until
#& & general&&rules and compile lines
# presently we recommend OPENMPI, since it seems to offer better
# performance than lam or mpich
# !!! Please do not send me any queries on how to install MPI, I will
# certainly not answer them !!!!
#=======================================================================
#-----------------------------------------------------------------------
# fortran linker for mpi
#-----------------------------------------------------------------------
FC=/home/ubuntu-1/vasp_setups/openmpi-1.6.5/bin/mpif90
#-----------------------------------------------------------------------
# additional options for CPP in parallel version (see also above):
# NGZhalf& && && && && &charge density& &reduced in Z direction
# wNGZhalf& && && && &&&gamma point only reduced in Z direction
# scaLAPACK& && && && & use scaLAPACK (usually slower on 100 Mbit Net)
#-----------------------------------------------------------------------
CPP& & = $(CPP_) -DMPI&&-DHOST=\&LinuxIFC\& -DIFC \
& &&&-Dkind8 -DCACHE_SIZE=4000 -DPGF90 -Davoidalloc -DNGZhalf \
& &&&-DMPI_BLOCK=8000 \
& &&&-DRPROMU_DGEMV&&-DRACCMU_DGEMV \
#-----------------------------------------------------------------------
# location of SCALAPACK
# if you do not use SCALAPACK simply leave that section commented out
#-----------------------------------------------------------------------
MKL_PATH=/opt/intel/composer_xe_2011_sp1.11.339/mkl/lib/intel64
BLAS= -L$(MKL_PATH) -libmkl_blas95_lp64
LAPACK= -L$(MKL_PATH) -libmkl_intel_lp64&&-libmkl_sequential -libmkl_core -libmkl_pgi_thread
SCA= $(MKL_PATH)/libmkl_scalapack_lp64.a $(MKL_PATH)/libmkl_blacs_openmpi_lp64.a
#BLACS=$(HOME)/archives/SCALAPACK/BLACS/
#SCA_=$(HOME)/archives/SCALAPACK/SCALAPACK
#SCA= $(SCA_)/libscalapack.a&&\
# $(BLACS)/LIB/blacsF77init_MPI-LINUX-0.a $(BLACS)/LIB/blacs_MPI-LINUX-0.a $(BLACS)/LIB/blacsF77init_MPI-LINUX-0.a
#-----------------------------------------------------------------------
# libraries for mpi
#-----------------------------------------------------------------------
LIB = -L/opt/intel/composer_xe_2011_sp1.11.339/compiler/lib/intel64 -libimf -limf -lm \
& && &-limf -lm -L../vasp.5.lib -ldmy&&\
& && &../vasp.5.lib/linpack_double.o $(LAPACK) \
& && &$(SCA) $(BLAS) $(BLACS) \
# FFT: fftmpi.o with fft3dlib of Juergen Furthmueller
#FFT3D& &= fftmpi.o fftmpi_map.o fft3dfurth.o fft3dlib.o
# alternatively: fftw.3.1.X is slighly faster and should be used if available
#FFT3D& &= fftmpi.o fftmpi_map.o fftw3d.o fft3dlib.o&&/opt/libs/fftw-3.1.2/lib/libfftw3.a
FFT3D& &= fftmpi.o fftmpi_map.o fftw3d.o fft3dlib.o&&/opt/intel/composer_xe_2011_sp1.11.339/mkl/interfaces/fftw3xf/libfftw3xf_intel.a
#-----------------------------------------------------------------------
# general rules and compile lines
#-----------------------------------------------------------------------
BASIC=& &symmetry.o symlib.o& &lattlib.o&&random.o& &
SOURCE=&&base.o& &&&mpi.o& && &smart_allocate.o& && &xml.o&&\
& && && &constant.o jacobi.o& &main_mpi.o&&scala.o& &\
& && && &asa.o& && &lattice.o&&poscar.o& &ini.o& && & xclib.o& &&&xclib_grad.o \
& && && &radial.o& &pseudo.o& &mgrid.o& & gridq.o& &&&ebs.o&&\
& && && &mkpoints.o wave.o& &&&wave_mpi.o&&wave_high.o&&\
& && && &$(BASIC)& &nonl.o& &&&nonlr.o& & nonl_high.o dfast.o& & choleski2.o \
& && && &mix.o& && &hamil.o& & xcgrad.o& &xcspin.o& & potex1.o& &potex2.o&&\
& && && &metagga.o constrmag.o cl_shift.o relativistic.o LDApU.o \
& && && &paw_base.o egrad.o& & pawsym.o& &pawfock.o&&pawlhf.o& & paw.o& &\
& && && &mkpoints_full.o& && & charge.o& &dipol.o& & pot.o&&\
& && && &dos.o& && &elf.o& && &tet.o& && &tetweight.o hamil_rot.o \
& && && &steep.o& & chain.o& & dyna.o& &&&sphpro.o& & us.o&&core_rel.o \
& && && &aedens.o& &wavpre.o& &wavpre_noio.o broyden.o \
& && && &dynbr.o& & rmm-diis.o reader.o& &writer.o& &tutor.o xml_writer.o \
& && && &brent.o& & stufak.o& &fileio.o& &opergrid.o stepver.o&&\
& && && &chgloc.o& &fast_aug.o fock.o& &&&mkpoints_change.o sym_grad.o \
& && && &mymath.o& &internals.o dimer_heyden.o dvvtrajectory.o vdwforcefield.o \
& && && &hamil_high.o nmr.o& & force.o \
& && && &pead.o& &&&subrot.o& &subrot_scf.o pwlhf.o&&gw_model.o optreal.o& &davidson.o \
& && && &electron.o rot.o&&electron_all.o shm.o& & pardens.o&&paircorrection.o \
& && && &optics.o& &constr_cell_relax.o& &stm.o& & finite_diff.o elpol.o& & \
& && && &hamil_lr.o rmm-diis_lr.o&&subrot_cluster.o subrot_lr.o \
& && && &lr_helper.o hamil_lrf.o& &elinear_response.o ilinear_response.o \
& && && &linear_optics.o linear_response.o& &\
& && && &setlocalpp.o&&wannier.o electron_OEP.o electron_lhf.o twoelectron4o.o \
& && && &ratpol.o screened_2e.o wave_cacher.o chi_base.o wpot.o local_field.o \
& && && &ump2.o bse.o acfdt.o chi.o sydmat.o
vasp: $(SOURCE) $(FFT3D) $(INC) main.o
& & & & rm -f vasp
& & & & $(FCL) -o vasp main.o&&$(SOURCE)& &$(FFT3D) $(LIB) $(LINK)
makeparam: $(SOURCE) $(FFT3D) makeparam.o main.F $(INC)
& & & & $(FCL) -o makeparam&&$(LINK) makeparam.o $(SOURCE) $(FFT3D) $(LIB)
zgemmtest: zgemmtest.o base.o random.o $(INC)
& & & & $(FCL) -o zgemmtest $(LINK) zgemmtest.o random.o base.o $(LIB)
dgemmtest: dgemmtest.o base.o random.o $(INC)
& & & & $(FCL) -o dgemmtest $(LINK) dgemmtest.o random.o base.o $(LIB)
ffttest: base.o smart_allocate.o mpi.o mgrid.o random.o ffttest.o $(FFT3D) $(INC)
& & & & $(FCL) -o ffttest $(LINK) ffttest.o mpi.o mgrid.o random.o smart_allocate.o base.o $(FFT3D) $(LIB)
kpoints: $(SOURCE) $(FFT3D) makekpoints.o main.F $(INC)
& & & & $(FCL) -o kpoints $(LINK) makekpoints.o $(SOURCE) $(FFT3D) $(LIB)
clean:& & & &
& & & & -rm -f *.g *.f *.o *.L *. touch *.F
main.o: main$(SUFFIX)
& & & & $(FC) $(FFLAGS)$(DEBUG)&&$(INCS) -c main$(SUFFIX)
xcgrad.o: xcgrad$(SUFFIX)
& & & & $(FC) $(FFLAGS) $(INLINE)&&$(INCS) -c xcgrad$(SUFFIX)
xcspin.o: xcspin$(SUFFIX)
& & & & $(FC) $(FFLAGS) $(INLINE)&&$(INCS) -c xcspin$(SUFFIX)
makeparam.o: makeparam$(SUFFIX)
& & & & $(FC) $(FFLAGS)$(DEBUG)&&$(INCS) -c makeparam$(SUFFIX)
makeparam$(SUFFIX): makeparam.F main.F
# MIND: I do not have a full dependency list for the include
# and MODULES: here are only the minimal basic dependencies
# if one strucuture is changed then touch_dep must be called
# with the corresponding name of the structure
base.o: base.inc base.F
mgrid.o: mgrid.inc mgrid.F
constant.o: constant.inc constant.F
lattice.o: lattice.inc lattice.F
setex.o: setexm.inc setex.F
pseudo.o: pseudo.inc pseudo.F
poscar.o: poscar.inc poscar.F
mkpoints.o: mkpoints.inc mkpoints.F
wave.o: wave.inc wave.F
nonl.o: nonl.inc nonl.F
nonlr.o: nonlr.inc nonlr.F
$(OBJ_HIGH):
& & & & $(CPP)
& & & & $(FC) $(FFLAGS) $(OFLAG_HIGH) $(INCS) -c $*$(SUFFIX)
$(OBJ_NOOPT):
& & & & $(CPP)
& & & & $(FC) $(FFLAGS) $(INCS) -c $*$(SUFFIX)
fft3dlib_f77.o: fft3dlib_f77.F
& & & & $(CPP)
& & & & $(F77) $(FFLAGS_F77) -c $*$(SUFFIX)
& & & & $(CPP)
& & & & $(FC) $(FFLAGS) $(OFLAG) $(INCS) -c $*$(SUFFIX)
.F$(SUFFIX):
& & & & $(CPP)
$(SUFFIX).o:
& & & & $(FC) $(FFLAGS) $(OFLAG) $(INCS) -c $*$(SUFFIX)
# special rules
#-----------------------------------------------------------------------
# these special rules are cummulative (that is once failed
#& &in one compiler version, stays in the list forever)
# -tpp5|6|7 P, PII-PIII, PIV
# -xW use SIMD (does not pay of on PII, since fft3d uses double prec)
# all other options do no affect the code performance since -O1 is used
fft3dlib.o : fft3dlib.F
& & & & $(CPP)
& & & & $(FC) -FR -lowercase -O2 -c $*$(SUFFIX)
fft3dfurth.o : fft3dfurth.F
& & & & $(CPP)
& & & & $(FC) -FR -lowercase -O1 -c $*$(SUFFIX)
radial.o : radial.F
& & & & $(CPP)
& & & & $(FC) -FR -lowercase -O1 -c $*$(SUFFIX)
symlib.o : symlib.F
& & & & $(CPP)
& & & & $(FC) -FR -lowercase -O1 -c $*$(SUFFIX)
symmetry.o : symmetry.F
& & & & $(CPP)
& & & & $(FC) -FR -lowercase -O1 -c $*$(SUFFIX)
wave_mpi.o : wave_mpi.F
& & & & $(CPP)
& & & & $(FC) -FR -lowercase -O1 -c $*$(SUFFIX)
wave.o : wave.F
& & & & $(CPP)
& & & & $(FC) -FR -lowercase -O1 -c $*$(SUFFIX)
dynbr.o : dynbr.F
& & & & $(CPP)
& & & & $(FC) -FR -lowercase -O1 -c $*$(SUFFIX)
asa.o : asa.F
& & & & $(CPP)
& & & & $(FC) -FR -lowercase -O1 -c $*$(SUFFIX)
broyden.o : broyden.F
& & & & $(CPP)
& & & & $(FC) -FR -lowercase -O2 -c $*$(SUFFIX)
us.o : us.F
& & & & $(CPP)
& & & & $(FC) -FR -lowercase -O1 -c $*$(SUFFIX)
LDApU.o : LDApU.F
& & & & $(CPP)
& & & & $(FC) -FR -lowercase -O2 -c $*$(SUFFIX)
安装Intel的时候应该会有提示的,将这个加入.bashrc
source /opt/intel/composer_xe_2011_sp1.11.339/bin/compilervars.sh intel64
谢谢回复,在~/.bashrc中加了,还是没有变。
下面是~/.bashrc中的设置:
export LD_LIBRARY_PATH=/home/ubuntu-1/vasp_setups/openmpi-1.6.5/bin:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=/home/ubuntu-1/vasp_setups/openmpi-1.6.5/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=/home/ubuntu-1/vasp_setups/openmpi-1.6.5:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=/opt/intel/composer_xe_2011_sp1.11.339/mkl/lib/intel64:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=/opt/intel/composer_xe_2011_sp1.11.339/compiler/lib/intel64:$LD_LIBRARY_PATH
source /opt/intel/composer_xe_2011_sp1.11.339/bin/compilervars.sh intel64
不需要这么多,只要
source /opt/intel/composer_xe_2011_sp1.11.339/bin/compilervars.sh intel64
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/ubuntu-1/vasp_setups/openmpi-1.6.5/lib
这两行就够了,另外你的openmpi是安装在/home/ubuntu-1/vasp_setups/openmpi-1.6.5路径下吗?默认是安装在/opt/路径下。
如果是安装在你写的路径下,修改完bashrc后source ~/.bashrc一下,让修改生效。
你的Makefile也有些问题,不知道你是要串行版本还是并行版本,要是并行版本的最好把串行部分注释掉。还有就是既然用libgoto2数学库,就不需要Intel的mkl数学库。你的Makefile里指定了两种数学库,编译就搞乱了。建议使用Intel的数学库
# mkl.10.0
# set -DRPROMU_DGEMV&&-DRACCMU_DGEMV in the CPP lines
#BLAS=-L/opt/intel/mkl100/lib/em64t -lmkl -lpthread
BLAS=-L/opt/intel/mkl/lib/intel64 -lmkl_intel_lp64&&-lmkl_sequential -lmkl_core -lpthread
并行部分的
MKL_PATH=/opt/intel/composer_xe_2011_sp1.11.339/mkl/lib/intel64
BLAS= -L$(MKL_PATH) -libmkl_blas95_lp64
LAPACK= -L$(MKL_PATH) -libmkl_intel_lp64&&-libmkl_sequential -libmkl_core -libmkl_pgi_thread
SCA= $(MKL_PATH)/libmkl_scalapack_lp64.a $(MKL_PATH)/libmkl_blacs_openmpi_lp64.a
LIB = -L/opt/intel/composer_xe_2011_sp1.11.339/compiler/lib/intel64 -libimf -limf -lm \
& && &-limf -lm -L../vasp.5.lib -ldmy&&\
& && &../vasp.5.lib/linpack_double.o $(LAPACK) \
& && &$(SCA) $(BLAS) $(BLACS) \
LIB& &&&= -L../vasp.5.lib -ldmy&&\
& && &../vasp.5.lib/linpack_double.o $(LAPACK) \
& && &$(SCA) $(BLAS)
我的openmpi确实安装在/home/ubuntu-1/vasp_setups/openmpi-1.6.5,
修改后,source ~/.bashrc,还是不行。
我用的是VMware的虚拟机,这个有影响吗?
你看看我给你改的Makefile,
虚拟机跟真机是一模一样的,编译没有任何问题!
谢谢啦,按你说的改了。
还是原来的错误,没变!
我再想想别的办法吧。
研究生必备与500万研究生在线互动!
扫描下载送金币

我要回帖

更多关于 菜鸟的专属大神 的文章

 

随机推荐