- Install OpenMPI
1.a Download OpenMPI: https://www.open-mpi.org/software/ompi/v1.10/
1.b Extract and configure
cd ~/Downloads/openmpi-1.10.0
mkdir build
cd build
# I prefer to keep /usr/local clean, so I put it in /opt/openmpi
../configure --prefix=/opt/openmpi --with-devel-headers --enable-binaries
make
sudo make install
1.c Add the following to your bash profile
export DYLD_LIBRARY_PATH=${DYLD_LIBRARY_PATH}:/opt/openmpi/lib
export PATH=${PATH}:/opt/openmpi/bin
- Install mpi4py
git clone https://github.com/mpi4py/mpi4py.git ./mpi4py.git
cd mpi4py.git
python setup.py build --mpicc=/opt/openmpi/bin/mpicc
python setup.py install
- Petsc and petsc4py
git clone https://bitbucket.org/petsc/petsc.git ./petsc.git
cd petsc.git
python setup.py build
python setup.py install
cd ..
git clone https://bitbucket.org/petsc/petsc4py.git ./petsc4py.git
cd petsc4py.git
python setup.py build
python setup.py install
The 'Install mpi4py' step is likely missing an install step:
python setup.py install
or:
python setup.py install --user