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
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Build Supercomputers with Raspberry Pi 3

You're reading from   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
Product type Paperback
Published in Mar 2017
Publisher Packt
ISBN-13 9781787282582
Length 254 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Carlos R. Morrison Carlos R. Morrison
Author Profile Icon Carlos R. Morrison
Carlos R. Morrison
Arrow right icon
View More author details
Toc

Table of Contents (13) Chapters Close

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

Using unrestrained MPI code logic

From here on, you can unleash the full power of your machine by simply commenting out the restraining outer for loop statement, as shown following in the code fragment. Most MPI codes you will write will not necessarily have the for loop coding format, but most of the exercises in this book will use this type of coding structure.

The code fragment will allow unrestrained processing:

// for(total_iter = 1; total_iter < n; total_iter++) ç comment this line 
{ 
  sum = 0.0; 
//     width = 1.0 / (double)total_iter; // width of a segment ç comment this 
                                                    line 
  width = 1.0 / (double)n; // width of a segment ç use this line 
//     for(i = rank + 1; i <= total_iter; i += numprocs) ç comment this line 
  for(i = rank + 1; i <= n; i += numprocs) ç use this line instead 
  { 
      x = width * ((double)i - 0.5); // x: distance to center of i(th) segment 
      sum += 4...
lock icon The rest of the chapter is locked
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.
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 $19.99/month. Cancel anytime
Banner background image