Reader small image

You're reading from  Raspberry Pi Super Cluster

Product typeBook
Published inNov 2013
Reading LevelBeginner
PublisherPackt
ISBN-139781783286195
Edition1st Edition
Languages
Right arrow
Author (1)
Andrew K. Dennis
Andrew K. Dennis
author image
Andrew K. Dennis

Andrew K. Dennis is a full stack and cybersecurity architect with over 17 years' experience who currently works for Modus Create in Reston, VA. He holds two undergraduate degrees in software engineering and creative computing and a master's degree in information security. Andy has worked in the US, Canada, and the UK in software engineering, e-learning, data science, and cybersecurity across his career, and has written four books on IoT, the Raspberry Pi, and supercomputing. His interests range from the application of pataphysics in computing to security threat modeling. Andy lives in New England and is an organizer of Security BSides CT.
Read more about Andrew K. Dennis

Right arrow

Preface

Have you ever read about parallel computing clusters and supercomputing, and wondered how to do it at home?

Do you have a number of Raspberry Pis and don't know what to do with them?

Then this is the book for you!

The field of parallel computing is certainly an exciting one. With the introduction of the Raspberry Pi, building a cluster at home is even easier. Hobbyists can now construct a small parallel computing cluster at low cost and using minimal physical space.

This book will walk you through building a parallel computing cluster using two Raspberry Pis and commodity off-the-shelf hardware.

Having set up your cluster, you will explore parallel computing paradigms such as MPI and MapReduce through exciting software projects.

Using MPICH and the C programming language, step-by-step guides will walk you through writing your own MPI-based applications. You will then test these in parallel on your two Raspberry Pis.

Following this, MapReduce will be examined through Apache Hadoop, which you will install and set up. You will then learn to interact with Hadoop by writing programs in Java.

Finally Raspberry Pi Super Cluster provides you with some fun jump-off points where you can explore the topics discussed in the book in further detail.

Having completed the various chapters' projects, you will have gained a basic knowledge of parallel computing and how it can be implemented on Raspberry Pi.

What this book covers

Chapter 1, Clusters, Parallel Computing, and Raspberry Pi – A Brief Background, provides an introduction to the topic of parallel computing and its history. You will also learn a little about the Raspberry Pi and why it is a good fit for experimenting with parallel computing.

Chapter 2, Setting Up your Raspberry Pi Software and Hardware for Parallel Computing, builds upon the first chapter by providing a guide to setting up a two node Raspberry Pi cluster and its associated hardware.

Chapter 3, Parallel Computing – MPI on the Raspberry Pi, introduces the topics of MPI (Message Passing Interface), and MPICH. These are explored through examples in the C programming language.

Chapter 4, Hadoop – Distributed Applications on the Raspberry Pi, explores Apache Hadoop and Java through practical examples. From installing Java through to Hadoop configuration, you will get a taste of the two technologies.

Chapter 5, MapReduce Applications with Hadoop and Java, explores the paradigm of MapReduce: the core technology at the heart of Hadoop.

Chapter 6, Calculate Pi with Hadoop and MPI, expands upon previous chapters with experiments on calculating Pi using Hadoop and MPICH. Here you will work with a Java example and write another C application implementing MPI.

Chapter 7, Going Further, finishes off the book with some projects ranging from building a Lego Raspberry Pi case to writing a Fortran application. You will also learn about some alternative approaches to powering your Raspberry Pi.

Appendix, provides you with a list of resources for further reading and exploration. Links to topics covered in this book are provided for the reader to follow up.

What you need for this book

The following list includes the recommended and optional hardware to complete the projects in this book:

  • Two Raspberry Pi Model B's

  • An HDMI monitor and cable

  • USB keyboard

  • USB mouse

  • Two Micro-USB power units compatible with the Raspberry Pi

  • Three network cables

  • A small network switch

  • Two Raspberry Pi compatible SD cards

  • Internet connection

  • A desk mounted power strip with both USB and mains outlet (optional)

  • Raspberry Pi cases/project enclosures (optional)

  • USB hard drive (optional for a project in Chapter 7, Going Further)

  • Lego (optional)

Who this book is for

Have you ever wanted to build your own super computer? Wonder what parallel computing is all about and want to experiment with it? Have a bunch of Raspberry Pis and not sure what to do with them? Then this book is for you.

Aimed at the super computing novice and Raspberry Pi enthusiast alike, this is the perfect introductory text for those wishing to get their hands dirty building their own system.

While some programming experience is required, no prior knowledge of the technologies associated with parallel computing is assumed.

Conventions

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 are shown as follows: "Navigate into mpich3 and create the following two directories."

A block of code is set as follows:

/*
Hello RPI implemented using MPI
*/

#include <stdio.h>
#include <mpi.h>

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

ssh pi@192.168.1.85 'sudo echo "raspberrypi2" | sudo tee /etc/hostname; sudo shutdown -r now'

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: "Select your SD card drive from the Device dropdown on the right-hand side".

Note

Warnings or important notes appear in a box like this.

Tip

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 may have disliked. Reader feedback is important for us to develop titles that you really get the most out of.

To send us general feedback, simply send an e-mail to , and mention the book title via 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 on www.packtpub.com/authors.

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 for all Packt books you have purchased from your account at http://www.packtpub.com. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.

Errata

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 would 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 http://www.packtpub.com/submit-errata, 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 on our website, or added to any list of existing errata, under the Errata section of that title. Any existing errata can be viewed by selecting your title from http://www.packtpub.com/support.

Piracy

Piracy of copyright 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.

Questions

You can contact us at if you are having a problem with any aspect of the book, and we will do our best to address it.

lock icon
The rest of the chapter is locked
You have been reading a chapter from
Raspberry Pi Super Cluster
Published in: Nov 2013Publisher: PacktISBN-13: 9781783286195
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
Andrew K. Dennis

Andrew K. Dennis is a full stack and cybersecurity architect with over 17 years' experience who currently works for Modus Create in Reston, VA. He holds two undergraduate degrees in software engineering and creative computing and a master's degree in information security. Andy has worked in the US, Canada, and the UK in software engineering, e-learning, data science, and cybersecurity across his career, and has written four books on IoT, the Raspberry Pi, and supercomputing. His interests range from the application of pataphysics in computing to security threat modeling. Andy lives in New England and is an organizer of Security BSides CT.
Read more about Andrew K. Dennis