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

Reuti reuti at staff.uni-marburg.de
Sun Sep 23 16:47:21 CDT 2012


Am 23.09.2012 um 15:04 schrieb Z.Y.Qiu:

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

This list is for MPICH, hence you should direct your question to the Open MPI list to get a suitable answer.

Nevertheless: using the correct mpic++ from the intended library you want to use will act as a wrapper and supply all necessary includes for headers and libraries automatically. So: use the mpic++ which your admin prepared and it should work instantly.

-- Reuti
 

> 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 =	
> 
> _______________________________________________
> mpich-discuss mailing list     mpich-discuss at mcs.anl.gov
> To manage subscription options or unsubscribe:
> https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/mpich-discuss/attachments/20120923/8edbe659/attachment.html>


More information about the mpich-discuss mailing list