We already knew the versatility and solid reputation of the Raspberry Pi platform. But what happens when one combines several Pi’s to run them in parallel? The result is a massively parallel cluster! Here is how you can reproduce the Tiny Titan project.
The Oak Ridge facility is known to house the Titan supercomputer, capable of more than 20 quadrillion calculations per second. But this laboratory also houses lesser-known Tiny Titan, a cluster made of nine Raspberry Pi processing units, or “cores”.
Tinytitan is a $1,000 supercomputer designed to teach the basics of future scientific parallel computing. Unlike desktop and laptop computers that hide the parallelism to their users, TinyTitan makes the concept of parallel computing explicit.
According to its creator Adam Simpson, creating a small-scale supercomputer is relatively simple, just wire the Pi’s for them to work in parallel. The hardest part, explains this Titan support specialist, is to write the code for it. According to Adam Simpson, “there is no proper platform to achieve personal supercomputing projects.” So he and two of his colleagues decided to create a set of tutorials. Working together, the parallel cores can solve complex problems, and the tutorials are intended to explain the process. For example, a lesson shows how to add two numbers together lists, dividing the problem into individual nuclei components working simultaneously. The tutorials are available free online. Start your journey to stardom supercomputer by going to github.com/TinyTitan.
Create your own Tiny Titan
The Oak Ridge lab has created a set of scripts (shown below) to guide you in creating your own TinyTitan. Once your TinyTitan up and running, you will be ready to run the demo software.
- Two Raspberry Pi with the Raspbian distribution
- A router or network switch for connecting the Pi’s
- An active Internet connection
The first step is to update each Raspberry Pi and configure the network settings. To start the each Pi that will be part of the cluster TinyTitan needs an active Internet connection. Download the initial configuration script and run it in a terminal as such:
$ Curl -kfsSLO https://raw.github.com/TinyTitan/TinySetup/master/pi_setup.sh $ Bash pi_setup.sh
When you are prompted to enter the number of nodes start at 1 and increment the value up to match the number of physical nodes present.
Once the first stage achieved, connect all nodes in the network router or switch. On the Pi that which was assigned a connection node number 1, run the following script:
$ Git clone https://github.com/TinyTitan/TinySetup.git $ Cd TinySetup $ Bash pi_post_setup.sh
Your Tiny Titan is now operational and ready to work. Extract the TinySPH and PiBrot examples available on the TinyTitan GitHub repository available there: https://tinytitan.github.io/software/
Some applications examples
TinySPH module is a 2D smoothed hydrodynamic particle calculation module designed to work in real time on the Oak Ridge Laboratory TinyTitan cluster. This application was designed to demonstrate the concept of distributed computing. Although it works better in a distributed environment, it is quite possible to run it on a shared memory system with a multicore processor. Although the code is designed to Tiny Titan it can, with some modifications, be compiled and run on Linux and OS X. The code makes use of MPI for distributed computing and requires at least two MPI processes (1 for rendering, one for the calculation). For more information: https://github.com/TinyTitan/SPH
PiBrot is an example of exploiting the parallel computing code to calculate a Mandelbrot fractal. The screen is divided in half vertically with MPI task that displays the left image and the same image being calculated on the right side with N-2 MPI tasks, where N is the total number of MPI tasks. For more information: https://github.com/TinyTitan/PiBrot
More around this topic...
In the same section
© HPC Today 2017 - All rights reserved.
Thank you for reading HPC Today.