Вы находитесь на странице: 1из 6

Installation of LAMMPS-30Oct13 on OS X 10.

9 chibaf 01 November
LAMMPS Molecular Dynamics Simulator http://lammps.sandia.gov/ Copyright (2 !" Sandia Corporation.

013

LAMMPS is a so#t$are #or molecular (and particles" dynamics. %t can &e installed on Mac 'S ( $ith several steps. 'n multi)core Mac* lammps is installed $ith ##t$ !.+ and 'penMP%. ,his document corresponds to lammps)! 'ct-!. old versions are o&tained #rom &elo$: http://lammps.sandia.gov/tars/ .emar/: the pac/age user)omp $as deleted #rom lammps)! 'ct-! &ecause o# compile errors. %# you need the openmp pac/age (user) omp"* you can employ lammps)-0Sep-!. %t can &e installed in the same manner as the #ollo$ing instructions. .emar/: the pac/age phonon $as added on lammps)--Mar-!. .emar/: the pac/age voronoi $as added on lammps)212an-!. .emar/: LAMMPS)-02an-! 3 242an-! got a compile error o# msm5omp.cpp $ith gcc (i676)apple)dar$in--)llvm)gcc)4.2 (8CC" 4.2.(9ased on Apple %nc. &uild 1617" (LL:M &uild 2!!6.--. "". then $e employed gcc)4.7 #rom http://hpc.s#.net/. .emar/: the pac/age user)mol#ile $as added on lammps)-42un-2. 9ut this document doesn;t descri&e installation o# the pac/age. .emar/: the pac/age <S=.)C'L:A.S $as added on lammps)2>May-2. .emar/: &uilt $ithout C<DA pac/age. .emar/: 'S ( - .6 or later is necessary #or 8P</'penCL pac/age. See .ecent LAMMPS ?e$s #or recent lammps updates. (-" 'S ( - .0.+ (mountain lion" is employed $ith Mac9oo/ Core2Duo (late 2 0". (2" i# you employ +code 1. line tools #or it. or later* you need to install command gcc)

(!" do$nloading gcc)mlion.tar.g@ #rom http://hpc.s#.net : 4.0)&in.tar.g@ #or os + - .0 instruction: (A" A gun@ip gcc)4.0)&in.tar.g@ (9" A sudo tar )+# gcc)4.0)&in.tar )C /

(4" installation o# 'penMP% -.6.+ do$nloading 'penMP% #rom http://$$$.open)mpi.org/so#t$are/ompi/v-.6/ e+tracting tar #ile (dou&le clic/ing tar.g@ #ile" and: A ./con#igure A ma/e all A ma/e chec/ A sudo ma/e install B $hen it passes all chec/. (1" installation o# CC,D

$e employ CC,D version !.+ B 20 Ce&ruary 2 -2 http://$$$.##t$.org/do$nload.html e+tracting tar #ile (dou&le clic/ing tar.g@ #ile" and: A ./con#igure A ma/e all A ma/e chec/ A sudo ma/e install (6" installing 'penE%M ('pen Eno$ledge &ase %nteratomic Model" --- Option: if you don't employ OpenKIM, skip this step. do$nload E%M AP% #rom https://open/im.org//im5apiBdo$nload BDe employed version -.2.2 or later. =+tract the #ile at your home directory and 'n ,erminal A cp Ma/e#ile.E%M5Con#ig.e+ample Ma/e#ile.E%M5Con#ig modi#yng FMa/e#ile.E%M5Con#igG as #ollo$s:
! ! "elease# $his file is %art of the o%en&im-a%i-v1. . ! ! ! this ma&e file b(il)s*cleans ever+thin' ! !,IM-.I" / 012OM34*o%en&im-a%i-vX.X.X ,IM-.I"/012OM34*o%en&im-a%i-v1. . !,IM-MO.3L-."I53"S-.I" / !,IM-MO.3LS-.I" / !,IM-$3S$S-.I" / ,IM-6OMPIL3"S7I$3 / 866 ,IM-S9S$3MLIN,3" / )ar:in ,IM-S9S$3MA"62 / ;<bit ,IM-LIN, / )+namic-loa) %ac&a'e.

'n ,erminal A e+port E%M5D%.HGthe path to open/imG B ending $ith F/G B e+ample: E%M5D%.H/<sers/chi&a#/open/im)api)v-.2.2/ A cd AE%M5D%M A ma/e e+amples A ma/e (>" installing :oroII (a so#t$are li&rary #or carrying out three) dimensional computations o# the :oronoi tessellation" --- Option: if you don't employ Voro++, skip this step. do$nload :ooroII #rom http://math.l&l.gov/voroII/do$nload/. BDe employed :ersion .4.6 or later. =+tract the #ile and on ,erminal moving to the directory: voroII) .4.6/ A ma/e A sudo ma/e install B #iles $ill &e installed under /usr/local/. (7" Do$nloading Lammps the latest version is o&tained #rom &elo$: http://lammps.sandia.gov/do$nload.htmlBtar old versions are o&tained #rom &elo$: http://lammps.sandia.gov/tars/ (0" &uilding LAMMPS

"emar&# in Ma&efile= tab is (se) for s%acin'. (A" &uild li&raries: a$pmd* atc* meam* poem* rea+* gpu* colvars. at a:%m)# A ma/e )# Ma/e#ile.openmpi at atc# A ma/e )# Ma/e#ile.gII at meam# A ma/e )# Ma/e#ile.g#ortran at %oems# A ma/e )# Ma/e#ile.gII at rea># A ma/e )# Ma/e#ile.g#ortran at '%( ! for O%en6L A ma/e )# Ma/e#ile.mac5opencl at colvars A ma/e )# Ma/e#ile.gII (9" at src*7S3"-6OL5A"S modi#ication o# Ma/e#ile.lammps
! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! $his file contains the hoo&s to b(il) an) lin& LAMMPS :ith the O%en,IM librar+ so that a LAMMPS in%(t scri%t can (se a ,IM %otential= via the %air-st+le &im comman). 9o( sho(l) first )o:nloa) ,IM from :::.o%en&im.or'. $hen b(il) its librar+ API in ,IM-API= :ith the mo)els 1%otentials4 +o( :ant to (se. 9o( sho(l) then have the files# o%en&im-a%i-vX.X.X*,IM-API*lib&im.a o%en&im-a%i-vX.X.X*,IM-API*lib&im.so ?hen +o( b(il) LAMMPS :ith the ,IM %ac&a'e installe)= it :ill (se the 3 settin's in this file. $he+ sho(l) be set as follo:s. &im-S9SIN6 / a %ath to the ,IM-API )irector+ that contains @.h files &im-S9SLIA / com%iler fla' to (se the ,IM librar+ &im-S9SPA$2 / a %ath to the ,IM librar+

! ----------------------------------------------------------! Settin's that the LAMMPS b(il) :ill im%ort :hen this %ac&a'e is installe) &im-S9SIN6 / -I*7sers*foo*o%en&im-a%i-v1. . *,IM-API &im-S9SLIA / -l&im &im-S9SPA$2 / -L*7sers*foo*o%en&im-a%i-v1. . *,IM-API

(C" at src*MA,3: modi#ication o# Ma/e#ile.openmpi:


! --------------------------------------------------------------------! com%iler*lin&er settin's ! s%ecif+ fla's an) libraries nee)e) for +o(r com%iler 66 / 66CLA8S / S2CLA8S / .3PCLA8S / m%icBB -O D -f(nroll-loo%s -fstrict-aliasin' -?all -? -?no-(ninitialiEe) D -fo%enm% ! enable O%enMP -fPI6 -M

LIN, / m%icBB LIN,CLA8S / -O LIA / -lst)cBB -l'fortran -l'om% -frame:or& vecLib ! 'fortran= O%enMP= a%%le la%ac& SIF3 / siEe A"62I53 / ar A"CLA8S / -rcsv S2LIACLA8S / -share) ! ! ! ! --------------------------------------------------------------------LAMMPS-s%ecific settin's s%ecif+ settin's for LAMMPS feat(res +o( :ill (se if +o( chan'e an+ -. settin'= )o f(ll re-com%ile after Gma&e cleanG 1ste% <4

! LAMMPS if)ef settin's= OP$IONAL ! see %ossible settin's in )oc*Section-start.html! LMP-IN6 / ! ! ! ! ! ! -.LAMMPS-8FIP

MPI librar+= "3H7I"3. see )isc(ssion in )oc*Section-start.html! - 1ste% I4 can %oint to )(mm+ MPI librar+ in src*S$7AS as in Ma&efile.serial IN6 / %ath for m%i.h= MPI com%iler settin's PA$2 / %ath for MPI librar+ LIA / name of MPI librar+

MPI-IN6 / MPI-PA$2 / MPI-LIA / ! ! ! ! ! ! CC$ librar+= OP$IONAL see )isc(ssion in )oc*Section-start.html! - 1ste% ;4 can be left blan& to (se %rovi)e) ,ISS CC$ librar+ IN6 / -.CC$ settin'= e.'. -.CC$-CC$?= CC$ com%iler settin's PA$2 / %ath for CC$ librar+ LIA / name of CC$ librar+ -.CC$-CC$?3 -lfft:3 ! em%lo+ fft: 3

CC$-IN6 / CC$-PA$2 / CC$-LIA /

(D" generating ma/e#ile at src directory A ma/e yes)all Installing package asphere Installing package ody Installing package class! Installing package colloid Installing package dipole Installing package fld Installing package gpu Installing package granular Installing package kim Installing package kspace updating package "#$ Installing package many ody updating package "#$ Installing package mc Installing package meam Installing package misc Installing package molecule updating package "#$ Installing package opt Installing package peri Installing package poems

Installing Installing Installing Installing Installing Installing Installing Installing Installing Installing updating updating updating updating updating Installing Installing Installing Installing updating updating updating Installing Installing Installing Installing Installing

package rea% package replica package rigid package shock package srd package &oronoi package %tc package user-atc package user-a'pmd package user-cg-cmm package "#$ src(pair)l*)sdk)coul)long)gpu.cpp src(pair)l*)sdk)coul)long)gpu.h src(pair)l*)sdk)gpu.cpp src(pair)l*)sdk)gpu.h package user-col&ars package user-cuda package user-eff package user-misc package "#$ src(pair)l*)sf)dipole)sf)gpu.cpp src(pair)l*)sf)dipole)sf)gpu.h package user-omp package user-molfile package user-phonon package user-rea%c package user-sph

A ma/e no)user)cuda Bdeleting C<DA pac/age $ninstalling package user-cuda A ma/e no)user)mol#ile Bdeleting mol#ile pac/age $ninstalling package user-molfile %# you didn;t employ 'penE%M: A ma/e no)/im Bdeleting 'penE%M pac/age $ninstalling package kim %# you didn;t employ :oroII: A ma/e no)voronoi Bdeleting :oroII pac/age $ninstalling package &oronoi A ma/e no)user)omp Bdeleting 'penMP pac/age &ecause o# compile error o# lammps)! 'ct-! $ninstalling package user-omp (="at src &uild e+ecuta&le &inary: lmp5openmpi A ma/e openmpi (C" setting up e+ample suppose that a directory J/&in e+ists. A cp lmp5openmpi J/&in/ A e+port PA,KHAPA,K:J/&in B use it in .&ash5pro#ile (- " e+ecution o# Lammps as multi)process comman) for m(lti %rocess# A mpirun )np ? lmp5openmpi L in.lammps.script

B? is a num&er o# MP% process Bsee Lammps manual #or details. comman) for m(lti threa)s :ith O%enMP#
A mpirun )+ 'MP5?<M5,K.=ADSHM )np ? lmp5openmpi )s# omp )in in.lammps B ? mpi process and M openmp threads per one mpi process
Mac9oo/2 0:J chi&a#A ps <S=. P%D ,, MCP< chi&a# 21!! s . chi&a# 21!44 s . chi&a# 21!41 s 41.> 21!41 -7.chi&a# 21!46 s 1>.! 21!46 2 .chi&a# 21!1 s ! . )M S,A, S S . S . S S P.% !-, !-, >, 2!, 4, 22, !-, S,%M= : . : . : !.20 : . 1 : 2.-: . 6 : . <,%M= : . : . :-4.66 : 7.42 :-6. : 0.1: . C'MMA?D )&ash mpirun )+ 'MP5?<M5,K.=ADSH2 )np 2 lmp5openmpi lmp5openmpi )s# omp )in in.lammps lmp5openmpi )s# omp )in in.lammps )&ash

lammps)! 'ct-! running as t$o openmp threads + t$o mpi process on mac&oo/ (core2duo" via /humi Npi+ivO (in Papanese" A%%en)i> lammps mailing list: SourceCorge.net: LAMMPS: lammps)users My $e& site: http://math.digi2.Pp/ http://math.digi2.Pp/math/lammps/ : lammps Scri&d ) chi&a# http://$$$.scri&d.com/chi&a# mail: t$itter: Qchi&a#

Вам также может понравиться