LAM/MPI logo

LAM/MPI General User's Mailing List Archives

  |   Home   |   Download   |   Documentation   |   FAQ   |   all just in this list

From: Guiyuan Lei (guiyuanlei_at_[hidden])
Date: 2006-09-13 11:02:05


Hello Ralf,

mpif77 gibbsreg.o -llammpi++ -lstdc++ -llapack -lblas -lg2c -lm

works

Many thanks.

Guiyuan

On 9/13/06, Ralf Wildenhues <Ralf.Wildenhues_at_[hidden]> wrote:
>
> Hello Guiyuan,
>
> * Guiyuan Lei wrote on Wed, Sep 13, 2006 at 02:07:49PM CEST:
> >
> > g++ -c gibbsreg.cpp -I/usr/include
> > mpif77 -llammpi++ -lstdc++ gibbsreg.o -lblas -llapack -lg2c -lm
> >
> > When I use "locate lammpi++", I got
> > /usr/lib64/liblammpi++.a
> > /usr/lib64/liblammpi++.la
>
> So effectively you only have the static liblammpi++.a installed (and the
> libtool wrapper).
>
> > When use above compile command, in new cluster, I got the following
> error
> > message:
> > gibbsreg.o(.gnu.linkonce.r._ZTVN3MPI2OpE+0x20): undefined reference to
> > `MPI::Op ::Init(void (*)(void const*, void*, int, MPI::Datatype const&),
> > bool)'
>
> The fix is to reorder the command line, so that all libraries appear
> after all objects that need their symbols, also I think you should
> reorder libblas to appear after liblapack since the latter needs the
> former (and unless you have shared libraries for them installed, that
> will give you further errors then).
>
> mpif77 gibbsreg.o -llammpi++ -lstdc++ -llapack -lblas -lg2c -lm
>
> Cheers,
> Ralf
> _______________________________________________
> This list is archived at http://www.lam-mpi.org/MailArchives/lam/
>