You are on page 1of 4

Installation of lammps-9Dec14 on Mac OS X Yosemite

15 December 2014 @chibaf


In this document, lammps standard packages are emplyoed.
(0) We employ Macbook Pro 13 inch mid 2012.
(1) OS X Yosemite is employed.
(2) You need knowledge of UNIX.
(3) Xcode.app is needed. It can be obtained from
http://develope.apple.com/
(4) After installation of Xcode.app, tat Termila.app:
$ xcode-select -instasll
$ sudo xcodebuild -license
Then gnu tools are enable.
(5) On GCC of Apple, OpenMP is not available. Then GCC
4.9.0 is obtained fron http://hpc.sf.net/
gcc-4.9-bin.tar.gz, updated Oct 2014 (Mavericks &
Yosemite)
$ sudo tar -zxvf gcc-4.9-bin.tar.gz -C /
(6) Installation of OpenMPI:
Obtain source codes of OpenMPI from http://www.openmpi.org, and extract
$ ./configure
$ make
$ make check
$ sudo make install (if make check said no error)
(7) Installation of FFTW:
Obtain source codes of FFTW from http://www.fftw.org, and
extract
$ ./configure
$ make
$ make check
$ sudo make install (if make check said no error)
If you employ Apple BLAS library, skip this step.
(8) Installation of OpenBLAS:
$ git clone https://github.com/xianyi/OpenBLAS.git
$ cd OpenBLAS
$ make BINARY=64 USE_OPENMP=0
$ sudo make PREFIX=/usr/local install
Then /usr/local/lib/libopenblas_sandybridgep-r0.2.xx.a
was generated.
A name of library depend on a CPU of your machine.
(reference: http://dedupe.readthedocs.org/en/latest/OSXInstall-Notes.html)
Then necessary tools and libraries were installed.
(9) building of lammps-5Nov14
Obtain lammps-5Nov14 from http://lammps.sandia.gov/tars/?
C=M;O=D

And extract the tar file. At lammps-9Dec14/src


$ make -yes-all (all packages are added)
Installing package asphere
Installing package body
Installing package class2
Installing package colloid
Installing package dipole
Installing package fld
Installing package gpu
Installing package granular
Installing package kim
Installing package kokkos
Installing package kspace
updating package GPU
Installing package manybody
updating package GPU
Installing package mc
Installing package meam
Installing package misc
Installing package molecule
updating package GPU
Installing package mpiio
Installing package opt
Installing package peri
Installing package poems
Installing package qeq
Installing package reax
Installing package replica
Installing package rigid
Installing package shock
Installing package snap
Installing package srd
Installing package voronoi
Installing package xtc
Installing package user-atc
Installing package user-awpmd
Installing package user-cg-cmm
updating package GPU
updating src/pair_lj_sdk_coul_long_gpu.cpp
updating src/pair_lj_sdk_coul_long_gpu.h
updating src/pair_lj_sdk_gpu.cpp
updating src/pair_lj_sdk_gpu.h
Installing package user-colvars
Installing package user-cuda
Installing package user-eff
Installing package user-fep
Installing package user-intel
Installing package user-lb
Installing package user-misc
updating package GPU
updating src/pair_lj_sf_dipole_sf_gpu.cpp
updating src/pair_lj_sf_dipole_sf_gpu.h

Installing
Installing
Installing
Installing
Installing
Installing

package
package
package
package
package
package

user-molfile
user-omp
user-phonon
user-qmmm
user-reaxc
user-sph

Deleting some packages not used


MacBookProMid2012-2:src chibaf$ make
Uninstalling package gpu
MacBookProMid2012-2:src chibaf$ make
Uninstalling package kim
MacBookProMid2012-2:src chibaf$ make
Uninstalling package poems
MacBookProMid2012-2:src chibaf$ make
Uninstalling package reax
MacBookProMid2012-2:src chibaf$ make
Uninstalling package voronoi
MacBookProMid2012-2:src chibaf$ make
Uninstalling package meam
MacBookProMid2012-2:src chibaf$ make
Uninstalling package user-awpmd
MacBookProMid2012-2:src chibaf$ make
Uninstalling package user-cuda
MacBookProMid2012-2:src chibaf$ make
Uninstalling package kokkos
MacBookProMid2012-2:src chibaf$ make
Uninstalling package user-qmmm
MacBookProMid2012-2:src chibaf$ make
Uninstalling package user-colvars
MacBookProMid2012-2:src chibaf$ make
Uninstalling package user-atc

no-gpu
no-kim
no-poems
no-reax
no-voronoi
no-meam
no-user-awpmd
no-user-cuda
no-kokkos
no-user-qmmm
no-user-colvars
no-user-atc

Modifying src/MAKE/Makefile.mpi. We show only modified


lines:
CCFLAGS =
-g -O3 -fopenmp
# if you employ OpenBLAS,
LIB =
-lgfortran -lgomp -lopenblas_xxxxx
# openblas_xxxxx is a name of your
/usr/local/lib/libopenblas_xxxxx. xxxx consists of cpu
name and version number.
# if you employ Apple BLAS,
LIB =
-lgfortran -lgomp -framework Accelerate
LMP_INC =

-DLAMMPS_GZIP -DLAMMPS_MEMALIGN=64

FFT_INC =

-DFFT_FFTW3

FFT_LIB =

-lfftw3

Then at src,
$ make mpi
If build becomes successful, lmp_mpi is generated at src.
(10) Execution of lammps
(A) mpirun -np N lmp_mpi < in.lammps
(B) mpirun -x OMP_NUM_THREADS=M -np N lmp_mpi -sf omp -in
in.lammps

where N is number of mpi process, M number of OpenMP, and


in.lammps is lammps input.
Description of lammps input is found in lammps manual.
Example of lammps inputs are also found in
http://math.digi2.jp/math/lammps/
or internet.

Lammps-9Dec14 on Macbook Pro 13inch mid 2012

You might also like