Derek Woodroffe's PicoCray Turns Raspberry Pi Pico Boards Into a Distributed Supercomputer of Sorts

Using I2C as a backhaul, PicoCray lets multiple RP2040 processors work on a single task — though performance gains have yet to be proven.

Gareth Halfacree
2 years agoHW101

Developer Derek Woodroffe has built a Cray-inspired "supercomputer" using Raspberry Pi Pico development boards — and has released the software for turning their RP2040 microcontrollers into a distributed computing platform, using I2C for inter-node communication.

"PicoCray [is] a system for running distributed code over multiple [Raspberry] Pi Picos," Woodroffe explains. "For many uses, it actually runs slower than running on a single Pico. This is a horses for courses situation. Basically this project is a 'Solution waiting for a Problem.'"

The design of the hardware is based on that of the classic Cray-1 supercomputer with its iconic segmented tower design. Where the Cray-1 was powered by a single 64-bit processor running at up to 80MHz and with 8.39MB of available memory, though, Woodroffe's creation boasts no fewer than nine Raspberry Pi Pico boards — giving it a total of 18 Arm Cortex-M0+ processors running at 133MHz but just around 2.4MB of RAM.

While the aesthetics may be Cray-1, the "supercomputer" design is based on distributed computing. When each Raspberry Pi Pico in the cluster is powered on, it checks if Pin 22 is brought low. If it is, it assumes a controller role; otherwise, it assumes a secondary role and allows the controller to assign it an I2C address. Once all processor nodes have booted, the controller can set them running on a task — the rendering of a Mandelbrot fractal, in Woodroffe's demo application.

"This code is all proof of principle," Woodroffe warns anyone looking to try the project out for themselves. "Much of it works. Some of it gives reasonable results. Does it work, not for all cases. Does it give a good Mandelbrot output? Well it did, but I've changed many many things since I last actually looked at its output. Basically if you are going to use this code to pilot a rocket, you will end up smashing into a planet at Mach something ridiculous. You have been warned."

Those who are not put off by Woodroffe's warning can find the project's source code on GitHub under the permissive BSD two-clause license.

Gareth Halfacree
Freelance journalist, technical author, hacker, tinkerer, erstwhile sysadmin. For hire: freelance@halfacree.co.uk.
Latest articles
Sponsored articles
Related articles
Latest articles
Read more
Related articles