[lammps-users] MEAM potential (forum LAMMPS)

We are almost sure that the error for the meam potential compilation is the folowing convention:
The C++ to FORTRAN function calls in pair_meam.cpp assumes that FORTRAN object names are converted to C object names by appending an underscore character. This is generally the case, but on machines that do not conform to this convention, you will need to modify either the C++ code or your compiler settings.
But we dont know how to modify this configuration. I saw in the src/REAX an exemple for to change this configuration, but we dont have experience with C++, where we must put the changes before to compile LAMMPS? We have the intel compilator and my makefile is:

  CC = mpicc
CCFLAGS = -O3 -fno-alias -ip -unroll0 -g -DMKL_ILP64 -DMPICH_IGNORE_CXX_SEEK -DLAMMPS_GZIP -DFFT_FFTW -I/cluster/intel/mkl/
LINK = mpicc
#LINKFLAGS = -mt_mpi -L/opt/intel/mkl/10.0.011/lib/em64t
LINKFLAGS = -L/cluster/intel/mkl/ -L../lib/meam -L/cluster/intel/fce/10.1.018/lib
USRLIB = -lmeam ../lib/meam/libmeam.a /cluster/intel/mkl/ ../lib/meam
meam_SYSLIB = -lifcore -lsvml -lompstub -limf
meam_SYSPATH = -L/opt/intel/fce/10.1.018/lib
SYSLIB = -lstdc++ -lpthread -lmkl_em64t -lguide $(meam_SYSLIB)
SIZE = size

# Link target

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

# Library target

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

# Compilation rules

  \(CC\) (CCFLAGS) -c $<

  \(CC\) (CCFLAGS) \(DEPFLAGS\) < > $@

# Individual dependencies

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

I have the error when I did:

make -f Makefile.ifort in lib/meam

make in src

after make yes-meam and

make cethil_meam yet and I have these errors:

ld: Dwarf Error: mangled line number section (bad file number).
pair_meam.o: In function `LAMMPS_NS::PairMEAM::coeff(int, char**)':
/home/cabsdacruz/LAMMPS/src/Obj_cethil_meam/pair.h:69: undefined reference t
pair_meam.o: In function `LAMMPS_NS::PairMEAM::read_files(char*, char*)':
pair_meam.cpp:(.text+0x1bc0): undefined reference to `meam_setup_global_'
pair_meam.cpp:(.text+0x20a5): undefined reference to `meam_setup_param_'
pair_meam.o: In function `LAMMPS_NS::PairMEAM::compute(int, int)':
pair_meam.cpp:(.text+0x2f20): undefined reference to `meam_dens_init_'
pair_meam.cpp:(.text+0x310b): undefined reference to `meam_dens_final_'
pair_meam.cpp:(.text+0x33a8): undefined reference to `meam_force_'
pair_meam.o: In function `LAMMPS_NS::PairMEAM::~PairMEAM()':
pair_meam.cpp:(.text+0x365b): undefined reference to `meam_cleanup_'
pair_meam.o: In function `_ZN9LAMMPS_NS8PairMEAMD9Ev':
pair_meam.cpp:(.text+0x3997): undefined reference to `meam_cleanup_'
pair_meam.o: In function `LAMMPS_NS::PairMEAM::~PairMEAM()':
pair_meam.cpp:(.text+0x3ce3): undefined reference to `meam_cleanup_'
pair_meam.o: In function `LAMMPS_NS::PairMEAM::~PairMEAM()':
pair_meam.cpp:(.text+0x4027): undefined reference to `meam_cleanup_'
make[1]: *** [../lmp_cethil_meam] Error 1
make[1]: Leaving directory `/home/cabsdacruz/LAMMPS/src/Obj_cethil_meam'
make: *** [cethil_meam] Error 2

First, I would use the most current (fully patched) LAMMPS,
since its src/MAKE/Makefile.foo files are more obvious
about where to set things. Second, you appear to be
using Intel compilers, so I would build the meam lib with
Makefile.ifort in lib/meam. Third, I would not trust mpicc
to know how to link Fortran and C++ - so I would use
the Intel c++ compiler (icc) explicitly in your src/MAKE/Makefile
and add all the Intel libraries needed to link in Fortran. I know
that it works - see MAKE/Makefile.linux - it's what I do on my