USER-CUDA compilation error

Hi all

I'm trying to compile LAMMPS (14 Feb 2013 version) with the USER-CUDA package +
OpenMPI (1.6) in a Rocks 5.3 cluster with Intel quad Processors. My GPU is GTX 670,
CUDA version is 5.0 and OpenMPI was compiled with Intel compilers. I already used
CUDA to compile other programs without any error.

I built the liblammpscuda.a library without any error (double precision, arch=20
although my GPU's CC is 3.0), but LAMMPS compilation failed with the following error
message:

[[[Lots of stuff]]]
mpic++ -O2 -funroll-loops -fstrict-aliasing -Wall -W -Wno-uninitialized
-DLAMMPS_GZIP -I../../lib/cuda -DLMP_USER_CUDA -DFFT_FFTW3
-I/usr/local/cuda-5.0/include -DUNIX -DCUDA_PRECISION=2 -DCUDA_ARCH=20 -c
angle_table.cpp
mpic++ -O2 -funroll-loops -fstrict-aliasing -Wall -W -Wno-uninitialized
-DLAMMPS_GZIP -I../../lib/cuda -DLMP_USER_CUDA -DFFT_FFTW3
-I/usr/local/cuda-5.0/include -DUNIX -DCUDA_PRECISION=2 -DCUDA_ARCH=20 -c
atom.cpp
atom_vec_full_cuda.h(26): error: no instance of constructor
"LAMMPS_NS::AtomVecFullCuda::AtomVecFullCuda" matches the argument list
            argument types are: (LAMMPS_NS::LAMMPS *)
  AtomStyle(full/cuda,AtomVecFullCuda)
  ^

atom_vec_full_cuda.h(26): error: no instance of constructor
"LAMMPS_NS::AtomVecFullCuda::AtomVecFullCuda" matches the argument list
            argument types are: (LAMMPS_NS::LAMMPS *)
  AtomStyle(full/cuda,AtomVecFullCuda)
  ^

compilation aborted for atom.cpp (code 2)
make[1]: *** [atom.o] Error 2
make[1]: se sale del directorio `/home/gsm/Descargas/lammps-14Feb13/src/Obj_openmpi'
make: *** [openmpi] Error 2

I tried to compile with both USER-CUDA and GPU packages and also tried to compile a
serial executable, but compilation failed with the same error in all cases.

Any help? Thanks in advance

I'm attaching my Makefile.openmpi below:

# openmpi = Fedora Core 6, mpic++, OpenMPI-1.6, FFTW3

SHELL = /bin/sh

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

CC = mpic++
CCFLAGS = -O2 \
    -funroll-loops -fstrict-aliasing -Wall -W -Wno-uninitialized
SHFLAGS = -fPIC
DEPFLAGS = -M

LINK = mpic++
LINKFLAGS = -O
LIB = -lstdc++
SIZE = size

ARCHIVE = ar
ARFLAGS = -rcsv
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 =
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 = -lfftw3

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

# ---------------------------------------------------------------------
# build rules and dependencies
# no need to edit this section

include Makefile.package.settings
include Makefile.package

EXTRA_INC = \(LMP\_INC\) (PKG_INC) \(MPI\_INC\) (FFT_INC) \(JPG\_INC\) (PKG_SYSINC)
EXTRA_PATH = \(PKG\_PATH\) (MPI_PATH) \(FFT\_PATH\) (JPG_PATH) \(PKG\_SYSPATH\) EXTRA\_LIB = (PKG_LIB) \(MPI\_LIB\) (FFT_LIB) \(JPG\_LIB\) (PKG_SYSLIB)

# Link target

\(EXE\): (OBJ)
  \(LINK\) (LINKFLAGS) \(EXTRA\_PATH\) (OBJ) \(EXTRA\_LIB\) (LIB) -o \(EXE\)   (SIZE) $(EXE)

# Library targets

lib: \(OBJ\)   (ARCHIVE) \(ARFLAGS\) (EXE) $(OBJ)

shlib: \(OBJ\)   (CC) \(CCFLAGS\) (SHFLAGS) \(SHLIBFLAGS\) (EXTRA_PATH) -o \(EXE\) \\         (OBJ) \(EXTRA\_LIB\) (LIB)

# Compilation rules

\.o:.cpp
  \(CC\) (CCFLAGS) \(SHFLAGS\) (EXTRA_INC) -c $<

\.d:.cpp
  \(CC\) (CCFLAGS) \(EXTRA\_INC\) (DEPFLAGS) &lt; &gt; @

# Individual dependencies

DEPENDS = \(OBJ:\.o=\.d\) sinclude (DEPENDS)

Juan J. Meléndez Martí­nez
Profesor Titular de Universidad
Departamento de Fí­sica
Universidad de Extremadura
Avda. de Elvas, s/n 06006 Badajoz (España)
Tfno.: 924 28 96 55
Fax: 924 28 96 51
e-mail: [email protected]...

Christian gave me a patch which I will post today
which will likely fix this. One of the function prototypes
changed and it didn't get propagated into the CUDA derived
classes.

Steve