[lammps-users] A problem about building lammps: undefined reference

Dear All:

The platform is redhat, openmpi. I use mpicc to compile. I’ve built all libraries of atc, meam, poems,reax, except gnu. But it still has problem:

make[1]: Entering directory /ifs/ibfs1/home/lyang/lammps-20Feb10/src/Obj_lewis' mpiCC -O -L/home/lyang/fftw2.1.5/lib -L../../lib/poems -L../../lib/meam -L../../lib/atc -L../../lib/reax -L/opt/intel/fce/9.1.036/lib angle_cg_cmm.o angle_charmm.o angle_class2.o angle_cosine.o angle_cosine_delta.o angle_cosine_squared.o angle.o angle_harmonic.o angle_hybrid.o angle_table.o atom.o atom_vec_angle.o atom_vec_atomic.o atom_vec_bond.o atom_vec_charge.o atom_vec_colloid.o atom_vec.o atom_vec_dipole.o atom_vec_ellipsoid.o atom_vec_full.o atom_vec_granular.o atom_vec_hybrid.o atom_vec_molecular.o atom_vec_peri.o bond_class2.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 bond_table.o cg_cmm_parms.o change_box.o comm.o compute_ackland_atom.o compute_angle_local.o compute_bond_local.o compute_centro_atom.o compute_cna_atom.o compute_com.o compute_com_molecule.o compute_coord_atom.o compute.o compute_damage_atom.o compute_dihedral_local.o compute_displace_atom.o compute_erotate_asphere.o compute_erotate_sphere.o compute_event_displace.o compute_group_group.o compute_gyration.o compute_gyration_molecule.o compute_heat_flux.o compute_improper_local.o compute_ke_atom.o compute_ke.o compute_msd.o compute_msd_molecule.o compute_pair_local.o compute_pe_atom.o compute_pe.o compute_pressure.o compute_property_atom.o compute_property_local.o compute_property_molecule.o compute_rdf.o compute_reduce.o compute_reduce_region.o compute_stress_atom.o compute_temp_asphere.o compute_temp_com.o compute_temp.o compute_temp_deform.o compute_temp_partial.o compute_temp_profile.o compute_temp_ramp.o compute_temp_region.o compute_temp_sphere.o create_atoms.o create_box.o delete_atoms.o delete_bonds.o dihedral_charmm.o dihedral_class2.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_cfg.o dump.o dump_custom.o dump_dcd.o dump_local.o dump_xtc.o dump_xyz.o error.o ewald.o ewald_n.o fft3d.o fft3d_wrap.o finish.o fix_addforce.o fix_atc.o fix_ave_atom.o fix_aveforce.o fix_ave_histo.o fix_ave_spatial.o fix_ave_time.o fix_bond_break.o fix_bond_create.o fix_bond_swap.o fix_box_relax.o fix.o fix_deform.o fix_deposit.o fix_drag.o fix_dt_reset.o fix_efield.o fix_enforce2d.o fix_evaporate.o fix_event.o fix_freeze.o fix_gravity.o fix_heat.o fix_imd.o fix_indent.o fix_langevin.o fix_lineforce.o fix_minimize.o fix_momentum.o fix_move.o fix_nph.o fix_npt_asphere.o fix_npt.o fix_npt_sphere.o fix_nve_asphere.o fix_nve.o fix_nve_limit.o fix_nve_noforce.o fix_nve_sphere.o fix_nvt_asphere.o fix_nvt.o fix_nvt_sllod.o fix_nvt_sphere.o fix_orient_fcc.o fix_peri_neigh.o fix_planeforce.o fix_poems.o fix_pour.o fix_press_berendsen.o fix_print.o fix_reax_bonds.o fix_recenter.o fix_respa.o fix_rigid.o fix_set_force.o fix_shake.o fix_shear_history.o fix_smd.o fix_spring.o fix_spring_rg.o fix_spring_self.o fix_store_coord.o fix_store_force.o fix_temp_berendsen.o fix_temp_rescale.o fix_thermal_conductivity.o fix_tmd.o fix_ttm.o fix_viscosity.o fix_viscous.o fix_wall_colloid.o fix_wall.o fix_wall_gran.o fix_wall_harmonic.o fix_wall_lj126.o fix_wall_lj93.o fix_wall_reflect.o fix_wall_region.o force.o group.o improper_class2.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.o min_hftn.o minimize.o min_linesearch.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_born_coul_long.o pair_buck_coul.o pair_buck_coul_cut.o pair_buck_coul_long.o pair_buck.o pair_cdeam.o pair_cg_cmm_coul_cut.o pair_cg_cmm_coul_long.o pair_cg_cmm.o pair_cmm_common.o pair_colloid.o pair_coul_cut.o pair_coul_debye.o pair_coul_long.o pair.o pair_dipole_cut.o pair_dpd.o pair_dsmc.o pair_eam_alloy.o pair_eam_alloy_opt.o pair_eam.o pair_eam_fs.o pair_eam_fs_opt.o pair_eam_opt.o pair_gayberne.o pair_gayberne_gpu.o pair_gran_hertz_history.o pair_gran_hooke.o pair_gran_hooke_history.o pair_hybrid.o pair_hybrid_overlay.o pair_lj96_cut.o pair_lj_charmm_coul_charmm.o pair_lj_charmm_coul_charmm_implicit.o pair_lj_charmm_coul_long.o pair_lj_charmm_coul_long_opt.o pair_lj_class2_coul_cut.o pair_lj_class2_coul_long.o pair_lj_class2.o pair_lj_coul.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_cut_gpu.o pair_lj_cut_opt.o pair_lj_expand.o pair_lj_gromacs_coul_gromacs.o pair_lj_gromacs.o pair_lj_smooth.o pair_lubricate.o pair_meam.o pair_morse.o pair_morse_opt.o pair_peri_pmb.o pair_reax.o pair_resquared.o pair_soft.o pair_sw.o pair_table.o pair_tersoff.o pair_tersoff_zbl.o pair_yukawa_colloid.o pair_yukawa.o pppm.o pppm_tip4p.o prd.o random_mars.o random_park.o read_data.o read_restart.o region_block.o region_cone.o region.o region_cylinder.o region_intersect.o region_plane.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 xdr_compat.o -lfftw -lpoems -lmeam -lreax -latc -lpthread -lstdc++ -lifcore -lsvml -lompstub -limf -lblas -o ../lmp_lewis fix_nph.o(.text+0x31f6): In function LAMMPS_NS::FixNPH::initial_integrate_respa(int, int, int)’:
: undefined reference to __svml_exp2' fix_nph.o(.text+0x3216): In function LAMMPS_NS::FixNPH::initial_integrate_respa(int, int, int)’:
: undefined reference to __svml_exp2' fix_nph.o(.text+0x32ce): In function LAMMPS_NS::FixNPH::initial_integrate_respa(int, int, int)’:
: undefined reference to __svml_exp2' fix_nph.o(.text+0x32ee): In function LAMMPS_NS::FixNPH::initial_integrate_respa(int, int, int)’:
: undefined reference to __svml_exp2' fix_nph.o(.text+0x3870): In function LAMMPS_NS::FixNPH::initial_integrate(int)’:
: undefined reference to __svml_exp2' fix_nph.o(.text+0x3892): more undefined references to __svml_exp2’ follow
improper_class2.o(.text+0xa98): In function LAMMPS_NS::ImproperClass2::compute(int, int)': : undefined reference to __svml_acos2’
improper_class2.o(.text+0xa9d): In function LAMMPS_NS::ImproperClass2::compute(int, int)': : undefined reference to __svml_sin2’
improper_class2.o(.text+0xab7): In function LAMMPS_NS::ImproperClass2::compute(int, int)': : undefined reference to __svml_acos2’
improper_class2.o(.text+0xac0): In function LAMMPS_NS::ImproperClass2::compute(int, int)': : undefined reference to __svml_sin2’
pair_airebo.o(.text+0x16e6): In function LAMMPS_NS::PairAIREBO::compute(int, int)': : undefined reference to __svml_exp2’
pair_airebo.o(.text+0x1765): In function LAMMPS_NS::PairAIREBO::compute(int, int)': : undefined reference to __svml_exp2’
pair_airebo.o(.text+0x7598): In function LAMMPS_NS::PairAIREBO::gSpline(double, double, int, double*, double*)': : undefined reference to __svml_pow2’
pair_airebo.o(.text+0x7602): In function LAMMPS_NS::PairAIREBO::gSpline(double, double, int, double*, double*)': : undefined reference to __svml_pow2’
pair_airebo.o(.text+0x7662): In function LAMMPS_NS::PairAIREBO::gSpline(double, double, int, double*, double*)': : undefined reference to __svml_pow2’
pair_airebo.o(.text+0x7726): In function LAMMPS_NS::PairAIREBO::gSpline(double, double, int, double*, double*)': : undefined reference to __svml_pow2’
pair_airebo.o(.text+0x7790): In function LAMMPS_NS::PairAIREBO::gSpline(double, double, int, double*, double*)': : undefined reference to __svml_pow2’
pair_airebo.o(.text+0x77f0): more undefined references to __svml_pow2' follow pair_airebo.o(.text+0x1b009): In function LAMMPS_NS::PairAIREBO::FREBO(int, int)’:
: undefined reference to __svml_exp2' pair_airebo.o(.text+0x1b088): In function LAMMPS_NS::PairAIREBO::FREBO(int, int)’:
: undefined reference to __svml_exp2' pair_gayberne_gpu.o(.text+0x196): In function LAMMPS_NS::PairGayBerneGPU::~PairGayBerneGPU()’:
: undefined reference to gb_gpu_time(int)' pair_gayberne_gpu.o(.text+0x1be): In function LAMMPS_NS::PairGayBerneGPU::~PairGayBerneGPU()’:
: undefined reference to gb_gpu_clear(int)' pair_gayberne_gpu.o(.text+0x2a4): In function LAMMPS_NS::PairGayBerneGPU::~PairGayBerneGPU()’:
: undefined reference to gb_gpu_time(int)' pair_gayberne_gpu.o(.text+0x2c7): In function LAMMPS_NS::PairGayBerneGPU::~PairGayBerneGPU()’:
: undefined reference to gb_gpu_clear(int)' pair_gayberne_gpu.o(.text+0x3a4): In function LAMMPS_NS::PairGayBerneGPU::~PairGayBerneGPU()’:
: undefined reference to gb_gpu_time(int)' pair_gayberne_gpu.o(.text+0x3c7): In function LAMMPS_NS::PairGayBerneGPU::~PairGayBerneGPU()’:
: undefined reference to gb_gpu_clear(int)' pair_gayberne_gpu.o(.text+0x50a): In function LAMMPS_NS::PairGayBerneGPU::compute(int, int)’:
: undefined reference to gb_gpu_reset_nbors(int, int, int, int*, int const*, int const*, int, bool&)' pair_gayberne_gpu.o(.text+0x555): In function LAMMPS_NS::PairGayBerneGPU::compute(int, int)’:
: undefined reference to gb_gpu_atom(double**, double**, int const*, bool, int)' pair_gayberne_gpu.o(.text+0x581): In function LAMMPS_NS::PairGayBerneGPU::compute(int, int)’:
: undefined reference to gb_gpu_gayberne(bool, bool, bool, int)' pair_gayberne_gpu.o(.text+0x60a): In function LAMMPS_NS::PairGayBerneGPU::compute(int, int)’:
: undefined reference to gb_gpu_forces(double**, double**, int const*, bool, bool, bool, bool, double*, double**, double*, int)' pair_gayberne_gpu.o(.text+0x759): In function LAMMPS_NS::PairGayBerneGPU::compute(int, int)’:
: undefined reference to gb_gpu_nbors(int const*, int, bool, int)' pair_gayberne_gpu.o(.text+0x7b4): In function LAMMPS_NS::PairGayBerneGPU::compute(int, int)’:
: undefined reference to gb_gpu_nbors(int const*, int, bool, int)' pair_gayberne_gpu.o(.text+0x9ae): In function LAMMPS_NS::PairGayBerneGPU::memory_usage()’:
: undefined reference to gb_gpu_bytes()' pair_gayberne_gpu.o(.text+0xce9): In function LAMMPS_NS::PairGayBerneGPU::init_style()’:
: undefined reference to gb_gpu_init(int&, int, double, double, double, double**, double**, double**, double**, double**, double*, int**, double**, double**, double**, double**, double**, double*, int, int, int)' pair_gayberne_gpu.o(.text+0xe2f): In function LAMMPS_NS::PairGayBerneGPU::init_style()’:
: undefined reference to gb_gpu_name(int, int, char*)' pair_lj_cut_gpu.o(.text+0x14b): In function LAMMPS_NS::PairLJCutGPU::~PairLJCutGPU()’:
: undefined reference to lj_gpu_time()' pair_lj_cut_gpu.o(.text+0x168): In function LAMMPS_NS::PairLJCutGPU::~PairLJCutGPU()’:
: undefined reference to lj_gpu_clear()' pair_lj_cut_gpu.o(.text+0x23e): In function LAMMPS_NS::PairLJCutGPU::~PairLJCutGPU()’:
: undefined reference to lj_gpu_time()' pair_lj_cut_gpu.o(.text+0x25b): In function LAMMPS_NS::PairLJCutGPU::~PairLJCutGPU()’:
: undefined reference to lj_gpu_clear()' pair_lj_cut_gpu.o(.text+0x32e): In function LAMMPS_NS::PairLJCutGPU::~PairLJCutGPU()’:
: undefined reference to lj_gpu_time()' pair_lj_cut_gpu.o(.text+0x34b): In function LAMMPS_NS::PairLJCutGPU::~PairLJCutGPU()’:
: undefined reference to lj_gpu_clear()' pair_lj_cut_gpu.o(.text+0x46b): In function LAMMPS_NS::PairLJCutGPU::compute(int, int)’:
: undefined reference to lj_gpu_cell(double**, double*, double**, int*, int, int, int, bool, bool, double const*, double const*)' pair_lj_cut_gpu.o(.text+0x653): In function LAMMPS_NS::PairLJCutGPU::memory_usage()’:
: undefined reference to lj_gpu_bytes()' pair_lj_cut_gpu.o(.text+0x984): In function LAMMPS_NS::PairLJCutGPU::init_style()’:
: undefined reference to lj_gpu_init(int&, int, double**, double**, double**, double**, double**, double**, double**, double**, double*, double*, double*, double, double, int, int)' pair_lj_cut_gpu.o(.text+0xa75): In function LAMMPS_NS::PairLJCutGPU::init_style()’:
: undefined reference to lj_gpu_name(int, int, char*)' pppm.o(.text+0x16de): In function LAMMPS_NS::PPPM::setup()’:
: undefined reference to __svml_exp2' pppm.o(.text+0x1712): In function LAMMPS_NS::PPPM::setup()’:
: undefined reference to __svml_sin2_mask' pppm.o(.text+0x1724): In function LAMMPS_NS::PPPM::setup()’:
: undefined reference to __svml_pow2_mask' pppm.o(.text+0x18c2): In function LAMMPS_NS::PPPM::setup()’:
: undefined reference to __svml_exp2' pppm.o(.text+0x18fb): In function LAMMPS_NS::PPPM::setup()’:
: undefined reference to __svml_sin2' pppm.o(.text+0x1911): In function LAMMPS_NS::PPPM::setup()’:
: undefined reference to __svml_pow2' pppm.o(.text+0x574e): In function LAMMPS_NS::PPPM::rms(double, double, double, double, double**)’:
: undefined reference to __svml_pow2' pppm.o(.text+0x57d5): In function LAMMPS_NS::PPPM::rms(double, double, double, double, double**)’:
: undefined reference to __svml_pow2' pppm.o(.text+0x5843): In function LAMMPS_NS::PPPM::rms(double, double, double, double, double**)’:
: undefined reference to __svml_pow2' pppm.o(.text+0x7af6): In function LAMMPS_NS::PPPM::set_grid()’:
: undefined reference to __svml_pow2' pppm.o(.text+0x7bb6): more undefined references to __svml_pow2’ follow
…/…/lib/meam/libmeam.a(meam_setup_done.o)(.text+0x164b): In function compute_pair_meam_': : undefined reference to __svml_exp2’
…/…/lib/meam/libmeam.a(meam_setup_done.o)(.text+0x1812): In function compute_pair_meam_': : undefined reference to __svml_exp2’
…/…/lib/meam/libmeam.a(meam_setup_done.o)(.text+0x7803): In function zbl_': : undefined reference to _svml_exp2’
…/…/lib/reax/libreax.a(reax_inout.o)(.text+0x12b1): In function ffinpt_': : undefined reference to svml_pow2’
…/…/lib/reax/libreax.a(reax_inout.o)(.text+0x13bb): In function ffinpt_': : undefined reference to svml_pow2’
…/…/lib/atc/libatc.a(Matrix.o)(.text+0x2eb): In function inv(Matrix<double> const&)': /ifs/ibfs1/home/lyang/lammps-20Feb10/lib/atc/Matrix.cpp:52: undefined reference to dgetrf

…/…/lib/atc/libatc.a(Matrix.o)(.text+0x32c):/ifs/ibfs1/home/lyang/lammps-20Feb10/lib/atc/Matrix.cpp:60: undefined reference to dlange_' ../../lib/atc/libatc.a(Matrix.o)(.text+0x36f):/ifs/ibfs1/home/lyang/lammps-20Feb10/lib/atc/Matrix.cpp:63: undefined reference to dgecon

…/…/lib/atc/libatc.a(Matrix.o)(.text+0x3a7):/ifs/ibfs1/home/lyang/lammps-20Feb10/lib/atc/Matrix.cpp:69: undefined reference to dgetri_' ../../lib/atc/libatc.a(Matrix.o)(.text+0x3ed):/ifs/ibfs1/home/lyang/lammps-20Feb10/lib/atc/Matrix.cpp:78: undefined reference to dgetri

…/…/lib/atc/libatc.a(Matrix.o)(.text+0x856): In function det(Matrix<double> const&)': /ifs/ibfs1/home/lyang/lammps-20Feb10/lib/atc/Matrix.cpp:110: undefined reference to dgetrf

…/…/lib/atc/libatc.a(Matrix.o)(.text+0xda1): In function max_eigenvalue(Matrix<double> const&)': /ifs/ibfs1/home/lyang/lammps-20Feb10/lib/atc/Matrix.cpp:136: undefined reference to dgetrf

make[1]: *** […/lmp_lewis] Error 1
make[1]: Leaving directory `/ifs/ibfs1/home/lyang/lammps-20Feb10/src/Obj_lewis’
make: *** [lewis] Error 2

The following is my makefile. Since the system’s name is lewis, I change the file’s name into Makefile.lewis.

I appreciate it very much if you can help me figure out the problem

ttm = RedHat Linux box, Intel icc, MPICH2, FFTW

SHELL = /bin/sh

System-specific settings

CC = mpiCC
CCFLAGS = -O -I//home/lyang/fftw2.1.5/include
-I…/…/lib/poems -I…/…/lib/reax -I…/…/lib/atc -I…/…/lib/meam
-DFFT_FFTW -DLAMMPS_GZIP -DMPICH_IGNORE_CXX_SEEK
DEPFLAGS = -M
LINK = mpiCC
LINKFLAGS = -O -L/home/lyang/fftw2.1.5/lib
-L…/…/lib/poems -L…/…/lib/meam -L…/…/lib/atc
-L…/…/lib/reax -L/opt/intel/fce/9.1.036/lib
USRLIB = -lfftw -lpoems -lmeam -lreax -latc
SYSLIB = -lpthread -lstdc++ -lifcore -lsvml -lompstub -limf -lblas
ARCHIVE = ar
ARFLAGS = -rc
SIZE = size

Link target

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

Library target

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

Compilation rules

.o:.cpp
(CC) (CCFLAGS) -c $<

.d:.cpp
(CC) (CCFLAGS) (DEPFLAGS) < > $@

Individual dependencies

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

Nick Yang

Your appended Makefile (different than your previous one) is
not the current style of Makefile used by the current version
of LAMMPS. Please download the current version, and use
those Makefiles.

Steve

2010/3/2 Lingqi Yang <[email protected]...>: