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 5. Advanced Solving of General Equation Systems

In the previous chapter, you were introduced to the ScaLAPACK library, which can be used to solve linear equation systems parallel to the distributed memory architecture. However, as you might have noticed, it is not an easy task to set up all the data structures that are required. First, it was necessary to plan a node grid that can be used for computations, and on this logical grid, calculation data has to be distributed correctly. A lot of experience and knowledge is required to perform such a task. Hence, it is not straightforward to program software that solves linear equations on your BeagleBone Black Cluster.

However, there are better options. In this chapter, we get to know the PETSc and SLEPc libraries, which are highly sophisticated and built upon ScaLAPACK and OpenMPI. With PETSc, it will become much easier to perform calculations such as solving linear, nonlinear, and even differential equation systems. SLEPc itself is a...

PETSc – a toolkit for scientific computation


PETSc stands for portable, extensible toolkit for scientific computation. It provides its functionality on a higher level than ScaLAPACK and thus makes it easier to use for beginners. Furthermore, it is developed for use with C++, so there are no function name issues compared to porting the FORTRAN libraries of ScaLAPACK, such as the underscores we encountered in the previous chapter. The following figure shows you the internal components of the PETSc library:

Important internal components of the PETSc library

Compared to handling vectors, which are not so critical, the proper storage of matrices can save a lot of memory and computation time. Mathematical problems often deal with special matrices that only have nonvanishing components in or near its diagonal. This leads to the idea to only save those diagonal or near-diagonal values that lead to the so-called sparse matrices. Sparse matrices, thus, are matrices where most of the components are zero...

SLEPc – a library for Eigenvalue problems


SLEPc stands for Scalable Library for Eigenvalue Problem Computations. With this library, it is possible to solve Eigenvalues and Eigenvectors. These problems are infamous in quantum mechanics. Before we go a little into details, we will download, configure, and compile the SLEPc extension library.

Downloading and configuring SLEPc

Download Version 3.4.4 from http://www.grycap.upv.es/slepc/download/download.htm.

Note

SLEPc and PETSc must match in their main and first subversions. So, 3.4.4 and 3.4.1 are fine, and 3.5 and 3.1 will probably not work.

To install SLEPc, extract the archive with the following command:

tar –xf petsc-3.4.4.tar.gz

Go to the petsc-3.4.4 subdirectory and type the following:

export PETSC_DIR=/var/mpishare/petsc-3.4.1
export PETSC_ARCH=arm-shared
export SLEPC_DIR=/var/mpishare/slepc-3.4.4
./configure

This takes only a minute.

Tip

In order to install SLEPc, PETSc must already be compiled!

The configure script will finish with the following...

Summary


In this chapter, you were introduced to the PETSc and SLEPc libraries. With PETSc, linear and nonlinear equations can be solved in a novel way. You were shown how to download and compile the PETSc library with the optional high-efficiency algorithm SuperLU for the distributed memory architecture. Also, some additional features were installed, which will play an important role in the following chapter.

Some simple PETSc examples explained how to treat parallel vectors and matrices and how each process can access its own and foreign parts. Starting with simple examples from calculating the vector norm in n-dimensions to solving a symmetric linear equation, you were shown how to use SuperLU to solve a two-dimensional Laplace equation. Using this example, you could also see the difference between a direct solver and an iterative solver.

Advancing the abilities of PETSc even further, we downloaded and configured the SLEPc library, which is a powerful software package that solves Eigenvalue...

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