Re: Amber7 & mpich

From: Michael Crowley <crowley_at_scripps.edu>
Date: Tue 4 Feb 2003 09:56:22 -0800

Dear Francois,

It appears that one of the following is occurring:

1) You do not have the correct path to your libs

   or

2) The symbols in your mpi lib do not match what you
   have created in your compile of sander.

You can check the second by trying

nm /usr/pgi/linux86/lib/libmpich.a | grep mpi_init

see if you get
00000000 W mpi_init_

or something like that. Whatever you get for mpi_init, should match
what the link comlains about, in your case:
_sander_.f:1247: undefined reference to `mpi_init__'

it is looking for mpi_init__
My lib has mpi_init_ (one trailing underscore) while your sander
is looking for two trailing underscores.

If your lib has one underscore, then just recompile all
of sander without the second_underscore flag.

Good luck
Mike
-----------------------------------------------------------------
Physical mail: Dr. Michael F. Crowley
                 Department of Molecular Biology, TPC6
                 The Scripps Research Institute
                 10550 North Torrey Pines Road
                 La Jolla, California 92037

Electronic mail: crowley_at_scripps.edu
Telephone: 858/784-9290
Fax: 858/784-8688
-----------------------------------------------------------------

From hornak_at_csb.sunysb.edu 04 Feb 2003 13:07:47 -0500
Message-id: <1044382067.1563.50.camel.frodo.bio.sunysb.edu>
Date: 04 Feb 2003 13:07:47 -0500
From: Viktor Hornak <hornak_at_csb.sunysb.edu>
To: AMBER list <amber.heimdal.compchem.ucsf.edu>
Subject: Re: Amber7 & mpich
In-Reply-to: <1044368843.3e3fcdcba1bc6.webmail.u-picardie.fr>

On Tue, 2003-02-04 at 09:27, FyD wrote:
> Dear All,
>
> I still have problems to compile AMBER7 (pgi compilators) with mpich 1.2.4:
>
> 1- I used the following MACHINE file:
> http://amber.ch.ic.ac.uk/cluster_info/Machine.pgf77_mpich
>
> 2- Setted "setenv SYSDIR Machines/standard" in this file
>
> 3- I put the file "farg.f" in ~src/lib, ~src/lapack and ~src/sander directories
> and compiled 'manually' it using "pgf77 -c Msecond_underscore farg.f"
                                       -----^
I hope this is just a typo in the message (I mean missing dash). Also,
let's make sure we're talking about the same farg.f file. Here is the
contents of ours:
-----------------
      integer function mpir_iargc()
      mpir_iargc = iargc()
      return
      end

      subroutine mpir_getarg( i, s )
      integer i
      character*(*) s
      call getarg(i,s)
      return
      end
------------------

>
> 4- I ran "make install" either in the ~/src/sander or ~/src directories: I get
> always the same error message:
>
> pgf77 -o sander sander.o cshf.o noecalc.o noeread.o caldis.o calrate.o dinten.o
> drates.o indexn.o kmat.o pearsn.o plane.o remarc.o nmrcal.o nmrred.o restal
> .o getnat.o nmrnrg.o modwt.o disnrg.o angnrg.o tornrg.o nmrprt.o nmrgrp.o
> nmrcms.o nmrcmf.o impnum.o nmrsht.o at2res.o chklin.o opnmrg.o printe.o runmin.o
> ndvprt.o force.o rdparm.o mdread.o locmem.o runmd.o newvel.o getcor.o r6ave.o
> r6drv.o aveint.o degcnt.o corf.o threeb.o tripl.o nmrrad.o decnvh.o fastwt.o
> echoin.o parallel.o jnrg.o shake.o ene.o mdwrit.o minrit.o set.o setmm.o
> dynlib.o mdfil.o nmlsrc.o ew_force.o ew_setup.o ew_box.o ew_bspline.o ew_fft.o
> ew_
> direct.o ew_recip.o pcshift.o align.o rstack.o istack.o grdmax.o rfree.o
> rgroup.o ddotp.o random.o lsqfit.o amopen.o debug.o ew_recip_reg.o
> ew_handle_dips.
> o ew_dipole_recip.o mexit.o egb.o new_time.o extra_pts.o thermo_int.o
> reorderwat.o matinv.o decomp.o ../lapack/lapack.a ../blas/blas.a ../lib/nxtsec.o
> /hom
> e/fyd/amber7/src/Machines/standard/sys.a -lm -L/usr/pgi/linux86/lib farg.o -lmpich
                                        ---------^
Hm, how come I don't see the directory (after -L switch) pointing to the
location of your mpich libraries? (it seems unlikely you'd have them
installed under pgi, and it's also unlikely you have added them to
LD_LIBRARY_PATH). Where is your mpich-1.2.4 installed and what are the
following variables in your MACHINE file set to?

setenv MPICH_HOME /usr/lib/mpich
setenv MPICH_INCLUDE $MPICH_HOME/include
setenv MPICH_LIBDIR $MPICH_HOME/lib
setenv MPICH_LIB mpich


> sander.o: In function `trajene':
> _sander_.f:1247: undefined reference to `mpi_init__'
> _sander_.f:1248: undefined reference to `mpi_comm_rank__'
> _sander_.f:1249: undefined reference to `mpi_comm_size__'
> _sander_.f:1450: undefined reference to `mpi_bcast__'
> _sander_.f:1451: undefined reference to `mpi_barrier__'
> _sander_.f:1590: undefined reference to `mpi_bcast__'
> nmrcal.o: In function `nmrcal':
> _nmrcal_.f:884: undefined reference to `mpi_bcast__'
> _nmrcal_.f:886: undefined reference to `mpi_bcast__'
>
> etc...
>
> ew_direct.o(.text+0x2394): undefined reference to `mpi_barrier__'
> ew_recip.o: In function `do_pmesh_kspace__':
> ew_recip.o(.text+0xd6a): undefined reference to `mpi_barrier__'
>
> Any idea what is the problem ?
>
> Thanks a lot, regards, Francois
>


-- 
===================================================================
Viktor Hornak
CSB computational facility   Phone: (631)632-1439
SUNY at Stony Brook          Fax:   (631)632-1555
Stony Brook, NY 11794-5115   E-mail: viktor.hornak_at_sunysb.edu
===================================================================
Received on Tue Feb 04 2003 - 09:56:22 PST
Custom Search