Book Image

Building a BeagleBone Black Super Cluster

By : Andreas J Reichel
Book Image

Building a BeagleBone Black Super Cluster

By: Andreas J Reichel

Overview of this book

Table of Contents (14 chapters)
Building a BeagleBone Black Super Cluster
About the Author
About the Reviewers


In the beginning of the 20th century, a great mind began to think about his interests in technology and art. His name was Konrad Zuse. As a young man, he had been looking for fields where he could use his creativity, but he was somehow disappointed with fixed rules that gave him no space to apply any free thought. Having started with mechanical engineering, he soon switched over to architecture, where he was disappointed again because he could only draw predefined Doric and Ionic columns and could not create something he had in mind himself. So, he switched over to civil and construction engineering. During his studying years, he thought of automatization that could ease real-life tasks, such as automatically working cameras or programmable instruments that could simplify complicated and annoying calculation tasks. He also built the first working vending machine where one could select goods from a dial and retrieve them after inserting coins.

Konrad Zuse (1910-1995), the inventor of the freely programmable binary computer


Picture taken from Wikimedia Commons, user ArtMechanic, license according to CC BY-SA3.0

Finally, he was possessed enough by the idea to invent a binary working computer, which he started to build in the living room of his parents' house, who were not quite amused about this. He was the first engineer who ever used the binary number system invented by Gottfried Wilhelm Leibniz (1646-1716). Based on this, he reinvented two-state logic without knowing that such a thing already existed. Using his ideas, he finally succeeded, after two years, in building the world's first working computer, the Z1, which he finished in 1937. It was a mechanical apparatus that used the motor of a vacuum cleaner, which seemed more practical to him compared to using electronic parts.

The Z1 was the first binary computer that had an input and output system, a memory, an arithmetical unit, and a program execution unit. Programs could be loaded from paper cards with hole patterns. However, the mechanical parts of the Z1 were not very reliable. Its successor, the Z2, worked with electronic relays and was able to perform floating point operations and possessed a 16-bit memory as well as a 10 Hz system clock.

At this time, computers were huge and filled whole rooms. However, development from electronic relays to electronic tubes soon increased the possible computation speed. The most famous computer that used such tubes was the Electronic Numerical Integrator and Computer (ENIAC). Its power supply had to provide almost 200 kW, which is 500 times more than what is required for standard computers nowadays. Addition or subtraction of a simple number took 200 microseconds, and calculating the root of a number took around a third of second.

Further developments in electronics and the amazing discovery of semiconductors laid down the fundament for the invention of the transistor. The first working bipolar transistor was invented at Bell Laboratories and was presented on December 23, 1947. It was for the first time that it was possible to control electronic currents with voltages in a much more reliable way.

In 1949, Werner Jacobi invented a semiconductor amplifier that used five transistors on one semiconductor substrate. This development was not noticed in the beginning, but it provided the basis for further miniaturization. This approach found more and more popularity from 1958 onward. Robert Noyce invented a fully integrated semiconductor circuit that also included its wire interconnections, which already used photo lithographic processes and diffusion processes for fabrication.

After several improvements in transistor fabrication, such as self-aligned gate structures, the semiconductor company Intel® developed the world's first universally functioning microprocessor for the Japanese calculator company Busicom. This led to the development of the first Central Processing Unit (CPU), which is the Intel 4004, and it was universally applicable. It was first made available on November 15, 1971.

The Intel 4004 microprocessor in a self-built vintage computer

The 4004 ran at a clock speed of maximum 740 kHz and consisted of around 2300 transistors. The execution of one command lasted eight cycles, which was one machine cycle. This led to a maximum throughput of 92500 instructions per second.

However, this was just the beginning. The number of bits the processors were able to work with at once was increased from four to eight, starting with the 8008 microprocessor. Also, speed and supported memory sizes increased dramatically over the first decade. Computers became affordable and are now an integral part of almost everybody's home.

Modern processors consist of billions of transistors and run at clock speeds of around 4 GHz, which leads to command throughputs of up to 4 billion instructions per second. Memory sizes increased from a few kilobytes to terabytes over the last decades and transistor sizes have shrunken by a factor of thousand from 10 microns to 15 nanometers.

Additionally, miniaturization has led to the possibility of building a fully working computer the size of a credit card with a million times more memory and 50,000 times less power consumption, which is a million times faster than ENIAC.

Combining several of these small computers can further increase their unimaginable calculation capacity, leading to the exciting world of parallel computations and super clusters.

In this book, you will learn about a state-of-the-art model of these very tiny computer boards, that is BeagleBone Black, which resembles a full computer system. Its abilities are far beyond what anybody could dream of 50 years ago. You will learn how to integrate several of these small boards into a fully working super computer cluster, giving you the possibility to freely scale up its calculation power.

Practical examples will demonstrate what this immense power is really useful for nowadays.

What this book covers

Chapter 1, BeagleBone Black System Board, introduces you to the hardware and explains the handling and working principle of the BeagleBone Black system board. A very basic introduction to generic software programming is also provided.

Chapter 2, Building a Beowulf Cluster, shows you a step-by-step guide in order to build a super computer with only minimal hardware interconnecting several boards. The network interconnection and topology is explained in detail.

Chapter 3, Operating System Setup and Configuration, shows you exactly how to install the Ubuntu operating system used throughout this book. A step-by-step guide helps you configure the master and slave nodes, SSH, as well as basic developer tools. A simple method of data transfer between the cluster and an external computer is also shown.

Chapter 4, Parallel Computing with OpenMPI and ScaLAPACK, features the introduction and installation of the OpenMPI messaging system. This chapter provides the basis for scaling calculations of linear mathematical problems on the cluster nodes. This is shown with the popular library ScaLAPACK.

Chapter 5, Advanced Solving of General Equation Systems, enhances the previous chapter with advanced software libraries such as PETSc for linear and nonlinear problems as well as SLEPc for Eigenvalue problems. Example programs show you how to solve such equations on your cluster.

Chapter 6, Scientific and Technological Examples of Parallel Computing, shows you the final step in order to use deal.II, the highly sophisticated scientific finite element library for simulations and arbitrary dimensions. Example programs show you how to take your first steps in order to use this huge library to solve difficult equations with a state-of-the-art approach.

Appendix, References, gives a list of important links for various software and examples, which provide additional reference.

What you need for this book

This book is based on the open source Linux operating system Ubuntu, which can easily be obtained and installed as described in the corresponding chapters. All configuration and further installation is based on open source standard software, which is under development and has long-term support. Links to the libraries are provided in the chapters and the appendix.

The mathematics and scientific libraries are downloaded from the Internet and are compiled on the BeagleBone Black system by the reader.

Who this book is for

This book is intended for the interested reader, the part-time programmer, or the professional scientist. It is not necessary for the reader to know every detail of complex linear algebra or multidimensional finite element problems. It is also not necessary for the reader to be a professional software programmer. With a little interest and love for challenging software applications, everybody can use this book as a first step toward modern cluster computing as a hobby and for professional usage.


In this book, you will find a number of styles of text that distinguish between different kinds of information. Here are some examples of these styles, and an explanation of their meaning.

Code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles are shown as follows: "The mmcblk0p1 and mmcblk0p2 partition, respectively, relate to the first and second partition of the first block device (the number zero), whereas the mmcblk1p1 and mmcblk1p2 partitions relate to the second block device (the number one)."

A block of code is set as follows:

int main() {

  return 0;

Any command-line input or output is written as follows:

mkdir ~/ubimage
sudo mount /dev/mmcblk0p2 ~/ubimage

New terms and important words are shown in bold. Words that you see on the screen, in menus or dialog boxes for example, appear in the text like this: "For this, go to the left-hand side window and open the Add menu with the green plus sign."


Warnings or important notes appear in a box like this.


Tips and tricks appear like this.

Reader feedback

Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or disliked. Reader feedback is important for us as it helps us develop titles that you will really get the most out of.

To send us general feedback, simply e-mail , and mention the book's title in the subject of your message.

If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide at

Customer support

Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

Downloading the example code

You can download the example code files from your account at for all the Packt Publishing books you have purchased. If you purchased this book elsewhere, you can visit and register to have the files e-mailed directly to you.


Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in the text or the code—we would be grateful if you could report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting, selecting your book, clicking on the Errata Submission Form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded to our website or added to any list of existing errata under the Errata section of that title.

To view the previously submitted errata, go to and enter the name of the book in the search field. The required information will appear under the Errata section.


Piracy of copyrighted material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works in any form on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.

Please contact us at with a link to the suspected pirated material.

We appreciate your help in protecting our authors and our ability to bring you valuable content.


If you have a problem with any aspect of this book, you can contact us at , and we will do our best to address the problem.