errors in making lammps

Hi Sir after removing gfortron error when i try to make linux a list of errors appears ‘’ undefined reference to …’ as shown below. the makefile setting is also shown below the error part. kindly guide me in this issue.

Error Window

[[email protected]…436… lammps-4Apr11]# cd src

[[email protected]…436… src]# make linux

make[1]: Entering directory `/root/imran/lammps-4Apr11/src/Obj_linux’

gcc -O -L…/…/lib/reax -L…/…/lib/poems -L…/…/lib/meam -L/opt/mpich/lib -L/opt/fftw/lib -L/root/imran/lammps-4apr11/lib/reax -L/root/imran/lammps-4apr11/lib/meam angle_cg_cmm.o angle_charmm.o angle_class2.o angle_cosine.o angle_cosine_delta.o angle_cosine_periodic.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_electron.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_atom_molecule.o compute_bond_local.o compute_centro_atom.o compute_cluster_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_atom_eff.o compute_ke.o compute_ke_eff.o compute_msd.o compute_msd_molecule.o compute_pair.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_deform_eff.o compute_temp_eff.o compute_temp_partial.o compute_temp_profile.o compute_temp_ramp.o compute_temp_region.o compute_temp_region_eff.o compute_temp_sphere.o compute_ti.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_adapt.o fix_addforce.o fix_ave_atom.o fix_ave_correlate.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_event_prd.o fix_event_tad.o fix_external.o fix_freeze.o fix_gravity.o fix_heat.o fix_imd.o fix_indent.o fix_langevin.o fix_langevin_eff.o fix_lineforce.o fix_minimize.o fix_momentum.o fix_move.o fix_msst.o fix_neb.o fix_nh_asphere.o fix_nh.o fix_nh_eff.o fix_nh_sphere.o fix_nph_asphere.o fix_nph.o fix_nph_eff.o fix_nph_sphere.o fix_npt_asphere.o fix_npt.o fix_npt_eff.o fix_npt_sphere.o fix_nve_asphere.o fix_nve.o fix_nve_eff.o fix_nve_limit.o fix_nve_noforce.o fix_nve_sphere.o fix_nvt_asphere.o fix_nvt.o fix_nvt_eff.o fix_nvt_sllod.o fix_nvt_sllod_eff.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_qeq_comb.o fix_qeq_reax.o fix_read_restart.o fix_reax_bonds.o fix_reax_c.o fix_recenter.o fix_respa.o fix_rigid.o fix_rigid_nve.o fix_rigid_nvt.o fix_setforce.o fix_shake.o fix_shear_history.o fix_smd.o fix_spring.o fix_spring_rg.o fix_spring_self.o fix_srd.o fix_store_force.o fix_store_state.o fix_temp_berendsen.o fix_temp_rescale.o fix_temp_rescale_eff.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 fix_wall_srd.o force.o group.o improper_class2.o improper.o improper_cvff.o improper_harmonic.o improper_hybrid.o improper_umbrella.o input.o integrate.o irregular.o kspace.o lammps.o lattice.o library.o main.o memory.o min_cg.o min.o min_fire.o min_hftn.o minimize.o min_linesearch.o min_quickmin.o min_sd.o modify.o neb.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_born.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_comb.o pair_coul_cut.o pair_coul_debye.o pair_coul_long.o pair.o pair_dipole_cut.o pair_dpd.o pair_dpd_tstat.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_eff_cut.o pair_eim.o pair_gauss.o pair_gayberne.o pair_gran_hertz_history.o pair_gran_hooke.o pair_gran_hooke_history.o pair_hbond_dreiding_lj.o pair_hbond_dreiding_morse.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_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_lps.o pair_peri_pmb.o pair_reax_c.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 reaxc_allocate.o reaxc_basic_comm.o reaxc_bond_orders.o reaxc_bonds.o reaxc_control.o reaxc_ffield.o reaxc_forces.o reaxc_hydrogen_bonds.o reaxc_init_md.o reaxc_io_tools.o reaxc_list.o reaxc_lookup.o reaxc_multi_body.o reaxc_nonbonded.o reaxc_reset_tools.o reaxc_system_props.o reaxc_tool_box.o reaxc_torsion_angles.o reaxc_traj.o reaxc_valence_angles.o reaxc_vector.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 special.o tad.o temper.o thermo.o timer.o universe.o update.o variable.o velocity.o verlet.o write_restart.o xdr_compat.o -lreax -lpoems -lmeam -lmpich -lpthread -lfftw -lreax -lgfortran -lmeam -lgfortran -lstdc++ -lmeam -lreax -lpoems -lpthread -lgfortran -o …/lmp_linux

/usr/local/lib/libmpich.a(init.o): In function `MPI_Init’:

init.c:(.text+0x34): undefined reference to `MPL_env2str’

init.c:(.text+0x54): undefined reference to `MPL_env2bool’

/usr/local/lib/libmpich.a(initthread.o): In function `MPI_Init_thread’:

initthread.c:(.text+0x4a6): undefined reference to `MPL_env2bool’

/usr/local/lib/libmpich.a(param_vals.o): In function `MPIR_Param_init_params’:

param_vals.c:(.text+0x16): undefined reference to `MPL_env2int’

param_vals.c:(.text+0x33): undefined reference to `MPL_env2int’

param_vals.c:(.text+0x50): undefined reference to `MPL_env2int’

param_vals.c:(.text+0x6d): undefined reference to `MPL_env2int’

param_vals.c:(.text+0x8a): undefined reference to `MPL_env2int’

/usr/local/lib/libmpich.a(param_vals.o):param_vals.c:(.text+0xa7): more undefined references to `MPL_env2int’ follow

/usr/local/lib/libmpich.a(param_vals.o): In function `MPIR_Param_init_params’:

param_vals.c:(.text+0x3d3): undefined reference to `MPL_env2bool’

param_vals.c:(.text+0x3f0): undefined reference to `MPL_env2bool’

param_vals.c:(.text+0x40d): undefined reference to `MPL_env2bool’

param_vals.c:(.text+0x42a): undefined reference to `MPL_env2bool’

param_vals.c:(.text+0x447): undefined reference to `MPL_env2bool’

/usr/local/lib/libmpich.a(param_vals.o):param_vals.c:(.text+0x464): more undefined references to `MPL_env2bool’ follow

/usr/local/lib/libmpich.a(param_vals.o): In function `MPIR_Param_init_params’:

param_vals.c:(.text+0x4bb): undefined reference to `MPL_env2int’

param_vals.c:(.text+0x4d8): undefined reference to `MPL_env2int’

param_vals.c:(.text+0x4f5): undefined reference to `MPL_env2bool’

param_vals.c:(.text+0x512): undefined reference to `MPL_env2bool’

param_vals.c:(.text+0x52f): undefined reference to `MPL_env2bool’

param_vals.c:(.text+0x54c): undefined reference to `MPL_env2bool’

param_vals.c:(.text+0x569): undefined reference to `MPL_env2int’

param_vals.c:(.text+0x586): undefined reference to `MPL_env2int’

param_vals.c:(.text+0x5a3): undefined reference to `MPL_env2int’

param_vals.c:(.text+0x5c0): undefined reference to `MPL_env2int’

param_vals.c:(.text+0x5dd): undefined reference to `MPL_env2str’

param_vals.c:(.text+0x5fa): undefined reference to `MPL_env2str’

param_vals.c:(.text+0x617): undefined reference to `MPL_env2bool’

param_vals.c:(.text+0x634): undefined reference to `MPL_env2bool’

param_vals.c:(.text+0x651): undefined reference to `MPL_env2bool’

param_vals.c:(.text+0x66e): undefined reference to `MPL_env2bool’

param_vals.c:(.text+0x68b): undefined reference to `MPL_env2bool’

/usr/local/lib/libmpich.a(param_vals.o):param_vals.c:(.text+0x6a8): more undefined references to `MPL_env2bool’ follow

/usr/local/lib/libmpich.a(mpid_vc.o): In function `MPIDI_Populate_vc_node_ids’:

mpid_vc.c:(.text+0x2b9): undefined reference to `MPL_env2int’

mpid_vc.c:(.text+0x2cc): undefined reference to `MPL_env2int’

mpid_vc.c:(.text+0x2f2): undefined reference to `MPL_env2bool’

/usr/local/lib/libmpich.a(tcp_init.o): In function `MPID_nem_tcp_bind’:

tcp_init.c:(.text+0x1dd): undefined reference to `MPL_env2range’

collect2: ld returned 1 exit status

make[1]: *** […/lmp_linux] Error 1

make[1]: Leaving directory `/root/imran/lammps-4Apr11/src/Obj_linux’

make: *** [linux] Error 2

Makefile.linux

linux = RedHat Linux box, gcc, gfortron, MPICH2, FFTW

SHELL = /bin/sh

---------------------------------------------------------------------

compiler/linker settings

specify flags and libraries needed for your compiler

CC = gcc

CCFLAGS = -O

DEPFLAGS = -M

LINK = gcc

LINKFLAGS = -O

LIB = -lstdc++ -lmeam -lreax -lpoems -lpthread -lgfortran

ARCHIVE = ar

ARFLAGS = -rc

SIZE = size

---------------------------------------------------------------------

LAMMPS-specific settings

specify settings for LAMMPS features you will use

LAMMPS ifdef options, see doc/Section_start.html

LMP_INC = -DLAMMPS_GZIP

MPI library, can be src/STUBS dummy lib

INC = path for mpi.h, MPI compiler settings

PATH = path for MPI library

LIB = name of MPI library

MPI_INC = -l/root/opt/mpich/include -DMPICH_SKIP_MPICXX

MPI_PATH = -L/root/opt/mpich/lib

MPI_LIB = -lmpich -lpthread

FFT library, can be -DFFT_NONE if not using PPPM from KSPACE package

INC = -DFFT_FFTW, -DFFT_INTEL, -DFFT_NONE, etc, FFT compiler settings

PATH = path for FFT library

LIB = name of FFT library

FFT_INC = -l/root/opt/fftw/include -DFFT_FFTW

FFT_PATH = -L/root/opt/fftw/lib

FFT_LIB = -lfftw

JPEG library, only needed if -DLAMMPS_JPEG listed with LMP_INC

INC = path for jpeglib.h

PATH = path for JPEG library

LIB = name of JPEG library

JPG_INC =

JPG_PATH =

JPG_LIB =

additional system libraries needed by LAMMPS package libraries

these settings are IGNORED if the corresponding LAMMPS package

(e.g. gpu, meam) is NOT included in the LAMMPS build

SYSLIB = names of libraries

SYSPATH = paths of libraries

gpu_SYSLIB = -lcudart

meam_SYSLIB = -lmeam -lgfortran

reax_SYSLIB = -lreax -lgfortran

poems_SYSLIB = -lpoems -lgfortran

user-atc_SYSLIB = -lblas -llapack

gpu_SYSPATH = -L/usr/local/cuda/lib64

meam_SYSPATH = -L/root/imran/lammps-4apr11/lib/meam

reax_SYSPATH = -L/root/imran/lammps-4apr11/lib/reax

poems_SYSLIB = -L/root/imran/lammps-4apr11/lib/poems

user-atc_SYSPATH =

---------------------------------------------------------------------

build rules and dependencies

no need to edit this section

include Makefile.package

EXTRA_INC = (LMP_INC) (PKG_INC) (MPI_INC) (FFT_INC) $(JPG_INC)

EXTRA_PATH = (PKG_PATH) (MPI_PATH) (FFT_PATH) (JPG_PATH) $(PKG_SYSPATH)

EXTRA_LIB = (PKG_LIB) (MPI_LIB) (FFT_LIB) (JPG_LIB) $(PKG_SYSLIB)

Link target

(EXE): (OBJ)

(LINK) (LINKFLAGS) (EXTRA_PATH) (OBJ) (EXTRA_LIB) (LIB) -o $(EXE)

(SIZE) (EXE)

Library target

lib: $(OBJ)

(ARCHIVE) (ARFLAGS) (EXE) (OBJ)

Compilation rules

.o:.cpp

(CC) (CCFLAGS) (EXTRA_INC) -c <

.d:.cpp

(CC) (CCFLAGS) (EXTRA_INC) (DEPFLAGS) < > @

Individual dependencies

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

include $(DEPENDS)

best regard
Muhammad Imran

The Islamia Uneversity of Bahawalpur (Pakistan)

The errors indicate you are not hooking up to MPI correctly.
That is not a LAMMPS issue. I suggest you find someone
conversant with Makefiles and buliding codes on a Linux box.
The doc pages explain all the details of what to do with MPI.

Steve