資源描述:
《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
2、,noFFTSHELL=/bin/sh#---------------------------------------------------------------------#compiler/linkersettings#specifyflagsandlibrariesneededforyourcompilerCC=??????g++4g++4該為g++CCFLAGS=???-g-ODEPFLAGS=???-MLINK=??????g++4g++4改為g++LINKFLAGS=???-g-OLIB=
3、??????????ARCHIVE=???arARFLAGS=???-rcSIZE=??????..size#---------------------------------------------------------------------然后存檔,退出,終端輸入cd/mnt/lmp/srcmakeclean-allmakeserial之后linux開始編譯,最后會在/mnt/lmp/src下生成lmp_serial的可執(zhí)行文件。mvlmp_seriallmp2計算一example終端輸入:cd/
4、mnt/lmp/e*/shearcp/mnt/lmp/src/lmp/mnt/lmp/e*/shear./lmp5、裝在/opt/fftw下)2安裝mpich終端輸入:cd/mntgunzipmpich2-1.3.1.tar.gztarxvfmpich2-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/bashrcfiexportPATH=/opt/mpich/bin:$PA
6、THexportLD_LIBRARY_PATH=/opt/mpich/lib:/opt/fftw/lib:$LD_LI..BRARY_PATH3安裝lammpscd/mntgunziplammps.tar.gztarxvflammps.tarmvlammps-5Dec10lmpcd/lmp/srcmakeyes-allmakeno-gpumakeno-user-atc(幾個特殊的package:meam,poems,reax,gpu,user-atc需要特別安裝,如下)cd/mnt/lmp/lib/mea
7、mlsmake–fMakefile.gfortran(安裝meam)cd/mnt/lmp/lib/poemslsmake–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#------
8、---------------------------------------------------------------#compiler/linkersettings#specifyflagsandlibrariesneededforyourcompilerCC=??????g++4g++4改為mpic++CCFLAGS=???-g-ODEPFLAGS=???-MLINK=??????g++4g++4改為mpic++L