VASP单机安装

简单的记了一下,在ubuntu 9.10和fedora 12中安装成功,硬件平台是thinkpad x200和lenovo扬天M8200四核版本的台式机。最后在一个神州的本子上也实现了,CPU是赛扬M的。

 

<!-- /* Font Definitions */ @font-face{font-family:宋体;panose-1:2 1 6 0 3 1 1 1 1 1;mso-font-alt:SimSun;mso-font-charset:134;mso-generic-font-family:auto;mso-font-pitch:variable;mso-font-signature:3 680460288 22 0 262145 0;}@font-face{font-family:"Cambria Math";panose-1:2 4 5 3 5 4 6 3 2 4;mso-font-charset:1;mso-generic-font-family:roman;mso-font-format:other;mso-font-pitch:variable;mso-font-signature:0 0 0 0 0 0;}@font-face{font-family:Calibri;panose-1:2 15 5 2 2 2 4 3 2 4;mso-font-charset:0;mso-generic-font-family:swiss;mso-font-pitch:variable;mso-font-signature:-520092929 1073786111 9 0 415 0;}@font-face{font-family:微软雅黑;panose-1:2 11 5 3 2 2 4 2 2 4;mso-font-charset:134;mso-generic-font-family:swiss;mso-font-pitch:variable;mso-font-signature:-2147483001 672087122 22 0 262175 0;}@font-face{font-family:"/@宋体";panose-1:2 1 6 0 3 1 1 1 1 1;mso-font-charset:134;mso-generic-font-family:auto;mso-font-pitch:variable;mso-font-signature:3 680460288 22 0 262145 0;}@font-face{font-family:"/@微软雅黑";panose-1:2 11 5 3 2 2 4 2 2 4;mso-font-charset:134;mso-generic-font-family:swiss;mso-font-pitch:variable;mso-font-signature:-2147483001 672087122 22 0 262175 0;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal{mso-style-unhide:no;mso-style-qformat:yes;mso-style-parent:"";margin:0cm;margin-bottom:.0001pt;text-align:justify;text-justify:inter-ideograph;mso-pagination:none;font-size:10.5pt;mso-bidi-font-size:11.0pt;font-family:"Calibri","sans-serif";mso-ascii-font-family:Calibri;mso-ascii-theme-font:minor-latin;mso-fareast-font-family:宋体;mso-fareast-theme-font:minor-fareast;mso-hansi-font-family:Calibri;mso-hansi-theme-font:minor-latin;mso-bidi-font-family:"Times New Roman";mso-bidi-theme-font:minor-bidi;mso-font-kerning:1.0pt;}a:link, span.MsoHyperlink{mso-style-priority:99;color:blue;mso-themecolor:hyperlink;text-decoration:underline;text-underline:single;}a:visited, span.MsoHyperlinkFollowed{mso-style-noshow:yes;mso-style-priority:99;color:purple;mso-themecolor:followedhyperlink;text-decoration:underline;text-underline:single;}p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph{mso-style-priority:34;mso-style-unhide:no;mso-style-qformat:yes;margin:0cm;margin-bottom:.0001pt;text-align:justify;text-justify:inter-ideograph;text-indent:21.0pt;mso-char-indent-count:2.0;mso-pagination:none;font-size:10.5pt;mso-bidi-font-size:11.0pt;font-family:"Calibri","sans-serif";mso-ascii-font-family:Calibri;mso-ascii-theme-font:minor-latin;mso-fareast-font-family:宋体;mso-fareast-theme-font:minor-fareast;mso-hansi-font-family:Calibri;mso-hansi-theme-font:minor-latin;mso-bidi-font-family:"Times New Roman";mso-bidi-theme-font:minor-bidi;mso-font-kerning:1.0pt;}.MsoChpDefault{mso-style-type:export-only;mso-default-props:yes;mso-bidi-font-family:"Times New Roman";mso-bidi-theme-font:minor-bidi;} /* Page Definitions */ @page{mso-page-border-surround-header:no;mso-page-border-surround-footer:no;}@page Section1{size:612.0pt 792.0pt;margin:72.0pt 90.0pt 72.0pt 90.0pt;mso-header-margin:36.0pt;mso-footer-margin:36.0pt;mso-paper-source:0;}div.Section1{page:Section1;} /* List Definitions */ @list l0{mso-list-id:1890411566;mso-list-type:hybrid;mso-list-template-ids:-2064081506 1906877590 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}@list l0:level1{mso-level-text:%1.;mso-level-tab-stop:none;mso-level-number-position:left;margin-left:18.0pt;text-indent:-18.0pt;}ol{margin-bottom:0cm;}ul{margin-bottom:0cm;}-->

I Vasp Installation Document

操作系统环境:Ubuntu 9.10 x32

硬件环境:VMWare Workstation at Intel P8600Celeron M 430

1.  安装IntelFortran Compiler非商业版本

检测到CriticalPre-requisites,安装g++,执行:

sudo apt-getinstall g++

完成上述检查后检测到几个小毛病,大意是:JREnot foundOS unknownglibc not supportbinutils package not supportJRE不装了,太大,不知道下到何年马月,更新了一下binutils,还是这几个毛病,不管了,继续。

安装完了fortran编译器,设置环境变量:

source /opt/intel/Compiler/11.1/069/bin/ifortvars.sh ia32

这个是一个临时的方法,如果下次还要用到ifort的话需要把文件写入/etc/profile中,这个方法网上有,自己找吧。

2.  解压Atlas的数学函数库

          这个在网上有,链接是http://www.netlib.org/atlas/archives/linux/。不过需要注意的是,这里面有很多处理器版本,我的两个实验平台都支持SSE2,所以选择P4,如果是AMD的选择Athlon版本的二进制包。

3.  编译Vasp

         首先需要安装libstdc++5的库,Ubuntu9.10默认只安装了libstdc++5,执行下面两条命令

wget http://mirros.kernel.org/ubuntu/pool/universe/g/gcc-3.3/libstdc++5_3.3.6-17ubuntu1_i386.deb

Sudo dpkg –I libstdc++5_3.3.6-17ubuntu1_i386.deb

         接着编译Vasplib,进入目录vasp.4.lib,删除所有的.o文件,选择需要的make文件,我的是用makefile.linux_ifc_P4,然后修改这个makefile

         19行吧ifc改成ifort。然后编译:

         make –f makefile.linux_ifc_P4

         这个时候会出现f951错误,大意是execvp找不到啥东西,这个是gccbug,卸载gccg++,删掉所有.o文件重新编译即可。编译完成后会得到libdmy.a

         接下来安装gfortran,这个是为了下面安装fftw的,命令很简单:

         apt-get install gfortran

         接着安装fftw3,这个也可以在官网上找到http://www.fftw.org

         解压后进入fftw的目录,需要配置几个东西:

         export CC=”gcc –m32”

         export F77=”gfortran –m32”

         然后安装fftw:

         ./configure –enable-sse2 –prefix=/opt/libs/fftw3.2.2

         make

         make install

         安装完毕后就可以开始编译vasp了,进入vasp.4.6的文件夹,编辑makefile.linux_ifc_P4文件,需要更改下面几个地方:

         第一个是编译器的选择,把ifc改成ifort

         第二个是Atlas函数库的home路径,改成/opt/Linux_P4SSE2/lib(不同的CPU路径不一样),接着把下面一行的BLAS路径的注释取消掉;

         第三个是去掉300行左右的编译命令的-e95选项;

         然后把/opt/intel/Compiler/11.1/069/mkl/include/fftw3.f文件拷到vasp.4.6目录下面,更改当前目录下的preprocess文件的权限为755。然后开始编译吧,最后会得到vasp可执行文件的

4.  乱七八糟的处理软件安装,lev等等……

         安装lev的时候需要安装fortran编译器g77,本来想用intel Fortran Compiler代替的,结果不行,f77,fort,gfortran都不行,没办法只好安装g77了。g77安装比较简单:

1)至ftp://ftp.ntu.edu.tw/pub/gnu/gnu/g77下载g77-0.5.23.tar.gz
至ftp://ftp.ntu.edu.tw/pub/gnu/gnu/gcc下载gcc-2.8.1.tar.gz
确定这两个东西是相容的(g77-0.5.23.tar.gz跟gcc-2.8.*.tar.gz等版本相容)
可以先解压g77-0.5.*.tar.gz然后查看解压后资料夹内的./f/INSTALL档案查看跟它相容的gcc版本.

2)用root的身分在/usr/下制造一个叫FSF的目录,如以下指令
#cd /usr
#mkdir FSF
将下载好的两个压缩档移到FSF目录中
#mv g77-0.5.23.tar.gz /usr/FSF
#mv gcc-2.8.1.tar.gz /usr/FSF

3)接下来跟着以下指令一步一步做,不要改变任何细节:
#cd /usr/src
#gunzip -c < /usr/FSF/gcc-2.8.1.tar.gz | tar xf - (注意|是pipe)
#gunzip -c < /usr/FSF/g77-0.5.23.tar.gz | tar xf -
#ln -s gcc-2.8.1 gcc
#ln -s g77-0.5.23 g77
#mv -i g77/* gcc
#cd gcc
#./configure –prefix=/usr
#make bootstrap (这里请耐心等它跑完这边最容易出错)
#make compare
#rm -fr stage1
#make -k install
#g77 -v (检查g77版本确定已安装OK)

4)详细说明请参看g77-0.5.23.tar.gz解压后的./g77-0.5.23/f/INSTALL档

 

你可能感兴趣的:(VASP单机安装)