Dear all,
I am nowing compiling the 16Sep12 version with GPU and CUDA
package. However, I encountered such an eorror and hve no idea
how to solve it.
serial = RedHat Linux box, g++4, MPICH2, FFTW
SHELL = /bin/sh
---------------------------------------------------------------------
compiler/linker settings
specify flags and libraries needed for your compiler
CC = g++
CCFLAGS = -O
SHFLAGS = -fPIC
DEPFLAGS = -M
LINK = g++
LINKFLAGS = -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
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/mpich/include -DMPICH_SKIP_MPICXX
MPI_PATH = -L/home/opt/mpich/lib
MPI_LIB = /home/opt/mpich/lib/libmpich.a
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 -FFT_FFTW
FFT_PATH = -L/home/opt/fftw/lib
FFT_LIB = /home/opt/fftw/lib/libfftw.a
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
additional system libraries needed by LAMMPS package libraries
these settings are IGNORED if the corresponding LAMMPS package
(e.g. gpu, meam) is NOT included in the LAMMPS build
SYSLIB = names of libraries
SYSPATH = paths of libraries
gpu_SYSLIB = -lcudart
gpu_SYSPATH = -L/usr/local/cuda/lib64
The error goes:
…
lal_yukawa_colloid.cpp:(.text.ZN9LAMMPS_AL13YukawaColloidIffE7computeEiiiPPdPiS2_S2_S4_PS4_S5_bbbbRiS5_S5_dRbS2[LAMMPS_AL::YukawaColloid<float, float>::compute(int, int, int, double**, int*, double*, double*, int*, int**, int**, bool, bool, bool, bool, int&, int**, int**, double, bool&, double*)]+0x869): undefined reference to ompi_mpi_comm_world' lal_yukawa_colloid.cpp:(.text._ZN9LAMMPS_AL13YukawaColloidIffE7computeEiiiPPdPiS2_S2_S4_PS4_S5_bbbbRiS5_S5_dRbS2_[LAMMPS_AL::YukawaColloid<float, float>::compute(int, int, int, double**, int*, double*, double*, int*, int**, int**, bool, bool, bool, bool, int&, int**, int**, double, bool&, double*)]+0x89d): undefined reference to
ompi_mpi_comm_world’
lal_yukawa_colloid.cpp:(.text.ZN9LAMMPS_AL13YukawaColloidIffE7computeEiiiPPdPiS2_S2_S4_PS4_S5_bbbbRiS5_S5_dRbS2[LAMMPS_AL::YukawaColloid<float, float>::compute(int, int, int, double**, int*, double*, double*, int*, int**, int**, bool, bool, bool, bool, int&, int**, int**, double, bool&, double*)]+0x911): undefined reference to ompi_mpi_comm_world' lal_yukawa_colloid.cpp:(.text._ZN9LAMMPS_AL13YukawaColloidIffE7computeEiiiPPdPiS2_S2_S4_PS4_S5_bbbbRiS5_S5_dRbS2_[LAMMPS_AL::YukawaColloid<float, float>::compute(int, int, int, double**, int*, double*, double*, int*, int**, int**, bool, bool, bool, bool, int&, int**, int**, double, bool&, double*)]+0xb55): undefined reference to
ompi_mpi_comm_world’
…/…/lib/gpu/libgpu.a(lal_yukawa_colloid.o):lal_yukawa_colloid.cpp:(.text.ZN9LAMMPS_AL13YukawaColloidIffE7computeEiiiPPdPiS2_S2_S4_PS4_S5_bbbbRiS5_S5_dRbS2[LAMMPS_AL::YukawaColloid<float, float>::compute(int, int, int, double**, int*, double*, double*, int*, int**, int**, bool, bool, bool, bool, int&, int**, int**, double, bool&, double*)]+0xb89): more undefined references to ompi_mpi_comm_world' follow collect2: ld returned 1 exit status make[1]: *** [../lmp_serial] Error 1 make[1]: Leaving directory
/home/software/lammps-16Sep12/src/Obj_serial’
make: *** [serial] Error 2
Anyone help me? Thanks in advance.
Regards,
edw