# How to Build a Beowulf Cluster / DIY Mobile Phones

**URL:** <https://forum.codeselfstudy.com/t/how-to-build-a-beowulf-cluster-diy-mobile-phones/1536>\
**Category:** General Discussion\
**Tags:** gnu, linux\
**Created:** [March 15, 2019, 8:00am UTC](https://forum.codeselfstudy.com/t/how-to-build-a-beowulf-cluster-diy-mobile-phones/1536 "2019-03-15T08:00:00Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Josh](https://forum.codeselfstudy.com/user_avatar/forum.codeselfstudy.com/josh/32/4_2.png) [@Josh](https://forum.codeselfstudy.com/u/Josh)\
**Post date:** [March 15, 2019, 8:00am UTC](https://forum.codeselfstudy.com/t/how-to-build-a-beowulf-cluster-diy-mobile-phones/1536/1 "2019-03-15T08:00:00Z")

</div>

Saving some links here:

[Building a Beowulf Cluster in just 13 steps](https://www.linux.com/blog/building-beowulf-cluster-just-13-steps)

> **[Arduin-o-Phone](https://learn.adafruit.com/arduin-o-phone-arduino-powered-diy-cellphone/overview)**
>
> Apple, Schmapple! Make your own phone with an Arduino & Adafruit FONA shield. This project will show you how you can use the FONA shield and a TFT shield stacked on top to make a touch-screen phone that you can program yourself.

> **[ArduinoPhone 2.0 - an Open Source Mobile Phone](https://www.instructables.com/ArduinoPhone-20-an-Open-Source-Mobile-Phone-Based-/)**
>
> ArduinoPhone 2.0 - an Open Source Mobile Phone: More than 2 years ago I had made an instructable - ArduinoPhone. 
> ArduinoPhone was big and it's difficult for the beginner to make one. As there's a step to make the charge circuit. 
> And I had heard so...

> **[Lightweight Arduino GSM Mobile Phone](https://www.hackster.io/Avishek/lightweight-arduino-gsm-mobile-phone-b241d3)**
>
> My lightweight Arduino GSM mobile phone. By Avishek.

> **[Reddit - The heart of the internet](https://old.reddit.com/r/linux/comments/789fzl/what_are_now_the_options_for_linux_phone/dos3rin/)**

---

<div class="post-metadata">

**Author:** ![flcpge](https://forum.codeselfstudy.com/user_avatar/forum.codeselfstudy.com/flcpge/32/653_2.png) [@flcpge](https://forum.codeselfstudy.com/u/flcpge)\
**Post date:** [March 15, 2019, 8:14am UTC](https://forum.codeselfstudy.com/t/how-to-build-a-beowulf-cluster-diy-mobile-phones/1536/2 "2019-03-15T08:14:24Z")

</div>

Build a Raspberry Pi Beowulf cluster.

> **[Raspberry Pi 3 Cluster (Supercomputer)](https://rasmurtech.wordpress.com/2018/06/27/raspberry-pi-3-cluster-supercomputer/)**
>
>   Here you will learn how to create a Raspberry Pi 3 Cluster (Supercomputer). This tutorial will work for all the other Raspberry Pi’s.    Parts Raspberry Pi 3 (2 or more)  Network Switch…

[![](https://forum.codeselfstudy.com/uploads/default/original/2X/9/9bd0bce58129b4a23cf410ed1b51b51e205999c2.jpeg "Raspberry Pi 3 Cluster (Supercomputer)") ](https://www.youtube.com/watch?v=irqPBr_K2Ak)

---

<div class="post-metadata">

**Author:** ![flcpge](https://forum.codeselfstudy.com/user_avatar/forum.codeselfstudy.com/flcpge/32/653_2.png) [@flcpge](https://forum.codeselfstudy.com/u/flcpge)\
**Post date:** [March 15, 2019, 8:18am UTC](https://forum.codeselfstudy.com/t/how-to-build-a-beowulf-cluster-diy-mobile-phones/1536/3 "2019-03-15T08:18:22Z")

</div>

Another video of a four node Raspberry Pi cluster.

---

<div class="post-metadata">

**Author:** ![Dan](https://forum.codeselfstudy.com/user_avatar/forum.codeselfstudy.com/dan/32/4311_2.png) [@Dan](https://forum.codeselfstudy.com/u/Dan)\
**Post date:** [March 15, 2019, 4:09pm UTC](https://forum.codeselfstudy.com/t/how-to-build-a-beowulf-cluster-diy-mobile-phones/1536/4 "2019-03-15T16:09:33Z")

</div>

I’m considering getting one of these.  
[https://www.amazon.com/Build-Supercomputers-Raspberry-Pi-3/dp/1787282589/](https://www.amazon.com/Build-Supercomputers-Raspberry-Pi-3/dp/1787282589/)  
[https://www.amazon.com/Raspberry-Super-Cluster-Andrew-Dennis/dp/1783286199/](https://www.amazon.com/Raspberry-Super-Cluster-Andrew-Dennis/dp/1783286199/)

---

<div class="post-metadata">

**Author:** ![Josh](https://forum.codeselfstudy.com/user_avatar/forum.codeselfstudy.com/josh/32/4_2.png) [@Josh](https://forum.codeselfstudy.com/u/Josh)\
**Post date:** [March 15, 2019, 5:28pm UTC](https://forum.codeselfstudy.com/t/how-to-build-a-beowulf-cluster-diy-mobile-phones/1536/5 "2019-03-15T17:28:05Z")

</div>

They sometimes have their books and videos on sale for $5-10 each. It looks like their videos are 3 for $25 at the moment, but not the books. I subscribe to their newsletter to stay updated.

[https://www.packtpub.com/](https://www.packtpub.com/)

---

<div class="post-metadata">

**Author:** ![Dan](https://forum.codeselfstudy.com/user_avatar/forum.codeselfstudy.com/dan/32/4311_2.png) [@Dan](https://forum.codeselfstudy.com/u/Dan)\
**Post date:** [March 15, 2019, 6:32pm UTC](https://forum.codeselfstudy.com/t/how-to-build-a-beowulf-cluster-diy-mobile-phones/1536/6 "2019-03-15T18:32:03Z")

</div>

Thanks. I will probably subscribe too.

---

<div class="post-metadata">

**Author:** ![Dan](https://forum.codeselfstudy.com/user_avatar/forum.codeselfstudy.com/dan/32/4311_2.png) [@Dan](https://forum.codeselfstudy.com/u/Dan)\
**Post date:** [March 22, 2019, 9:36pm UTC](https://forum.codeselfstudy.com/t/how-to-build-a-beowulf-cluster-diy-mobile-phones/1536/7 "2019-03-22T21:36:26Z")

</div>

I decided to go with this book first ($25 on Amazon). I’m only about 25% of the way through it, but so far it is quite good and I’m learning a lot from it.

> **[Introduction to Parallel Computing](https://link.springer.com/book/10.1007/978-3-319-98833-7)**
>
> This undergraduate textbook provides a concise overview of practical methods for the design of efficient parallel programs. The coverage includes three mainstream parallelization approaches for multicore computers, interconnected computers and...

---

<div class="post-metadata">

**Author:** ![Dan](https://forum.codeselfstudy.com/user_avatar/forum.codeselfstudy.com/dan/32/4311_2.png) [@Dan](https://forum.codeselfstudy.com/u/Dan)\
**Post date:** [March 22, 2019, 10:11pm UTC](https://forum.codeselfstudy.com/t/how-to-build-a-beowulf-cluster-diy-mobile-phones/1536/8 "2019-03-22T22:11:47Z")

</div>

I clearly need to review / learn C though. 🙂

---

<div class="post-metadata">

**Author:** ![Josh](https://forum.codeselfstudy.com/user_avatar/forum.codeselfstudy.com/josh/32/4_2.png) [@Josh](https://forum.codeselfstudy.com/u/Josh)\
**Post date:** [April 6, 2019, 2:56am UTC](https://forum.codeselfstudy.com/t/how-to-build-a-beowulf-cluster-diy-mobile-phones/1536/9 "2019-04-06T02:56:36Z")

</div>

According to this, you can simulate a Beowulf cluster using Virtualbox.  
[https://www-users.cs.york.ac.uk/~mjf/pi\_cluster/src/Building\_a\_simple\_Beowulf\_cluster.html](https://www-users.cs.york.ac.uk/~mjf/pi_cluster/src/Building_a_simple_Beowulf_cluster.html)

> ## 2. Building a virtual Beowulf Cluster
> 
> It is not a bad idea to start by building a virtual cluster using virtualization software like [VirtualBox](http://en.wikipedia.org/wiki/VirtualBox). I simply used my laptop running Ubuntu as the master node, and two virtual computing nodes running Ubuntu Server Edition were created in VirtualBox. The virtual cluster allows you to build and test the cluster without the need for the extra hardware. However, this method is only meant for testing and not suited if you want increased performance.
> 
> When it comes to configuring the nodes for the cluster, building a virtual cluster is practically the same as building a cluster with actual machines. The difference is that you don’t have to worry about the hardware as much. You do have to properly configure the virtual network interfaces of the virtual nodes. They need to be configured in a way that the master node (e.g. the computer on which the virtual nodes are running) has network access to the virtual nodes, and vice versa.

---

<div class="post-metadata">

**Author:** ![Dan](https://forum.codeselfstudy.com/user_avatar/forum.codeselfstudy.com/dan/32/4311_2.png) [@Dan](https://forum.codeselfstudy.com/u/Dan)\
**Post date:** [April 6, 2019, 4:35am UTC](https://forum.codeselfstudy.com/t/how-to-build-a-beowulf-cluster-diy-mobile-phones/1536/10 "2019-04-06T04:35:41Z")

</div>

That looks like a great resource!

---

<div class="post-metadata">

**Author:** ![Dan](https://forum.codeselfstudy.com/user_avatar/forum.codeselfstudy.com/dan/32/4311_2.png) [@Dan](https://forum.codeselfstudy.com/u/Dan)\
**Post date:** [April 9, 2019, 4:48am UTC](https://forum.codeselfstudy.com/t/how-to-build-a-beowulf-cluster-diy-mobile-phones/1536/11 "2019-04-09T04:48:54Z")

</div>

It appears Julia is working on adding native parallel computing features:  
[https://docs.julialang.org/en/v1/manual/parallel-computing/index.html](https://docs.julialang.org/en/v1/manual/parallel-computing/index.html)

I hope it moves beyond the experimental stage soon. For now it seems the languages of choice for parallel computing are C/C++ and Fortran. I’ve used C before, but not much and it was a long time ago. I essentially need to relearn it (which is probably a good idea anyway).

How badass is Fortran though, still being a scientific computing player after all these years? 💪🕶

---

<div class="post-metadata">

**Author:** ![Josh](https://forum.codeselfstudy.com/user_avatar/forum.codeselfstudy.com/josh/32/4_2.png) [@Josh](https://forum.codeselfstudy.com/u/Josh)\
**Post date:** [April 10, 2019, 2:55am UTC](https://forum.codeselfstudy.com/t/how-to-build-a-beowulf-cluster-diy-mobile-phones/1536/12 "2019-04-10T02:55:52Z")

</div>

More inspiration:

Description:  
[http://likemagicappears.com/projects/raspberry-pi-cluster/](http://likemagicappears.com/projects/raspberry-pi-cluster/)

---

<div class="post-metadata">

**Author:** ![Dan](https://forum.codeselfstudy.com/user_avatar/forum.codeselfstudy.com/dan/32/4311_2.png) [@Dan](https://forum.codeselfstudy.com/u/Dan)\
**Post date:** [April 10, 2019, 4:26am UTC](https://forum.codeselfstudy.com/t/how-to-build-a-beowulf-cluster-diy-mobile-phones/1536/13 "2019-04-10T04:26:41Z")

</div>

I really like the idea of building a cluster with Raspberry Pis as a way to learn how these things go without risking a lot of cash. But I’m a little confused about these clusters with a ton of Pis. Do 40 node clusters require a very different setup from 4 node clusters? I guess he needs 2 switches so the network topology is evidently different, as it no doubt would have to be with very many nodes. I just don’t know enough about any of that stuff.

According to his page, he spent $3000 and has a system “about as fast as a nice desktop”. Seems like $3000 spent on a few “real” nodes could yield a very speedy system indeed. But perhaps that’s not the point. He does seem to have learned about a lot more than just assembling a cluster, with the custom case and apparently some sort of custom circuit boards, for example. It’s certainly more impressive than anything I’ve ever put together, and it does indeed look very cool! A good inspiration!

---

<div class="post-metadata">

**Author:** ![Josh](https://forum.codeselfstudy.com/user_avatar/forum.codeselfstudy.com/josh/32/4_2.png) [@Josh](https://forum.codeselfstudy.com/u/Josh)\
**Post date:** [April 10, 2019, 5:37am UTC](https://forum.codeselfstudy.com/t/how-to-build-a-beowulf-cluster-diy-mobile-phones/1536/14 "2019-04-10T05:37:12Z")

</div>

I just tried to find the largest Raspberry Pi cluster and it looks like it’s the 3,000-Pi one below. I can’t find an update about the 10,000-pi plan. 🤔

[https://www.raspberrypi.org/blog/raspberry-pi-clusters-come-of-age/](https://www.raspberrypi.org/blog/raspberry-pi-clusters-come-of-age/)

---

<div class="post-metadata">

**Author:** ![flcpge](https://forum.codeselfstudy.com/user_avatar/forum.codeselfstudy.com/flcpge/32/653_2.png) [@flcpge](https://forum.codeselfstudy.com/u/flcpge)\
**Post date:** [April 10, 2019, 7:50am UTC](https://forum.codeselfstudy.com/t/how-to-build-a-beowulf-cluster-diy-mobile-phones/1536/15 "2019-04-10T07:50:11Z")

</div>

The communication between the Raspberry Pi nodes is limited by its ethernet connection.

The Pi 3 has a Gigabit ethernet connection, but because of USB 2.0 limitations, its maximum throughput is 330 Mb, not 1000 Mb. Other limits include the load balancer, and a bunch of other stuff I don’t understand.

The machine clusters in the [Top 500 Supercomputers](https://www.top500.org/) are engineering marvels.

---

<div class="post-metadata">

**Author:** ![Dan](https://forum.codeselfstudy.com/user_avatar/forum.codeselfstudy.com/dan/32/4311_2.png) [@Dan](https://forum.codeselfstudy.com/u/Dan)\
**Post date:** [April 11, 2019, 6:21pm UTC](https://forum.codeselfstudy.com/t/how-to-build-a-beowulf-cluster-diy-mobile-phones/1536/16 "2019-04-11T18:21:37Z")

</div>

Lately I’ve been trying to get even a superficial overview of what all is available for parallel programming interfaces/standards/whatever. I’m going to post some notes here about that, maybe mostly to keep a record for myself, but also in hopes someone might correct my errors, fill in my gaps, etc.

For CPUs that share memory – so multiple cores on one chip or multiple chips on one board – there is OpenMP. A new wrinkle here is that the latest versions of OpenMP now also allow code to be run on a GPU.

For CPUs that don’t share memory but are connected via a network, there is (Open)MPI. Not surprisingly, communication speed is much more limited here than in the shared memory case above. For each CPU in the network, OpenMPI can make use of multiple cores, but evidently it’s not uncommon to mix OpenMPI and OpenMP, using the latter to direct processes through the portions of the system that share memory.

For running the parallel portion of a program through GPUs, there’s the well-known CUDA platform, but only for (some) Nvidia GPUs. There’s also OpenCL and OpenACC, which run on most (all?) GPUs.

So far as I can tell, for any given application and system, there may be no way to know which of these approaches is best without simply trying them out and comparing. Indeed many publications seem to be dedicated to this. And even within a particular scenario, say OpenMP on one multicore CPU, there are so many ways to allocate the processes that it seems very much like an experimental science.

I guess if you’re not an a big hurry, this experimenting could be fun. The only one of these I’ve “test driven” as yet, even for simple examples, is OpenMP. For that, tweaking the various settings and timing the results has indeed been entertaining. 🙂

Anyway, as I said above, please do add to or correct any of the above. I would really appreciate it.

---

<div class="post-metadata">

**Author:** ![Dan](https://forum.codeselfstudy.com/user_avatar/forum.codeselfstudy.com/dan/32/4311_2.png) [@Dan](https://forum.codeselfstudy.com/u/Dan)\
**Post date:** [April 18, 2019, 10:47pm UTC](https://forum.codeselfstudy.com/t/how-to-build-a-beowulf-cluster-diy-mobile-phones/1536/17 "2019-04-18T22:47:48Z")

</div>

**Updates:**

Test hardware: My ancient (2012) MacBook Air  
CPU has 2 physical cores, and thus 4 logical cores via hyper-threading (or something)  
GPU is simple integrated chip, an Intel HD 4000

(1) OpenMP is not very hard to get up and running, at least for “Hello World” type testing. Control of parallelization is done with one-line “directives” that are not super hard to understand (at least the ones I tried). Testing it out with a ridiculously parallel program, I got about 3.48x speedup, which seems about the best one could hope for on 4 logical cores.

(2) OpenCL is an absolute _nightmare_. Even for the simplest of examples, you still need a _ton_ of code to interact with the GPU. It’s hard to even find the relevant calculations being done amid the sea of GPU specific code. So, I abandoned this without determining how much speedup it provided.

(3) The more recent OpenACC is _way_ easier to use than OpenCL. It is a lot like OpenMP. I haven’t learned much at all about it yet, but just running things out of the box with a single directive before my for loop, I was able to get 5.93x speedup over the same code run in serial. Even reading through Intel’s documentation on my graphics chip, I’m still not sure of the internals, so I’m not sure if that’s an expected amount of speedup for this chip or not. Reading test results of people who know much better what they’re doing, evidently OpenCL does offer better speedup over OpenACC, but is much more difficult to use (even for them). So, for now at least, this seems the go-to platform for running parallel code through the GPU, and I’ll spend some more time learning it.

Then it’s on to OpenMPI! 🙂

**Edit/Rant** : So far, trying each of OpenMP, OpenCL, and OpenACC on a Mac has given me some difficulty. There are work-arounds for some issues, but not all so far as I can tell. Looks like things will go much more smoothly with Linux, though I haven’t tried them there yet.

---

<div class="post-metadata">

**Author:** ![Josh](https://forum.codeselfstudy.com/user_avatar/forum.codeselfstudy.com/josh/32/4_2.png) [@Josh](https://forum.codeselfstudy.com/u/Josh)\
**Post date:** [February 7, 2020, 2:54am UTC](https://forum.codeselfstudy.com/t/how-to-build-a-beowulf-cluster-diy-mobile-phones/1536/18 "2020-02-07T02:54:32Z")

</div>

Here’s one with a particle accelerator.

---

<div class="post-metadata">

**Author:** ![Dan](https://forum.codeselfstudy.com/user_avatar/forum.codeselfstudy.com/dan/32/4311_2.png) [@Dan](https://forum.codeselfstudy.com/u/Dan)\
**Post date:** [February 7, 2020, 3:30am UTC](https://forum.codeselfstudy.com/t/how-to-build-a-beowulf-cluster-diy-mobile-phones/1536/19 "2020-02-07T03:30:34Z")

</div>

(sigh) I really have to get back to exploring parallel computing. Just the little bit I tried out was a lot of fun.

---

<div class="post-metadata">

**Author:** ![Dan](https://forum.codeselfstudy.com/user_avatar/forum.codeselfstudy.com/dan/32/4311_2.png) [@Dan](https://forum.codeselfstudy.com/u/Dan)\
**Post date:** [March 19, 2020, 5:04pm UTC](https://forum.codeselfstudy.com/t/how-to-build-a-beowulf-cluster-diy-mobile-phones/1536/20 "2020-03-19T17:04:27Z")

</div>

On the topic of DIY phones, I thought this looked fun:

**Homemade Cell Phone with Rotary Dial**  
[http://justine-haupt.com/rotarycellphone/index.html](http://justine-haupt.com/rotarycellphone/index.html)

[Next page](https://forum.codeselfstudy.com/t/how-to-build-a-beowulf-cluster-diy-mobile-phones/1536.md?page=2)
