You are on page 1of 3

7/20/2016 InstallLAMMPSonUbuntuwithoptionalpackage(LAMMPS)|xinfeei

xinfeei

inbetweendreams

Feeds: Posts Comments

InstallLAMMPSonUbuntuwithoptionalpackage(
LAMMPS)

May27,2012byxinfeei

TobuildtwoexecutableobjectivesforLAMMPSonUBUNTU

(IvetriedtheseonbothUBUNTU11.xandUBUNTU12.x.theoptionalpackage,whichhereisreax,
itmaybesamefortheotheroptionalpackages.onlyreaxmeampoemsandgpupackagesneed
compiledbeforecompiletheLAMMPS.)

(whenyouareinstallingtheUBUNTUrepositories,Theremayappeartherequirementofroot
authority,pleaserefertosudosuorsudoicommandatthebeginningifitappearstheerrorthat
askyoufortherootprivilege.oraddsudobeforeeachinstallationcommand.)

thetwotargetedexecutableobjectivesisserialandopenmpi,serialisthesimplemethodtoexecute
theinputscriptwithoutmpiandtw,andopenmpiexecutableobjectivecaninvokethempiand
tw.Thecompilerofserialisg++,andforopenmpiitismpic++.

thenbegin,rstopenterminal

0)sudoaptgetupdate

1)sudoaptgetinstallbuildessentialgfortran

2)downloadlammpstarballfromocialwebsite

3)extractthetarballletoafolder,mycommandsareasfollowing,

cdDownloads

cplammps14May12.tar.gz../

cd..

gunziplammps.tar.gz

tarxvflammps14May12.tar

4)thencompilethereaxlibrary,gotothereaxlibraryrst
https://xinfeei.wordpress.com/2012/05/27/installlammpsonubuntuwithoptionalpackage%E5%AE%89%E8%A3%85lammps/ 1/3
7/20/2016 InstallLAMMPSonUbuntuwithoptionalpackage(LAMMPS)|xinfeei

4)thencompilethereaxlibrary,gotothereaxlibraryrst

cdlammps14May12/lib/reax

makefMakele.gfortran

5)congurethereaxlibary

lastcommandwillproduceseveralles,openoneofthemnamedasmakele.lammps,changethe
reaxSYSLIB=lgfortran,theINCandPATHleftasblank.

6)conguremakechoices,cdintosrcfolder

cdlammps14May12/src(assumingyouarenowinhomefolder)

makeyesreax

makepackagestatus(checktherearefourpackagesareincludedmolecule,manybody,kspace,reax)

FROMNOWON,ITHASTWOBRANCHESACCORDINGTOWHICHEXECUTABLEOBJECTIVE
YOUNEED.

(A)fortheserialobjetive

1)cdintothesrc/stubsfolderoflammps

cdlammps14May12/src/STUBS

make

andgobacktosrcfolder

makeserial

B)createaexecutableobjectivewithopenmpiundersrcfolder

sudoaptgetinstallopenmpibinopenmpidoclibopenmpidev

sudoaptgetinstalltw2twdev

gotosrcfolder

makeopenmpi

itsdone,anditworks.

9)thentesttheobjectives,

cdlammps14May12/examples/reax

../../src/lmp_serial<in.reax.rdx

or

mpirunnp4../../src/lmp_openmpi<in.reax.rdx

youwillseetheexamplessuccessfullygothrough.
https://xinfeei.wordpress.com/2012/05/27/installlammpsonubuntuwithoptionalpackage%E5%AE%89%E8%A3%85lammps/ 2/3
7/20/2016 InstallLAMMPSonUbuntuwithoptionalpackage(LAMMPS)|xinfeei

youwillseetheexamplessuccessfullygothrough.

PostedinLAMMPS|LeaveaComment

CommentsRSS

CreateafreewebsiteorblogatWordPress.com.

TheMistyLookTheme.

https://xinfeei.wordpress.com/2012/05/27/installlammpsonubuntuwithoptionalpackage%E5%AE%89%E8%A3%85lammps/ 3/3

You might also like