Building a shared library with meam

Hi again,
Sorry if these questions are a little dumb, I’m still relatively new to this. Do you know which libraries would be conflicting with 32 vs. 64 bits? I’m on OSX snow leopard which i believe is 64 bit so I assume the g++ and gfortran compilers that came with it are 64 as well. I have -gfortran in the Makefile.lammps of the meam directory and g++ as the CC in the Lammps makefile with gfortran as the LINK. Heres the error message again; last time i forgot some of the text:

There are a whole bunch of ld: warning: could not create compact unwind for … lines before this.

Undefined symbols for architecture x86_64:
“_for_cpstr”, referenced from:
meam_setup_done in libmeam.a(meam_setup_done.o)
compute_pair_meam in libmeam.a(meam_setup_done.o)
phi_meam in libmeam.a(meam_setup_done.o)
get_densref in libmeam.a(meam_setup_done.o)
get_tavref in libmeam.a(meam_setup_done.o)
compute_reference_density in libmeam.a(meam_setup_done.o)
get_zij2 in libmeam.a(meam_setup_done.o)

“___powr8i4”, referenced from:
meam_setup_done in libmeam.a(meam_setup_done.o)
compute_pair_meam in libmeam.a(meam_setup_done.o)
phi_meam in libmeam.a(meam_setup_done.o)
get_densref in libmeam.a(meam_setup_done.o)
compute_reference_density in libmeam.a(meam_setup_done.o)
get_zij2 in libmeam.a(meam_setup_done.o)
“_for_check_mult_overflow64”, referenced from:
compute_pair_meam in libmeam.a(meam_setup_done.o)
“_for_alloc_allocatable”, referenced from:
compute_pair_meam in libmeam.a(meam_setup_done.o)
“__intel_fast_memcpy”, referenced from:
compute_pair_meam in libmeam.a(meam_setup_done.o)
interpolate_meam in libmeam.a(meam_setup_done.o)
“___svml_exp2”, referenced from:
compute_pair_meam in libmeam.a(meam_setup_done.o)
zbl in libmeam.a(meam_setup_done.o)
“_for_dealloc_allocatable”, referenced from:
meam_cleanup in libmeam.a(meam_cleanup.o)
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
make[1]: *** [shlib] Error 1
make: *** [mac] Error 2

Thanks for all the help,
Jacob​

Hi again,
    Sorry if these questions are a little dumb, I'm still relatively new to
this. Do you know which libraries would be conflicting with 32 vs. 64 bits?

no. i am not a mac expert. you would be really better off talking to
such a person.

I'm on OSX snow leopard which i believe is 64 bit so I assume the g++ and
gfortran compilers that came with it are 64 as well. I have -gfortran in

not automatically. most x86 compilers can generate bother 32-bit and
64-bit code.

the Makefile.lammps of the meam directory and g++ as the CC in the Lammps
makefile with gfortran as the LINK. Heres the error message again; last
time i forgot some of the text:

There are a whole bunch of ld: warning: could not create compact unwind for
.... lines before this.

these warnings are are references to internal functions of the intel
compiler runtimes.
this suggests that you have not removed any previously compiled object
and library files when you changed the makefile settings to use gcc
instead.
again, these are all things that would be resolved much more quickly
when you have a local expert simply look over your shoulder. doing
this over e-mail is extremely slow and cumbersome.

axel.

Thanks for the help, ill ask around

Note that the lib/mean dir has several Makefiles which are meant to be
used with various compilers. Generally you simply need to use
a C++ compiler (for LAMMPS) and Fortran compiler (for the MEAM lib) that are
consistent with each other. E.g. Intel for both, or GNU for both.

Steve