欢迎来到天天文库
浏览记录
ID:24863341
大小:58.18 KB
页数:7页
时间:2018-11-16
《lammps安装步骤详解》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、一lamps非并行安装1在终端输入:cd/mnt(源码包lammps.tar.gz放在/mnt下(cp/home/lab/Desktop/lammps.tar.gz/mnt))gunziplamps.tar.gztarxvflamps.tarmvlammps-5Dec10lmp(重命名为lmp)cdlmp/src/STUBSmakecleanmakecd/mnt/lmp/src/MAKEviMakefile.serial后出现#g++=RedHatLinuxbox,g++4,gfortran,noMPI,noFFTSHE
2、LL=/bin/sh#---------------------------------------------------------------------#compiler/linkersettings#specifyflagsandlibrariesneededforyourcompilerCC= g++4g++4该为g++CCFLAGS= -g-ODEPFLAGS= -MLINK= g++4g++4改为g++LINKFLAGS= -g-OLIB= ARCHIVE
3、= arARFLAGS= -rcSIZE= size#---------------------------------------------------------------------然后存档,退出,终端输入cd/mnt/lmp/srcmakeclean-allmakeserial之后linux开始编译,最后会在/mnt/lmp/src下生成lmp_serial的可执行文件。mvlmp_seriallmp2计算一example终端输入:cd/mnt/lmp/e*/shearcp/mnt/lmp/
4、src/lmp/mnt/lmp/e*/shear./lmp5、pmpich2-1.3.1.tar.gztarxvfmpich2-1.3.1.tarcd/mpich2-1.3.1./configure–prefix==/opt/mpichmakemakeinstall(mpich即安装在/opt/mpich下)然后配置环境变量终端输入:cdvi.bashrc开始编译为If[-f/etc/bashrc];then./etc/bashrcfiexpotPATH=/opt/mpich/bin:$PATHexportLD_LIBRARY_PATH=/opt/mpich/lib:/opt/ff6、tw/lib:$LD_LIBRARY_PATH3安装lammpscd/mntgunziplammps.tar.gztarxvflammps.tarmvlammps-5Dec10lmpcd/lmp/srcmakeyes-allmakeno-gpumakeno-user-atc(几个特殊的package:meam,poems,reax,gpu,user-atc需要特别安装,如下)cd/mnt/lmp/lib/meamlsmake–fMakefile.gfortran(安装meam)cd/mnt/lmp/lib/poemsls7、make–fMakefile.g++cd/mnt/lmp/lib/reaxlsmake–fMakefile.gfortran(然后对Makefile.serial文件进行编译)cd/mnt/lmp/src/MAKEviMakefile.serial(按下i可修改)#g++=RedHatLinuxbox,g++4,gfortran,MPICH2,FFTWSHELL=/bin/sh#---------------------------------------------------------------------#co8、mpiler/linkersettings#specifyflagsandlibrariesneededforyourcompilerCC= g++4g++4改为mpic++CCFLAGS= -g-ODEPFLAGS= -MLINK= g++4g++4改为mpic++LINKFLAGS=
5、pmpich2-1.3.1.tar.gztarxvfmpich2-1.3.1.tarcd/mpich2-1.3.1./configure–prefix==/opt/mpichmakemakeinstall(mpich即安装在/opt/mpich下)然后配置环境变量终端输入:cdvi.bashrc开始编译为If[-f/etc/bashrc];then./etc/bashrcfiexpotPATH=/opt/mpich/bin:$PATHexportLD_LIBRARY_PATH=/opt/mpich/lib:/opt/ff
6、tw/lib:$LD_LIBRARY_PATH3安装lammpscd/mntgunziplammps.tar.gztarxvflammps.tarmvlammps-5Dec10lmpcd/lmp/srcmakeyes-allmakeno-gpumakeno-user-atc(几个特殊的package:meam,poems,reax,gpu,user-atc需要特别安装,如下)cd/mnt/lmp/lib/meamlsmake–fMakefile.gfortran(安装meam)cd/mnt/lmp/lib/poemsls
7、make–fMakefile.g++cd/mnt/lmp/lib/reaxlsmake–fMakefile.gfortran(然后对Makefile.serial文件进行编译)cd/mnt/lmp/src/MAKEviMakefile.serial(按下i可修改)#g++=RedHatLinuxbox,g++4,gfortran,MPICH2,FFTWSHELL=/bin/sh#---------------------------------------------------------------------#co
8、mpiler/linkersettings#specifyflagsandlibrariesneededforyourcompilerCC= g++4g++4改为mpic++CCFLAGS= -g-ODEPFLAGS= -MLINK= g++4g++4改为mpic++LINKFLAGS=
此文档下载收益归作者所有