Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
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
Build Supercomputers with Raspberry Pi 3
Build Supercomputers with Raspberry Pi 3

Build Supercomputers with Raspberry Pi 3: A step-by-step guide that will enhance your skills in creating powerful systems to solve complex issues

eBook
€17.99 €26.99
Paperback
€32.99
Subscription
Free Trial
Renews at €18.99p/m

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
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
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

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

Build Supercomputers with Raspberry Pi 3

Chapter 2. One Node Supercomputing

This chapter discusses one node supercomputing. Initially, you will install the Linux (Ubuntu) OS on your PC (one node). Next, you will be instructed on how to access your PC processor's specs within the Windows environment. This information is critical for determining how many cores and/or threads (see Appendix) are available for Message Passing Interface (MPI) processing when using the -H command (this command is discussed in detail later in the book). You will then write and run a simple serial π equation code, and then write and run the MPI version of the serial π code. This coding exercise provides an initial feel for converting serial coding to MPI coding. The critical structure of the MPI π code's for statement is discussed, and finally, you will employ the MPI technique to generate π from the Euler, Leibniz, and Nilakantha infinite series expansions.

In this chapter, you will learn about the following...

Linux installation

Before we embark on our digital odyssey, the reader is advised to install the Linux OS on their main PC as we will be using command-line instructions to communicate remotely with your Pi2 or Pi3, via Secure Shell (SSH) protocol (more on this later). You may visit the Ubuntu website: http://www.ubuntu.com/download/desktop/install-ubuntu-desktop for tutorial/instructions, and download a free version of the OS. In addition, when installing Ubuntu, select the option that allows you to access the Windows OS as you also will eventually be using Windows apps such as win32 Disk imager, and an SD card formatter (we will discuss their download and applications later when you begin configuring your eight-node Pi2 or Pi3 super cluster).

PC processor

The processor in modern PCs has multiple cores. Earlier PC models had two cores, but later PCs typically have four cores, each running at GHz speeds, thus making it possible for you to test/debug the same MPI programs you will be running on your eight-node, 32-core Pi supercomputer. Initially, you will utilize the CPU in your main PC as a one node supercomputer. This step will give you a quick introduction to and demonstration of the MPI protocol. Incidentally, the author's PC has an i7, four-core processor, each core running at 4 GHz, and can run two processing threads per physical core. The initial MPI runs included in this book were done using this 4 GHz machine.

Accessing processor technical details

You can access the technical details of your processor via the Control Panel on your computer. On a Windows 7 machine, click on Systems & Security, then click on System, then Device Manager, and click on Processor. On the other hand, if you have a Windows 10 OS, proceed as follows. Click on the Windows icon at the bottom left of the taskbar, and then click on the File Explorer icon, then click on the This PC icon. Next, click on the Computer tab at the top left of the displayed window, then click on System properties. Note the information displayed in the window. Next, click on Device Manager, and then click on Processors. You should now see the total number of processors/compute threads in the cores in your PC.

Write/run serial π code

Using your PC as a one-node supercomputer is quite easy, and can be quite a fun exercise as you command the cores in the processor to do your digital bidding. From here on, it will be assumed that the reader has a working knowledge of the C language. So, the first step on your digital journey will be to write and run a simple C code to compute π. This code will perform numeric integration (using 300,000 iterations) on an x function representation of π. You will then convert this code's logic into its MPI version, run it on one core of the processor, and then gradually bring online the remaining cores. You will observe progressively improving processing speed as you activate successive cores. Let's start with the simple π equation:

Write/run serial π code

This equation is one of many that are available for obtaining an approximate value of π. In later sections, we will explore a few more complex and famous equations that will give your supercomputer...

Linux installation


Before we embark on our digital odyssey, the reader is advised to install the Linux OS on their main PC as we will be using command-line instructions to communicate remotely with your Pi2 or Pi3, via Secure Shell (SSH) protocol (more on this later). You may visit the Ubuntu website: http://www.ubuntu.com/download/desktop/install-ubuntu-desktop for tutorial/instructions, and download a free version of the OS. In addition, when installing Ubuntu, select the option that allows you to access the Windows OS as you also will eventually be using Windows apps such as win32 Disk imager, and an SD card formatter (we will discuss their download and applications later when you begin configuring your eight-node Pi2 or Pi3 super cluster).

PC processor


The processor in modern PCs has multiple cores. Earlier PC models had two cores, but later PCs typically have four cores, each running at GHz speeds, thus making it possible for you to test/debug the same MPI programs you will be running on your eight-node, 32-core Pi supercomputer. Initially, you will utilize the CPU in your main PC as a one node supercomputer. This step will give you a quick introduction to and demonstration of the MPI protocol. Incidentally, the author's PC has an i7, four-core processor, each core running at 4 GHz, and can run two processing threads per physical core. The initial MPI runs included in this book were done using this 4 GHz machine.

Left arrow icon Right arrow icon
Download code icon Download Code

Key benefits

  • Carlos R. Morrison from NASA will teach you to build a supercomputer with Raspberry Pi 3
  • Deepen your understanding of setting up host nodes, configuring networks, and automating mountable drives
  • Learn various math, physics, and engineering applications to solve complex problems

Description

Author Carlos R. Morrison (Staff Scientist, NASA) will empower the uninitiated reader to quickly assemble and operate a Pi3 supercomputer in the shortest possible time. The lifeblood of a supercomputer, the MPI code, is introduced early, and sample MPI code provides additional practice opportunities for you to test the effectiveness of your creation. You will learn how to configure various nodes and switches so that they can effectively communicate with each other. By the end of this book, you will have successfully built a supercomputer and the various applications related to it.

Who is this book for?

This book targets hobbyists and enthusiasts who want to explore building supercomputers with microcomputers. Researchers will also find this book useful. Prior programming knowledge is necessary; knowledge of supercomputers is not.

What you will learn

  • Understand the concept of Message Passing Interface (MPI)
  • Understand node networking
  • Configure nodes so that they can communicate with each other via the network switch
  • Build a Raspberry Pi3 supercomputer
  • Test the supercluster
  • Use the supercomputer to calculate MPI ? codes
  • Learn various practical supercomputer applications

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Mar 23, 2017
Length: 254 pages
Edition : 1st
Language : English
ISBN-13 : 9781787289154
Vendor :
Raspberry Pi
Category :

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
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
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Product Details

Publication date : Mar 23, 2017
Length: 254 pages
Edition : 1st
Language : English
ISBN-13 : 9781787289154
Vendor :
Raspberry Pi
Category :

Packt Subscriptions

See our plans and pricing
Modal Close icon
€18.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
€189.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
€264.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 95.97
Build Supercomputers with Raspberry Pi 3
€32.99
Python Programming with Raspberry Pi
€29.99
Raspberry Pi Zero Cookbook
€32.99
Total 95.97 Stars icon

Table of Contents

12 Chapters
1. Getting Started with Supercomputing Chevron down icon Chevron up icon
2. One Node Supercomputing Chevron down icon Chevron up icon
3. Preparing the Initial Two Nodes Chevron down icon Chevron up icon
4. Static IP Address and Hosts File Setup Chevron down icon Chevron up icon
5. Creating a Common User for All Nodes Chevron down icon Chevron up icon
6. Creating a Mountable Drive on the Master Node Chevron down icon Chevron up icon
7. Configuring the Eight Nodes Chevron down icon Chevron up icon
8. Testing the Super Cluster Chevron down icon Chevron up icon
9. Real-World Math Application Chevron down icon Chevron up icon
10. Real-World Physics Application Chevron down icon Chevron up icon
11. Real-World Engineering Application Chevron down icon Chevron up icon
A. Appendix Chevron down icon Chevron up icon

Customer reviews

Top Reviews
Rating distribution
Full star icon Full star icon Full star icon Full star icon Half star icon 4.3
(7 Ratings)
5 star 71.4%
4 star 14.3%
3 star 0%
2 star 0%
1 star 14.3%
Filter icon Filter
Top Reviews

Filter reviews by




Amazon Customer Aug 20, 2018
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Well written book on Pi Cluster Computing. The example codes are easy to implement and run. Would definitely recommend this book to anyone wanting to get into supercomputing. FYI, some basic knowledge of C is needed.
Amazon Verified review Amazon
Yay Aug 17, 2018
Full star icon Full star icon Full star icon Full star icon Full star icon 5
This book is an excellent book for introducing a novice to supercomputing using the Pi computer. It was a lot of fun “one node supercomputing” on my PC, as discussed in detail in chapter 2, pg. 41 - 62, where you are instructed on using all four microprocessor cores simultaneously to calculate pi. I then proceeded to build my Pi2 cluster as per the remaining chapters in the book. This was indeed an interesting, and informative book/project. The book is easy to follow, and the codes (C files) supplied online through Packt books are also easy to follow and implement. I would recommend this book to any high school senior, enthusiast or hobbyist eager to learn about supercomputers or supercomputing. No knowledge of Linux is required, however, a working knowledge of C is necessary in order to read, and understand the codes you would be implementing.
Amazon Verified review Amazon
Alpha69 Apr 04, 2021
Full star icon Full star icon Full star icon Full star icon Full star icon 5
An invaluable addition to my set of computer technology books. The book is easy to follow and the reader doesn't need a background in computer science to build this blazingly fast mini supercomputer. It took me only a few hours to build this fine machine. I recommend this book to anyone curious about supercomputing. I would give the book six solid stars if it were possible.
Amazon Verified review Amazon
crm60 Apr 26, 2020
Full star icon Full star icon Full star icon Full star icon Full star icon 5
A gentle introduction to building your supercomputer using multiple Raspberry PI nodes. The book stands out for its step-by-step nature, making it well-suited to readers with limited familiarity with Linux. The author details the hardware cluster build, software setup for networking, and operating system setup and walks the reader through multiple examples. The use of the MPI interface closes the circle to enable students to write their very own "supercomputer" programs on their PI clusters. Links for downloading the color versions of the figures in the chapters and pre-written copies of the codes are provided at the beginning of the book. I love my PI2 supercomputer. This is a beautifully written introductory book on supercomputing. I highly recommend this book to anyone curious about supercomputing.
Amazon Verified review Amazon
DaveWR May 26, 2018
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Excellent book with lots of good information to cluster computers. It's easy to set up the cluster as described. There are no significant technical glitches which prevent duplication of the exercises. It's also a good review of relevant Linux commands.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

How do I buy and download an eBook? Chevron down icon Chevron up icon

Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.

If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.

Please Note: Packt eBooks are non-returnable and non-refundable.

Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:

  • You may make copies of your eBook for your own use onto any machine
  • You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website? Chevron down icon Chevron up icon

If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:

  1. Register on our website using your email address and the password.
  2. Search for the title by name or ISBN using the search option.
  3. Select the title you want to purchase.
  4. Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title. 
  5. Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook? Chevron down icon Chevron up icon
  • If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
  • To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
  • To view your account details or to download a new copy of the book go to www.packtpub.com/account
  • To contact us directly if a problem is not resolved, use www.packtpub.com/contact-us
What eBook formats do Packt support? Chevron down icon Chevron up icon

Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.

You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.

What are the benefits of eBooks? Chevron down icon Chevron up icon
  • You can get the information you need immediately
  • You can easily take them with you on a laptop
  • You can download them an unlimited number of times
  • You can print them out
  • They are copy-paste enabled
  • They are searchable
  • There is no password protection
  • They are lower price than print
  • They save resources and space
What is an eBook? Chevron down icon Chevron up icon

Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.

When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.

For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.