LAM/MPI logo

LAM/MPI General User's Mailing List Archives

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

From: Jeff Squyres (jsquyres_at_[hidden])
Date: 2005-05-10 19:50:41


That seems like a pretty odd error, especially since you're not even
using any MPI 2 C++ symbols in your example.cpp file. A few questions:

1. Does your C++ compiler work? Can you compile, link, and run simple
C++ programs, such as programs that use STL objects?

2. Can you upgrade your version of LAM/MPI? The 6.3 series is *really*
old; we're up to the 7.1 series these days (I honestly don't remember
the last time I answered a question about the 6.3 series! ;-) )

3. If you can't upgrade, you might want to run "nm -C" on your
libmpi++.a and see if the symbols are really in there.

4. I honestly don't remember, but I think you want to include <mpi.h>,
not <mpi++.h> -- I *think* we were careful about that from the very
beginning (because the standard says that all C and C++ programs should
only have to include <mpi.h> -- the name mpi++.h is not standardized).

On May 10, 2005, at 10:23 AM, Travis Spencer wrote:

> Hey,
>
> I am trying to determine if the C++ bindings of our LAM 6.3.2 are
> broken. I can compile C++ programs and the ring example, but I can't
> link them. When I try, this is the result:
>
> $ hcp -o ring -fexceptions -Wno-deprecated
> /pkgs/lam-6.3.2/examples/mpi2c++/ring.cc
> Undefined first referenced
> symbol in file
> MPI::ERRORS_THROW_EXCEPTIONS /var/tmp//ccYpyd0w.o
> MPI::INT /var/tmp//ccYpyd0w.o
> MPI::Request::ignored_status /var/tmp//ccYpyd0w.o
> MPI::Intracomm::current_op /var/tmp//ccYpyd0w.o
> MPI::Comm::mpi_err_map /var/tmp//ccYpyd0w.o
> MPI::ANY_TAG /var/tmp//ccYpyd0w.o
> op_intercept(void*, void*, int*, _dtype**)/var/tmp//ccYpyd0w.o
> MPI::Comm::ignored_status /var/tmp//ccYpyd0w.o
> throw_excptn_fctn(_comm**, int*, ...)/var/tmp//ccYpyd0w.o
> MPI::Comm::mpi_comm_map /var/tmp//ccYpyd0w.o
> MPI::COMM_WORLD /var/tmp//ccYpyd0w.o
> ld: fatal: Symbol referencing errors. No output written to ring
> collect2: ld returned 1 exit status
> $ cat petars_example.cpp
> #include <mpi++.h>
>
> int main(int argc, char** argv)
> {
> return 0;
> }
> $ hcp -fexceptions -Wno-deprecated petars_example.cpp
> Undefined first referenced
> symbol in file
> MPI::ERRORS_THROW_EXCEPTIONS /var/tmp//cc5nsuBi.o
> MPI::Request::ignored_status /var/tmp//cc5nsuBi.o
> MPI::Intracomm::current_op /var/tmp//cc5nsuBi.o
> MPI::Comm::mpi_err_map /var/tmp//cc5nsuBi.o
> op_intercept(void*, void*, int*, _dtype**)/var/tmp//cc5nsuBi.o
> MPI::Comm::ignored_status /var/tmp//cc5nsuBi.o
> throw_excptn_fctn(_comm**, int*, ...)/var/tmp//cc5nsuBi.o
> MPI::Comm::mpi_comm_map /var/tmp//cc5nsuBi.o
> ld: fatal: Symbol referencing errors. No output written to petar
> collect2: ld returned 1 exit status
> $ grep ERRORS_ /pkgs/lam-6.3.2/lib/*
> Binary file /pkgs/lam-6.3.2/lib/libmpi++.a matches
> $ hcp -showme
> /pkgs/gcc/current/bin/g++ -I/pkgs/lam-6.3.2/include/mpi2c++
> -I/pkgs/lam-6.3.2/include -L/pkgs/lam-6.3.2/lib -lmpi++ -lmpi -ltstdio
> -ltrillium+-largs -lt -lsocket -lnsl -lgen
> $ ls -l `which mpiCC`
> lrwxrwxrwx 1 johnj sdudes 3 Sep 1 2003 /pkgs/lam-6.3.2/bin/mpiCC ->
> hcp
>
> I don't understand why these linking errors are happening when the hcp
> wrapper is including libmpi++.a. These symbols seem to be in that
> library.
>
> Any ideas? Any help? Has this problem cropped up for anyone else?
> Have I overlooked something?
>
> --
>
> Regards,
>
> Travis Spencer
> Portland, OR USA
>
> _______________________________________________
> This list is archived at http://www.lam-mpi.org/MailArchives/lam/
>

-- 
{+} Jeff Squyres
{+} jsquyres_at_[hidden]
{+} http://www.lam-mpi.org/