Docsity

CS 575: Parallel Processing Lecture 1 - Introduction to Parallel Computing - Prof. Anton W, Study notes of Computer Science

Partial preview of the text

Download CS 575: Parallel Processing Lecture 1 - Introduction to Parallel Computing - Prof. Anton W and more Study notes Computer Science in PDF only on Docsity!

CS 575 Parallel Processing

Lecture one:

Introduction

Wim Bohm

Colorado State University

Except as otherwise noted, the content of this presentation is licensed under the Creative Commons Attribution 2.5 license

.

Course Topics



Introduction,

Background



Orders of magnitude, Recurrences



Parallel Models, communication



Performance, Speedup, Efficiency

CS

lecture 1



Performance, Speedup, Efficiency



Parallel Algorithms



Dense, sparse matrix algorithms



Sorting



Graph Algorithms



N body problem



Searching

(

Branch and bound,

Backtrack, Dynamic Programming)



Fast Fourier Transform

Intro: Parallel Computing^ 

Parallel Computing is cost effective



Off the shelf, commodity processors are very fast



Memory is very cheap Building a processor that is a small factor faster

CS

lecture 1



Building a processor that is a small factor faster costs an order of magnitude more



Clusters:

NoW is the time!



Cheapest way to get more performance: multiprocessor



NoW: Networks of workstations



Workstation can be an SMP



SMP: Symmetric Multi Processor



Shared memory,

Bus or Crossbar (eg. Cray)

Wile E. Coyote’s Parallel Computer



Get a lot of the fastest processors



Get a lot of memory per processor



Get the fastest network

CS

lecture 1



Get the fastest network



Hook it all together



And then what ???

Problem with Wile E. Coyote Architecture^ Von Neumann Machines not built for //ism



To get high speed, processors have

lots of state



Cache, stack, global memory



To tolerate latency, we need

fast context switch.

WHY?

No free lunch:

can’t have both

CS

lecture 1



No free lunch:

can’t have both



Certainly not if the processor was not designed for both



Memory wall: memory gets slower and slower



in terms of number of cycles it takes to access



Memory hierarchy gets more and more complex



Memory accesses block



No split phase memory access



BUT

that’s still what we use,

WHY?

Sequential vs Parallel Algorithms^ 

Efficient Parallel Algorithms



Use efficient sequential algorithms



Maximize parallelism

CS

lecture 1



Minimize overhead



synchronization, remote accesses



Efficiency is Architecture Dependent



Efficient Sequential Algorithms



Minimize time, space



Efficiency is portable



Efficient program on Pentium ~ Efficient program on Opteron

Parallel Programming Paradigms



Implicit parallel programming: Super Compilers^ 

Compiler extracts parallelism from

sequential code



Distributes data, creates and schedules

tasks



Complication:

side effects:

CS

lecture 1

the sequential order of reads and writes to a memorylocation determines the program outcome

a parallelizing compiler must obey the sequential order ofside effecting statements and still create //ism

pointers, aliases, indirect array reference make analyzingwhich statements access which locations hard or impossible

  • 35

years of compiler research has not brought much result.

Paradigms cont’^ 

Implicit parallel programming cont’



Simple, clean case: Functional Programming (FP)



Functions:

no side effects

, order of execution less constrained

F ( P(x,y), Q(y,z) )

P and Q can be executed

in parallel

F ( P(x,y), Q(y,z) )

P and Q can be executed

in parallel



Simple

single assigment

memory model

: no pointers, no

write after read or write after write hazards (dataflowsemantics)



FP was long doomed too high level too inefficient,because the simple memory model causes lots of copies



FP

is coming back:

MapReduce

approach in data

centers (Google) is a data parallel functional paradigm

CS

lecture 1

Example 1: Weather Prediction^ 

Area, segments



3000300011 cubic miles



.1.1.1 cubic mile:

11

segments

CS

lecture 1



Two day prediction



half hour time steps: ~ 100

time steps



Computation per segment



Temp, Pressure, Humidity, Wind speed, Wind direction for each time step in each segment



Assume ~ 100 FLOPs per time step per segment

Performance: Weather Prediction



Computational requirement: 10

15

FLOPs

assume one FLOP per clock cycle

CS

lecture 1

assume one FLOP per clock cycle



Fast serial computer:

4

GHz



Total serial time: 25*

4

sec ~

70

hours



Not too good for

48

hour weather

prediction

Example 2:

N body problem



Astronomy: bodies in space



Attract each other: Gravitational forceNewtons law O(n*n) calculations per “snapshot”

CS

lecture 1



O(n*n) calculations per “snapshot”



Galaxy: ~ 10

11

bodies

->

~ 10

22

calculations



Calculation 1 micro sec



Snapshot: 10

16

secs = ~

11

days = ~ 3*

8

years



Is parallelism going to help us? NO



What

does

help? Better algorithm: Barnes Hut



Divides the space in “quad tree”



Treats “far’ away

quads as one body

Other Challenging Applications^ 

Satellite data acquisition: billions of bits / sec



Satellite data processing



Pollution levels, Remote sensing of materials Image recognition

CS

lecture 1



Image recognition



Discrete optimization problems



Planning, Scheduling, VLSI design



Material, Weapons

modeling



Airplane/Satellite/Vehicle design



Internet (Google search)

ASICS cont’^ 

How much faster than General purpose?



Example: 1D 1024 FFT



General purpose machine (G4):

25 micro secs



ASIC device (MIT Lincoln Labs): 32 nano secs

CS

lecture 1



ASIC device (MIT Lincoln Labs): 32 nano secs



ASIC device uses 20 milliwatts (100 * less power)



Future designs:



2 tera ops

in small ( < cubic ft ) device



Target applications



FFT



Finite Impulse Response (FIR) Filters



Matrix multiply



QR decomposition

Background^ 

If you do not have necessarybackground in analysis of algorithms



See the book



Introduction to Algorithms by

CS

lecture 1

Introduction to Algorithms by



Cormen, Leiserson, Rivest and Stein



Or go online



Topics to study



Introduction



Growth of functions



Summations



Recurrences