LAM/MPI logo

LAM/MPI General User's Mailing List Archives

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

From: Martin Dimitrov (slice4e_at_[hidden])
Date: 2003-05-19 12:59:50


I am a newbe to MPI and LAM. I was trying to compile a simple HelloWorld program like this:

[slice4e_at_cserver HelloWorld]$ mpicc HelloWorldMPI.cpp
/tmp/ccFGypJl.o(.eh_frame+0x11): undefined reference to `__gxx_personality_v0'
collect2: ld returned 1 exit status

and then like this:

[slice4e_at_cserver HelloWorld]$ gcc -lmpi HelloWorldMPI.cpp
HelloWorldMPI.cpp:2:17: mpi.h: No such file or directory
HelloWorldMPI.cpp: In function `int main(int, char**)':
HelloWorldMPI.cpp:7: `MPI_Init' undeclared (first use this function)
HelloWorldMPI.cpp:7: (Each undeclared identifier is reported only once for each
   function it appears in.)
HelloWorldMPI.cpp:9: `MPI_Finalize' undeclared (first use this function)
[slice4e_at_cserver HelloWorld]$

And it does not work. Please help me. It seems that gcc does not know where the mpi.h file is located.
On the other hand I cannot understand the mpicc error message at all.

How can I make gcc know where the mpi.h is? How can I make it work?

Thanks for your help and time
Martin