OpenMPI in Xcode 6.1

To debug OpenMPI programs in Xcode 6.1…

First build a recent version of OpenMPI.  From the Terminal…

> curl -O
> tar -xvzf openmpi-1.8.3.tar.gz
> cd openmpi-1.8.3
> ./configure –prefix=/usr/local/lib/openmpi-1.8.3/ CFLAGS=-m64 CXXFLAGS=-m64 FFLAGS=-m64 FCFLAGS=-m64
> make
> make install

Start a new project.  Select OS X -> Application -> Command Line Application

Select Project -> Build Settings -> Add /usr/local/lib/openmpi-1.8.3/include to User Header Search Paths

Under Build Phases, expand Link Binary with Libraries, then add



#include “mpi.h”

to main.cpp

And you should be able to build the project and use Open MPI functions.


You may also like...

Leave a Reply