Book Image

Build Supercomputers with Raspberry Pi 3

By : Carlos R. Morrison
Book Image

Build Supercomputers with Raspberry Pi 3

By: Carlos R. Morrison

Overview of this book

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.
Table of Contents (20 chapters)
Build Supercomputers with Raspberry Pi 3
Credits
About the Author
About the Reviewer
www.PacktPub.com
Customer Feedback
Dedication
Preface
6
Creating a Mountable Drive on the Master Node

Hosts file setup


First, open the hosts file, to see what's in there. Use the command highlighted in red:

.

Let's edit this file. You need to define a host name for a given address so that when you ssh the name, the Pis will recognize what IP address you are referring to. So, let's modify the hosts file (see the following screenshot). Enter the command sudo vim /etc/hosts and update the records with the highlighted text (substituting your own IP address):

Note

Remember to comment out 127.0.1.1 Mst0 with the # character, and then save the updated files by pressing the Esc key and entering :wq.

Now let's give this new technique a whirl. Enter the command ssh Slv1 and then enter the password. The prompt should change to pi@Slv1:~ $. This means that we are now in the slave node1. Let's edit the same file in the slave node, by entering sudo vim /etc/hosts, and update the records with the highlighted text shown in the following screenshot, then save the updated file by entering Esc:wq:

Go ahead...