Open MPI logo

Open MPI User's Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Open MPI User's mailing list

Subject: Re: [OMPI users] How to get started?
From: Gus Correa (gus_at_[hidden])
Date: 2008-10-02 11:45:24


Hi Anugraha Sankaranarayananand list

Most likely your default mpicc is not the OpenMPI one that you want to use.
Linux distributions and many commercial compilers come with a variety of
versions of MPI, which may take precedence in your path.
This confusion happens all the time.

I suggest you use full path name for compilation, e.g:

/my/full/path/to/openmpi/bin/mpicc sample.c -o sample

Likewise, use full path name to mpirun/mpiexec when you run the
executable, e.g.:

/my/full/path/to/openmpi/bin/mpiexec -n 2 sample

I hope this helps,
Gus Correa
 

-- 
---------------------------------------------------------------------
Gustavo J. Ponce Correa, PhD - Email: gus_at_[hidden]
Lamont-Doherty Earth Observatory - Columbia University
P.O. Box 1000 [61 Route 9W] - Palisades, NY, 10964-8000 - USA
---------------------------------------------------------------------
Anugraha Sankaranarayanan wrote:
>>Thank you, everyone.I have successfully installed the openmpi pkg in
>>my ubuntu hardy heron for gcc( HP Compaq Dual-core notebook) following
>>the instructions in the FAQ page.I still need to install the
>>libopenmpi-dev header file pkg.Will come back after doing that.
>
>>Anugraha.S
>
> I've installed the libopenmpi-dev and also openmpi-bin.I tried to 
> compile a sample program and am getting this error,
> atom_at_atom-laptop:~$ mpicc sample.c -o sample
> sample.c:2:17: error: ompi.h: No such file or directory
> sample.c: In function 'main':
> sample.c:7: error: 'mpi_comm_world' undeclared (first use in this 
> function)
> sample.c:7: error: (Each undeclared identifier is reported only once
> sample.c:7: error: for each function it appears in.)
>
> Am I using the wrong header file? I tried ompic.h too, but the same 
> error.What do i have to do?
>
> Thanking in advance,
> S.Anugraha.
>
>------------------------------------------------------------------------
>
>_______________________________________________
>users mailing list
>users_at_[hidden]
>http://www.open-mpi.org/mailman/listinfo.cgi/users
>