Re: [AMBER] iAPBS 1.2.0 - APBS 1.0.0 - Amber11 compilation error

From: Robert Konecny <rok.ucsd.edu>
Date: Tue, 20 Sep 2011 20:22:46 -0700

Hi Ken,

you are right, there is a new function matvec() in the libFpbsa.a library
which collides with the same named function in APBS. One solution is - as
you are proposing - to rename all instances of matvec() in APBS. Other
solution, perhaps simpler is to redefine matvec() in libapbs.a:

cd $APBS_PREFIX/lib
mv libapbs.a libapbs.a.bck
objcopy --redefine-sym matvec_=matveci_ libapbs.a.bck libapbs.a

Thanks,

Robert


On Tue, Sep 20, 2011 at 05:05:00PM -0500, Kenneth Tussey wrote:
> I finally got this to compile - I renamed every instance of matvec() in
> the apbs source files to matvecc() to prevent the function collision
> during linking. I am not sure what matvec() is doing in the apbs source
> code, but I am relatively sure that matvec() in the amber code is the
> routine for multiplying a matrix and a vector. I do not think that
> renaming either function will cause a problem as long as every instance
> of that function is renamed throughout the entire source code tree.
>
> I haven't tried it yet, but I imagine that running
>
> for i in $(find $AMBERHOME -name "*.f" -o -name "*.fh"); do \
> grep " matvec(" $i && \
> sed 's: matvec(: matvecc(:' > $i.new && \
> mv $i.new $i;
> done
>
> will replace every instance of the matvec() function in the amber code
> with matvecc() name ( or whatever you want to use for this function),
> and allow the code to compile.
>
> Here are the source files that appear to call matvec() -
>
> /opt/amber11/src/nmode/calink.f
> /opt/amber11/AmberTools/src/pbsa/_jumps.f
> /opt/amber11/AmberTools/src/pbsa/_irre32.f
> /opt/amber11/AmberTools/src/pbsa/problem.f
> /opt/amber11/AmberTools/src/pbsa/irre32.f
> /opt/amber11/AmberTools/src/pbsa/_problem.f
> /opt/amber11/AmberTools/src/pbsa/miniop.f
> /opt/amber11/AmberTools/src/pbsa/jumps.f
> /opt/amber11/AmberTools/src/pbsa/_irre31.f
> /opt/amber11/AmberTools/src/pbsa/_miniop.f
> /opt/amber11/AmberTools/src/pbsa/coed20.f
> /opt/amber11/AmberTools/src/pbsa/_coed6.f
> /opt/amber11/AmberTools/src/pbsa/irre31.f
> /opt/amber11/AmberTools/src/pbsa/_coed20.f
> /opt/amber11/AmberTools/src/pbsa/coed6.f
>
>
> Hope this helps somebody compile sander.APBS in the future.
>
> Ken
>
>
>
>
>
>
> On 09/20/2011 03:12 PM, Kenneth Tussey wrote:
> > Hello,
> >
> > The patch did not seem to work :
> >
> > # patch -p0 -N < patch.apbs
> > patching file src/sander/Makefile
> > Hunk #1 FAILED at 305.
> > 1 out of 1 hunk FAILED -- saving rejects to file src/sander/Makefile.rej
> >
> > But, I did read it , and assume the patch was just deleting the
> > libFpbsa.a library from the Makefile. So I did that manually. Now, the
> > final compilation, it seems, is missing critical definitions:
> >
> >
> > gfortran -o sander.APBS apbs_vars.APBS.o apbs.APBS.o 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.APBS.o trajene.o cshf.o nmrcal.o
> > mtmdcall.o pearsn.o printe.APBS.o runmin.o rdparm.o mdread.APBS.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.APBS.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 force.APBS.o \
> > -L/usr/local/iAPBS-build/lib -liapbs -lapbsmainroutines
> > -lapbs -lmaloc \
> > /opt/amber11/lib/libsqm.a /opt/amber11/lib/arpack.a
> > /opt/amber11/lib/lapack.a /opt/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
> > /opt/amber11/lib/libnetcdf.a -DAPBS -lz
> > sander.APBS.o: In function `sander_':
> > _sander.APBS.f:(.text+0x401d): undefined reference to `pb_free_'
> > runmin.o: In function `runmin_':
> > _runmin.f:(.text+0x1b62): undefined reference to
> > `__poisson_boltzmann_MOD_oution'
> > _runmin.f:(.text+0x1b68): undefined reference to
> > `__poisson_boltzmann_MOD_outwat'
> > mdread.APBS.o: In function `mdread1_':
> > _mdread.APBS.f:(.text+0x3986): undefined reference to `pb_read_'
> > mdread.APBS.o: In function `mdread2_':
> > _mdread.APBS.f:(.text+0xe763): undefined reference to `pb_init_'
> > ene.o: In function `bond_':
> > _ene.f:(.text+0x3c2): undefined reference to
> > `__poisson_boltzmann_MOD_outflagorig'
> > _ene.f:(.text+0x3c9): undefined reference to
> > `__poisson_boltzmann_MOD_outflagorig'
> > ene.o: In function `capwat_':
> > _ene.f:(.text+0x357c): undefined reference to
> > `__poisson_boltzmann_MOD_outflagorig'
> > _ene.f:(.text+0x35a2): undefined reference to
> > `__poisson_boltzmann_MOD_outflagorig'
> > force.APBS.o: In function `force_':
> > _force.APBS.f:(.text+0x1652): undefined reference to
> > `__poisson_boltzmann_MOD_pb_force'
> > _force.APBS.f:(.text+0x16f0): undefined reference to
> > `__dispersion_cavity_MOD_npopt'
> > _force.APBS.f:(.text+0x272e): undefined reference to
> > `__dispersion_cavity_MOD_np_force'
> > collect2: ld returned 1 exit status
> > make: *** [sander.APBS] Error 1
> >
> >
> >
> > On 09/19/2011 05:22 PM, Jason Swails wrote:
> >> Try applying the following patch that I attached
> >>
> >> go to AMBERHOME, and apply it via
> >>
> >> cd $AMBERHOME
> >> patch -p0 -N< patch.apbs
> >>
> >> See if this works for you. If not, I will try building it myself and report
> >> back.
> >>
> >> HTH,
> >> Jason
> >>
> >> On Mon, Sep 19, 2011 at 4:47 PM, Kenneth Tussey
> >> <tussey1.illinois.gmail.com>wrote:
> >>
> >>> When attempting to build sander.APBS as per the instructions on the
> >>> iAPBS website, I get an error from having multiple definitions of
> >>> matvec_. See code below. I have tried compiling with multiple versions
> >>> of APBS 1.x.0, and they all seem to give the same error. Perhaps someone
> >>> can shed some light on this? Thank you.
> >>>
> >>> Ken
> >>>
> >>> /make[1]: Leaving directory `/opt/amber11/AmberTools/src/arpack'
> >>> ifort -o sander.APBS apbs_vars.APBS.o apbs.APBS.o 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.APBS.o trajene.o cshf.o nmrcal.o
> >>> mtmdcall.o pearsn.o printe.APBS.o runmin.o rdparm.o mdread.APBS.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.APBS.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 force.APBS.o \
> >>> -L/usr/local/iAPBS-build/lib -liapbs -lapbsmainroutines
> >>> -lapbs -lmaloc \
> >>> /opt/amber11/lib/libsqm.a /opt/amber11/lib/libFpbsa.a
> >>> /opt/amber11/lib/arpack.a -Wl,--start-group
> >>> /usr/local/intel/composerxe-2011.4.191/mkl/lib/em64t/libmkl_intel_lp64.a
> >>> /usr/local/intel/composerxe-2011.4.191/mkl/lib/em64t/libmkl_sequential.a
> >>> /usr/local/intel/composerxe-2011.4.191/mkl/lib/em64t/libmkl_core.a
> >>> -Wl,--end-group -lpthread -lsvml \
> >>> ../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 /opt/amber11/lib/libnetcdf.a
> >>> -shared-intel -DAPBS
> >>> /opt/amber11/lib/libFpbsa.a(miniop.o): In function `matvec_':
> >>> _miniop.f:(.text+0xa80): multiple definition of `matvec_'
> >>>
> >>> /usr/local/iAPBS-build/lib/libapbs.a(matvecd.o):/usr/local/iAPBS-build/apbs-1.0.0-source/contrib/pmgZ/matvecd.f:38:
> >>> first defined here
> >>> /usr/local/iAPBS-build/lib/libiapbs.a(apbs_driver.o): In function
> >>> `apbsdrv_':
> >>> apbs_driver.c:(.text+0x1207): undefined reference to `loadPotMaps'
> >>> make: *** [sander.APBS] Error 1/
> >>>
> >>> _______________________________________________
> >>> 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
> >
>
> _______________________________________________
> 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 Tue Sep 20 2011 - 21:00:02 PDT
Custom Search