This is a project that is designed to use the Raspberry Pi as a cluster. This has been done before by the Exeter Linux user group details of this project can be found here.
We are thinking of making a Raspberry Pi supercomputer cluster, with around 5 RPi 2B’s, which of course are around 6 times faster than pi 1’s. This will mean the cluster itself will be 6 times faster than one made with previous pi’s. We may have to modify some code in order for the cluster to work with the full 4 cores per pi, but this should be doable.
If we use 5 pi’s and Ethernet cables, along with a switch I found online, the cost is around £175. However, some parts could be supplied by people who have no further us for them. The cost of 5 pi’s is the main problem, as they themselves are £160, but I believe the cost would be well worth it.
As part of this, we have so far researched the following
TEST PROGRAM –
The following programs produces the first 1000 prime numbers. This can be used to test the program and the cluster is working as expected.
#! /usr/bin/env python count = 1 i = 3 while count != 1000: for k in range(2,i): if i%k == 0: break else: print(i) count += 1 i += 2
Using the time command it should be possible to get an idea on how long a program takes to execute :
time parallel ::: ./prime2.py produces
I do not fully understand what I am doing here, so i need to investigate further thse results. I am however doing this on a dual core system.
The cost of 5 pi 2b+’s and network cables, as well as an ethernet switch – £174.73 in total, but well worth it!
|Raspberry Pi 2 B+||£27.99||5||TOTAL|
|PSU 2A 5v||x||x||x|
|Network Switch||? Free from http://www.wifispark.com/||1||?|
It is probably possible to mix and match systems in this case, the Raspberry Pi 2 uses the
|19 / 2 / 2015||http://www.dcglug.org.uk/cluster-progress/||POST||M. lUGG|
by Jan Palach
Cortex A7 processor (4 core) while the Banana Pi uses the Cortex A7 (2 core) processors.
Comparison of single board computers can be found here.
Banana Pi information can be found here. This is important as the same code can be run on both units (in theory)
OTHER CODING RESOURCES
http://www.parallelpython.com/ – Python library for parallel programming
by Jan Palach