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

Arrow left icon
Profile Icon Carlos R. Morrison
Arrow right icon
€18.99 per month
Full star icon Full star icon Full star icon Full star icon Half star icon 4.3 (7 Ratings)
Paperback Mar 2017 254 pages 1st Edition
eBook
€17.99 €26.99
Paperback
€32.99
Subscription
Free Trial
Renews at €18.99p/m
Arrow left icon
Profile Icon Carlos R. Morrison
Arrow right icon
€18.99 per month
Full star icon Full star icon Full star icon Full star icon Half star icon 4.3 (7 Ratings)
Paperback Mar 2017 254 pages 1st Edition
eBook
€17.99 €26.99
Paperback
€32.99
Subscription
Free Trial
Renews at €18.99p/m
eBook
€17.99 €26.99
Paperback
€32.99
Subscription
Free Trial
Renews at €18.99p/m

What do you get with a Packt Subscription?

Free for first 7 days. $19.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing
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 : 9781787282582
Vendor :
Raspberry Pi
Category :
Languages :

What do you get with a Packt Subscription?

Free for first 7 days. $19.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing

Product Details

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

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

What is included in a Packt subscription? Chevron down icon Chevron up icon

A subscription provides you with full access to view all Packt and licnesed content online, this includes exclusive access to Early Access titles. Depending on the tier chosen you can also earn credits and discounts to use for owning content

How can I cancel my subscription? Chevron down icon Chevron up icon

To cancel your subscription with us simply go to the account page - found in the top right of the page or at https://subscription.packtpub.com/my-account/subscription - From here you will see the ‘cancel subscription’ button in the grey box with your subscription information in.

What are credits? Chevron down icon Chevron up icon

Credits can be earned from reading 40 section of any title within the payment cycle - a month starting from the day of subscription payment. You also earn a Credit every month if you subscribe to our annual or 18 month plans. Credits can be used to buy books DRM free, the same way that you would pay for a book. Your credits can be found in the subscription homepage - subscription.packtpub.com - clicking on ‘the my’ library dropdown and selecting ‘credits’.

What happens if an Early Access Course is cancelled? Chevron down icon Chevron up icon

Projects are rarely cancelled, but sometimes it's unavoidable. If an Early Access course is cancelled or excessively delayed, you can exchange your purchase for another course. For further details, please contact us here.

Where can I send feedback about an Early Access title? Chevron down icon Chevron up icon

If you have any feedback about the product you're reading, or Early Access in general, then please fill out a contact form here and we'll make sure the feedback gets to the right team. 

Can I download the code files for Early Access titles? Chevron down icon Chevron up icon

We try to ensure that all books in Early Access have code available to use, download, and fork on GitHub. This helps us be more agile in the development of the book, and helps keep the often changing code base of new versions and new technologies as up to date as possible. Unfortunately, however, there will be rare cases when it is not possible for us to have downloadable code samples available until publication.

When we publish the book, the code files will also be available to download from the Packt website.

How accurate is the publication date? Chevron down icon Chevron up icon

The publication date is as accurate as we can be at any point in the project. Unfortunately, delays can happen. Often those delays are out of our control, such as changes to the technology code base or delays in the tech release. We do our best to give you an accurate estimate of the publication date at any given time, and as more chapters are delivered, the more accurate the delivery date will become.

How will I know when new chapters are ready? Chevron down icon Chevron up icon

We'll let you know every time there has been an update to a course that you've bought in Early Access. You'll get an email to let you know there has been a new chapter, or a change to a previous chapter. The new chapters are automatically added to your account, so you can also check back there any time you're ready and download or read them online.

I am a Packt subscriber, do I get Early Access? Chevron down icon Chevron up icon

Yes, all Early Access content is fully available through your subscription. You will need to have a paid for or active trial subscription in order to access all titles.

How is Early Access delivered? Chevron down icon Chevron up icon

Early Access is currently only available as a PDF or through our online reader. As we make changes or add new chapters, the files in your Packt account will be updated so you can download them again or view them online immediately.

How do I buy Early Access content? Chevron down icon Chevron up icon

Early Access is a way of us getting our content to you quicker, but the method of buying the Early Access course is still the same. Just find the course you want to buy, go through the check-out steps, and you’ll get a confirmation email from us with information and a link to the relevant Early Access courses.

What is Early Access? Chevron down icon Chevron up icon

Keeping up to date with the latest technology is difficult; new versions, new frameworks, new techniques. This feature gives you a head-start to our content, as it's being created. With Early Access you'll receive each chapter as it's written, and get regular updates throughout the product's development, as well as the final course as soon as it's ready.We created Early Access as a means of giving you the information you need, as soon as it's available. As we go through the process of developing a course, 99% of it can be ready but we can't publish until that last 1% falls in to place. Early Access helps to unlock the potential of our content early, to help you start your learning when you need it most. You not only get access to every chapter as it's delivered, edited, and updated, but you'll also get the finalized, DRM-free product to download in any format you want when it's published. As a member of Packt, you'll also be eligible for our exclusive offers, including a free course every day, and discounts on new and popular titles.