Dear all,
I’m compiling the 16Sep12 version with gpu package.
But I encountered an error. Any suggestions will be
greatly appreciated. Thank you.
Makefile.g++
g++ = RedHat Linux box, g++, openmpi, FFTW
SHELL = /bin/sh
---------------------------------------------------------------------
compiler/linker settings
specify flags and libraries needed for your compiler
CC = g++
CCFLAGS = -g -O # -Wunused
SHFLAGS = -fPIC
DEPFLAGS = -M
LINK = g++
LINKFLAGS = -g -O
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 -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 = -I/home/opt/openmpi/include -DMPICH_IGNORE_CXX_SEEK
MPI_PATH = -L/home/opt/openmpi/lib
MPI_LIB = -lmpi -lopen-pal -lpthread
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 = -I/home/opt/fftw/include -DFFT_FFTW
FFT_PATH = -L/home/opt/fftw/lib
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 = -I/home/opt/jpeg/include
JPG_PATH = -L/home/opt/jpeg/lib
JPG_LIB = /home/opt/jpeg/lib/libjpeg.a
GPU and …
meam_SYSLIB = -lmeam -lgfortran
poems_SYSLIB = -lpoems -lgfortran
reax_SYSLIB = -lreax -lgfortran
meam_SYSPATH = -L/home/software/temp/lammps_g++/lib/meam
poems_SYSPATH = -L/home/software/temp/lammps_g++/lib/poems
reax_SYSPATH = -L/home/software/temp/lammps_g++/lib/reax
gpu_SYSLIB = -lcudart -lcuda
gpu_SYSPATH = -L/usr/local/cuda/lib64
And the error goes:
egion_sphere.o region_union.o remap.o remap_wrap.o replicate.o rerun.o respa.o run.o set.o special.o tad.o temper.o thermo.o timer.o universe.o update.o variable.o velocity.o verlet.o verlet_split.o write_restart.o xdr_compat.o -lgpu -lpoems -lreax -lmeam -lmpi -lopen-pal -lpthread -lfftw /home/opt/jpeg/lib/libjpeg.a -lcudart -lcuda -lgfortran -o …/lmp_g++
angle_charmm.o: In function MPI::Op::Init(void (*)(void const*, void*, int, MPI::Datatype const&), bool)': /home/opt/openmpi/include/openmpi/ompi/mpi/cxx/op_inln.h:122: undefined reference to
ompi_mpi_cxx_op_intercept’
angle_charmm.o: In function Intracomm': /home/opt/openmpi/include/openmpi/ompi/mpi/cxx/intracomm.h:25: undefined reference to
MPI::Comm::Comm()’
angle_charmm.o: In function Intracomm': /home/opt/openmpi/include/openmpi/ompi/mpi/cxx/intracomm_inln.h:23: undefined reference to
MPI::Comm::Comm()’
angle_charmm.o: In function Intracomm': /home/opt/openmpi/include/openmpi/ompi/mpi/cxx/intracomm.h:25: undefined reference to
MPI::Comm::Comm()’
/home/opt/openmpi/include/openmpi/ompi/mpi/cxx/intracomm.h:25: undefined reference to MPI::Comm::Comm()' /home/opt/openmpi/include/openmpi/ompi/mpi/cxx/intracomm.h:25: undefined reference to
MPI::Comm::Comm()’
angle_charmm.o:/home/opt/openmpi/include/openmpi/ompi/mpi/cxx/intracomm_inln.h:23: more undefined references to MPI::Comm::Comm()' follow angle_charmm.o:(.rodata._ZTVN3MPI3WinE[vtable for MPI::Win]+0x48): undefined reference to
MPI::Win::Free()’
angle_charmm.o:(.rodata._ZTVN3MPI8DatatypeE[vtable for MPI::Datatype]+0x78): undefined reference to MPI::Datatype::Free()' collect2: ld returned 1 exit status make[1]: *** [../lmp_g++] Error 1 make[1]: Leaving directory
/home/software/temp/lammps_g++/src/Obj_g++’
make: *** [g++] Error 2
Regards,
edw