[lammps-users] LAMMPS Compiling Problem

Hi Steve,

When I compile the latest version of LAMMPS (9Feb11), there is always an error as below:

mpic++ -O2 -funroll-loops -DFFT_FFTW -DLAMMPS_GZIP -fstrict-aliasing -I/opt/fftw/2.1.5/intel/include -c create_atoms.cpp
create_atoms.cpp(173): error: identifier “INT64_MAX” is undefined
if (atom->natoms < 0 || atom->natoms > MAXBIGINT)
^

compilation aborted for create_atoms.cpp (code 2)
make[1]: *** [create_atoms.o] Error 2

Do you know why?

Below is my make file:

openmpi = Hercules cluster, icc/ifort 11, OpenMPI, FFTW2

SHELL = /bin/sh
#.IGNORE:

add Intel-based OpenMPI to path

PATH:=/opt/mpi/openmpi/intel/bin:{PATH} FFTW=/opt/fftw/2.1.5/intel LMPLIB={HOME}/development/lammps/lammps-9Feb11/lib
export PATH

CC = mpic++
CCFLAGS = -O2 -funroll-loops -DFFT_FFTW -DLAMMPS_GZIP
-fstrict-aliasing -I${FFTW}/include
NOALIAS = -fno-strict-aliasing
DEPFLAGS= -M
LINK = mpic++
LINKFLAGS = -L${FFTW}/lib
USRLIB = -lfftw
SYSLIB =
ARCHIVE = ar
ARFLAGS = -rcsv
SIZE = size

Link target

(EXE): (OBJ)
(LINK) (LINKFLAGS) (OBJ) (USRLIB) (SYSLIB) -o (EXE)
(SIZE) (EXE)

Library target

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

Compilation rules

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

.d:.cpp
(CC) (CCFLAGS) (DEPFLAGS) < > [email protected]

explicit overrides for files that violate ansi aliasing rules

pair.o : pair.cpp
(CC) (CCFLAGS) (NOALIAS) -c <

pair_table.o : pair_table.cpp
(CC) (CCFLAGS) (NOALIAS) -c <

pair_eam_alloy_opt.o : pair_eam_alloy_opt.cpp
(CC) (CCFLAGS) (NOALIAS) -c <

pair_eam_fs_opt.o : pair_eam_fs_opt.cpp
(CC) (CCFLAGS) (NOALIAS) -c <

pair_eam_opt.o : pair_eam_opt.cpp
(CC) (CCFLAGS) (NOALIAS) -c <

pair_lj_charmm_coul_long_opt.o : pair_lj_charmm_coul_long_opt.cpp
(CC) (CCFLAGS) (NOALIAS) -c <

pair_lj_cut_opt.o : pair_lj_cut_opt.cpp
(CC) (CCFLAGS) (NOALIAS) -c <

pair_morse_opt.o : pair_morse_opt.cpp
(CC) (CCFLAGS) (NOALIAS) -c <

pair_lj_cut_coul_long.o : pair_lj_cut_coul_long.cpp
(CC) (CCFLAGS) (NOALIAS) -c <

pair_cg_cut_coul_cut.o : pair_cg_cut_coul_cut.cpp
(CC) (CCFLAGS) (NOALIAS) -c <

pair_cg_cut_coul_long.o : pair_cg_cut_coul_long.cpp
(CC) (CCFLAGS) (NOALIAS) -c <

pair_lj_charmm_coul_long.o : pair_lj_charmm_coul_long.cpp
(CC) (CCFLAGS) (NOALIAS) -c <

pair_lj_cut_coul_long_tip4p.o : pair_lj_cut_coul_long_tip4p.cpp
(CC) (CCFLAGS) (NOALIAS) -c <

Individual dependencies

DEPENDS = (OBJ:.o=.d) include (DEPENDS)

Hi Steve,

When I compile the latest version of LAMMPS (9Feb11), there is always an
error as below:

mpic++ -O2 -funroll-loops -DFFT_FFTW -DLAMMPS_GZIP -fstrict-aliasing
-I/opt/fftw/2.1.5/intel/include -c create_atoms.cpp
create_atoms.cpp(173): error: identifier "INT64_MAX" is undefined
if (atom->natoms < 0 || atom->natoms > MAXBIGINT)
^

compilation aborted for create_atoms.cpp (code 2)
make[1]: *** [create_atoms.o] Error 2

Do you know why?

because your compiler is not ISO C99 compliant?

when reporting compilation problems, please _always_
report details of operating system, compiler, hardware
and so on. if you don't know, please consult your
system administrator.

thanks,
   axel.