parallel algorithms on networks of processors roy (hutch) pargas, phd computer science (unc chapel...

122
Parallel Algorithms on Networks of Processors Roy (Hutch) Pargas, PhD Computer Science (UNC Chapel Hill) School of Computing, Clemson University [email protected]

Upload: braydon-barrs

Post on 29-Mar-2015

216 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Parallel Algorithms on Networks of Processors Roy (Hutch) Pargas, PhD Computer Science (UNC Chapel Hill) School of Computing, Clemson University pargas@clemson.edu

Parallel Algorithms on Networks of Processors

Roy (Hutch) Pargas, PhD Computer Science (UNC Chapel Hill)School of Computing, Clemson University

[email protected]

Page 2: Parallel Algorithms on Networks of Processors Roy (Hutch) Pargas, PhD Computer Science (UNC Chapel Hill) School of Computing, Clemson University pargas@clemson.edu

2

OutlineWhat are parallel algorithms? Why use them?

Challenges for parallel algorithm designers

Choosing a network

Partitioning the data

Designing the algorithm

Example

Recurrences (binary tree)

Analysis (Speedup and Efficiency)

Summary and Conclusions

Roy Pargas, Clemson University [email protected]

July 30, 2011

50 Golden Years Ateneo Mathematics Program Quezon City, Philippines

Page 3: Parallel Algorithms on Networks of Processors Roy (Hutch) Pargas, PhD Computer Science (UNC Chapel Hill) School of Computing, Clemson University pargas@clemson.edu

3

Why Parallel Computation?

Roy Pargas, Clemson University [email protected]

July 30, 2011

50 Golden Years Ateneo Mathematics Program Quezon City, Philippines

Page 4: Parallel Algorithms on Networks of Processors Roy (Hutch) Pargas, PhD Computer Science (UNC Chapel Hill) School of Computing, Clemson University pargas@clemson.edu

4

Why Parallel Computation?

Roy Pargas, Clemson University [email protected]

July 30, 2011

50 Golden Years Ateneo Mathematics Program Quezon City, Philippines

Page 5: Parallel Algorithms on Networks of Processors Roy (Hutch) Pargas, PhD Computer Science (UNC Chapel Hill) School of Computing, Clemson University pargas@clemson.edu

5

Why Parallel Computation?

Roy Pargas, Clemson University [email protected]

July 30, 2011

50 Golden Years Ateneo Mathematics Program Quezon City, Philippines

Page 6: Parallel Algorithms on Networks of Processors Roy (Hutch) Pargas, PhD Computer Science (UNC Chapel Hill) School of Computing, Clemson University pargas@clemson.edu

6

Why Parallel Computation?

Roy Pargas, Clemson University [email protected]

July 30, 2011

50 Golden Years Ateneo Mathematics Program Quezon City, Philippines

Page 7: Parallel Algorithms on Networks of Processors Roy (Hutch) Pargas, PhD Computer Science (UNC Chapel Hill) School of Computing, Clemson University pargas@clemson.edu

7

Why Parallel Computation?

Roy Pargas, Clemson University [email protected]

July 30, 2011

50 Golden Years Ateneo Mathematics Program Quezon City, Philippines

Page 8: Parallel Algorithms on Networks of Processors Roy (Hutch) Pargas, PhD Computer Science (UNC Chapel Hill) School of Computing, Clemson University pargas@clemson.edu

8

Why Parallel Computation?

Roy Pargas, Clemson University [email protected]

July 30, 2011

50 Golden Years Ateneo Mathematics Program Quezon City, Philippines

Page 9: Parallel Algorithms on Networks of Processors Roy (Hutch) Pargas, PhD Computer Science (UNC Chapel Hill) School of Computing, Clemson University pargas@clemson.edu

9

New ProcessorsFaster and Cheaper

Roy Pargas, Clemson University [email protected]

July 30, 2011

50 Golden Years Ateneo Mathematics Program Quezon City, Philippines

January2011

Page 10: Parallel Algorithms on Networks of Processors Roy (Hutch) Pargas, PhD Computer Science (UNC Chapel Hill) School of Computing, Clemson University pargas@clemson.edu

10

Partition the Data

Roy Pargas, Clemson University [email protected]

July 30, 2011

50 Golden Years Ateneo Mathematics Program Quezon City, Philippines

Page 11: Parallel Algorithms on Networks of Processors Roy (Hutch) Pargas, PhD Computer Science (UNC Chapel Hill) School of Computing, Clemson University pargas@clemson.edu

11

Organize the Processors

Roy Pargas, Clemson University [email protected]

July 30, 2011

50 Golden Years Ateneo Mathematics Program Quezon City, Philippines

Page 12: Parallel Algorithms on Networks of Processors Roy (Hutch) Pargas, PhD Computer Science (UNC Chapel Hill) School of Computing, Clemson University pargas@clemson.edu

12

Build a Network

Roy Pargas, Clemson University [email protected]

July 30, 2011

50 Golden Years Ateneo Mathematics Program Quezon City, Philippines

Page 13: Parallel Algorithms on Networks of Processors Roy (Hutch) Pargas, PhD Computer Science (UNC Chapel Hill) School of Computing, Clemson University pargas@clemson.edu

13

Build a Network

Roy Pargas, Clemson University [email protected]

July 30, 2011

50 Golden Years Ateneo Mathematics Program Quezon City, Philippines

Page 14: Parallel Algorithms on Networks of Processors Roy (Hutch) Pargas, PhD Computer Science (UNC Chapel Hill) School of Computing, Clemson University pargas@clemson.edu

14

Choosing a Network

Roy Pargas, Clemson University [email protected]

July 30, 2011

50 Golden Years Ateneo Mathematics Program Quezon City, Philippines

Page 15: Parallel Algorithms on Networks of Processors Roy (Hutch) Pargas, PhD Computer Science (UNC Chapel Hill) School of Computing, Clemson University pargas@clemson.edu

15

Choosing a Network

Roy Pargas, Clemson University [email protected]

July 30, 2011

50 Golden Years Ateneo Mathematics Program Quezon City, Philippines

Page 16: Parallel Algorithms on Networks of Processors Roy (Hutch) Pargas, PhD Computer Science (UNC Chapel Hill) School of Computing, Clemson University pargas@clemson.edu

16

Choosing a Network

Roy Pargas, Clemson University [email protected]

July 30, 2011

50 Golden Years Ateneo Mathematics Program Quezon City, Philippines

Page 17: Parallel Algorithms on Networks of Processors Roy (Hutch) Pargas, PhD Computer Science (UNC Chapel Hill) School of Computing, Clemson University pargas@clemson.edu

17

Choosing a Network

Roy Pargas, Clemson University [email protected]

July 30, 2011

50 Golden Years Ateneo Mathematics Program Quezon City, Philippines

Page 18: Parallel Algorithms on Networks of Processors Roy (Hutch) Pargas, PhD Computer Science (UNC Chapel Hill) School of Computing, Clemson University pargas@clemson.edu

18

Choosing a Network

Roy Pargas, Clemson University [email protected]

July 30, 2011

50 Golden Years Ateneo Mathematics Program Quezon City, Philippines

Page 19: Parallel Algorithms on Networks of Processors Roy (Hutch) Pargas, PhD Computer Science (UNC Chapel Hill) School of Computing, Clemson University pargas@clemson.edu

19

Are There Really Any Multiprocessing

Systems in Use Today?

Roy Pargas, Clemson University [email protected]

July 30, 2011

50 Golden Years Ateneo Mathematics Program Quezon City, Philippines

Page 20: Parallel Algorithms on Networks of Processors Roy (Hutch) Pargas, PhD Computer Science (UNC Chapel Hill) School of Computing, Clemson University pargas@clemson.edu

20

Are There Really Any Multiprocessing

Systems in Use Today?

Roy Pargas, Clemson University [email protected]

July 30, 2011

50 Golden Years Ateneo Mathematics Program Quezon City, Philippines

HamburgJune 2011Top 500

Page 21: Parallel Algorithms on Networks of Processors Roy (Hutch) Pargas, PhD Computer Science (UNC Chapel Hill) School of Computing, Clemson University pargas@clemson.edu

21

SupercomputersNEC/HP Tsubame

(Japan)

Roy Pargas, Clemson University [email protected]

July 30, 2011

50 Golden Years Ateneo Mathematics Program Quezon City, Philippines

1.192 petaflops ≈ 1.28 quadrillion floating point

operations per sec

73,278 Xeon cores

Infiniband grid network

Page 22: Parallel Algorithms on Networks of Processors Roy (Hutch) Pargas, PhD Computer Science (UNC Chapel Hill) School of Computing, Clemson University pargas@clemson.edu

22

Roy Pargas, Clemson University [email protected]

July 30, 2011

50 Golden Years Ateneo Mathematics Program Quezon City, Philippines

SupercomputersDawning Nebulae

(China)1.27 petaflops ≈ 1.36

quadrillion floating point operations per sec

9280 Intel 6-core Xeon processors = 55,680 cores

Infiniband grid network

Page 23: Parallel Algorithms on Networks of Processors Roy (Hutch) Pargas, PhD Computer Science (UNC Chapel Hill) School of Computing, Clemson University pargas@clemson.edu

23

Roy Pargas, Clemson University [email protected]

July 30, 2011

50 Golden Years Ateneo Mathematics Program Quezon City, Philippines

SupercomputersCray Jaguar (USA)

1.75 petaflops ≈ 1.876 quadrillion floating point

operations per sec

224,256 AMD cores

3D torus network

Page 24: Parallel Algorithms on Networks of Processors Roy (Hutch) Pargas, PhD Computer Science (UNC Chapel Hill) School of Computing, Clemson University pargas@clemson.edu

24

Roy Pargas, Clemson University [email protected]

July 30, 2011

50 Golden Years Ateneo Mathematics Program Quezon City, Philippines

SupercomputersNUDT Tianhe-1A

(China)2.566 petaflops ≈ 2.75

quadrillion floating point operations per sec

14336 CPUs

Undisclosed proprietary network

Page 25: Parallel Algorithms on Networks of Processors Roy (Hutch) Pargas, PhD Computer Science (UNC Chapel Hill) School of Computing, Clemson University pargas@clemson.edu

25

Roy Pargas, Clemson University [email protected]

July 30, 2011

50 Golden Years Ateneo Mathematics Program Quezon City, Philippines

SupercomputersFujitsu “K” (Japan)

K = “kei” = Japanese for 10 quadrillion

8.162 petaflops ≈ 9 quadrillion floating point operations per

sec

68,544 8-core SPARC64 processors = 548,352

cores

3-dimensional torus network called Tofu

Page 26: Parallel Algorithms on Networks of Processors Roy (Hutch) Pargas, PhD Computer Science (UNC Chapel Hill) School of Computing, Clemson University pargas@clemson.edu

26

Roy Pargas, Clemson University [email protected]

July 30, 2011

50 Golden Years Ateneo Mathematics Program Quezon City, Philippines

TOP500

Top 500 Computers in the World

Page 27: Parallel Algorithms on Networks of Processors Roy (Hutch) Pargas, PhD Computer Science (UNC Chapel Hill) School of Computing, Clemson University pargas@clemson.edu

27

Where Does that Leave Us?

Roy Pargas, Clemson University [email protected]

July 30, 2011

50 Golden Years Ateneo Mathematics Program Quezon City, Philippines

Page 28: Parallel Algorithms on Networks of Processors Roy (Hutch) Pargas, PhD Computer Science (UNC Chapel Hill) School of Computing, Clemson University pargas@clemson.edu

28

Where Does that Leave Us?

Roy Pargas, Clemson University [email protected]

July 30, 2011

50 Golden Years Ateneo Mathematics Program Quezon City, Philippines

In a wonderful playground of mathematical algorithmic design where imagination and creativity are key!

Page 29: Parallel Algorithms on Networks of Processors Roy (Hutch) Pargas, PhD Computer Science (UNC Chapel Hill) School of Computing, Clemson University pargas@clemson.edu

29

Where Does that Leave Us?

In a wonderful playground of mathematical algorithmic design where imagination and creativity are key!

Roy Pargas, Clemson University [email protected]

July 30, 2011

50 Golden Years Ateneo Mathematics Program Quezon City, Philippines

Page 30: Parallel Algorithms on Networks of Processors Roy (Hutch) Pargas, PhD Computer Science (UNC Chapel Hill) School of Computing, Clemson University pargas@clemson.edu

30

Where Does that Leave Us?

In a wonderful playground of mathematical algorithmic design where imagination and creativity are key!

Roy Pargas, Clemson University [email protected]

July 30, 2011

50 Golden Years Ateneo Mathematics Program Quezon City, Philippines

Page 31: Parallel Algorithms on Networks of Processors Roy (Hutch) Pargas, PhD Computer Science (UNC Chapel Hill) School of Computing, Clemson University pargas@clemson.edu

31

Where Does that Leave Us?

In a wonderful playground of mathematical algorithmic design where imagination and creativity are key!

Roy Pargas, Clemson University [email protected]

July 30, 2011

50 Golden Years Ateneo Mathematics Program Quezon City, Philippines

Page 32: Parallel Algorithms on Networks of Processors Roy (Hutch) Pargas, PhD Computer Science (UNC Chapel Hill) School of Computing, Clemson University pargas@clemson.edu

32

Challenges for Parallel Algorithm

DesignersChoosing a network

Partitioning the problem

Designing the parallel algorithm

Roy Pargas, Clemson University [email protected]

July 30, 2011

50 Golden Years Ateneo Mathematics Program Quezon City, Philippines

Page 33: Parallel Algorithms on Networks of Processors Roy (Hutch) Pargas, PhD Computer Science (UNC Chapel Hill) School of Computing, Clemson University pargas@clemson.edu

33

So Let’s Try It:

Choosing a network

Partitioning the problem

Designing the parallel algorithm

Roy Pargas, Clemson University [email protected]

July 30, 2011

50 Golden Years Ateneo Mathematics Program Quezon City, Philippines

Page 34: Parallel Algorithms on Networks of Processors Roy (Hutch) Pargas, PhD Computer Science (UNC Chapel Hill) School of Computing, Clemson University pargas@clemson.edu

34

So Let’s Try It:Elliptic Partial Diff

EqnsChoosing a network

Partitioning the problem

Designing the parallel algorithm

Roy Pargas, Clemson University [email protected]

July 30, 2011

50 Golden Years Ateneo Mathematics Program Quezon City, Philippines

Page 35: Parallel Algorithms on Networks of Processors Roy (Hutch) Pargas, PhD Computer Science (UNC Chapel Hill) School of Computing, Clemson University pargas@clemson.edu

35

Elliptic PDEs

Roy Pargas, Clemson University [email protected]

July 30, 2011

50 Golden Years Ateneo Mathematics Program Quezon City, Philippines

Problems involving second-order elliptic partial differential equations are equilibrium problems. Given a region R bounded by a curve C and that the unknown function z satisfies Laplace’s or Poisson’s equation in R, the objective is to approximate the value of z at any point in R. The method of finite differences is an often used numerical method for solving this problem. The basic strategy is to approximate the differential equation by a difference equation and to solve the difference equation.

Page 36: Parallel Algorithms on Networks of Processors Roy (Hutch) Pargas, PhD Computer Science (UNC Chapel Hill) School of Computing, Clemson University pargas@clemson.edu

36

Designing the Algorithm

Why Solve Linear Recurrences?

Roy Pargas, Clemson University [email protected]

July 30, 2011

50 Golden Years Ateneo Mathematics Program Quezon City, Philippines

Page 37: Parallel Algorithms on Networks of Processors Roy (Hutch) Pargas, PhD Computer Science (UNC Chapel Hill) School of Computing, Clemson University pargas@clemson.edu

37

Designing the Algorithm

Why Solve Linear Recurrences?

The problem: Solving PDEs using the Method of Finite Differences leads to

Roy Pargas, Clemson University [email protected]

July 30, 2011

50 Golden Years Ateneo Mathematics Program Quezon City, Philippines

Page 38: Parallel Algorithms on Networks of Processors Roy (Hutch) Pargas, PhD Computer Science (UNC Chapel Hill) School of Computing, Clemson University pargas@clemson.edu

38

Designing the Algorithm

Why Solve Linear Recurrences?

The problem: Solving PDEs using the Method of Finite Differences leads to

Solving Block Tridiagonal Systems which leads to

Roy Pargas, Clemson University [email protected]

July 30, 2011

50 Golden Years Ateneo Mathematics Program Quezon City, Philippines

Page 39: Parallel Algorithms on Networks of Processors Roy (Hutch) Pargas, PhD Computer Science (UNC Chapel Hill) School of Computing, Clemson University pargas@clemson.edu

39

Designing the Algorithm

Why Solve Linear Recurrences?

The problem: Solving PDEs using the Method of Finite Differences leads to

Solving Block Tridiagonal Systems which leads to

Solving Tridiagonal Systems which leads to

Roy Pargas, Clemson University [email protected]

July 30, 2011

50 Golden Years Ateneo Mathematics Program Quezon City, Philippines

Page 40: Parallel Algorithms on Networks of Processors Roy (Hutch) Pargas, PhD Computer Science (UNC Chapel Hill) School of Computing, Clemson University pargas@clemson.edu

40

Designing the Algorithm

Why Solve Linear Recurrences?

The problem: Solving PDEs using the Method of Finite Differences leads to

Solving Block Tridiagonal Systems which leads to

Solving Tridiagonal Systems which leads to

Solving Linear Recurrences

Roy Pargas, Clemson University [email protected]

July 30, 2011

50 Golden Years Ateneo Mathematics Program Quezon City, Philippines

Page 41: Parallel Algorithms on Networks of Processors Roy (Hutch) Pargas, PhD Computer Science (UNC Chapel Hill) School of Computing, Clemson University pargas@clemson.edu

41

Designing the Algorithm

Why Solve Linear Recurrences?

The problem: Solving PDEs using the Method of Finite Differences leads to

Solving Block Tridiagonal Systems which leads to

Solving Tridiagonal Systems which leads to

Solving Linear Recurrences many many many times

Roy Pargas, Clemson University [email protected]

July 30, 2011

50 Golden Years Ateneo Mathematics Program Quezon City, Philippines

Page 42: Parallel Algorithms on Networks of Processors Roy (Hutch) Pargas, PhD Computer Science (UNC Chapel Hill) School of Computing, Clemson University pargas@clemson.edu

42

Designing the Algorithm

Why Solve Linear Recurrences?

The problem: Solving PDEs using the Method of Finite Differences leads to

Solving Block Tridiagonal Systems which leads to

Solving Tridiagonal Systems which leads to

Solving Linear Recurrences many many many times

Why Use a Binary Tree? Roy Pargas, Clemson University [email protected]

July 30, 2011

50 Golden Years Ateneo Mathematics Program Quezon City, Philippines

Page 43: Parallel Algorithms on Networks of Processors Roy (Hutch) Pargas, PhD Computer Science (UNC Chapel Hill) School of Computing, Clemson University pargas@clemson.edu

43

Linear Recurrences

Roy Pargas, Clemson University [email protected]

July 30, 2011

50 Golden Years Ateneo Mathematics Program Quezon City, Philippines

Key Idea: Successfully solving the original pde problem depends upon solving recurrences quickly and efficiently.

Page 44: Parallel Algorithms on Networks of Processors Roy (Hutch) Pargas, PhD Computer Science (UNC Chapel Hill) School of Computing, Clemson University pargas@clemson.edu

44

Linear Recurrences

Roy Pargas, Clemson University [email protected]

July 30, 2011

50 Golden Years Ateneo Mathematics Program Quezon City, Philippines

Consider the following set of n equations:x0 = a0

x1 = a1 + b1 x0

x2 = a2 + b2 x1

...

xn-1 = an-1 + bn-1 xn-2

Page 45: Parallel Algorithms on Networks of Processors Roy (Hutch) Pargas, PhD Computer Science (UNC Chapel Hill) School of Computing, Clemson University pargas@clemson.edu

45

Linear Recurrences

Roy Pargas, Clemson University [email protected]

July 30, 2011

50 Golden Years Ateneo Mathematics Program Quezon City, Philippines

Consider the following set of n equations:x0 = a0

x1 = a1 + b1 x0

x2 = a2 + b2 x1

...

xn-1 = an-1 + bn-1 xn-2

Can we solve for xi in parallel?

Page 46: Parallel Algorithms on Networks of Processors Roy (Hutch) Pargas, PhD Computer Science (UNC Chapel Hill) School of Computing, Clemson University pargas@clemson.edu

46

Linear Recurrences

Roy Pargas, Clemson University [email protected]

July 30, 2011

50 Golden Years Ateneo Mathematics Program Quezon City, Philippines

For uniformity:x0 = a0 + b0 x-1 b0=0, x-1=dummy variablex1 = a1 + b1 x0

x2 = a2 + b2 x1

...

xn-1 = an-1 + bn-1 xn-2

Page 47: Parallel Algorithms on Networks of Processors Roy (Hutch) Pargas, PhD Computer Science (UNC Chapel Hill) School of Computing, Clemson University pargas@clemson.edu

47

Linear Recurrences

Roy Pargas, Clemson University [email protected]

July 30, 2011

50 Golden Years Ateneo Mathematics Program Quezon City, Philippines

For uniformity:x0 = a0 + b0 x-1

x1 = a1 + b1 x0

x2 = a2 + b2 x1

...

xn-1 = an-1 + bn-1 xn-2

Observe, ifxi = a + b xj

xj = a’ + b’ xk

Thenxi = (a + ba’) +bb’ xk

= a” + b” xk

Page 48: Parallel Algorithms on Networks of Processors Roy (Hutch) Pargas, PhD Computer Science (UNC Chapel Hill) School of Computing, Clemson University pargas@clemson.edu

48

Linear Recurrences

Roy Pargas, Clemson University [email protected]

July 30, 2011

50 Golden Years Ateneo Mathematics Program Quezon City, Philippines

Notation changex0 = a0 + b0 x-1 C0,-1 = (a0,b0)x1 = a1 + b1 x0 C1,0 = (a1,b1)x2 = a2 + b2 x1 C2,1 = (a2,b2)...

xn-1 = an-1 + bn-1 xn-2 Cn-1,n-2 = (an-1,bn-1)

Observe, ifxi = a + b xj

xj = a’ + b’ xk

Thenxi = (a + ba’) +bb’ xk

= a” + b” xk

Page 49: Parallel Algorithms on Networks of Processors Roy (Hutch) Pargas, PhD Computer Science (UNC Chapel Hill) School of Computing, Clemson University pargas@clemson.edu

49

Linear Recurrences

Roy Pargas, Clemson University [email protected]

July 30, 2011

50 Golden Years Ateneo Mathematics Program Quezon City, Philippines

Notation changex0 = a0 + b0 x-1 C0,-1 = (a0,b0)x1 = a1 + b1 x0 C1,0 = (a1,b1)x2 = a2 + b2 x1 C2,1 = (a2,b2)...

xn-1 = an-1 + bn-1 xn-2 Cn-1,n-2 = (an-1,bn-1)

Observe, ifxi = a + b xj Ci,j = (a,b)xj = a’ + b’ xk Cj,k = (a’,b’)

Thenxi = (a + ba’) +bb’ xk Ci,j Cj,k =

= a” + b” xk Ci,k = (a+ba’,bb’)

Page 50: Parallel Algorithms on Networks of Processors Roy (Hutch) Pargas, PhD Computer Science (UNC Chapel Hill) School of Computing, Clemson University pargas@clemson.edu

50

Linear Recurrences

Roy Pargas, Clemson University [email protected]

July 30, 2011

50 Golden Years Ateneo Mathematics Program Quezon City, Philippines

To summarize:xi = a + b xj Ci,j = (a,b)xj = a’ + b’ xk Cj,k = (a’,b’)

Thenxi = (a + ba’) +bb’ xk Ci,j Cj,k =

= a” + b” xk Ci,k = (a+ba’,bb’)

Page 51: Parallel Algorithms on Networks of Processors Roy (Hutch) Pargas, PhD Computer Science (UNC Chapel Hill) School of Computing, Clemson University pargas@clemson.edu

51

Linear Recurrences

Roy Pargas, Clemson University [email protected]

July 30, 2011

50 Golden Years Ateneo Mathematics Program Quezon City, Philippines

To summarize:xi = a + b xj Ci,j = (a,b)xj = a’ + b’ xk Cj,k = (a’,b’)

Thenxi = (a + ba’) +bb’ xk Ci,j Cj,k =

= a” + b” xk Ci,k = (a+ba’,bb’)

One last observation:

Page 52: Parallel Algorithms on Networks of Processors Roy (Hutch) Pargas, PhD Computer Science (UNC Chapel Hill) School of Computing, Clemson University pargas@clemson.edu

52

Linear Recurrences

Roy Pargas, Clemson University [email protected]

July 30, 2011

50 Golden Years Ateneo Mathematics Program Quezon City, Philippines

To summarize:xi = a + b xj Ci,j = (a,b)xj = a’ + b’ xk Cj,k = (a’,b’)

Thenxi = (a + ba’) +bb’ xk Ci,j Cj,k =

= a” + b” xk Ci,k = (a+ba’,bb’)

One last observation:If any variable is expressed in terms of

the dummy variable x-1 (e.g., x0 = a0 + b0 x-1) then that variable is solved.

Page 53: Parallel Algorithms on Networks of Processors Roy (Hutch) Pargas, PhD Computer Science (UNC Chapel Hill) School of Computing, Clemson University pargas@clemson.edu

53

Linear Recurrences

Roy Pargas, Clemson University [email protected]

July 30, 2011

50 Golden Years Ateneo Mathematics Program Quezon City, Philippines

To summarize:xi = a + b xj Ci,j = (a,b)xj = a’ + b’ xk Cj,k = (a’,b’)

Thenxi = (a + ba’) +bb’ xk Ci,j Cj,k =

= a” + b” xk Ci,k = (a+ba’,bb’)

One last observation:If any variable is expressed in terms of

the dummy variable x-1 (e.g., x0 = a0 + b0 x-1) then that variable is solved. So Ci,-1 = (a,b)

Page 54: Parallel Algorithms on Networks of Processors Roy (Hutch) Pargas, PhD Computer Science (UNC Chapel Hill) School of Computing, Clemson University pargas@clemson.edu

54

Linear Recurrences

Roy Pargas, Clemson University [email protected]

July 30, 2011

50 Golden Years Ateneo Mathematics Program Quezon City, Philippines

To summarize:xi = a + b xj Ci,j = (a,b)xj = a’ + b’ xk Cj,k = (a’,b’)

Thenxi = (a + ba’) +bb’ xk Ci,j Cj,k =

= a” + b” xk Ci,k = (a+ba’,bb’)

One last observation:If any variable is expressed in terms of

the dummy variable x-1 (e.g., x0 = a0 + b0 x-1) then that variable is solved. So Ci,-1 = (a,b) means that b=0

Page 55: Parallel Algorithms on Networks of Processors Roy (Hutch) Pargas, PhD Computer Science (UNC Chapel Hill) School of Computing, Clemson University pargas@clemson.edu

55

Linear Recurrences

Roy Pargas, Clemson University [email protected]

July 30, 2011

50 Golden Years Ateneo Mathematics Program Quezon City, Philippines

To summarize:xi = a + b xj Ci,j = (a,b)xj = a’ + b’ xk Cj,k = (a’,b’)

Thenxi = (a + ba’) +bb’ xk Ci,j Cj,k =

= a” + b” xk Ci,k = (a+ba’,bb’)

One last observation:If any variable is expressed in terms of

the dummy variable x-1 (e.g., x0 = a0 + b0 x-1) then that variable is solved. So Ci,-1 = (a,b) means that b=0 and that xi = a + b x-1 = a + 0 x-1 = a

Page 56: Parallel Algorithms on Networks of Processors Roy (Hutch) Pargas, PhD Computer Science (UNC Chapel Hill) School of Computing, Clemson University pargas@clemson.edu

56

C0,-

1

C1,

0

C2,

1

C3,

2

C4,

3

C5,

4

C6,

5

C7,

6 Roy Pargas, Clemson University [email protected]

July 30, 2011

50 Golden Years Ateneo Mathematics Program Quezon City, Philippines

Linear Recurrences

Page 57: Parallel Algorithms on Networks of Processors Roy (Hutch) Pargas, PhD Computer Science (UNC Chapel Hill) School of Computing, Clemson University pargas@clemson.edu

57

Linear Recurrences

Roy Pargas, Clemson University [email protected]

July 30, 2011

50 Golden Years Ateneo Mathematics Program Quezon City, Philippines

C0,-1C1,0C2,1C3,2C4,3

C5,4C6,5C7,6

C0,-

1

C1,

0

C3,

2

C4,

3

C5,

4

C6,

5

C7,

6

C2,

1

Page 58: Parallel Algorithms on Networks of Processors Roy (Hutch) Pargas, PhD Computer Science (UNC Chapel Hill) School of Computing, Clemson University pargas@clemson.edu

58

Linear Recurrences

Roy Pargas, Clemson University [email protected]

July 30, 2011

50 Golden Years Ateneo Mathematics Program Quezon City, Philippines

C0,-1C1,0C2,1C3,2C4,3

C5,4C6,5C7,6

C0,-

1

C1,

0

C3,

2

C4,

3

C5,

4

C6,

5

C7,

6

C2,

1

C7,

5

C5,

3

C3,

1

C1,-

1

Page 59: Parallel Algorithms on Networks of Processors Roy (Hutch) Pargas, PhD Computer Science (UNC Chapel Hill) School of Computing, Clemson University pargas@clemson.edu

59

Linear Recurrences

Roy Pargas, Clemson University [email protected]

July 30, 2011

50 Golden Years Ateneo Mathematics Program Quezon City, Philippines

C0,-1C1,0C2,1C3,2C4,3

C5,4C6,5C7,6

C0,-

1

C1,

0

C3,

2

C4,

3

C5,

4

C6,

5

C7,

6

C2,

1

C7,

5

C5,

3

C3,

1

C1,-

1

C7,5 C5,3C3,1 C1,-1

Page 60: Parallel Algorithms on Networks of Processors Roy (Hutch) Pargas, PhD Computer Science (UNC Chapel Hill) School of Computing, Clemson University pargas@clemson.edu

60

Linear Recurrences

Roy Pargas, Clemson University [email protected]

July 30, 2011

50 Golden Years Ateneo Mathematics Program Quezon City, Philippines

C0,-1C1,0C2,1C3,2C4,3

C5,4C6,5C7,6

C0,-

1

C1,

0

C3,

2

C4,

3

C5,

4

C6,

5

C7,

6

C2,

1

C7,

5

C5,

3

C3,

1

C1,-

1

C7,5 C5,3C3,1 C1,-1

C7,

3

C3,-

1

Page 61: Parallel Algorithms on Networks of Processors Roy (Hutch) Pargas, PhD Computer Science (UNC Chapel Hill) School of Computing, Clemson University pargas@clemson.edu

61

Linear Recurrences

Roy Pargas, Clemson University [email protected]

July 30, 2011

50 Golden Years Ateneo Mathematics Program Quezon City, Philippines

C0,-1C1,0C2,1C3,2C4,3

C5,4C6,5C7,6

C0,-

1

C1,

0

C3,

2

C4,

3

C5,

4

C6,

5

C7,

6

C2,

1

C7,

5

C5,

3

C3,

1

C1,-

1

C7,5 C5,3C3,1 C1,-1

C7,

3

C3,-

1

C7,3 C3,-1

Page 62: Parallel Algorithms on Networks of Processors Roy (Hutch) Pargas, PhD Computer Science (UNC Chapel Hill) School of Computing, Clemson University pargas@clemson.edu

62

Linear Recurrences

Roy Pargas, Clemson University [email protected]

July 30, 2011

50 Golden Years Ateneo Mathematics Program Quezon City, Philippines

C0,-1C1,0C2,1C3,2C4,3

C5,4C6,5C7,6

C0,-

1

C1,

0

C3,

2

C4,

3

C5,

4

C6,

5

C7,

6

C2,

1

C7,

5

C5,

3

C3,

1

C1,-

1

C7,5 C5,3C3,1 C1,-1

C7,

3

C3,-

1

C7,3 C3,-1

C7,-

1

Page 63: Parallel Algorithms on Networks of Processors Roy (Hutch) Pargas, PhD Computer Science (UNC Chapel Hill) School of Computing, Clemson University pargas@clemson.edu

63

Linear Recurrences

Roy Pargas, Clemson University [email protected]

July 30, 2011

50 Golden Years Ateneo Mathematics Program Quezon City, Philippines

C0,-1C1,0C2,1C3,2C4,3

C5,4C6,5C7,6

C0,-

1

C1,

0

C3,

2

C4,

3

C5,

4

C6,

5

C7,

6

C2,

1

C7,

5

C5,

3

C3,

1

C1,-

1

C7,5 C5,3C3,1 C1,-1

C7,

3

C3,-

1

C7,3 C3,-1

C7,-

1

C7,-

1C7,-1

Page 64: Parallel Algorithms on Networks of Processors Roy (Hutch) Pargas, PhD Computer Science (UNC Chapel Hill) School of Computing, Clemson University pargas@clemson.edu

64

Linear Recurrences

Roy Pargas, Clemson University [email protected]

July 30, 2011

50 Golden Years Ateneo Mathematics Program Quezon City, Philippines

C0,-1C1,0C2,1C3,2C4,3

C5,4C6,5C7,6

C0,-

1

C1,

0

C3,

2

C4,

3

C5,

4

C6,

5

C7,

6

C2,

1

C7,

5

C5,

3

C3,

1

C1,-

1

C7,5 C5,3C3,1 C1,-1

C7,

3

C3,-

1

C7,3 C3,-1

C7,-

1

C7,-

1C7,-1

Solved variable

Page 65: Parallel Algorithms on Networks of Processors Roy (Hutch) Pargas, PhD Computer Science (UNC Chapel Hill) School of Computing, Clemson University pargas@clemson.edu

65

Linear Recurrences

Roy Pargas, Clemson University [email protected]

July 30, 2011

50 Golden Years Ateneo Mathematics Program Quezon City, Philippines

C0,-1C1,0C2,1C3,2C4,3

C5,4C6,5C7,6

C0,-

1

C1,

0

C3,

2

C4,

3

C5,

4

C6,

5

C7,

6

C2,

1

C7,

5

C5,

3

C3,

1

C1,-

1

C7,5 C5,3C3,1 C1,-1

C7,

3

C3,-

1

C7,3 C3,-1

C7,-

1

C7,-

1C7,-1

Solved variables

Page 66: Parallel Algorithms on Networks of Processors Roy (Hutch) Pargas, PhD Computer Science (UNC Chapel Hill) School of Computing, Clemson University pargas@clemson.edu

66

Linear Recurrences

Roy Pargas, Clemson University [email protected]

July 30, 2011

50 Golden Years Ateneo Mathematics Program Quezon City, Philippines

C0,-1C1,0C2,1C3,2C4,3

C5,4C6,5C7,6

C0,-

1

C1,

0

C3,

2

C4,

3

C5,

4

C6,

5

C7,

6

C2,

1

C7,

5

C5,

3

C3,

1

C1,-

1

C7,5 C5,3C3,1 C1,-1

C7,

3

C3,-

1

C7,3 C3,-1

C7,-

1

C7,-

1C7,-1

How do we solve for the other variables?

Page 67: Parallel Algorithms on Networks of Processors Roy (Hutch) Pargas, PhD Computer Science (UNC Chapel Hill) School of Computing, Clemson University pargas@clemson.edu

67

C6,5

C7,-1

Linear Recurrences

Roy Pargas, Clemson University [email protected]

July 30, 2011

50 Golden Years Ateneo Mathematics Program Quezon City, Philippines

C0,-1C1,0C2,1C3,2C4,3

C5,4C7,6

C0,-

1

C1,

0

C3,

2

C4,

3

C5,

4

C6,

5

C7,

6

C2,

1

C7,

5

C5,

3

C3,

1

C1,-

1

C7,5 C5,3C3,1 C1,-1

C7,

3

C3,-

1

C7,3 C3,-1

C7,-

1

C7,-

1

In the downsweep!

Page 68: Parallel Algorithms on Networks of Processors Roy (Hutch) Pargas, PhD Computer Science (UNC Chapel Hill) School of Computing, Clemson University pargas@clemson.edu

68

C6,5

C7,-1

Linear Recurrences

Roy Pargas, Clemson University [email protected]

July 30, 2011

50 Golden Years Ateneo Mathematics Program Quezon City, Philippines

C0,-1C1,0C2,1C3,2C4,3

C5,4C7,6

C0,-

1

C1,

0

C3,

2

C4,

3

C5,

4

C6,

5

C7,

6

C2,

1

C7,

5

C5,

3

C3,

1

C1,-

1

C7,5 C5,3C3,1 C1,-1

C7,

3

C3,-

1

C7,3 C3,-1

C7,-

1

(x7,x-

1)

Page 69: Parallel Algorithms on Networks of Processors Roy (Hutch) Pargas, PhD Computer Science (UNC Chapel Hill) School of Computing, Clemson University pargas@clemson.edu

69

C6,5

(x7,x-1)

Linear Recurrences

Roy Pargas, Clemson University [email protected]

July 30, 2011

50 Golden Years Ateneo Mathematics Program Quezon City, Philippines

C0,-1C1,0C2,1C3,2C4,3

C5,4C7,6

C0,-

1

C1,

0

C3,

2

C4,

3

C5,

4

C6,

5

C7,

6

C2,

1

C7,

5

C5,

3

C3,

1

C1,-

1

C7,5 C5,3C3,1 C1,-1

C7,

3

C3,-

1

C7,3 C3,-1

C7,-

1

(x7,x-

1)

Page 70: Parallel Algorithms on Networks of Processors Roy (Hutch) Pargas, PhD Computer Science (UNC Chapel Hill) School of Computing, Clemson University pargas@clemson.edu

70

C6,5

(x7,x-1)

Linear Recurrences

Roy Pargas, Clemson University [email protected]

July 30, 2011

50 Golden Years Ateneo Mathematics Program Quezon City, Philippines

C0,-1C1,0C2,1C3,2C4,3

C5,4C7,6

C0,-

1

C1,

0

C3,

2

C4,

3

C5,

4

C6,

5

C7,

6

C2,

1

C7,

5

C5,

3

C3,

1

C1,-

1

C7,5 C5,3C3,1 C1,-1

C7,

3

C3,-

1

C7,3 C3,-1

x3

(x7,x-

1)

Page 71: Parallel Algorithms on Networks of Processors Roy (Hutch) Pargas, PhD Computer Science (UNC Chapel Hill) School of Computing, Clemson University pargas@clemson.edu

71

C6,5

(x7,x-1)

Linear Recurrences

Roy Pargas, Clemson University [email protected]

July 30, 2011

50 Golden Years Ateneo Mathematics Program Quezon City, Philippines

C0,-1C1,0C2,1C3,2C4,3

C5,4C7,6

C0,-

1

C1,

0

C3,

2

C4,

3

C5,

4

C6,

5

C7,

6

C2,

1

C7,

5

C5,

3

C3,

1

C1,-

1

C7,5 C5,3C3,1 C1,-1

C7,

3

C3,-

1

x3

(x7,x-

1)

(x7,x3) (x3,x-1)

Page 72: Parallel Algorithms on Networks of Processors Roy (Hutch) Pargas, PhD Computer Science (UNC Chapel Hill) School of Computing, Clemson University pargas@clemson.edu

72

C6,5

(x7,x-1)

Linear Recurrences

Roy Pargas, Clemson University [email protected]

July 30, 2011

50 Golden Years Ateneo Mathematics Program Quezon City, Philippines

C0,-1C1,0C2,1C3,2C4,3

C5,4C7,6

C0,-

1

C1,

0

C3,

2

C4,

3

C5,

4

C6,

5

C7,

6

C2,

1

C7,

5

C5,

3

C3,

1

C1,-

1

C3,1 C1,-1

x3

(x7,x-

1)

(x7,x3) (x3,x-1)

x5C7,5 C5,3

x1

Page 73: Parallel Algorithms on Networks of Processors Roy (Hutch) Pargas, PhD Computer Science (UNC Chapel Hill) School of Computing, Clemson University pargas@clemson.edu

73

C6,5

(x7,x-1)

Linear Recurrences

Roy Pargas, Clemson University [email protected]

July 30, 2011

50 Golden Years Ateneo Mathematics Program Quezon City, Philippines

C0,-1C1,0C2,1C3,2C4,3

C5,4C7,6

C0,-

1

C1,

0

C3,

2

C4,

3

C5,

4

C6,

5

C7,

6

C2,

1

C7,

5

C5,

3

C3,

1

C1,-

1

x3

(x7,x-

1)

(x7,x3) (x3,x-1)

x5 x1

(x7,x5) (x5,x3) (x3,x1) (x1,x-1)

Page 74: Parallel Algorithms on Networks of Processors Roy (Hutch) Pargas, PhD Computer Science (UNC Chapel Hill) School of Computing, Clemson University pargas@clemson.edu

74

(x7,x5)

C6,5

(x7,x-1)

Linear Recurrences

Roy Pargas, Clemson University [email protected]

July 30, 2011

50 Golden Years Ateneo Mathematics Program Quezon City, Philippines

C0,-1C1,0C2,1C3,2C4,3

C5,4C7,6

C0,-

1

C1,

0

C3,

2

C4,

3

C5,

4

C6,

5

C7,

6

C2,

1

x3

(x7,x-

1)

(x7,x3) (x3,x-1)

x5 x1

(x5,x3) (x3,x1) (x1,x-1)

x6 x4 x3 x1

Page 75: Parallel Algorithms on Networks of Processors Roy (Hutch) Pargas, PhD Computer Science (UNC Chapel Hill) School of Computing, Clemson University pargas@clemson.edu

75

(x7,x5)

(x7,x-1)

Linear Recurrences

Roy Pargas, Clemson University [email protected]

July 30, 2011

50 Golden Years Ateneo Mathematics Program Quezon City, Philippines

C0,-

1

C1,

0

C3,

2

C4,

3

C5,

4

C6,

5

C7,

6

C2,

1

x3

(x7,x-

1)

(x7,x3) (x3,x-1)

x5 x1

(x5,x3) (x3,x1) (x1,x-1)

x6 x4 x3 x1

(x7,x6) (x6,x5) (x5,x4)(x0,x-1)(x1,x0)(x4,x3) (x3,x2) (x2,x1)

Page 76: Parallel Algorithms on Networks of Processors Roy (Hutch) Pargas, PhD Computer Science (UNC Chapel Hill) School of Computing, Clemson University pargas@clemson.edu

76

(x7,x5)

(x7,x-1)

Linear Recurrences

Roy Pargas, Clemson University [email protected]

July 30, 2011

50 Golden Years Ateneo Mathematics Program Quezon City, Philippines

x3

(x7,x-

1)

(x7,x3) (x3,x-1)

x5 x1

(x5,x3) (x3,x1) (x1,x-1)

x6 x4 x3 x1

(x7,x6) (x6,x5) (x5,x4)(x0,x-1)(x1,x0)(x4,x3) (x3,x2) (x2,x1)

(x7,x6) (x0,x-

1)(x6,x5) (x5,x4) (x4,x3) (x3,x2) (x2,x1) (x1,x0)

Page 77: Parallel Algorithms on Networks of Processors Roy (Hutch) Pargas, PhD Computer Science (UNC Chapel Hill) School of Computing, Clemson University pargas@clemson.edu

77

(x7,x5)

(x7,x-1)

Linear Recurrences

Roy Pargas, Clemson University [email protected]

July 30, 2011

50 Golden Years Ateneo Mathematics Program Quezon City, Philippines

x3

(x7,x-

1)

(x7,x3) (x3,x-1)

x5 x1

(x5,x3) (x3,x1) (x1,x-1)

x6 x4 x3 x1

(x7,x6) (x6,x5) (x5,x4)(x0,x-1)(x1,x0)(x4,x3) (x3,x2) (x2,x1)

(x7,x6) (x0,x-

1)(x6,x5) (x5,x4) (x4,x3) (x3,x2) (x2,x1) (x1,x0)

Leaves contain solutions!

Page 78: Parallel Algorithms on Networks of Processors Roy (Hutch) Pargas, PhD Computer Science (UNC Chapel Hill) School of Computing, Clemson University pargas@clemson.edu

78

(x7,x5)

(x7,x-1)

Linear Recurrences

Roy Pargas, Clemson University [email protected]

July 30, 2011

50 Golden Years Ateneo Mathematics Program Quezon City, Philippines

x3

(x7,x-

1)

(x7,x3) (x3,x-1)

x5 x1

(x5,x3) (x3,x1) (x1,x-1)

x6 x4 x3 x1

(x7,x6) (x6,x5) (x5,x4)(x0,x-1)(x1,x0)(x4,x3) (x3,x2) (x2,x1)

(x7,x6) (x0,x-

1)(x6,x5) (x5,x4) (x4,x3) (x3,x2) (x2,x1) (x1,x0)

But we can do better!

Page 79: Parallel Algorithms on Networks of Processors Roy (Hutch) Pargas, PhD Computer Science (UNC Chapel Hill) School of Computing, Clemson University pargas@clemson.edu

79

(x7,x5)

(x7,x-1)

Linear Recurrences

Roy Pargas, Clemson University [email protected]

July 30, 2011

50 Golden Years Ateneo Mathematics Program Quezon City, Philippines

x3

(x7,x-

1)

(x7,x3) (x3,x-1)

x5 x1

(x5,x3) (x3,x1) (x1,x-1)

x6 x4 x3 x1

(x7,x6) (x6,x5) (x5,x4)(x0,x-1)(x1,x0)(x4,x3) (x3,x2) (x2,x1)

(x7,x6) (x0,x-

1)(x6,x5) (x5,x4) (x4,x3) (x3,x2) (x2,x1) (x1,x0)

Pipelining the solution

Page 80: Parallel Algorithms on Networks of Processors Roy (Hutch) Pargas, PhD Computer Science (UNC Chapel Hill) School of Computing, Clemson University pargas@clemson.edu

80

Roy Pargas, Clemson University [email protected]

July 30, 2011

50 Golden Years Ateneo Mathematics Program Quezon City, Philippines

Linear RecurrencesPipelining the solution

Page 81: Parallel Algorithms on Networks of Processors Roy (Hutch) Pargas, PhD Computer Science (UNC Chapel Hill) School of Computing, Clemson University pargas@clemson.edu

81

Roy Pargas, Clemson University [email protected]

July 30, 2011

50 Golden Years Ateneo Mathematics Program Quezon City, Philippines

Linear RecurrencesPipelining the solution

Page 82: Parallel Algorithms on Networks of Processors Roy (Hutch) Pargas, PhD Computer Science (UNC Chapel Hill) School of Computing, Clemson University pargas@clemson.edu

82

Roy Pargas, Clemson University [email protected]

July 30, 2011

50 Golden Years Ateneo Mathematics Program Quezon City, Philippines

Linear RecurrencesPipelining the solution

Page 83: Parallel Algorithms on Networks of Processors Roy (Hutch) Pargas, PhD Computer Science (UNC Chapel Hill) School of Computing, Clemson University pargas@clemson.edu

83

Roy Pargas, Clemson University [email protected]

July 30, 2011

50 Golden Years Ateneo Mathematics Program Quezon City, Philippines

Linear RecurrencesPipelining the solution

Page 84: Parallel Algorithms on Networks of Processors Roy (Hutch) Pargas, PhD Computer Science (UNC Chapel Hill) School of Computing, Clemson University pargas@clemson.edu

84

Roy Pargas, Clemson University [email protected]

July 30, 2011

50 Golden Years Ateneo Mathematics Program Quezon City, Philippines

Linear RecurrencesPipelining the solution

Page 85: Parallel Algorithms on Networks of Processors Roy (Hutch) Pargas, PhD Computer Science (UNC Chapel Hill) School of Computing, Clemson University pargas@clemson.edu

85

Roy Pargas, Clemson University [email protected]

July 30, 2011

50 Golden Years Ateneo Mathematics Program Quezon City, Philippines

Linear RecurrencesPipelining the solution

Page 86: Parallel Algorithms on Networks of Processors Roy (Hutch) Pargas, PhD Computer Science (UNC Chapel Hill) School of Computing, Clemson University pargas@clemson.edu

86

Roy Pargas, Clemson University [email protected]

July 30, 2011

50 Golden Years Ateneo Mathematics Program Quezon City, Philippines

Linear RecurrencesPipelining the solution

Page 87: Parallel Algorithms on Networks of Processors Roy (Hutch) Pargas, PhD Computer Science (UNC Chapel Hill) School of Computing, Clemson University pargas@clemson.edu

87

Roy Pargas, Clemson University [email protected]

July 30, 2011

50 Golden Years Ateneo Mathematics Program Quezon City, Philippines

Linear RecurrencesPipelining the solution

Page 88: Parallel Algorithms on Networks of Processors Roy (Hutch) Pargas, PhD Computer Science (UNC Chapel Hill) School of Computing, Clemson University pargas@clemson.edu

88

Roy Pargas, Clemson University [email protected]

July 30, 2011

50 Golden Years Ateneo Mathematics Program Quezon City, Philippines

Linear RecurrencesPipelining the solution

Page 89: Parallel Algorithms on Networks of Processors Roy (Hutch) Pargas, PhD Computer Science (UNC Chapel Hill) School of Computing, Clemson University pargas@clemson.edu

89

Roy Pargas, Clemson University [email protected]

July 30, 2011

50 Golden Years Ateneo Mathematics Program Quezon City, Philippines

Linear RecurrencesPipelining the solution

Page 90: Parallel Algorithms on Networks of Processors Roy (Hutch) Pargas, PhD Computer Science (UNC Chapel Hill) School of Computing, Clemson University pargas@clemson.edu

90

Roy Pargas, Clemson University [email protected]

July 30, 2011

50 Golden Years Ateneo Mathematics Program Quezon City, Philippines

Linear RecurrencesPipelining the solution

Page 91: Parallel Algorithms on Networks of Processors Roy (Hutch) Pargas, PhD Computer Science (UNC Chapel Hill) School of Computing, Clemson University pargas@clemson.edu

91

AnalysisT1 = Time on one processor

Tn = Time on n processors

S = Speedup = T1/Tn (ideal: S = n)

E = Efficiency = S/n (ideal: E = 1)

Roy Pargas, Clemson University [email protected]

July 30, 2011

50 Golden Years Ateneo Mathematics Program Quezon City, Philippines

Page 92: Parallel Algorithms on Networks of Processors Roy (Hutch) Pargas, PhD Computer Science (UNC Chapel Hill) School of Computing, Clemson University pargas@clemson.edu

92

Speedup and Efficiency

Single PassAssume 1 floating point operation requires 1 time unit

T1 = (n−1) (1 mult + 1 add) = 2n−2 time units

n leaves 2n processors T2n = (log2n)( 2 mults + 1 add) // upsweep

+ (log2n)(1 mult + 1 add) // downsweep= 5 log2n time units

S = Speedup = T1/T2n = (2n−2)/(5 log2n)

E = Efficiency = S/2n = (2n−2)/[ (5 log2n) (2n) ]

Roy Pargas, Clemson University [email protected]

July 30, 2011

50 Golden Years Ateneo Mathematics Program Quezon City, Philippines

Page 93: Parallel Algorithms on Networks of Processors Roy (Hutch) Pargas, PhD Computer Science (UNC Chapel Hill) School of Computing, Clemson University pargas@clemson.edu

93

Speedup

Roy Pargas, Clemson University [email protected]

July 30, 2011

50 Golden Years Ateneo Mathematics Program Quezon City, Philippines

0 200 400 600 800 1000 12000

0.02

0.04

0.06

0.08

0.1

0.12

0.14

Series1

Speedup and Efficiency

Single Pass

Page 94: Parallel Algorithms on Networks of Processors Roy (Hutch) Pargas, PhD Computer Science (UNC Chapel Hill) School of Computing, Clemson University pargas@clemson.edu

94

Speedup Efficiency

Roy Pargas, Clemson University [email protected]

July 30, 2011

50 Golden Years Ateneo Mathematics Program Quezon City, Philippines

0 200 400 600 800 1000 12000

0.02

0.04

0.06

0.08

0.1

0.12

0.14

Series1

0 50 100 150 200 250 300 3500

0.01

0.02

0.03

0.04

0.05

0.06

Series1

Speedup and Efficiency

Single Pass

Page 95: Parallel Algorithms on Networks of Processors Roy (Hutch) Pargas, PhD Computer Science (UNC Chapel Hill) School of Computing, Clemson University pargas@clemson.edu

95

With Pipelining. Assume kn equations for large k

T1 = (kn−1) (1 mult + 1 add) = 2kn−2 time units

n leaves 2n processors T2n = (log2n)( 2 mults + 1 add) // pipefill up

+ (k – 2 log 2n) (5) // pipeline on k−2log 2n waves

+ (log2n)( 1 mult + 1 add) // pipedrain

down= 5(k – log2n) time units

S = Speedup = T1/T2n = (2kn−2)/[5(k – log2n )]

E = Efficiency = S/2n = (2kn−2)/[5(k – log2n ) (2n)]

Roy Pargas, Clemson University [email protected]

July 30, 2011

50 Golden Years Ateneo Mathematics Program Quezon City, Philippines

Speedup and Efficiency

With Pipelining

Page 96: Parallel Algorithms on Networks of Processors Roy (Hutch) Pargas, PhD Computer Science (UNC Chapel Hill) School of Computing, Clemson University pargas@clemson.edu

96

Roy Pargas, Clemson University [email protected]

July 30, 2011

50 Golden Years Ateneo Mathematics Program Quezon City, Philippines

Speedup and Efficiency

With PipeliningSpeedup

0 200 400 600 800 1000 12000

50

100

150

200

250

300

350

400

450

Series1

Page 97: Parallel Algorithms on Networks of Processors Roy (Hutch) Pargas, PhD Computer Science (UNC Chapel Hill) School of Computing, Clemson University pargas@clemson.edu

97

Roy Pargas, Clemson University [email protected]

July 30, 2011

50 Golden Years Ateneo Mathematics Program Quezon City, Philippines

Speedup and Efficiency

With PipeliningSpeedup Efficiency

0 200 400 600 800 1000 12000

50

100

150

200

250

300

350

400

450

Series1

0 200 400 600 800 1000 12000.1999

0.2000

0.2001

0.2002

0.2003

Series1

Page 98: Parallel Algorithms on Networks of Processors Roy (Hutch) Pargas, PhD Computer Science (UNC Chapel Hill) School of Computing, Clemson University pargas@clemson.edu

98

Technique Can Work For

Roy Pargas, Clemson University [email protected]

July 30, 2011

50 Golden Years Ateneo Mathematics Program Quezon City, Philippines

Second-order linear recurrencesx0 = a0

x1 = a1 + b1 x0

x2 = a2 + b2 x1 + c2 x0

...

xn-1 = an-1 + bn-1 xn-2 + cn-1 xn-3

Higher order linear recurrences

Page 99: Parallel Algorithms on Networks of Processors Roy (Hutch) Pargas, PhD Computer Science (UNC Chapel Hill) School of Computing, Clemson University pargas@clemson.edu

99

Technique Can Work For

Roy Pargas, Clemson University [email protected]

July 30, 2011

50 Golden Years Ateneo Mathematics Program Quezon City, Philippines

Quotients of linear recurrencesx0 = a0

xi = (ai + bi xi-1)/(ci + di xi-1) i=1,2,…, n-1

Other recurrences

Page 100: Parallel Algorithms on Networks of Processors Roy (Hutch) Pargas, PhD Computer Science (UNC Chapel Hill) School of Computing, Clemson University pargas@clemson.edu

100

Summary and Conclusions

Roy Pargas, Clemson University [email protected]

July 30, 2011

50 Golden Years Ateneo Mathematics Program Quezon City, Philippines

Page 101: Parallel Algorithms on Networks of Processors Roy (Hutch) Pargas, PhD Computer Science (UNC Chapel Hill) School of Computing, Clemson University pargas@clemson.edu

101

Summary and Conclusions

Chip technology is going to get even better/faster/cheaper for the foreseeable future.

Roy Pargas, Clemson University [email protected]

July 30, 2011

50 Golden Years Ateneo Mathematics Program Quezon City, Philippines

Page 102: Parallel Algorithms on Networks of Processors Roy (Hutch) Pargas, PhD Computer Science (UNC Chapel Hill) School of Computing, Clemson University pargas@clemson.edu

102

Summary and Conclusions

Roy Pargas, Clemson University [email protected]

July 30, 2011

50 Golden Years Ateneo Mathematics Program Quezon City, Philippines

Chip technology is going to get even better/faster/cheaper for the foreseeable future. (Ignore the naysaying pundits!)

Page 103: Parallel Algorithms on Networks of Processors Roy (Hutch) Pargas, PhD Computer Science (UNC Chapel Hill) School of Computing, Clemson University pargas@clemson.edu

103

Summary and Conclusions

Chip technology is going to get even better/faster/cheaper for the foreseeable future. (Ignore the naysaying pundits!)

More massively parallel processing systems are going to be built and will become even better/faster/cheaper.

Roy Pargas, Clemson University [email protected]

July 30, 2011

50 Golden Years Ateneo Mathematics Program Quezon City, Philippines

Page 104: Parallel Algorithms on Networks of Processors Roy (Hutch) Pargas, PhD Computer Science (UNC Chapel Hill) School of Computing, Clemson University pargas@clemson.edu

104

Summary and Conclusions

Roy Pargas, Clemson University [email protected]

July 30, 2011

50 Golden Years Ateneo Mathematics Program Quezon City, Philippines

Chip technology is going to get even better/faster/cheaper for the foreseeable future. (Ignore the naysaying pundits!)

More massively parallel processing systems are going to be built and will become even better/faster/cheaper.

The challenging world of parallel algorithmic design beckons and awaits creative minds.

Page 105: Parallel Algorithms on Networks of Processors Roy (Hutch) Pargas, PhD Computer Science (UNC Chapel Hill) School of Computing, Clemson University pargas@clemson.edu

105

Summary and Conclusions

Chip technology is going to get even better/faster/cheaper for the foreseeable future. (Ignore the naysaying pundits!)

More massively parallel processing systems are going to be built and will become even better/faster/cheaper.

The challenging world of parallel algorithmic design beckons and awaits creative minds. Yes, this means you!

Roy Pargas, Clemson University [email protected]

July 30, 2011

50 Golden Years Ateneo Mathematics Program Quezon City, Philippines

Page 106: Parallel Algorithms on Networks of Processors Roy (Hutch) Pargas, PhD Computer Science (UNC Chapel Hill) School of Computing, Clemson University pargas@clemson.edu

106

Where in the World is Clemson

University?

50 Golden Years Ateneo Mathematics Program Quezon City, Philippines

We are here!

Roy Pargas, Clemson University [email protected]

July 30, 2011

Page 107: Parallel Algorithms on Networks of Processors Roy (Hutch) Pargas, PhD Computer Science (UNC Chapel Hill) School of Computing, Clemson University pargas@clemson.edu

107

Thank you for your kind attention!

Roy Pargas, Clemson University [email protected]

July 30, 2011

50 Golden Years Ateneo Mathematics Program Quezon City, Philippines

Questions?

Page 108: Parallel Algorithms on Networks of Processors Roy (Hutch) Pargas, PhD Computer Science (UNC Chapel Hill) School of Computing, Clemson University pargas@clemson.edu

108

Extra Slides

Roy Pargas, Clemson University [email protected]

July 30, 2011

50 Golden Years Ateneo Mathematics Program Quezon City, Philippines

Page 109: Parallel Algorithms on Networks of Processors Roy (Hutch) Pargas, PhD Computer Science (UNC Chapel Hill) School of Computing, Clemson University pargas@clemson.edu

109

Roy Pargas, Clemson University [email protected]

July 30, 2011

50 Golden Years Ateneo Mathematics Program Quezon City, Philippines

Links

1. Fujitsu K Computer (K = “kei” = Japanese word for 10 quadrillion)

http://www.fujitsu.com/global/about/tech/k/http://en.wikipedia.org/wiki/K_computer

2. NUDT “Tianhe-1A” Computerhttp://blog.zorinaq.com/?e=36http://en.wikipedia.org/wiki/Tianhe-I

3. Cray Jaguarhttp://en.wikipedia.org/wiki/Jaguar_(computer)http://www.nccs.gov/jaguar/

4. Dawning Nebulaehttp://en.wikipedia.org/wiki/Dawning_Information_Industryhttp://www.theregister.co.uk/2010/05/31/top_500_supers_jun2010/

5. NEC/HP Tsubame 2.0 http://en.wikipedia.org/wiki/TOP500

Page 110: Parallel Algorithms on Networks of Processors Roy (Hutch) Pargas, PhD Computer Science (UNC Chapel Hill) School of Computing, Clemson University pargas@clemson.edu

110

Hypercube

Roy Pargas, Clemson University [email protected]

July 30, 2011

50 Golden Years Ateneo Mathematics Program Quezon City, Philippines

0-Degree

Page 111: Parallel Algorithms on Networks of Processors Roy (Hutch) Pargas, PhD Computer Science (UNC Chapel Hill) School of Computing, Clemson University pargas@clemson.edu

111

Hypercube

Roy Pargas, Clemson University [email protected]

July 30, 2011

50 Golden Years Ateneo Mathematics Program Quezon City, Philippines

0-Degree

Page 112: Parallel Algorithms on Networks of Processors Roy (Hutch) Pargas, PhD Computer Science (UNC Chapel Hill) School of Computing, Clemson University pargas@clemson.edu

112

Hypercube

Roy Pargas, Clemson University [email protected]

July 30, 2011

50 Golden Years Ateneo Mathematics Program Quezon City, Philippines

0-Degree

Page 113: Parallel Algorithms on Networks of Processors Roy (Hutch) Pargas, PhD Computer Science (UNC Chapel Hill) School of Computing, Clemson University pargas@clemson.edu

113

Hypercube

Roy Pargas, Clemson University [email protected]

July 30, 2011

50 Golden Years Ateneo Mathematics Program Quezon City, Philippines

0-Degree

Page 114: Parallel Algorithms on Networks of Processors Roy (Hutch) Pargas, PhD Computer Science (UNC Chapel Hill) School of Computing, Clemson University pargas@clemson.edu

114

Hypercube

Roy Pargas, Clemson University [email protected]

July 30, 2011

50 Golden Years Ateneo Mathematics Program Quezon City, Philippines

0-Degree

1-Degree

0 1

Page 115: Parallel Algorithms on Networks of Processors Roy (Hutch) Pargas, PhD Computer Science (UNC Chapel Hill) School of Computing, Clemson University pargas@clemson.edu

115

Hypercube

Roy Pargas, Clemson University [email protected]

July 30, 2011

50 Golden Years Ateneo Mathematics Program Quezon City, Philippines

0-Degree

1-Degree

0 1

0 1

Page 116: Parallel Algorithms on Networks of Processors Roy (Hutch) Pargas, PhD Computer Science (UNC Chapel Hill) School of Computing, Clemson University pargas@clemson.edu

116

Hypercube

Roy Pargas, Clemson University [email protected]

July 30, 2011

50 Golden Years Ateneo Mathematics Program Quezon City, Philippines

0-Degree

1-Degree

0 1

0 1

0 1

Page 117: Parallel Algorithms on Networks of Processors Roy (Hutch) Pargas, PhD Computer Science (UNC Chapel Hill) School of Computing, Clemson University pargas@clemson.edu

117

Hypercube

Roy Pargas, Clemson University [email protected]

July 30, 2011

50 Golden Years Ateneo Mathematics Program Quezon City, Philippines

0-Degree

1-Degree

0 1

0 1

0 1

Page 118: Parallel Algorithms on Networks of Processors Roy (Hutch) Pargas, PhD Computer Science (UNC Chapel Hill) School of Computing, Clemson University pargas@clemson.edu

118

Hypercube

Roy Pargas, Clemson University [email protected]

July 30, 2011

50 Golden Years Ateneo Mathematics Program Quezon City, Philippines

0-Degree

1-Degree

0 1

00

01

10

11

2-Degree

Page 119: Parallel Algorithms on Networks of Processors Roy (Hutch) Pargas, PhD Computer Science (UNC Chapel Hill) School of Computing, Clemson University pargas@clemson.edu

119

Hypercube

Roy Pargas, Clemson University [email protected]

July 30, 2011

50 Golden Years Ateneo Mathematics Program Quezon City, Philippines

3-Degree

0-Degree

1-Degree

0 1

00

01

10

11

2-Degree

Page 120: Parallel Algorithms on Networks of Processors Roy (Hutch) Pargas, PhD Computer Science (UNC Chapel Hill) School of Computing, Clemson University pargas@clemson.edu

120

Hypercube

Roy Pargas, Clemson University [email protected]

July 30, 2011

50 Golden Years Ateneo Mathematics Program Quezon City, Philippines

3-Degree

4-Degree

0-Degree

1-Degree

0 1

00

01

10

11

2-Degree

Page 121: Parallel Algorithms on Networks of Processors Roy (Hutch) Pargas, PhD Computer Science (UNC Chapel Hill) School of Computing, Clemson University pargas@clemson.edu

121

Hypercube

Roy Pargas, Clemson University [email protected]

July 30, 2011

50 Golden Years Ateneo Mathematics Program Quezon City, Philippines

3-Degree

4-Degree

5-Degree

Page 122: Parallel Algorithms on Networks of Processors Roy (Hutch) Pargas, PhD Computer Science (UNC Chapel Hill) School of Computing, Clemson University pargas@clemson.edu

122

All-to-All Communication

(Hypercube)

Roy Pargas, Clemson University [email protected]

July 30, 2011

50 Golden Years Ateneo Mathematics Program Quezon City, Philippines

Problem

Motivation