Open-source News

Parallel and distributed computing with Raspberry Pi clusters

opensource.com - Thu, 03/02/2023 - 16:00
Parallel and distributed computing with Raspberry Pi clusters visimpscot2 Thu, 03/02/2023 - 03:00

Since the Raspberry Pi's launch, creators have based countless computer science education projects on the humble pocket-sized system on a chip. These have included many projects exploring low-cost Raspberry Pi clusters to introduce parallel and distributed computing (PDC) concepts.

The UK Open University (OU) provides distance education to students of diverse ages, experiences, and backgrounds, which raises some issues not faced in more traditional universities. The OU experiment using Raspberry Pi clusters to introduce PDC concepts to distance learning students began in 2019 and has been featured in an academic paper but deserves to be known more widely.

The project uses Raspberry Pi clusters based on the OctaPi instructions, released under a Creative Commons Licence by GCHQ. Eight Raspberry Pis are connected in a private network using a router and a switch. One of the Raspberry Pis acts as the lead, while the others are servers providing results back to the lead device. Programs written in Python run on the lead Pi, and the dispy package distributes activities across cores in the cluster.

Three programs have been developed for the clusters, and you can download them from the Git repository.

Two of the programs are text-based and linked to search problems: The traveling salesperson and password hashing. As complete search problems, these are ideal for teaching PDC concepts. The third program is graphical. The image combiner takes three images as input, with non-overlapping obstructions. It constructs an image without any obstructions by comparing the RGBA values pixel-by-pixel across the three images and selecting the median.

Using the cluster

The Open University is a distance learning institution, so students access the clusters through a web interface. Remote access to the clusters uses the OpenSTEM Labs infrastructure at the university. Ten clusters (eight built with Pi 4, two built with Pi 3B+) are installed into racks, with webcams pointed at each cluster.

The students select which program to run, the number of cores to use, and the parameters for the selected program. As output, they see the time the program takes to run on an individual Raspberry Pi compared to the cluster using the number of cores selected. The student also sees the output from the program, either the password hashing result, the minimal and maximal traveling salesperson route, or the non-occluded image.

Image by:

(Peter Cheer, CC BY-SA 4.0)

A webcam shows a live stream of the cluster. The lead Pi has an LED display to show the program's state as it runs. The webcam makes it clear to students that they are experimenting with real dedicated hardware rather than getting simulated or pre-recorded results.

Image by:

(Peter Cheer, CC BY-SA 4.0)

Each program has two activities associated with it, illustrating different aspects of program design and PDC operations. One of the main learning points is that PDC computing can provide significant performance advantages but at a cost in the time and resources taken to divide and distribute a problem and, in reverse, to recombine the results. The second learning point is that efficiency is significantly affected by the program design.

More on Raspberry Pi What is Raspberry Pi? eBook: Guide to Raspberry Pi Getting started with Raspberry Pi cheat sheet eBook: Running Kubernetes on your Raspberry Pi Whitepaper: Data-intensive intelligent applications in a hybrid cloud blueprint Understanding edge computing Our latest on Raspberry Pi Students like it

Currently, the use of the Raspberry Pi clusters is optional. Based on the findings so far, though, students enjoy it and are motivated by having remote access to physical hardware.

One student has said, "It was really interesting to be able to use real clusters instead of having it virtualized."

Another adds, "It was really exciting to be able to actually see a cluster working and see the real effects of working with multiple cores. It was great to be able to try this out for myself, not just to read the theory about it!"

Students are using the clusters to undertake learning activities designed to teach the principles of PDC rather than writing and running their own programs. The experience of developing a low-cost Raspberry Pi cluster for use with open-distance university students demonstrates the benefits remote practical activities can have for teaching PDC concepts and engaging students.

When I asked Daniel Gooch, one of the team members behind the project, about it, he said: "For me, where we differ is that we've taken an existing set of Raspberry Pi instructions and worked on integrating in additional wrap-around material to ensure it can cope with the distance and scale we operate on."

This academic experiment using Raspberry Pi clusters introduces parallel and distributed computing (PDC) concepts to distance learning students.

Image by:

Dwight Sipler on Flickr

Raspberry Pi Education What to read next This work is licensed under a Creative Commons Attribution-Share Alike 4.0 International License. Register or Login to post a comment.

Learn Python Control Flow and Loops to Write and Tune Shell Scripts – Part 2

Tecmint - Thu, 03/02/2023 - 12:35
The post Learn Python Control Flow and Loops to Write and Tune Shell Scripts – Part 2 first appeared on Tecmint: Linux Howtos, Tutorials & Guides .

In the previous article of this Python series, we shared a brief introduction to Python, its command-line shell, and the IDLE. We also demonstrated how to perform arithmetic calculations, how to store values in

The post Learn Python Control Flow and Loops to Write and Tune Shell Scripts – Part 2 first appeared on Tecmint: Linux Howtos, Tutorials & Guides.

Getting Started with Python Programming and Scripting in Linux – Part 1

Tecmint - Thu, 03/02/2023 - 12:00
The post Getting Started with Python Programming and Scripting in Linux – Part 1 first appeared on Tecmint: Linux Howtos, Tutorials & Guides .

It has been said (and often required by recruitment agencies) that system administrators need to be proficient in a scripting language. While most of us may be comfortable using Bash (or other Linux shells

The post Getting Started with Python Programming and Scripting in Linux – Part 1 first appeared on Tecmint: Linux Howtos, Tutorials & Guides.

Steam On Linux Marketshare Percentage Dipped In February

Phoronix - Thu, 03/02/2023 - 08:10
Valve has just published the Steam Survey results for the month prior and it points to Steam on Linux as a percentage dropping as well as a similar pullback in the Steam Deck hardware usage...

Linux 6.3 Adds Thunderbolt/USB4 DisplayPort Bandwidth Allocation Mode

Phoronix - Thu, 03/02/2023 - 03:30
Earlier this week Greg Kroah-Hartman submitted the USB/Thunderbolt subsystem updates for the ongoing Linux 6.3 kernel merge window...

Intel Compute Runtime 22.53.25242.13 Released With OpenCL & Level Zero Enhancements

Phoronix - Thu, 03/02/2023 - 02:30
Following a three month lull, last week Intel got back to releasing Compute-Runtime and IGC compiler updates. They have been working to shift to a monthly release cadence while during this transition period they needed extra time as it also rolled out some compiler/runtime interface changes. Now back into their swing of things, for kicking off the new month they have the Compute Runtime 22.53.25242.13 release...

Godot 4.0 Stable Released As Major Step Forward For Open-Source Game Engines

Phoronix - Wed, 03/01/2023 - 23:30
The Godot engine developers are starting off March with a bang... The much anticipated Godot 4.0 engine that has been in development for years has been released as stable!..

Pages