lammps安装.doc
文本预览下载声明
lammps安装
本文主要利用openmpi来安装并行版lammps,openmpi之前已经安装成功过,不在赘述。
本文主要主要安装最基础的lammps,没有添加任何其它的package。
1、下载fftw数据库(拿fftw-2.1.5.tar.gz来说)
解压 tar-zxvf fftw-2.1.5.tar.gz 解压后得到fftw-2.1.5文件夹
cd fftw-2.1.5
在当前目录下 ./configure –prefix={安装目录}/fftw/ #提前在安装目录下将fftw文件夹建好
make
make install
至此,fftw已经安装好
2、下载lammps安装包(就拿lammps_stable.tar来说)
解压 tar –xvf lammps_stable.tar
cd lammps-1Feb12/src/MAKE
因为选择openmpi进行并行编译,因此选用相应的Makefile.mac_mpi,修改后的Makefile文件如下(修改的地方用红色标记):
# mac_mpi = Apple laptop, gcc 4.6, gfortran, Open MPI 1.4.3, FFTW 2.1.5, QUIP
SHELL = /bin/sh
# ---------------------------------------------------------------------
# compiler/linker settings
# generally no need to edit this section
# unless additional compiler/linker flags or libraries needed for your machine
CC = ${MPI_GCC46_PATH}/mpic++ 将这行改为{openmpi安装目录}/bin/mpic++
CCFLAGS = -O3
SHFLAGS = -fPIC
DEPFLAGS = -M
LINK = ${MPI_GCC46_PATH}/mpic++ 和上面一样
LINKFLAGS = -O3
LIB =
SIZE = size
ARCHIVE = ar
ARFLAGS = -rc
SHLIBFLAGS = -shared
# ---------------------------------------------------------------------
# LAMMPS-specific settings
# specify settings for LAMMPS features you will use
# if you change any -D setting, do full re-compile after make clean
# LAMMPS ifdef settings, OPTIONAL
# see possible settings in doc/Section_start.html#2_2 (step 4)
LMP_INC = -DLAMMPS_GZIP -DQUIP_GFORTRAN -DLAMMPS_JPEG记住,一定要删除
# MPI library, REQUIRED
# see discussion in doc/Section_start.html#2_2 (step 5)
# can point to dummy MPI library in src/STUBS as in Makefile.serial
# INC = path for mpi.h, MPI compiler settings
# PATH = path for MPI library
# LIB = name of MPI library
MPI_INC = -DOMPI_SKIP_MPICXX 添加-I/{openmpi安装目录}/include (例如-I/home/BSS03/software/openmpi-1.4.5/include)
MPI_PATH =
MPI_LIB = 添加 –L/{openmpi安装目录}/lib –lmpi
(例如-L/home/BSS03/software/openmpi-1.4.5/lib -lmpi)
# FFT library, OPTIONAL
# see discussion in doc/Section_start.html#2_2 (step 6)
# can be left blank to use provided KISS FFT library
# INC = -
显示全部