Am 09.11.2012 um 08:47 schrieb shiny knight:

> Thanks for your replies.
> 
> I use Snow Leopard, running ompi_info returns an error (command not found).

I'm on this version too. Which version of Xcode do you use - "Xcode 3.2.6 and 
iOS SDK 4.3"? Attached is a small file which I can compile with the mentioned 
command.

$ mpicc demo.m -o demo -O0 -ObjC -framework Foundation -framework CoreLocation
$ mpiexec -np 2 ./demo


> I was looking for installers and I remember that I have installed MPICH2 if I 
> recall correctly (I didn't knew about openMPI until today), so I have mpicc 
> installed.
> 
> Should I remove MPICH2 and install OpenMPI?

Yes.

Different MPI implementations have to be installed in different locations and 
the paths set accordingly. Also note, that an application compiled with Open 
MPI can't be started with MPICH2 `mpiexec` and vice versa. Well, yes - it could 
be started but it will only run in serial in all instances like you can start 
any application with `mpiexec`. As `mpicc` is only a wrapper to provide 
additonal paths arguments to -I/-L/-l, all usual options apply. In principle 
MPI applications can also be compiled by a plain gcc, but then you have to take 
care of all the necessary libraries on your own.

-- Reuti

Attachment: demo.m
Description: Binary data

Reply via email to