I have installed MPICH on my Pi. I am making a cluster.
sudo apt-get install python-mpi4py
installs mpi4py. However, it also install openmpi which conflicts with MPICH.
So, I started from scratch again, installed MPICH. After that I ran following sequence of commands,
sudo apt-get install cython
installs cython which is must for mpi4py.
git clone https://bitbucket.org/mpi4py/mpi4py
downloads mpi4py source.
cd mpi4py
to open mpi4py source directory.
sudo python3 setup.py build
to build. It shows following error,
pi@raspberrypi:~/mpi4py $ sudo python3 setup.py build
Unable to find pgen, not compiling formal grammar.
warning: no files found matching '*.pyx' under directory 'Cython/Debugger/Tests'
warning: no files found matching '*.pxd' under directory 'Cython/Debugger/Tests'
warning: no files found matching '*.h' under directory 'Cython/Debugger/Tests'
warning: no files found matching '*.pxd' under directory 'Cython/Utility'
Someone please help me. Please let me know where I am doing wrong.
1 Answer 1
I am answering my own question here. I have asked the same query on MPI4PY bitbucket portal. We can find that discussion here.
Go to home directory.
cd ~
Download mpi4py tarball.
wget https://bitbucket.org/mpi4py/mpi4py/downloads/mpi4py-2.0.0.tar.gz
Update.
sudo apt-get update --fix-missing
Unzip the file.
tar zxf mpi4py-2.0.0.tar.gz
Open the directory.
cd mpi4py-2.0.0
Installation for Python3
sudo apt-get install python3-dev
sudo python3 setup.py build --mpicc=/home/pi/mpich-install/bin/mpicc
sudo python3 setup.py install
Installation for Python
sudo apt-get install python-dev
sudo python setup.py build --mpicc=/home/pi/mpich-install/bin/mpicc
sudo python setup.py install
Explore related questions
See similar questions with these tags.