Installation of LAMMPS-11Mar13 - 23Apr13 on OS X 10.

8 (Mountain Lion) chibaf 26 April 2013
LAMMPS Molecular Dynamics Simulator http://lammps.sandia.gov/ Copyright (2003) Sandia Corporation.

LAMMPS is a software for molecular (and particles) dynamics. It can be installed on Mac OS X with several steps. On multi-core Mac, lammps is installed with fftw 3.x and OpenMPI. This document corresponds to lammps-11Mar13, 14Mar13, 21Mar13, 22Mar13, 2Apr13, 3Apr13, 12Apr13 and 23Apr13. Remark: a package user-atc was deleted from lammps-11Mar13, 14Mar13, 21Mar13, 22Mar13, 2Apr13, 3Apr13, 12Apr13 and 23Apr13 in this document. Remark: a package phonon was added on lammps-11Mar13. Remark: a package voronoi was added on lammps-25Jan13. Remark: LAMMPS-19Jan13 – 24Jan13 got a compile error of msm_omp.cpp with gcc (i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00)). then we employed gcc-4.8 from http://hpc.sf.net/. Remark: a package user-molfile was added on lammps-14Jun12. But this document doesn't describe installation of the package. Remark: a package USER-COLVARS was added on lammps-27May12. Remark: built without CUDA package. Remark: OS X 10.6 or later is necessary for GPU/OpenCL package. See Recent LAMMPS News for recent lammps updates. (1) OS X 10.8.x (mountain lion) is employed with MacBook Core2Duo (late 2009). (2) if you employ xcode 4.4 or later, you need to install command line tools for it. (3) downloading gcc-mlion.tar.gz from http://hpc.sf.net :

gcc-

mlion.tar.gz (4.8 / updated 2013) for os x 10.8.x
instruction: (A) $ gunzip gcc-mlion.tar.gz (B) $ sudo tar -xf gcc-mlion.tar -C / (4) downloading gfortran from http://hpc.sf.net :

gfortran-

mlion.tar.gz for os x 10.8.x
instruction: (A) $ gunzip gfortran-mlion.tar.gz (B) $ sudo tar -xf gfortrn-mlion.tar -C / (5) you can also obtain gfortran from: Tools - R for Mac OS X developer's page - GNU Fortan for Xcode (6) installation of OpenMPI 1.6.x downloading OpenMPI from http://www.open-mpi.org/software/ompi/v1.6/ extracting tar file (double clicking tar.gz file) and: $ ./configure $ make all $ make check

x # 29 February 2012 http://www.sandia.h" #include "Solver.4. gpu. (7) installation of FFTW we employ FFTW version 3.lammps: user-awpmd_SYSINC = user-awpmd_SYSLIB = -framework vecLib # use apple lapack and blas user-awpmd_SYSPATH = $ make -f Makefile.h" // added on 28 september 2011 modification of Makefile. atc. #We employed Version 0.cpp: #include "DenseMatrix.gov/download. (A) build libraries: awpmd.4. (10) Downloading Lammps the latest version is obtained from below: http://lammps.gov/voro++/download/.gz file) and: $ .h" // added on 28 september 2011 #include "DiagonalMatrix. Extract the file and on Terminal moving to the directory: voro++-0.org/kim_api#download #We employed version 1.sandia.fftw. poem. meam. Extract the file and On Terminal $ export KIM_DIR=”the path to openkim” # ending with “/” # example: KIM_DIR = /Users/foo/openkim-api-v1.h" #include "SparseMatrix./configure $ make all $ make check $ sudo make install (8) installing OpenKIM (Open Knowledge base Interatomic Model) download KIM API from https://openkim.org/download.gov/tars/ (11) building LAMMPS Remark: in Makefile.lammps: user-awpmd_SYSINC = user-awpmd_SYSLIB = -framework vecLib # use apple lapack and blas user-awpmd_SYSPATH = .$ sudo make install #if it passes all check.1/ $ cd $KIM_DIM $ make examples $ make (9) installing Voro++ (a software library for carrying out threedimensional computations of the Voronoi tessellation) download Vooro++ from http://math. reax. tab is used for spacing.1 or later.1.5 or later. at awpmd: modification of Makefile.openmpi at atc: modification of Matrix.html extracting tar file (double clicking tar.1.5/ $ make $ sudo make install # files will be installed under /usr/local/.lbl.html#tar old versions are obtained from below: http://lammps. colvars.

...g++ at reax: $ make -f Makefile. e. -DFFT_FFTW..g.openmpi CC = mpic++ CCFLAGS = -O2 \ -funroll-loops -fstrict-aliasing -Wall -W -Wnouninitialized -fopenmp # use openmp DEPFLAGS = -M LINK = mpic++ LINKFLAGS = -O -lgfortran -framework vecLib -lgomp # for gfortran and openmp... .x FFT_PATH = FFT_LIB = -lfftw3 # use fftw 3.mac_opencl at colvars $ make -f Makefile.g++ at meam: modification of Makefile. OPTIONAL # see discussion in doc/Section_start.gfortran at poems: $ make -f Makefile.. # FFT library.lammps: gpu_SYSINC = gpu_SYSLIB = -framework OpenCL gpu_SYSPATH = $ make -f Makefile.html#2_2 (step 6) # can be left blank to use provided KISS FFT library # INC = -DFFT setting..lammps: meam_SYSINC = meam_SYSLIB = -lgfortran meam_SYSPATH = $ make -f Makefile.g++ # for gfortran # use apple opencl framework (B) at src/MAKE: modification of Makefile..$ make -f Makefile. FFT compiler settings # PATH = path for FFT library # LIB = name of FFT library FFT_INC = -DFFT_FFTW3 # use fftw 3..x (C) generating makefile at src directory $ make yes-all Installing package asphere Installing package body Installing package class2 Installing package colloid Installing package dipole Installing package fld Installing package gpu . use apple framework for lapack and blas ...gfortran at gpu (OpenCL) modification of Makefile.

bash_profile .1 $ make openmpi (E) setting up example suppose that a directory ~/bin exists.1.22Mar13 Uninstalling package user-atc (D)at src build executable binary: lmp_openmpi $ export KIM_DIR = ”the path to openkim directory” # example: KIM_DIR = /Users/foo/openkim-api-v1. $ cp lmp_openmpi ~/bin/ $ export PATH=$PATH:~/bin # use it in .Installing Installing Installing Installing Installing Installing Installing Installing Installing Installing Installing Installing Installing Installing Installing Installing Installing Installing Installing Installing Installing Installing Installing Installing Installing Installing Installing Installing Installing package package package package package package package package package package package package package package package package package package package package package package package package package package package package package granular kim kspace manybody mc meam molecule opt peri poems reax replica rigid shock srd voronoi xtc user-misc user-atc user-awpmd user-cg-cmm user-colvars user-cuda user-eff user-omp user-molfile user-phonon user-reaxc user-sph $ make no-user-cuda #deleting CUDA package Uninstalling package user-cuda $ make no-user-molfile #deleting molfile package Uninstalling package user-molfile $ make no-user-atc #deleting atc package for 11Mar13 .

06 0:00.(12) execution of Lammps as multi-process command for multi process: $ mpirun -np N lmp_openmpi < in.script #N is a number of MPI process #see Lammps manual for details.jp/ http://math.01 0:14.00 0:09.lammps.lammps # N mpi process and M openmp threads per one mpi process MacBook2009:~ chibaf$ ps USER PID TT %CPU chibaf 25330 s000 0.scribd.com/chibaf mail: .chibaf http://www.66 0:08.digi2.0 -M STAT S S R S R S S PRI 31T 31T 7T 23T 4T 22T 31T STIME 0:00.01 0:03.7 25345 18.01 0:00.00 COMMAND -bash mpirun -x OMP_NUM_THREADS=2 -np 2 lmp_openmpi lmp_openmpi -sf omp -in in.lammps lmp_openmpi -sf omp -in in.net: LAMMPS: lammps-users My web site: http://math.1 chibaf 25350 s003 0.digi2.lammps -bash lammps-23Apr13 running as two openmp threads x two mpi process on macbook (core2duo) via "a big tree of black honey and a spring of hot water" / illustration by poko [pixiv] (in japanese) lammps mailing list: SourceForge.01 UTIME 0:00.51 0:00. command for multi threads with OpenMP: $ mpirun -x OMP_NUM_THREADS=M -np N lmp_openmpi -sf omp -in in.11 0:00.3 25346 20.29 0:00.01 0:00.0 chibaf 25345 s000 45.42 0:16.jp/math/lammps/ : lammps Scribd .1 chibaf 25346 s000 57.0 chibaf 25344 s000 0.05 0:02.

Sign up to vote on this title
UsefulNot useful