Wednesday, July 14, 2010

Compiling OpenMPI on MacOSX

First, you will need a proper gfortran installed on your system. This version (gfortran 4.2.3)worked for me. After installing that download and extract OpenMPI. Here's the config line that I used
./configure --prefix=/Users/USERNAME/pkg/openmpi-1.4.2-install\
F77=gfortran CFLAGS=-m64 CXXFLAGS=-m64 FFLAGS=-m64
then
make
make install
Voila!

If you wish to install to the default location (/usr/local/ etc...) remove the prefix option.

Cite as:
Saad, T. "Compiling OpenMPI on MacOSX". Weblog entry from Please Make A Note. https://pleasemakeanote.blogspot.com/2010/07/compiling-openmpi-on-macosx.html?m=0

2 comments:

  1. FWIW: be careful of replacing the OS X-default installed Open MPI. We typically advocate installing in a non-default location (such as /usr/local or whatever). As long as you use the "mpicc" and friends installed with your new Open MPI install, it should link to the right shared libraries.

    ReplyDelete
  2. Jeff, thanks a lot for the note!

    ReplyDelete