欢迎来到天天文库
浏览记录
ID:47037159
大小:43.50 KB
页数:7页
时间:2019-07-04
《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,noFFTSHELL=/bin/sh#
2、---------------------------------------------------------------------#compiler/linkersettings#specifyflagsandlibrariesneededforyourcompilerCC= g++4g++4该为g++CCFLAGS= -g-ODEPFLAGS= -MLINK= g++4g++4改为g++LINKFLAGS= -g-OLIB= ARCHIVE= arARFLAGS= -rcSI
3、ZE= size#---------------------------------------------------------------------然后存档,退出,终端输入cd/mnt/lmp/srcmakeclean-allmakeserial之后linux开始编译,最后会在/mnt/lmp/src下生成lmp_serial的可执行文件。mvlmp_seriallmp2计算一example终端输入:cd/mnt/lmp/e*/shearcp/mnt/lmp/src/lmp/mnt/lmp/e*/shear./lmp4、shear即开始计算二lammps的并行安装1安装fftw终端输入:cd/mntgunzipfftw-2.1.5.tar.gz(源码包fftw-2.1.5.tar.gz在/mnt下)tarxvffftw-2.1.5.tarcdfftw-2.1.5./configure–prefix=/opt/fftw--enable-floatmakemakeinstall(fftw-2.1.5即安装在/opt/fftw下)2安装mpich终端输入:cd/mntgunzipmpich2-1.3.1.tar.gztarxvfmpich2-1.3.1.tarcd5、/mpich2-1.3.1./configure–prefix==/opt/mpichmakemakeinstall(mpich即安装在/opt/mpich下)然后配置环境变量终端输入:cdvi.bashrc开始编译为If[-f/etc/bashrc];then./etc/bashrcfiexportPATH=/opt/mpich/bin:$PATHexportLD_LIBRARY_PATH=/opt/mpich/lib:/opt/fftw/lib:$LD_LIBRARY_PATH3安装lammpscd/mntgunziplammps.tar6、.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/poemslsmake–fMakefile.g++cd/mnt/lmp/lib/reaxlsmake–fMakefile.gfortran(然后7、对Makefile.serial文件进行编译)cd/mnt/lmp/src/MAKEviMakefile.serial(按下i可修改)#g++=RedHatLinuxbox,g++4,gfortran,MPICH2,FFTWSHELL=/bin/sh#---------------------------------------------------------------------#compiler/linkersettings#specifyflagsandlibrariesneededforyourcompilerCC= 8、g++4g++4改为mpic++CCFLAGS= -g-ODEPFLAGS= -MLINK= g++4g++4改为mpic++LINKFLAGS=
4、shear即开始计算二lammps的并行安装1安装fftw终端输入:cd/mntgunzipfftw-2.1.5.tar.gz(源码包fftw-2.1.5.tar.gz在/mnt下)tarxvffftw-2.1.5.tarcdfftw-2.1.5./configure–prefix=/opt/fftw--enable-floatmakemakeinstall(fftw-2.1.5即安装在/opt/fftw下)2安装mpich终端输入:cd/mntgunzipmpich2-1.3.1.tar.gztarxvfmpich2-1.3.1.tarcd
5、/mpich2-1.3.1./configure–prefix==/opt/mpichmakemakeinstall(mpich即安装在/opt/mpich下)然后配置环境变量终端输入:cdvi.bashrc开始编译为If[-f/etc/bashrc];then./etc/bashrcfiexportPATH=/opt/mpich/bin:$PATHexportLD_LIBRARY_PATH=/opt/mpich/lib:/opt/fftw/lib:$LD_LIBRARY_PATH3安装lammpscd/mntgunziplammps.tar
6、.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/poemslsmake–fMakefile.g++cd/mnt/lmp/lib/reaxlsmake–fMakefile.gfortran(然后
7、对Makefile.serial文件进行编译)cd/mnt/lmp/src/MAKEviMakefile.serial(按下i可修改)#g++=RedHatLinuxbox,g++4,gfortran,MPICH2,FFTWSHELL=/bin/sh#---------------------------------------------------------------------#compiler/linkersettings#specifyflagsandlibrariesneededforyourcompilerCC=
8、g++4g++4改为mpic++CCFLAGS= -g-ODEPFLAGS= -MLINK= g++4g++4改为mpic++LINKFLAGS=
此文档下载收益归作者所有