↖️ Show all posts

Cluster Computing with some Raspberry Pis

Please, skim the whole article first, at least read the headers. Work your way through, step by step, reading the next chapter once before you continue :)

What you need:

Preparing a Master Image

Current Raspbian (2017-11) ships with Python 3.5. All we need to do now, is set up an MPI. Download Raspbian

Set some time aside for the following - if concurrency isn’t your thing and you need to sit in front of your screen ;-) (a quality, class 10 SD card can plough through the setup process)



ssh into one of the Pi - this will be your master node from now on.


ssh into your slave machine

Connect Master and Slave

ssh to master then run $ ssh pi@pinode01 making the machines known to each other

Adding Nodes

You can add further slaves, using the node image you created earlier. Be sure to add the nodes one by one.

Run Your Cluster

to utilize all members of the cluster, ssh to your master and add a hostfile to the directory your script is in, looking like this for one master and one slave:

# content of hostfile

# add all cluster member with their hostname

Demo / Test

all your nodes should say hello :D

Errors / Help / Network

If mpiexec throws proxy or connection errors, you might need to check your router for duplicate hostnames in its network settings. This caused major hickups in my run network (AVM Fritz Box 7490).

⬅️ Read previous Read next ➡️