[lammps-users] problem on using MEAM package

Hi, I am now installing MEAM package on lammps.
I did what the documentation introduced. I built the MEAM itself as a library and produce the MEAM directory in src directory. and then I rewrote my Makefile as following. make this makefile i got corresponding executable file, lmp_meam. But this doesn’t work, I still cann’t use meam potential in my simmulation.

Could you kindly please figure out where i made some mistake?
Thanks very much and sorry to bother others

Regrads
Ian

Did you install the MEAM package before building LAMMPS?
That is different than building the MEAM library.
I.e.

make yes-meam
make linux

See Section 2.3 of the manual on packages.

Steve

Hi, Steve,
Yeah, I did it. it shows error saying:

/usr2/dong/lammps/lammps-22Jun07/lib/meam/libmeam.a(meam_setup_done.o)(.text+0x7c2): In function compute_pair_meam_': : undefined reference to for_check_mult_overflow64’
/usr2/dong/lammps/lammps-22Jun07/lib/meam/libmeam.a(meam_setup_done.o)(.text+0x7f3): In function `compute_pair_meam_’:

I then try to add -lifcore or -lgfortran in SYSLIB or USRLIB and make it again, but it has errors “/usr/bin/ld: cannot find -lifcore”

Could you please kindly tell me where i do something wrong to make linking FORTRAN to C invalid?

Thank you very much for your reply

Regards
Yi

Hi, Steve,
Yeah, I did it. it shows error saying:

/usr2/dong/lammps/lammps-22Jun07/lib/meam/libmeam.a(meam_setup_done.o)(.text+0x7c2): In function compute_pair_meam_': : undefined reference to for_check_mult_overflow64’
/usr2/dong/lammps/lammps-22Jun07/lib/meam/libmeam.a(meam_setup_done.o)(.text+0x7f3): In function compute_pair_meam_': : undefined reference to for_alloc_allocatable’

I then try to add -lifcore or -lgfortran in SYSLIB or USRLIB and make it again, but it has errors “/usr/bin/ld: cannot find -lifcore”

Could you please kindly tell me where i do something wrong to make linking FORTRAN to C invalid?

Thank you very much for your reply

Regards
Yi

Hi, Steve,
Yeah, I did it. it shows error saying:

[...]

I then try to add -lifcore or -lgfortran in SYSLIB or USRLIB and make it
again, but it has errors "/usr/bin/ld: cannot find -lifcore"

ok, that means you have not told the linker in which directory
to find the libifcore.a or libifcore.so files. i suggest you add you
your makefile (you have to use the proper version number...)

INTELDIR=/opt/intel/fce/9.1.040/lib/

and change the system library entry to:

SYSLIB=-Wl,-rpath,\(INTELDIR\) \-L(INTELDIR) -lifcore

Could you please kindly tell me where i do something wrong to make linking
FORTRAN to C invalid?

linking fortran and c++ at the same time is always tricky and requires
a rather detailed understanding of the linking process and what runtime
libraries each compiler depends on. there is no common solution to this,
as it changes with each combination of compilers. adding MPI to the equation
makes it even more complicated...

in your case, i hope you were just missing the linker path.

cheers,
   axel.

Hi, Axel
Thanks very much for your help! I am now able to compile it and run the meam example in.meam and in.meam.shear successfully.
Thank you once again.!

Best Regards
Yi