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

MPI Taylor series cosine(x) function


The Taylor series formula for the cosine(x) function is as follows:

Write, compile, and run this serial cosine(x) code (see the following code, which shows serial cosine(x) code) to get a feel of the program:

/***********************************
\* Serial cosine(x)code.          * 
 *                                * 
 * Taylor series representation   * 
 * of the trigonometric cosine(x).*  
 *                                * 
 * Author: Carlos R. Morrison     * 
 *                                * 
 * Date: 1/10/2017                * 
 **********************************/ 
#include <math.h> 
#include <stdio.h> 
 
int main(void) 
{ 
  unsigned int j; 
  unsigned long int k; 
  long long int B,D;  
  int num_loops = 17; 
  float y; 
  double x; 
  double sum0=0,A,C,E; 
/******************************************************/ 
 ...