Reader small image

You're reading from  Building a BeagleBone Black Super Cluster

Product typeBook
Published inNov 2014
Publisher
ISBN-139781783989447
Edition1st Edition
Right arrow
Author (1)
Andreas J Reichel
Andreas J Reichel
author image
Andreas J Reichel

Andreas Josef Reichel was born in 1982 in Munich, Bavaria, to Josef and Ursula. He went to an elementary school from 1989 to 1993 and continued with lower secondary education for 4 years and started with middle school in 1996. In 1999, he finished school as the best graduate of the year. From 2000 to 2001, he went to Fachoberschule and got his subject-linked university entrance qualification, with which he began to study Physical Technology at the University of Applied Sciences in Munich. After two semesters, he got his preliminary diploma and began with general studies of Physics at the Ludwig Maximilian University of Munich in 2003. In 2011, he completed Dipl.-Phys. (Univ.) in experimental physics with the THz characterization of thin semiconductor films in photonics and optoelectronics. Now, he is working on his dissertation to Dr. rer. nat. on plasma etching processes for semiconductors at the Walter Schottky Institute of the Technische Universität München in Garching. In his spare time, he has been learning programming languages such as BASIC, Pascal, C/C++, x86 and x64 Assembler, as well as HTML, PHP, JavaScript, and the database system MySQL and has been programming since he was 13 years old. Since 1995, he has been an active hobby musician in different accordion ensembles and orchestras. He also loves to learn about languages and drawing, and he began practicing Chinese martial arts in 2012. He invests most of his free time in hobby electronic projects and family genealogical research. He was the co-author of Charge carrier relaxation and effective masses in silicon probed by terahertz spectroscopy, S. G. Engelbrecht, A. J. Reichel, and R. Kersting, Journal of Applied Physics.
Read more about Andreas J Reichel

Right arrow

Chapter 6. Scientific and Technological Examples of Parallel Computing

In the last two chapters, you saw different examples of how to utilize the scalable computational power of your self-built BeagleBone Black cluster. You saw that special software libraries and some programming skills are necessary in order to create the required tools. In Chapter 4, Parallel Computing with OpenMPI and ScaLAPACK, you gained basic knowledge of how the calculation power is distributed using OpenMPI and how to utilize it to solve problems in linear algebra.

In Chapter 5, Advanced Solving of General Equation Systems Using Advanced Methods, you got to know about a much simpler approach for an even broader area of mathematical problems. With the two libraries SLEPc and PETSc, you saw how to solve linear, nonlinear, and Eigenvalue equations, which are very common in scientific and general technological questions but also appear in financial problems and many other areas.

In this chapter, you will get to know about...

Calculations on cloud-distributed mesh grids


In order to distribute mathematical problems onto a cluster, it is necessary to create a logical plan that maps the data array onto the logical computation nodes. In technological or scientific calculations, a real body or space often builds the basis for a fundamental description. For example, we want to calculate the strain inside a two-dimensional body or the heat transfer from one side to the other side of this body. In order to do this, it is necessary to describe this body in a mathematical manner.

The triangulation of a body mesh

To accomplish this description, you need to calculate all the physical properties of all infinitesimally small constituents of it. Usually, this would be atoms or molecules. However, a sugar cube already contains around 10 to the power of 21 atoms. These are thousands of billions of billions of atoms. If you want to store a few numbers, for example, eight double format floating point numbers for each of these atoms...

deal.II – a powerful Physics calculation library


deal.II is a highly sophisticated simulation library based on the method of finite elements. It is developed by professional mathematicians and programmers, and it is open source software. The first question that might arise is why should you use the deal.II library at all. This can be answered with the same argument as the one used for the other software library we have already used. You can, of course, write everything yourself from scratch. However, you only have limited time each day to write your code, and also, you do not want to have just a simple algorithm for a specific problem. You probably want code that is state of the art and very efficient in problem solving. However, not many people would have the knowledge to write highly optimized code and this also takes a very long time. Again, it becomes very clear why deal.II is helpful. It is a complete library already optimized to run on cluster systems and solve different kinds of engineering...

Example programs


To understand the possibilities of deal.II, it's best that we have a look at some of the standard example files that come with the package. You will see the /var/mpishare/deal.II/examples folder in your source directory tree. Go there and enter the directory of the first example called step-1.

As you have seen in the previous chapters, it is a time-consuming action to always specify every single link library when compiling your programs. Also, when you have programs with more than one object file, compiling this way will soon get annoying and unmanageable. However, there is a far better way to generate software, namely using the so-called makefiles.

Using makefiles

A makefile is nothing but a file that contains all the compiler and linker information. It is a special file that is processed by a program called make. This program can be understood to be a simple command interpreter that makes software creation more flexible and convenient.

If you open the /var/mpishare/deal.II...

Parallel solution of elastic equations


Till now, all deal.II examples only used the first cluster node. They were thought to show you a few things that deal.II is able to do and how it can nicely output some graphics. In this example, however, you will see an example where a very computationally intense equation for the elastic deformation of a solid body is solved in parallel on a BeagleBone Black cluster using the deal.II library. Because deal.II supports an interface to the PETSc library, problems can be transferred to PETSc and solved on the cluster in parallel.

Let's first consider the mathematical starting point. The elastic equation is as follows:

Here, c is the stiffness tensor, f is the force vector, and u is the resulting deformation vector. The implementation of such a linear equation system is very complicated. There are further explanations at http://www.dealii.org/8.0.0/doxygen/deal.II/step_8.html regarding the programming of deal.II to solve this.

While step-8 is still a serial...

The visualization of calculated data


Although deal.II can output data in various formats and you could always choose another format, if you cannot open special example files such as .gmv in the previous example, there is a highly sophisticated visualization software called Visit that is freely available on the Web.

You can download it to your computer from the following link in order to install and conveniently view the solution files from any remote location using the Samba network share, for example.

Tip

Visit 2.7.3 will require around 520 MB of hard disk space during the installation.

After installing and starting Visit, you should get two windows: a kind of tool window on the left-hand side and a document window on the right-hand side.

There is a problem with the current .gmv importer and deal.II .gmv output files. In order to correctly load your simulation data, you should change example 17 to output .vtk files instead of .gmv files. For this, open the main.cc file and replace the following...

Summary


In this last chapter, we saw some highly advanced applications of all our previously used packages together with the deal.II library. Of course, it was not possible to show you everything in detail; however, you were introduced to many techniques that are very important in order to write or understand modern simulation software for science, engineering, and many other areas.

You got to know about the deal.II library and how it is configured and built upon our previously compiled libraries PETSc and SLEPc. You were shown some important examples, which are part of the deal.II documentation, that demonstrate the power of your BeagleBone Black cluster. Mainly, these examples demonstrated triangulation to describe geometric objects and discussed the solution of Poisson's equation on one node in order to have a first look how deal.II works. We also discussed the parallel solution of elastic equations that calculate the deformation of a solid body in parallel and show how the full cluster...

lock icon
The rest of the chapter is locked
You have been reading a chapter from
Building a BeagleBone Black Super Cluster
Published in: Nov 2014Publisher: ISBN-13: 9781783989447
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime

Author (1)

author image
Andreas J Reichel

Andreas Josef Reichel was born in 1982 in Munich, Bavaria, to Josef and Ursula. He went to an elementary school from 1989 to 1993 and continued with lower secondary education for 4 years and started with middle school in 1996. In 1999, he finished school as the best graduate of the year. From 2000 to 2001, he went to Fachoberschule and got his subject-linked university entrance qualification, with which he began to study Physical Technology at the University of Applied Sciences in Munich. After two semesters, he got his preliminary diploma and began with general studies of Physics at the Ludwig Maximilian University of Munich in 2003. In 2011, he completed Dipl.-Phys. (Univ.) in experimental physics with the THz characterization of thin semiconductor films in photonics and optoelectronics. Now, he is working on his dissertation to Dr. rer. nat. on plasma etching processes for semiconductors at the Walter Schottky Institute of the Technische Universität München in Garching. In his spare time, he has been learning programming languages such as BASIC, Pascal, C/C++, x86 and x64 Assembler, as well as HTML, PHP, JavaScript, and the database system MySQL and has been programming since he was 13 years old. Since 1995, he has been an active hobby musician in different accordion ensembles and orchestras. He also loves to learn about languages and drawing, and he began practicing Chinese martial arts in 2012. He invests most of his free time in hobby electronic projects and family genealogical research. He was the co-author of Charge carrier relaxation and effective masses in silicon probed by terahertz spectroscopy, S. G. Engelbrecht, A. J. Reichel, and R. Kersting, Journal of Applied Physics.
Read more about Andreas J Reichel