Given the challenge of illustrating parallel computing to secondary school students here is an account by Ben Eagan, a computational scientist at ICHEC and a recent graduate of the EPCC MSc. in High Performance Computing, where he designed and developed both the hardware and software for a "mini" cluster centred around the Raspberry Pi.
If you would like to see this cluster live please visit the ICHEC stand at the BT Young Scientist and Technology Exhibition from the 10 to 12th of January 2013.
The following details were provided ahead of the system design. A fully operational "mini" cluster to be constructed from 8-networked Raspberry Pis (RPis) and housed in a transparent enclosure so that students can see the inner workings of the parallel machine. Coloured cables (Power, Ethernet) to be used to visually aid the students to understand how the cluster was constructed and how all the networked RPis can work as one. The mini cluster to be built as described by Prof. Simon Cox from the University of Southampton in the UK and connected to a display to view various parallel computations including: a parallel Game of life and ray tracing demos.
In October 2012 Ben was assigned to build a Raspberry Pi cluster as apart of the outreach programme within ICHEC. He was pretty excited to get his hands on a number of Pis and get to work. He had just finished a master's in High Performance Computing in Edinburgh at EPCC. Several of his classmates had been planning to build a Raspberry Pi cluster of their own as a Dissertation project, but demand was so high they were forced to plan something else. So he felt quite privileged to have access to this hardware, and was determined to put it to good use.
One of the requirements for this cluster was that it exist in a transparent enclosure to allow viewers to easily see all the details of the system. While a simple transparent box would have been ok, he decided to get a bit creative. Being a fan of puns, a Raspberry Pi cluster had great potential. The first plan was to build an octagonal enclosure with eight pi shaped wedges containing a Raspberry Pi, sitting above the networking. After some more thought, he decided the symbol Pi had a lot of potential, and decided to try to build a freestanding Pi symbol capable of housing a cluster. He did some initial designs using Google Sketchup, and set to work with something that could be generously called a plan.
The building took place at the Galway 091 Labs Makerspace, where the members gave Ben some great advice about how to work with 3mm Acrylic sheet. Due to its tendency to warp when heated, Ben ended up using a "score and snap" technique. This involved using a crafting scalpel to score the material where a desired cut would be, and then clamping the sheet to a table edge with the excess material hanging off the edge, and snapping down quickly. This left a much cleaner edge, allowing the structure to take shape.
The cluster was built following instructions made available by Prof. Simon Cox at the University of Southampton, who built a supercomputer from 64 Raspberry Pis. Once completed our cluster contained 8 Raspberry Pis, running the Debian based Raspbian Wheezy operating systems, with parallel jobs being executed using the Message Passing Interface (mpich2). Additionally, the parallel distributed shell utility was used for managing files and issuing commands throughout the system.
Once the case was built, and the cluster was configured and successfully communicating, it was time to run some code! As the cluster was built for a demonstration at the BT Young Scientist and Technology Exhibition, something that could provide a nice visual for parallel programs was desired. For this, a parallel implementation of John Conway’s Game of Life was chosen. The parallel implementation of this used an automated domain decomposition based on the number of participating MPI processes, and graphics were handled by a designated "head node" Raspberry Pi using the multimedia library Simple DirectMedia Layer (SDL) - screen shot below. The display includes the current state of the Game of Life board, with individual colours representing each domain decomposition.
From super-gluing his fingers together, to trying to tame rogue Game of Life columns, building the Raspberry Pi cluster was a really fun process with plenty of interesting challenges to overcome along the way. The Raspberry Pi is an amazing little computer, and the cluster serves as an excellent demonstration to how large parallel systems work. Additionally, due to its low cost, it makes for an affordable hands-on lesson in parallel programming and parallel systems. Ben hopes children and adults alike make sure to take advantage of this device, and take a shot at building supercomputers of their very own.