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: 2004-09-17 15:53:27


On Sep 17, 2004, at 4:42 PM, louis.gonzales_at_[hidden] wrote:

> That's a very large assumption now isn't it? What platform are you
> programming
> on? Possibly, the hello.cpp program I have contains, code that
> implements a
> hello message passed to all the nodes on my cluster? Perhaps?

Sidenote: if this is an MPI program, you should be using mpic++ to
compile it.

No, this is not a large assumption.

Regardless of whether hello.cpp is an MPI program or not, you used g++
to compile it with no other options. ld then complained about some
linker option. g++ is the one who invokes ld. At no point were any
LAM commands used. Any LAM header files used (e.g., "mpi.h") would not
affect how your linker is invoked because we don't use any pragmas --
just plain, vanilla C and/or C++..

Hence, none of this has anything to do with MPI or LAM -- it's 100%
your C++ compiler.

So based on the information you provided, the problem is likely to be a
faulty installation of g++. Try "g++ -v hello.cpp".

> On Sep 17, 2004, at 4:32 PM, louis.gonzales_at_[hidden] wrote:
>
>> g++ hello.cpp
>> /usr/ccs/bin/ld: Unrecognized argument: +init
>> /usr/ccs/bin/ld: Usage: /usr/ccs/bin/ld [options] [flags] files
>> collect2: ld returned 1 exit status

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