[lammps-users] lammps-users Digest, Vol 21, Issue 27

Thanks, Steve, and since I run LAMMPS on single processor and I edited
Makefile.serial under /src/MAKE to include the meam library by adding
-L/home/pengxiang/Desktop/lammps/lib/meam
just after
CCFALGS=-O -I../STUBS -DFFT-NONE
and
LINKFLAGS=-O -L../STUBS
I was sure meam package has been included. Then I went to /src directory
and typed 'make serial' got folowing

[[email protected] src]$ make serial
make[1]: Entering directory
`/home/pengxiang/Desktop/lammps/src/Obj_serial'
gcc -O -L../STUBS -L/home/pengxiang/Desktop/lammps/lib/meam
angle_charmm.o angle_cosine.o angle_cosine_squared.o angle.o
angle_harmonic.o angle_hybrid.o atom.o atom_vec_angle.o
atom_vec_atomic.o atom_vec_bond.o atom_vec_charge.o atom_vec.o
atom_vec_full.o atom_vec_hybrid.o atom_vec_molecular.o bond.o
bond_fene.o bond_fene_expand.o bond_harmonic.o bond_hybrid.o
bond_morse.o bond_nonlinear.o bond_quartic.o change_box.o comm.o
compute_attribute_atom.o compute_centro_atom.o compute_coord_atom.o
compute.o compute_ke_atom.o compute_pe_atom.o compute_pe.o
compute_pressure.o compute_rotate_dipole.o compute_rotate_gran.o
compute_stress_atom.o compute_sum_atom.o compute_sum.o compute_temp.o
compute_temp_deform.o compute_temp_partial.o compute_temp_ramp.o
compute_temp_region.o compute_variable_atom.o compute_variable.o
create_atoms.o create_box.o delete_atoms.o delete_bonds.o
dihedral_charmm.o dihedral.o dihedral_harmonic.o dihedral_helix.o
dihedral_hybrid.o dihedral_multi_harmonic.o dihedral_opls.o
displace_atoms.o displace_box.o domain.o dump_atom.o dump_bond.o dump.o
dump_custom.o dump_dcd.o dump_xyz.o error.o ewald.o fft3d.o fft3d_wrap.o
finish.o fix_add_force.o fix_ave_atom.o fix_ave_force.o
fix_ave_spatial.o fix_ave_time.o fix_com.o fix.o fix_deform.o
fix_deposit.o fix_drag.o fix_dt_reset.o fix_efield.o fix_enforce2d.o
fix_gravity.o fix_gyration.o fix_heat.o fix_indent.o fix_langevin.o
fix_line_force.o fix_minimize.o fix_momentum.o fix_msd.o fix_nph.o
fix_npt.o fix_nve.o fix_nve_limit.o fix_nve_noforce.o fix_nvt.o
fix_nvt_sllod.o fix_orient_fcc.o fix_plane_force.o fix_print.o fix_rdf.o
fix_recenter.o fix_respa.o fix_rigid.o fix_set_force.o fix_shake.o
fix_shear_history.o fix_spring.o fix_spring_rg.o fix_spring_self.o
fix_temp_rescale.o fix_tmd.o fix_viscosity.o fix_viscous.o
fix_wall_lj126.o fix_wall_lj93.o fix_wall_reflect.o fix_wiggle.o force.o
group.o improper.o improper_cvff.o improper_harmonic.o improper_hybrid.o
input.o integrate.o kspace.o lammps.o lattice.o library.o main.o
memory.o min_cg.o min_cg_fr.o min.o minimize.o min_sd.o modify.o
neigh_bond.o neighbor.o neigh_derive.o neigh_full.o neigh_gran.o
neigh_half_bin.o neigh_half_multi.o neigh_half_nsq.o neigh_list.o
neigh_request.o neigh_respa.o neigh_stencil.o output.o pack.o
pair_airebo.o pair_buck_coul_cut.o pair_buck_coul_long.o pair_buck.o
pair_coul_cut.o pair_coul_long.o pair.o pair_eam_alloy.o pair_eam.o
pair_eam_fs.o pair_hybrid.o pair_hybrid_overlay.o
pair_lj_charmm_coul_charmm.o pair_lj_charmm_coul_charmm_implicit.o
pair_lj_charmm_coul_long.o pair_lj_cut_coul_cut.o
pair_lj_cut_coul_debye.o pair_lj_cut_coul_long.o
pair_lj_cut_coul_long_tip4p.o pair_lj_cut.o pair_lj_expand.o
pair_lj_smooth.o pair_meam.o pair_morse.o pair_soft.o pair_sw.o
pair_table.o pair_tersoff.o pair_yukawa.o pppm.o pppm_tip4p.o
random_mars.o random_park.o read_data.o read_restart.o region_block.o
region.o region_cylinder.o region_intersect.o region_prism.o
region_sphere.o region_union.o remap.o remap_wrap.o replicate.o respa.o
run.o set.o shell.o special.o temper.o thermo.o timer.o universe.o
update.o variable.o velocity.o verlet.o write_restart.o -lmpi -lstdc++
-o ../lmp_serial
pair_meam.o: In function `LAMMPS_NS::PairMEAM::compute(int, int)':
pair_meam.cpp:(.text+0x1622): undefined reference to `meam_dens_init_'
pair_meam.cpp:(.text+0x178a): undefined reference to `meam_dens_final_'
pair_meam.cpp:(.text+0x1972): undefined reference to `meam_force_'
pair_meam.o: In function `LAMMPS_NS::PairMEAM::~PairMEAM()':
pair_meam.cpp:(.text+0x1ac8): undefined reference to `meam_cleanup_'
pair_meam.o: In function `LAMMPS_NS::PairMEAM::~PairMEAM()':
pair_meam.cpp:(.text+0x1d82): undefined reference to `meam_cleanup_'
pair_meam.o: In function `LAMMPS_NS::PairMEAM::~PairMEAM()':
pair_meam.cpp:(.text+0x2034): undefined reference to `meam_cleanup_'
pair_meam.o: In function `LAMMPS_NS::PairMEAM::read_files(char*,
char*)':
pair_meam.cpp:(.text+0x3044): undefined reference to
`meam_setup_global_'
pair_meam.cpp:(.text+0x36cc): undefined reference to `meam_setup_param_'
pair_meam.o: In function `LAMMPS_NS::PairMEAM::coeff(int, char**)':
pair_meam.cpp:(.text+0x3951): undefined reference to `meam_setup_done_'
collect2: ld returned 1 exit status
make[1]: *** [../lmp_serial] Error 1
make[1]: Leaving directory
`/home/pengxiang/Desktop/lammps/src/Obj_serial'
make: *** [serial] Error 2

Is this the right steps of 'make foo' you mentioned? I am new for LAMMPS
and any help will be greatly apprieciated.

n Thu, 2008-02-14 at 07:14 -0800,

The errors you are getting look like a problem with
linking a C++ and Fortran code together. Every system
does this differently with naming conventions, etc.
So you'll need to figure out how your compilers suggest
doing it.

Steve