Error when compile the latest LAMMS on CentOS 6: ../pair_eam_opt.cpp(84): error: expected a "; "

Hello, everyone,

Now I compile the latest LAMMPS on CentOS 6, a error occurs:

/home/qi/Install/mpich/bin/mpicxx -O3 -DLAMMPS_GZIP -DLAMMPS_MEMALIGN=64 -DLAMMPS_BIGBIG -I…/…/lib/voronoi/includelink -DLMP_PYTHON -I…/…/lib/poems -DLMP_MPIIO -I…/…/lib/meam -DMPICH_SKIP_MPICXX -DOMPI_SKIP_MPICXX=1 -I/home/qi/Install/mpich/include -DFFT_FFTW3 -I/home/qi/Install/fftw/include -I/home/qi/Install/voro++/include/voro++ -I/usr/include/python2.6 -I/usr/include/python2.6 -c …/pair_eam_opt.cpp
…/pair_eam_opt.cpp(84): error: expected a “;”
double* _noalias coeff;

But I did the same compile on CentOS 7, there is no any error.

Thanks you all in advance.

Hello, everyone,

Now I compile the latest LAMMPS on CentOS 6, a error occurs:

/home/qi/Install/mpich/bin/mpicxx -O3 -DLAMMPS_GZIP -DLAMMPS_MEMALIGN=64
-DLAMMPS_BIGBIG -I../../lib/voronoi/includelink -DLMP_PYTHON
-I../../lib/poems -DLMP_MPIIO -I../../lib/meam -DMPICH_SKIP_MPICXX
-DOMPI_SKIP_MPICXX=1 -I/home/qi/Install/mpich/include -DFFT_FFTW3
-I/home/qi/Install/fftw/include -I/home/qi/Install/voro++/include/voro++
-I/usr/include/python2.6 -I/usr/include/python2.6 -c ../pair_eam_opt.cpp
../pair_eam_opt.cpp(84): error: expected a ";"
    double* _noalias coeff;

But I did the same compile on CentOS 7, there is no any error.

​this has been discussed on this very list just a few days ago.
you must be using the intel compiler on the centos 6 machine, while the
centos 7 machine likely is using the GNU compiler.
for the intel compiler you should add "-restrict" to the CCFLAGS in your
makefile, and the compilation should no longer throw the quoted error.

axel.​

Thanks you all in advance.

Thank you very much.

I get it,

I should change

CC = /home/xx/Install/mpich/bin/mpicxx
CCFLAGS = -O3
SHFLAGS = -fPIC
DEPFLAGS = -M

LINK = /home/xx/Install/mpich/bin/mpicxx
LINKFLAGS = -O
LIB =
SIZE = size

to

CC = /home/xx/Install/mpich/bin/mpicxx -cxx=g++
CCFLAGS = -O3
SHFLAGS = -fPIC
DEPFLAGS = -M

LINK = /home/xx/Install/mpich/bin/mpicxx -cxx=g++
LINKFLAGS = -O
LIB =
SIZE = size

thanks.