A Rasp Pi HAT for clustering Pi Zeros
MPI Code Example
I'm not going to cover "benchmarks" on the ClusterHAT, but it is important to illustrate some real MPI code running on the cluster. Rather than run HPL [17], the high-performance Linpack benchmark, and argue over tuning options to get the "best" performance, I find it's better to run the NAS Parallel Benchmarks (NPB) [18], which are fairly simple benchmarks that cover a range of algorithms, primarily focused on computational fluid dynamics (CFD) [19]. They stress the processor, memory bandwidth, and network bandwidth; are easy to build and compile; and come in several flavors, including MPI. Also, different problem sizes or "classes" scale from very small to very large systems.
Because the ClusterHAT is a small cluster, I used only the class A test. In the interest of brevity, I only used the cg
(conjugate gradient, irregular memory access and communication), ep
(embarrassingly parallel), is
(integer sort, random memory access), and lu
(lower-upper Gauss-Seidel solver) applications with four and eight processors. Four processors included two cases: (1) Pi Zeros only, and (2) RPi3 only. The eight processors case included the RPi3 and the Pi Zeros (a total of eight cores).
For all four applications, performance, measured in millions of operations per second (MOPS), was recorded from the output for the entire MPI group and for each process in the MPI group. These results are tabulated in Table 1.
Table 1
NPB Results
Test | Class | No. of Cores | Total MOPS (RPi3 Only) | MOPS/Process (RPi3 Only) | Total MOPS (Pi Zeros Only) | MOPS/Process (Pi Zeros Only) | Total MOPS (Pi Zeros + RPi3) | MOPS/Process (Pi Zeros + RPi3) |
---|---|---|---|---|---|---|---|---|
CG |
A |
4 |
198.98 |
49.75 |
38.77 |
9.69 |
– |
– |
CG |
A |
8 |
– |
– |
– |
– |
71.98 |
9 |
EP |
A |
4 |
25.8 |
6.45 |
6.93 |
1.73 |
– |
– |
EP |
A |
8 |
– |
– |
– |
– |
13.92 |
1.74 |
IS |
A |
4 |
43.85 |
10.96 |
3.99 |
1 |
– |
– |
IS |
A |
8 |
– |
– |
– |
– |
6.71 |
0.84 |
LU |
A |
4 |
425.36 |
106.34 |
197.88 |
49.47 |
– |
– |
LU |
A |
8 |
– |
– |
– |
– |
396.22 |
49.53 |
Summary
The ClusterHAT is one of the most innovative clusters to come along in many years. It's very compact, uses a very small amount of power, runs Linux, and is fairly inexpensive (around $100 for the entire system).
Although it is obviously not designed to be a speed demon, you can use it to learn about common cluster tools and clustering and how to write parallel and distributed software. The ClusterHAT cluster can run Singularity [20] and Docker [21] containers, including resource managers. In a classroom, each student could have a small ClusterHAT cluster on which to run real applications, including AI [22].
The ClusterHAT is one of the coolest HPC pieces of hardware to come out in a long time.
Infos
- Raspberry Pi: https://www.raspberrypi.org/
- Raspberry Pi sales: http://www.techradar.com/news/the-raspberry-pi-is-now-the-third-best-selling-computer-of-all-time
- Parallel computing through art: http://www.seemoreproject.com/
- Five-node Raspberry Pi 3 cluster:http://climbers.net/sbc/diy-raspberry-pi-3-cluster-2017/
- HATs: https://www.raspberrypi.org/blog/introducing-raspberry-pi-hats/
- ClusterHAT: https://clusterhat.com/
- ClusterHAT video: https://clusterhat.com/setup-assembly
- Raspbian Jesse: https://www.raspberrypi.org/blog/raspbian-jessie-is-here/
- pdsh: https://github.com/grondo/pdsh
- Pixel desktop: https://www.raspberrypi.org/blog/introducing-pixel/
- raspi-config: https://www.raspberrypi.org/documentation/configuration/raspi-config.md
- "Parallel shell with pdsh" by Jeff Layton, Linux Pro Magazine, issue 166, September 2014, pg. 64, http://www.linuxpromagazine.com/Issues/2014/166/Parallel-Shells
- clusterhat tool: https://clusterhat.com/setup-control
- GPIO: https://www.raspberrypi.org/documentation/hardware/raspberrypi/gpio/README.md
- clusterctl: https://github.com/thagrol/clusterctl
- Bridged network: https://wiki.debian.org/BridgeNetworkConnections
- HPL: http://www.netlib.org/benchmark/hpl/
- NPB: https://www.nas.nasa.gov/publications/npb.html
- CFD: https://en.wikipedia.org/wiki/Computational_fluid_dynamics
- Singularity: http://singularity.lbl.gov/
- Docker: https://www.docker.com/
- AI: http://mashable.com/2017/06/29/microsoft-puts-ai-on-a-raspberry-pi/
« Previous 1 2
Buy this article as PDF
(incl. VAT)
Buy Linux Magazine
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.
News
-
Canonical Releases Ubuntu 24.04
After a brief pause because of the XZ vulnerability, Ubuntu 24.04 is now available for install.
-
Linux Servers Targeted by Akira Ransomware
A group of bad actors who have already extorted $42 million have their sights set on the Linux platform.
-
TUXEDO Computers Unveils Linux Laptop Featuring AMD Ryzen CPU
This latest release is the first laptop to include the new CPU from Ryzen and Linux preinstalled.
-
XZ Gets the All-Clear
The back door xz vulnerability has been officially reverted for Fedora 40 and versions 38 and 39 were never affected.
-
Canonical Collaborates with Qualcomm on New Venture
This new joint effort is geared toward bringing Ubuntu and Ubuntu Core to Qualcomm-powered devices.
-
Kodi 21.0 Open-Source Entertainment Hub Released
After a year of development, the award-winning Kodi cross-platform, media center software is now available with many new additions and improvements.
-
Linux Usage Increases in Two Key Areas
If market share is your thing, you'll be happy to know that Linux is on the rise in two areas that, if they keep climbing, could have serious meaning for Linux's future.
-
Vulnerability Discovered in xz Libraries
An urgent alert for Fedora 40 has been posted and users should pay attention.
-
Canonical Bumps LTS Support to 12 years
If you're worried that your Ubuntu LTS release won't be supported long enough to last, Canonical has a surprise for you in the form of 12 years of security coverage.
-
Fedora 40 Beta Released Soon
With the official release of Fedora 40 coming in April, it's almost time to download the beta and see what's new.