Hi, Dave
Thanks for quick replying and the patch. Seems the patch works, it got rid of the duplicated symbol problem, but now I have got undefined symbol problem as following, wondering if you have any thought about this. I am wondering if this is related to the "fno-underscoring" flag I have to pass to the MPICH compiling. For the gcc/gfortran 4.5.0. I followed Mengjuei Hsieh's amberonmac blog, and downloaded the pre-compiled package from hpc.sf.net. Thanks in advance for your help!
...
...
ranlib arpack.a
mv arpack.a /common2/SL_upgrade/SRC-4-SL_UPGRADE/AMBER/v11/amber11/lib
mpif90 -o sander.MPI constants.o state.o memory_module.o stack.o nose_hoover.o nose_hoover_vars.o nose_hoover_init.o qmmm_module.o trace.o lmod.o rand2.o lmodC.o xminC.o decomp.o icosasurf.o egb.o remd.o findmask.o relax_mat.o nmr.o multitmd.o multisander.o sander.o trajene.o cshf.o nmrcal.o mtmdcall.o pearsn.o printe.o runmin.o rdparm.o mdread.o locmem.o runmd.o getcor.o degcnt.o decnvh.o fastwt.o parallel.o shake.o ene.o mdwrit.o minrit.o set.o dynlib.o mdfil.o nmlsrc.o ew_force.o ew_setup.o ew_box.o ew_bspline.o ew_fft.o nonbond_list.o short_ene.o ew_recip.o pcshift.o align.o csa.o rfree.o rgroup.o amopen.o debug.o ew_recip_reg.o ew_handle_dips.o ew_dipole_recip.o mexit.o new_time.o extra_pts.o thermo_int.o matinv.o assert.o mmtsb.o mmtsb_client.o erfcfun.o constantph.o prn_dipoles.o ips.o sglds.o iwrap2.o amoeba_valence.o amoeba_multipoles.o amoeba_recip.o amoeba_interface.o amoeba_direct.o amoeba_mdin.o amoeba_adjust.o amoeba_self.o amoeba_vdw.o amoeba_induced.o amoeba_runmd.o bintraj.o spatial_recip.
o spatial_fft.o parms.o softcore.o mbar.o molecule.o xref.o dssp.o charmm.o qm_mm.o qm_ewald.o qm2_variable_solvent.o qmmm_qmtheorymodule.o \
pimd_vars.o pimd_force.o pimd_init.o cmd_vars.o cmd_matrix.o lscivr_vars.o lsc_init.o lsc_xp.o evb_vars.o evb_mathf.o evb_init.o evb_bcast.o evb_dealloc.o check_input.o evb_io.o evb_keywrd.o exchange_gauss.o exchange_warshel.o react_flux_init.o react_path.o react_flux.o kappa_keck.o schlegel_dg.o schlegel_full.o schlegel_diis.o schlegel_gmres.o schlegel_gbasis.o schlegel_pgbasis.o bnd_strtch.o ang_bend.o dihed_tors.o torinternal.o evb_gfchk.o bmat_inv.o bmat_grad.o unitv.o crossv.o cart2internal.o wdc_bmat.o select_coord.o schlegel_uff.o schlegel_dihed.o schlegel_angle.o schlegel_poh_uff.o schlegel_poh_irc.o schlegel_hcn_cart.o schlegel_hcn_int_irc.o schlegel_hcn_cart_irc.o evb_outoptions.o evb_2stdebug.o egap_umb_2stdebug.o dg_debug.o evb_io_debug.o bmat_debug.o bmat_inv_debug.o evb_io_debug2.o morse_anal2num.o xwarshel_anal2num.o xgauss_anal2num.o vdw_anal2num.o rcdbonds_anal2num.o rcbond_anal2num.o dg_grad_anal2num.o evb_input.o evb_alloc.o evb_matrix.o morsify.o mod_vdw.o evb_ntrfc.o evb_f
orce.o out_evb.o dbonds_anal2num.o bond_anal2num.o evb_umb.o evb_umb_primitive.o force.o \
/common2/SL_upgrade/SRC-4-SL_UPGRADE/AMBER/v11/amber11/lib/libsqm.a /common2/SL_upgrade/SRC-4-SL_UPGRADE/AMBER/v11/amber11/lib/libFpbsa.a /common2/SL_upgrade/SRC-4-SL_UPGRADE/AMBER/v11/amber11/lib/arpack.a /common2/SL_upgrade/SRC-4-SL_UPGRADE/AMBER/v11/amber11/lib/lapack.a /common2/SL_upgrade/SRC-4-SL_UPGRADE/AMBER/v11/amber11/lib/blas.a \
../lib/nxtsec.o ../lib/sys.a mt19937.o ncsu-abmd-hooks.o ncsu-bbmd-ctxt.o ncsu-bbmd-hooks.o ncsu-cftree.o ncsu-colvar-math.o ncsu-colvar-type.o ncsu-colvar-utils.o ncsu-colvar.o ncsu-constants.o ncsu-cv-ANGLE.o ncsu-cv-DISTANCE.o ncsu-cv-HANDEDNESS.o ncsu-cv-MULTI_RMSD.o ncsu-cv-N_OF_BONDS.o ncsu-cv-N_OF_STRUCTURES.o ncsu-cv-R_OF_GYRATION.o ncsu-cv-TORSION.o ncsu-cv-LCOD.o ncsu-cv-COS_OF_DIHEDRAL.o ncsu-lexer.o ncsu-parser.o ncsu-pmd-hooks.o ncsu-rmsd.o ncsu-sander-hooks.o ncsu-sander-proxy.o ncsu-smd-hooks.o ncsu-umbrella.o ncsu-utils.o ncsu-value.o ../netcdf/lib/libnetcdf.a
Undefined symbols:
"_lmodc", referenced from:
___lmod_driver_MOD_run_lmod in lmod.o
(maybe you meant: _lmodc_)
"_wallclock", referenced from:
___trace_MOD_trace_exit in trace.o
___trace_MOD_trace_enter in trace.o
_sander in sander.o
_sander in sander.o
_timer_start in new_time.o
_timer_stop in new_time.o
_timer_stop_start in new_time.o
_print_ongoing_time_summary in new_time.o
_qm2_time_diag_routines in libsqm.a(qm2_load_params_and_allocate.o)
_qm2_time_diag_routines in libsqm.a(qm2_load_params_and_allocate.o)
_qm2_time_diag_routines in libsqm.a(qm2_load_params_and_allocate.o)
_qm2_time_diag_routines in libsqm.a(qm2_load_params_and_allocate.o)
_qm2_time_diag_routines in libsqm.a(qm2_load_params_and_allocate.o)
_qm2_time_diag_routines in libsqm.a(qm2_load_params_and_allocate.o)
_qm2_time_diag_routines in libsqm.a(qm2_load_params_and_allocate.o)
_qm2_time_diag_routines in libsqm.a(qm2_load_params_and_allocate.o)
_qm2_time_diag_routines in libsqm.a(qm2_load_params_and_allocate.o)
_qm2_time_diag_routines in libsqm.a(qm2_load_params_and_allocate.o)
_qm2_time_diag_routines in libsqm.a(qm2_load_params_and_allocate.o)
_qm2_time_diag_routines in libsqm.a(qm2_load_params_and_allocate.o)
_qm2_time_diag_routines in libsqm.a(qm2_load_params_and_allocate.o)
_qm2_time_diag_routines in libsqm.a(qm2_load_params_and_allocate.o)
_qm2_time_diag_routines in libsqm.a(qm2_load_params_and_allocate.o)
_qm2_time_diag_routines in libsqm.a(qm2_load_params_and_allocate.o)
"_nwallclock", referenced from:
_sander in sander.o
"_microsec", referenced from:
_mdread2 in mdread.o
"_dsarpack_", referenced from:
_arpack in lmodC.o
"_xminc", referenced from:
___lmod_driver_MOD_run_xmin in lmod.o
(maybe you meant: _xminc_)
ld: symbol(s) not found
collect2: ld returned 1 exit status
make[1]: *** [sander.MPI] Error 1
make: *** [parallel] Error 2
On Jul 1, 2010, at 8:58 AM, case wrote:
> On Wed, Jun 30, 2010, Yu Chen wrote:
>>
>> I am trying to compile parallel Amber 11 on snow leopard (10.6.4) with
>> gcc/gfortran, and got duplicate symbol error as in the subject (full
>> error message at the end of the email), wondering if some one can give
>> some advices. Thanks in advance!
>
> We have always relied on name mangling to disambiguate the gauss() function
> in random.f and rand2.c, but it looks like that may no longer be possible.
>
> Try the attached patch file, doing this:
>
> cd $AMBERHOME
> patch -p0 -N < patch-file
>
> Then do a "make clean" and recompile.
>
> [Aside: can you say where you obtained your gcc/gfortran 4.5.0 from, e.g.
> fink, macports, compiled it yourself....?]
>
> Thanks for the report....dac
>
> <rand2.patch>_______________________________________________
> AMBER mailing list
> AMBER.ambermd.org
> http://lists.ambermd.org/mailman/listinfo/amber
_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Thu Jul 01 2010 - 07:00:12 PDT