Hardware Reference
In-Depth Information
$ tar xfz mpi4py-1.3.tar.gz
$ cd mpi4py-1.3/demo
Now repeat these steps on each of your other nodes, as this hasn't been baked into
the system image.
Run examples (on your master node):
$ mpirun.openmpi -np 2 -machinefile /home/pi/mpi_testing/machinefile python
helloworld.py
Hello, World! I am process 0 of 2 on raspberrypi.
Hello, World! I am process 1 of 2 on iridispi002.
Then:
$ mpiexec.openmpi -n 4 -machinefile /home/pi/mpi_testing/machinefile python
helloworld.py
Hello, World! I am process 2 of 4 on raspberrypi.
Hello, World! I am process 3 of 4 on iridispi002.
Hello, World! I am process 1 of 4 on iridispi002.
Hello, World! I am process 0 of 4 on raspberrypi.
Getting Pip for Raspberry Pi
Pip is a tool for installing and managing those Python packages, which will
give you an easy way to do so with your cluster. Read more about it at http://
www.pip-installer.org/en/latest/index.html .
Make a directory under your home called pip_testing and change into it. A
prerequisite for pip is distribute , so let's get that first and then install pip :
$ curl http://python-distribute.org/distribute_setup.py | sudo python
$ curl https://raw.github.com/pypa/pip/master/contrib/get-pip.py | su
do python
Notes on Making MPI Shared Libraries for Raspberry Pi
MPI libraries can also be built “shared” so that they can be dynamically loaded. This
gives a library file that ends in .so . not .a , and you can do that by building those MPI
libraries again.
To do so, repeat the steps beginning with making a directory for your MPI sources, but
with a suffix of _shared on the directory names:
 
Search WWH ::




Custom Search