資源描述:
《lammps 安裝步驟詳解》由會員上傳分享,免費在線閱讀,更多相關內(nèi)容在應用文檔-天天文庫。
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后出現(xiàn)#g++=RedHatLinuxbox,g++4,gfortran,noMPI,noFFTSHELL=/bin
2、/sh#---------------------------------------------------------------------#compiler/linkersettings#specifyflagsandlibrariesneededforyourcompilerCC=??????g++4g++4該為g++CCFLAGS=???-g-ODEPFLAGS=???-MLINK=??????g++4g++4改為g++LINKFLAGS=???-g-OLIB=??????????ARCHIVE=???arARFLAGS=
3、???-rcSIZE=??????size#---------------------------------------------------------------------然后存檔,退出,終端輸入cd/mnt/lmp/srcmakeclean-allmakeserial之后linux開始編譯,最后會在/mnt/lmp/src下生成lmp_serial的可執(zhí)行文件。mvlmp_seriallmp2計算一example終端輸入:cd/mnt/lmp/e*/shearcp/mnt/lmp/src/lmp/mnt/lmp/e*/sh
4、ear./lmp5、ich2-1.3.1.tarcd/mpich2-1.3.1./configure–prefix==/opt/mpichmakemakeinstall(mpich即安裝在/opt/mpich下)然后配置環(huán)境變量終端輸入:cdvi.bashrc開始編譯為If[-f/etc/bashrc];then./etc/bashrcfiexpotPATH=/opt/mpich/bin:$PATHexportLD_LIBRARY_PATH=/opt/mpich/lib:/opt/fftw/lib:$LD_LIBRARY_PATH3安裝lammpscd/
6、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/poemslsmake–fMakefile.g++cd/mnt/lmp/lib/reaxlsmak
7、e–fMakefile.gfortran(然后對Makefile.serial文件進行編譯)cd/mnt/lmp/src/MAKEviMakefile.serial(按下i可修改)#g++=RedHatLinuxbox,g++4,gfortran,MPICH2,FFTWSHELL=/bin/sh#---------------------------------------------------------------------#compiler/linkersettings#specifyflagsandlibrariesnee
8、dedforyourcompilerCC=??????g++4g++4改為mpic++CCFLAGS=???-g-ODEPFLAGS=???-MLINK=??????g++4g++4改為mpic++LINKFLAGS=?