[mpich-discuss] problems linking mpi or openmpi to LAMMPS

Z.Y.Qiu luoyuan126 at gmail.com
Sun Sep 23 08:04:47 CDT 2012


Hi,everyone. I have some problems about linking MPI softwares to LAMMPS.
1. I can link MPICH2-1.3.1 which is installed under my document on the
LINUX service successfully.But when i link
 openmpi which installed under  root, i failed.
2.For mpich2-1.3.1, libmpich.a ,libpthread.a and libmpl.a are needed. If i
want link openmpi to lammps ,which libs do i need.
i can find libmpi.a in lib directory.
3.what do i need to modify the content of Makefile in LAMMPS. The following
is the content of Makefile in LAMMPS.
  Words in red is the content i modified.
appreciating any help !!!!!!!!!!!

# openmpi = Fedora Core 6, mpic++, OpenMPI-1.1, FFTW2

SHELL = /bin/sh

# ---------------------------------------------------------------------
# compiler/linker settings
# specify flags and libraries needed for your compiler

CC = mpic++   -I/public/software/mpi/openmpi1.4.2-intel/include  \
                       -I/home/qzy/lammps/lmp/lib/reax                  \
                       -I/home/qzy/lammps/lmp/lib/meam
CCFLAGS = -O2 \
-funroll-loops -fstrict-aliasing -Wall -W -Wno-uninitialized
DEPFLAGS = -M
LINK = mpic++
LINKFLAGS = -O         -L/public/software/mpi/openmpi1.4.2-intel/lib  \
                         -L/home/qzy/lammps/lmp/lib/reax                 \
                         -L/home/qzy/lammps/lmp/lib/meam
LIB =           -lstdc++   -lgfortran
ARCHIVE = ar
ARFLAGS = -rcsv
SIZE = size

# ---------------------------------------------------------------------
# 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

# 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 =
MPI_PATH =
MPI_LIB =

# 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 = -DFFT setting, e.g. -DFFT_FFTW, FFT compiler settings
# PATH = path for FFT library
# LIB = name of FFT library

FFT_INC =     -DFFT_FFTW
FFT_PATH =
FFT_LIB = -lfftw

# JPEG library, OPTIONAL
# see discussion in doc/Section_start.html#2_2 (step 7)
# only needed if -DLAMMPS_JPEG listed with LMP_INC
# INC = path for jpeglib.h
# PATH = path for JPEG library
# LIB = name of JPEG library

JPG_INC =
JPG_PATH =
JPG_LIB =
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/mpich-discuss/attachments/20120923/9da3dc04/attachment.html>


More information about the mpich-discuss mailing list