Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Raspberry Pi Super Cluster
Raspberry Pi Super Cluster

Raspberry Pi Super Cluster: As a Raspberry Pi enthusiast have you ever considered increasing their performance with parallel computing? Discover just how easy it can be with the right help – this guide takes you through the process from start to finish.

eBook
$20.69 $22.99
Paperback
$31.19 $38.99
Subscription
Free Trial
Renews at $19.99p/m

What do you get with Print?

Product feature icon Instant access to your digital copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Redeem a companion digital copy on all Print orders
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Modal Close icon
Payment Processing...
tick Completed

Shipping Address

Billing Address

Shipping Methods
Table of content icon View table of contents Preview book icon Preview Book

Raspberry Pi Super Cluster

Chapter 2. Setting Up your Raspberry Pi Software and Hardware for Parallel Computing

Now we are familiar with the concept of parallel computing and we need to set up our Raspberry Pi's hardware and software in order to work with MPI and Hadoop.

In this chapter we will start by discussing our work environment and hardware configuration. Following this we will install the necessary software onto the SD card and complete the basic configuration required.

Setting up our work environment


In order for our devices to communicate with one another, we need to set up the networking hardware and cable connections. We will also need to connect the necessary peripherals in order to interact with the Raspberry Pi's boot loading software.

Provided is a list of recommended and optional items you will need and following this we will discuss each of them in detail:

  • Two Raspberry Pi Model B's, preferred with 512 MB RAM

  • HDMI-capable or VGA/DVI monitor with appropriate adapter or adapter cable

  • USB keyboard

  • USB mouse

  • Two 1A at 5 V Micro-USB power units

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

  • Three Ethernet/RJ45 network cables

  • A small network switch

  • An existing Internet connection

  • Two SD cards that are compatible with the Raspberry Pi

  • Housing units for the Raspberry Pi boards (optional)

  • USB hard drives (optional)

  • Lego (optional)

HDMI-capable monitor or VGA/DVI monitor and adapter

The Raspberry Pi provides two easy options for connecting visual...

Future expansion and a scalable setup


The examples in this book are designed to be scalable. That is if you wish to add more Raspberry Pi's to your network, this should be very easy.

If you plan on running more than two devices you should therefore consider hardware that scales well. Switches for example come with as many as 48 ports.

One area you may find problematic is in providing power to multiple Raspberry Pi computers. Having a huge number of power units of USB hubs can be extremely cluttered. In Chapter 7, Going Further, we suggest several methods for providing power to multiple units.

With the preceding thoughts in mind, let's now complete the initial set up of our hardware.

Completing the initial setup


Each chapter in this book will guide you through when you need to connect each hardware device and install software as necessary.

There is however some setup you will need to perform initially:

  • Start by connecting your switch to your router using a network cable and then connect the power unit to the switch to power it up.

  • Using a PC or similar device with an Ethernet connection, plug it into the switch and test that you can access the network and Internet.

  • Next select a single Raspberry Pi. This will be your Master unit.

  • Connect the mouse, keyboard, and the monitor to the Raspberry Pi.

  • Test that the Raspberry Pi is in easy reach of the switch by connecting them together via an Ethernet cable. Once you have confirmed this you can disconnect the Ethernet cable.

  • If you are using an USB hub or two separate USB power units, plug these into your mains power and position them so they are within easy reach of the Raspberry Pi.

  • Next check that the USB cables can easily plug...

Using an SD card as our Raspberry Pi's storage device


The Raspberry Pi comes equipped with a Secure Digital (SD) card port and to begin with we will run the operating system from an SD card. It is possible to use an USB hard drive as we discussed earlier, which are generally faster and in Chapter 7, Going Further we will discuss this in more detail. For the earlier chapters, however, the SD card is convenient as it is easy to quickly clone for multiple devices, takes up no extra desk space, and leaves the USB ports free for connecting a mouse and keyboard for debugging issue, if for example, you cannot login to the device via the network.

There is a range of SD cards available in the market in a variety of sizes. You will need to use an SD card of at least 2 GB.

You can find a guide to supported SD card brands and models at eLinux's Raspberry Pi Wiki:

http://elinux.org/RPi_SD_cards

It is also possible to purchase an SD card with a pre-installed operating system; however we recommend following...

BerryBoot version 2


Next we are going to download and install BerryBoot version 2 onto the formatted SD card. For those of you who chose to download NOOBS from the Raspberry Pi site, you can ignore this step and should follow the readme guide.

BerryBoot is a Mac, Windows, and Linux compatible universal operating system installer, also known as a boot loader. BerryBoot is packaged as a ZIP file, which when unzipped onto your formatted SD card will launch once the SD card is connected to the Raspberry Pi.

Once BerryBoot launches, it gives you the option of installing one or more Raspberry Pi-compatible operating systems onto the SD card.

Downloading the BerryBoot version 2 ZIP file

In order to install BerryBoot, you will need to download the latest version of the ZIP file from the BerryBoot website. This can be found at:

http://www.berryterminal.com/doku.php/berryboot

Locate the download hyperlink; this will probably have a date stamp on it. As of May 28, 2013 the file is approximately 30 MB.

Using...

Starting up the Raspberry Pi


You are now ready to start up the Raspberry Pi and start using BerryBoot version 2.

The following steps will guide you through powering up your Raspberry Pi safely:

  1. Start by ejecting your SD card from your computer and place it into the SD card port of the Raspberry Pi you prepared for use earlier in this chapter.

  2. Plug in the mouse and keyboard to the USB ports. You will need these in order to complete the operating installation process.

  3. Hook up the monitor to the HDMI port.

  4. Connect the Raspberry Pi to the switch you set up earlier in this chapter.

  5. Now power up your Raspberry Pi by connecting the micro-USB power unit to it.

If you are using BerryBoot, displayed on your monitor will be the Welcome screen. This is the first step in setting up our operating system and is also a confirmation that we copied the boot loader onto the SD card successfully.

BerryBoot version 2 and NOOBS provide us with a number of Linux versions to choose from. For setting up our parallel-based...

Wrapping up


We now have our operating system installed and our RSA key set up. The following guides provide some optional tools and compilers you can now install onto Raspbian, including a guide to install Fortran.

Editing text files on Raspbian

While editing and running code on your Raspberry Pi, having a good code and text-editing tool is very useful. By default the Raspberry Pi comes installed with a text-editor called nano. You can read more about nano at:

http://www.nano-editor.org/

Vim is also a text editing tool—especially good for programming—with a wide variety of functions and features, including the ability to run shell commands while you are editing a file.

For those interested in checking out Vim, you can read more at:

http://www.vim.org/about.php

To install Vim from the terminal line run the following command:

sudo apt-get install vim

Throughout this book we will be using Vim to edit files; however, feel free to use nano or whichever tool you are most comfortable with.

Installing...

Summary


In this chapter we set up our work area and hardware for building our parallel computing system using Raspberry Pi. We then formatted our SD card and installed BerryBoot version 2 or NOOBS. This subsequently allowed us to set up our Master Raspberry Pi device. Finally we tested our SSH service running on the Raspberry Pi and created an SSH public and private key pair.

Next we will install MPICH, set up our second Raspberry Pi, test our SSH keys, and try out a parallel application that runs on both of our Raspberry Pi's.

Left arrow icon Right arrow icon

Key benefits

  • Learn about parallel computing by building your own system using Raspberry Pi
  • Build a two-node parallel computing cluster
  • Integrate Raspberry Pi with Hadoop to build your own super cluster

Description

A cluster is a type of parallel/distributed processing system which consists of a collection of interconnected stand-alone computers cooperatively working together. Using Raspberry Pi computers, you can build a two-node parallel computing cluster which enhances performance and availability. This practical, example-oriented guide will teach you how to set up the hardware and operating systems of multiple Raspberry Pi computers to create your own cluster. It will then navigate you through how to install the necessary software to write your own programs such as Hadoop and MPICH before moving on to cover topics such as MapReduce. Throughout this book, you will explore the technology with the help of practical examples and tutorials to help you learn quickly and efficiently. Starting from a pile of hardware, with this book, you will be guided through exciting tutorials that will help you turn your hardware into your own super-computing cluster. You'll start out by learning how to set up your Raspberry Pi cluster's hardware. Following this, you will be taken through how to install the operating system, and you will also be given a taste of what parallel computing is about. With your Raspberry Pi cluster successfully set up, you will then install software such as MPI and Hadoop. Having reviewed some examples and written some programs that explore these two technologies, you will then wrap up with some fun ancillary projects. Finally, you will be provided with useful links to help take your projects to the next step.

Who is this book for?

Raspberry Pi Super Cluster is an introductory guide for those interested in experimenting with parallel computing at home. Aimed at Raspberry Pi enthusiasts, this book is a primer for getting your first cluster up and running. Basic knowledge of C or Java would be helpful but no prior knowledge of parallel computing is necessary.

What you will learn

  • Discover how to set up the hardware to build your parallel computing cluster
  • Set up your Raspberry Pi computers and install an operating system
  • Network your two Raspberry Pi s together
  • Gain an understanding of MPI through practical examples
  • Learn how to work with MPICH to write parallel applications
  • Install Hadoop and experiment with processing text files
  • Get acquainted with MapReduce, the paradigm at the heart of Hadoop
Estimated delivery fee Deliver to United States

Economy delivery 10 - 13 business days

Free $6.95

Premium delivery 6 - 9 business days

$21.95
(Includes tracking information)

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Nov 20, 2013
Length: 126 pages
Edition : 1st
Language : English
ISBN-13 : 9781783286195
Category :
Languages :

What do you get with Print?

Product feature icon Instant access to your digital copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Redeem a companion digital copy on all Print orders
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Modal Close icon
Payment Processing...
tick Completed

Shipping Address

Billing Address

Shipping Methods
Estimated delivery fee Deliver to United States

Economy delivery 10 - 13 business days

Free $6.95

Premium delivery 6 - 9 business days

$21.95
(Includes tracking information)

Product Details

Publication date : Nov 20, 2013
Length: 126 pages
Edition : 1st
Language : English
ISBN-13 : 9781783286195
Category :
Languages :

Packt Subscriptions

See our plans and pricing
Modal Close icon
$19.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
$199.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts
$279.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total $ 96.77 120.97 24.20 saved
Raspberry Pi cookbook for Python programmers
$39.19 $48.99
Raspberry Pi Server Essentials
$26.39 $32.99
Raspberry Pi Super Cluster
$31.19 $38.99
Total $ 96.77 120.97 24.20 saved Stars icon

Table of Contents

7 Chapters
Clusters, Parallel Computing, and Raspberry Pi – A Brief Background Chevron down icon Chevron up icon
Setting Up your Raspberry Pi Software and Hardware for Parallel Computing Chevron down icon Chevron up icon
Parallel Computing – MPI on the Raspberry Pi Chevron down icon Chevron up icon
Hadoop – Distributed Applications on the Raspberry Pi Chevron down icon Chevron up icon
MapReduce Applications with Hadoop and Java Chevron down icon Chevron up icon
Calculate Pi with Hadoop and MPI Chevron down icon Chevron up icon
Going Further Chevron down icon Chevron up icon

Customer reviews

Top Reviews
Rating distribution
Full star icon Full star icon Full star icon Half star icon Empty star icon 3.5
(20 Ratings)
5 star 35%
4 star 25%
3 star 15%
2 star 5%
1 star 20%
Filter icon Filter
Top Reviews

Filter reviews by




Kindle Customer Feb 03, 2015
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Excellent reference! attached a picture of what I put together with the help of this book.
Amazon Verified review Amazon
Beep Jan 23, 2017
Full star icon Full star icon Full star icon Full star icon Full star icon 5
My students build the basic Super Cluster detailed here, and went on to add a Western Digital USB hard drive, and an associated 4-Pi stack. This guide was accurate and Methodical.
Amazon Verified review Amazon
Peter Dec 04, 2017
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Good
Amazon Verified review Amazon
David H Mar 03, 2014
Full star icon Full star icon Full star icon Full star icon Full star icon 5
I've seen several YouTube videos showing clusters of Raspberry Pi's and, as I have a few Raspberry Pi's, thought I would have a go at building my cluster. Looking for information on how to do it, I came across this book which provides a great introduction into parallel computing and also provided very clear, concise instructions to set up a cluster of 2 Raspberry Pi's.I love reading the back story to the things I learn and the first chapter provides a really good history to parallel/distributed computing. Setting up the Raspberry Pi's is covered in the second chapter and is done well and without going into the finite detail of setting up a Pi that is covered (and repeated!) in so many other places. In the third chapter, the process to setting up MPI on the Raspberry Pi's is covered which enables the Raspberry Pi's to be connected in a parallel computing environment. This is then taken forward into chapter 4 and where we set up Hadoop and MapReduce. Hadoop enables distributed applications to be written and MapReduce is intended to enable systems to process large datasets. In setting up MPI, Hadoop and MapReduce, simple applications are written but the book then brings this all together by writing an application to calculate pi using Hadoop, and then the same in MPI to compare the two technologies. Finally, the book provides some very useful information on how to take things further.Overall, I thoroughly enjoyed reading and using this book to take me into an area of computing I've never delved into. I thought the book was concise, easy to read and the examples were clear and easy to follow and I'll certainly be keen to read Andrew K. Dennis' future books.
Amazon Verified review Amazon
nhevilwench Feb 07, 2014
Full star icon Full star icon Full star icon Full star icon Full star icon 5
I have a number of Raspberry Pi's sitting around from various projects I have experimented with in the past. I came across this book on building a cluster using two Raspberry Pi's.The book guides you though MPI (Message Passing Interface) and Hadoop and provides novices with a good guide for getting started.As well as software development aspects there are some fun little side projects like building your own stackable case using Lego's. There is also an interesting introduction to super computing to give you a background to the field.Overall a great introduction to parallel computing aimed at the novice.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

What is the digital copy I get with my Print order? Chevron down icon Chevron up icon

When you buy any Print edition of our Books, you can redeem (for free) the eBook edition of the Print Book you’ve purchased. This gives you instant access to your book when you make an order via PDF, EPUB or our online Reader experience.

What is the delivery time and cost of print book? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela
What is custom duty/charge? Chevron down icon Chevron up icon

Customs duty are charges levied on goods when they cross international borders. It is a tax that is imposed on imported goods. These duties are charged by special authorities and bodies created by local governments and are meant to protect local industries, economies, and businesses.

Do I have to pay customs charges for the print book order? Chevron down icon Chevron up icon

The orders shipped to the countries that are listed under EU27 will not bear custom charges. They are paid by Packt as part of the order.

List of EU27 countries: www.gov.uk/eu-eea:

A custom duty or localized taxes may be applicable on the shipment and would be charged by the recipient country outside of the EU27 which should be paid by the customer and these duties are not included in the shipping charges been charged on the order.

How do I know my custom duty charges? Chevron down icon Chevron up icon

The amount of duty payable varies greatly depending on the imported goods, the country of origin and several other factors like the total invoice amount or dimensions like weight, and other such criteria applicable in your country.

For example:

  • If you live in Mexico, and the declared value of your ordered items is over $ 50, for you to receive a package, you will have to pay additional import tax of 19% which will be $ 9.50 to the courier service.
  • Whereas if you live in Turkey, and the declared value of your ordered items is over € 22, for you to receive a package, you will have to pay additional import tax of 18% which will be € 3.96 to the courier service.
How can I cancel my order? Chevron down icon Chevron up icon

Cancellation Policy for Published Printed Books:

You can cancel any order within 1 hour of placing the order. Simply contact customercare@packt.com with your order details or payment transaction id. If your order has already started the shipment process, we will do our best to stop it. However, if it is already on the way to you then when you receive it, you can contact us at customercare@packt.com using the returns and refund process.

Please understand that Packt Publishing cannot provide refunds or cancel any order except for the cases described in our Return Policy (i.e. Packt Publishing agrees to replace your printed book because it arrives damaged or material defect in book), Packt Publishing will not accept returns.

What is your returns and refunds policy? Chevron down icon Chevron up icon

Return Policy:

We want you to be happy with your purchase from Packtpub.com. We will not hassle you with returning print books to us. If the print book you receive from us is incorrect, damaged, doesn't work or is unacceptably late, please contact Customer Relations Team on customercare@packt.com with the order number and issue details as explained below:

  1. If you ordered (eBook, Video or Print Book) incorrectly or accidentally, please contact Customer Relations Team on customercare@packt.com within one hour of placing the order and we will replace/refund you the item cost.
  2. Sadly, if your eBook or Video file is faulty or a fault occurs during the eBook or Video being made available to you, i.e. during download then you should contact Customer Relations Team within 14 days of purchase on customercare@packt.com who will be able to resolve this issue for you.
  3. You will have a choice of replacement or refund of the problem items.(damaged, defective or incorrect)
  4. Once Customer Care Team confirms that you will be refunded, you should receive the refund within 10 to 12 working days.
  5. If you are only requesting a refund of one book from a multiple order, then we will refund you the appropriate single item.
  6. Where the items were shipped under a free shipping offer, there will be no shipping costs to refund.

On the off chance your printed book arrives damaged, with book material defect, contact our Customer Relation Team on customercare@packt.com within 14 days of receipt of the book with appropriate evidence of damage and we will work with you to secure a replacement copy, if necessary. Please note that each printed book you order from us is individually made by Packt's professional book-printing partner which is on a print-on-demand basis.

What tax is charged? Chevron down icon Chevron up icon

Currently, no tax is charged on the purchase of any print book (subject to change based on the laws and regulations). A localized VAT fee is charged only to our European and UK customers on eBooks, Video and subscriptions that they buy. GST is charged to Indian customers for eBooks and video purchases.

What payment methods can I use? Chevron down icon Chevron up icon

You can pay with the following card types:

  1. Visa Debit
  2. Visa Credit
  3. MasterCard
  4. PayPal
What is the delivery time and cost of print books? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela
Modal Close icon
Modal Close icon