How do supercomputers work? The best way to understand it is to build a tiny one. In the spring semester of 2022, members of the Kastoria Linux Society (KLS) connected four Raspberry Pi boards into a working cluster.
The setup
- 4 nodes based on the Raspberry Pi 3
- OpenMPI for communication between the nodes
- Linux, configured entirely from the command line
Calculating Pi
A cluster splits a large computation into smaller parts that run in parallel on different machines, then combines the results. The team gave theirs a classic challenge: calculating the decimal digits of Pi. Using MPI in Python, each Raspberry Pi computes part of the result and sends it back to the main node. The code is published on our GitHub.
What the team learned
Through the project, the team became familiar with the Linux terminal, Bash scripting, parallel programming and network configuration from the command line — the same ideas behind the world’s largest supercomputers, on hardware that fits on a desk. The cluster was presented at IEEE Day 2022.
Version 2: Kubernetes (2024)
In April 2024 the Kastoria Linux Society completed the first version of a Raspberry Pi Kubernetes Cluster. The project, “Implementing Raspberry Pi Cluster and Kubernetes”, was presented at FOSSCOMM 2024 (9–10 November, University of Macedonia) by project coordinator Marios Roussos, who built it with George Tingos, Konstantinos Terpsis and Giorgos Kokkinos.

The team
- 2022 cluster: Eleftherios Nikolopoulos, Vangelis Nestoridis
- 2024 Kubernetes cluster: Marios Roussos (coordinator), George Tingos, Konstantinos Terpsis, Giorgos Kokkinos
Links
- Source code: https://github.com/ieeesbkastoria/KLS-Pi-Calculation