Hello All,
I am trying to build the most recent version of lammps on an infiniband cluster running linux CentOS 5.5. We run OFED-1.4.1 (from the linux distro). I am using the intel compiler 11.1.073 and openmpi 1.4.2 (built with the intel compiler 11.1.073). My compilation always gets stuck at building atom.cpp.
In the following I am pasting the error, the command I use to build, the MAKE/Makefile.openmpi_intel, and the Makefile.package. Please let me know if you need any more info.
The version I am trying to build is: lammps-18Mar11
1) here is the error:
mpic++ -O3 -fno-alias -ip -unroll0 -DLAMMPS_GZIP -I../../lib/atc -I../../lib/reax -I../../lib/poems -I../../lib/meam -DOMPI_IGNORE_CXX_SEEK -DFFT_FFTW -I/u/local/compilers/intel/11.1/073/mkl/include/fftw -c atom.cpp
atom_vec_electron.h(60): error: return type is not identical to nor covariant with return type "LAMMPS_NS::bigint={int64_t={long}}" of overridden virtual function function "LAMMPS_NS::AtomVec::memory_usage"
double memory_usage();
^
atom_vec_electron.h(16): error: object of abstract class type "LAMMPS_NS::AtomVecElectron" is not allowed:
pure virtual function "LAMMPS_NS::AtomVec::memory_usage" has no overrider
AtomStyle(electron,AtomVecElectron)
^
compilation aborted for atom.cpp (code 2)
make[1]: *** [atom.o] Error 2
make[1]: Leaving directory `/u/local/downloads/lammps/lammps-18Mar11/src/Obj_openmpi_intel'
make: *** [openmpi_intel] Error 2
2) here is the command I use to build:
make openmpi_intel
3) here is the Makefile:
~ cat Makefile.openmpi_intel
# 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++
CCFLAGS = -O3 -fno-alias -ip -unroll0
#CCFLAGS = -O2 \
# -funroll-loops -fstrict-aliasing -Wall -W -Wno-uninitialized
DEPFLAGS = -M
LINK = mpic++
LINKFLAGS = -O -L/u/local/compilers/intel/11.1/073/mkl/lib/em64t
LIB = -lstdc++ -lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lpthread
ARCHIVE = ar
ARFLAGS = -rcsv
SIZE = size
# ---------------------------------------------------------------------
# LAMMPS-specific settings
# specify settings for LAMMPS features you will use
# LAMMPS ifdef options, see doc/Section_start.html
LMP_INC = -DLAMMPS_GZIP
# MPI library, can be src/STUBS dummy lib
# INC = path for mpi.h, MPI compiler settings
# PATH = path for MPI library
# LIB = name of MPI library
MPI_INC = -DOMPI_IGNORE_CXX_SEEK
MPI_PATH = -L/u/local/intel/11.1/openmpi/1.4.2/lib
MPI_LIB = -lmpi -lpthread
# FFT library, can be -DFFT_NONE if not using PPPM from KSPACE package
# INC = -DFFT_FFTW, -DFFT_INTEL, -DFFT_NONE, etc, FFT compiler settings
# PATH = path for FFT library
# LIB = name of FFT library
FFT_INC = -DFFT_FFTW -I/u/local/compilers/intel/11.1/073/mkl/include/fftw
FFT_PATH =
FFT_LIB = /u/local/compilers/intel/11.1/073/mkl/lib/em64t/libfftw2xc_intel.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
meam_SYSLIB = -lifcore -lsvml -lompstub -limf
reax_SYSLIB = -lifcore -lsvml -lompstub -limf
#user-atc_SYSLIB = -lblas -llapack
user-atc_SYSLIB = -lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lpthread
#gpu_SYSPATH = -L/usr/local/cuda/lib64
meam_SYSPATH = -L/u/local/compilers/intel/11.1/073/lib/intel64
reax_SYSPATH = -L/u/local/compilers/intel/11.1/073/lib/intel64
user-atc_SYSPATH = -L/u/local/compilers/intel/11.1/073/mkl/lib/em64t
# ---------------------------------------------------------------------
# build rules and dependencies
# no need to edit this section
include Makefile.package
EXTRA_INC = \(LMP\_INC\) (PKG_INC) \(MPI\_INC\) (FFT_INC)
EXTRA_PATH = \(PKG\_PATH\) (MPI_PATH) \(FFT\_PATH\) (PKG_SYSPATH)
EXTRA_LIB = \(PKG\_LIB\) (MPI_LIB) \(FFT\_LIB\) (PKG_SYSLIB)
# Link target
\(EXE\): (OBJ)
\(LINK\) (LINKFLAGS) \(EXTRA\_PATH\) (OBJ) \(EXTRA\_LIB\) (LIB) -o \(EXE\)
(SIZE) $(EXE)
# Library target
lib: \(OBJ\) (ARCHIVE) \(ARFLAGS\) (EXE) $(OBJ)
# Compilation rules
\.o:.cpp
\(CC\) (CCFLAGS) \(EXTRA\_INC\) \-c <
\.d:.cpp
\(CC\) (CCFLAGS) \(EXTRA\_INC\) (DEPFLAGS) < > @
# Individual dependencies
DEPENDS = \(OBJ:\.o=\.d\) include (DEPENDS)
4) here is the Makefile.packge:
~ cat Makefile.package
# Settings for libraries used by specific LAMMPS packages
# this file is auto-edited when those packages are included/excluded
PKG_INC = -I../../lib/atc -I../../lib/reax -I../../lib/poems -I../../lib/meam
PKG_PATH = -L../../lib/atc -L../../lib/reax -L../../lib/poems -L../../lib/meam
PKG_LIB = -latc -lreax -lpoems -lmeam
PKG_SYSPATH = \(user\-atc\_SYSPATH\) (reax_SYSPATH) \(meam\_SYSPATH\) PKG\_SYSLIB = (user-atc_SYSLIB) \(reax\_SYSLIB\) (meam_SYSLIB)
Please notice that I have tried to build lammps-18Mar11 with the exact same version of the intel compiler and openmpi that I have used to build the working lammps-14Oct09 version (and with very similar makefile) but I still encounter the problem described above.
I would appreciate if you could help.
Thanks,
Raffaella.