Via Ubuntu Linux Super Computer, all nodes (you can do all of this on just 1 device, however):
On all nodes:
sudo apt-get install python
sudo apt-get install python-mpi4py
cd ~
sudo mkdir mpi4py
cd mpi4py
wget http://mpi4py.googlecode.com/files/mpi4py-1.3.tar.gz
tar xfz mpi4py-1.3.tar.gz
cd mpi4py-1.3/demo
Just the master node now:
mpirun.openmpi -np 2 -machinefile /home/pi/mpi_testing/machinefile python helloworld.py
For the above code, you will need that machine file to exist. We placed ours from the building a super computer tutorial in the /home/pi/mpi_testing/ directory under the name of machinefile. The contents of the machine file are just the local IP addresses listed out, separated by new lines.
To get the local IP address, usually 192.168.x.x, type "ifconfig" in your shell.
From the test we ran, you should get some simple helloworld output. If not, you should go back and look everything over!