Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
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

MPI Fourier series sawtooth signal

We will now generate such a signal by first writing, and running the serial Fourier series sawtooth code, and then apply MPI technique to the sawtooth Fourier series equation depicted here:

MPI Fourier series sawtooth signal

The serial sawtooth(x) code is depicted on the following pages. On the master node, write, compile, and run this serial sawtooth(x) code (see the following serial sawtooth(x) code) to get the feel of the program:

/***********************************
* *** Serial sawtooth(x) code *** *
* *
* Fourier series representation *
* of the sawtooth(x) function. *
* *
* Author: Carlos R. Morrison *
* *
* Date: 2/12/2017 *
***********************************/
#include <math.h> // math library
#include <stdio.h>// Standard Input/Output library
int main(void)
{
int j;
unsigned long int i;
double sum0,sum1,A,B,C;
double D[100]={0},x[100]={0},d,dd=10.00,o,oo=10.0*(M_PI/180);
float Amp;
float g;
int m,n,p=36;
printf("n");
printf("###################...
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 €18.99/month. Cancel anytime