16
Science Advisory Committee Meeting - 2 September 3, 2010 • Stanford University 04_Parallel Processing Parallel Processing Majid AlMeshari John W. Conklin

Parallel Processing Majid AlMeshari John W. Conklin

  • Upload
    bian

  • View
    25

  • Download
    0

Embed Size (px)

DESCRIPTION

Parallel Processing Majid AlMeshari John W. Conklin. Outline. Challenge Requirements Resources Approach Status Tools for Processing. Challenge. - PowerPoint PPT Presentation

Citation preview

Page 1: Parallel Processing Majid AlMeshari John W. Conklin

Science Advisory Committee Meeting - 20September 3, 2010 • Stanford University

104_Parallel Processing

Parallel Processing

Majid AlMeshariJohn W. Conklin

Page 2: Parallel Processing Majid AlMeshari John W. Conklin

Science Advisory Committee Meeting - 20

2

September 3, 2010 • Stanford University

04_Parallel Processing

Outline• Challenge• Requirements• Resources• Approach• Status• Tools for Processing

Page 3: Parallel Processing Majid AlMeshari John W. Conklin

Science Advisory Committee Meeting - 20

3

September 3, 2010 • Stanford University

04_Parallel Processing

Challenge

A computationally intensive algorithm is applied on a huge set of data. Verification of filter’s correctness takes a long time and hinders progress.

Page 4: Parallel Processing Majid AlMeshari John W. Conklin

Science Advisory Committee Meeting - 20

4

September 3, 2010 • Stanford University

04_Parallel Processing

Requirements• Achieve a speed-up between 5-10x over serial version• Minimize parallelization overhead• Minimize time to parallelize new releases of code• Achieve reasonable scalability

1 4 8 16 200

2000

4000

6000

8000

10000

12000

14000

16000

18000

20000

bayes., finalizecompile infoestimation (fit)distribute Jcompute Jh(x)initialization

Number of Processors

Tim

e (s

ec)

SAC 19

Page 5: Parallel Processing Majid AlMeshari John W. Conklin

Science Advisory Committee Meeting - 20

5

September 3, 2010 • Stanford University

04_Parallel Processing

Resources• Hardware

– Computer Cluster (Regelation), a 44 64-bit CPUs »64-bit enables us to address a memory space beyond 4 GB»Using this cluster because:

(a) likely will not need more than 44 processors(b) same platform as our Linux boxes

• Software– MatlabMPI

»Matlab parallel computing toolbox created by MIT Lincoln Lab

»Eliminates the need to port our code into another language

Page 6: Parallel Processing Majid AlMeshari John W. Conklin

Science Advisory Committee Meeting - 20

6

September 3, 2010 • Stanford University

04_Parallel Processing

Approach - Serial Code StructureInitialization

Loop over iterations

Loop Gyros

Loop over orbits

Loop over Segments

Build h(x)(the right hand side)

Build Jacobian, J(x)

Load data (Z), perform fitBayesian estimation,

display results

Computationally Intensive

Components

(Parallelize!!!)

Page 7: Parallel Processing Majid AlMeshari John W. Conklin

Science Advisory Committee Meeting - 20

7

September 3, 2010 • Stanford University

04_Parallel Processing

Approach - Parallel Code StructureInitialization

Loop over iterationsLoop Gyros

Loop over orbitsLoop over Segments

Build h(x)

Build Jacobian, J(x)

Bayesian estimation, display results

Distribute J(x), all nodes

Load data (Z), perform fitLoop over partial orbits

Send information matrices to master & combine

In parallel, split up by columns of J(x)

In parallel, split up by orbits

Custom data distribution code

required (Overhead)

Page 8: Parallel Processing Majid AlMeshari John W. Conklin

Science Advisory Committee Meeting - 20

8

September 3, 2010 • Stanford University

04_Parallel Processing

Code in Action

. . . . . . . . .

. . . . . . . . .

Go

for n

ext G

yro,

Seg

men

t

Go

for

anot

her

Iter

atio

n

Initialization

Compute hand Partial J

Sync PointGet Complete J

Perform Fit

Sync PointCombine Info Matrix

Bayesian EstimationAnother Iteration?

Split by Columns of J

Split by Rows of J

Page 9: Parallel Processing Majid AlMeshari John W. Conklin

Science Advisory Committee Meeting - 20

9

September 3, 2010 • Stanford University

04_Parallel Processing

Parallelization Techniques - 1• Minimize inter-processor communication

– Use MatlabMPI for one-to-one communication only– Use a custom approach for one-to-many communication

Processors

Tim

e (S

ec) Comm time with

custom approachComm time with

MPI

Page 10: Parallel Processing Majid AlMeshari John W. Conklin

Science Advisory Committee Meeting - 20

10

September 3, 2010 • Stanford University

04_Parallel Processing

Parallelization Techniques - 2• Balance processing load among processors

Load per processor = ∑ length(reducedVectork)*(computationWeightk + diskIOWeight)

k: {RT, Tel, Cg, TFM, S0}

Processors

Tim

e (S

ec) CPUs have

uniform load

Page 11: Parallel Processing Majid AlMeshari John W. Conklin

Science Advisory Committee Meeting - 20

11

September 3, 2010 • Stanford University

04_Parallel Processing

Parallelization Techniques - 3• Minimize memory footprint of slave code

– Tightly manage memory to prevent swapping to disk, or “out of memory” errors

– We managed to save ~40% of RAM per processor and never seen “out of memory” since

Page 12: Parallel Processing Majid AlMeshari John W. Conklin

Science Advisory Committee Meeting - 20

12

September 3, 2010 • Stanford University

04_Parallel Processing

Parallelization Techniques - 4• Find contention points

– Cache what can be cached– Optimize what can be optimized

Tim

e (S

ec)

Page 13: Parallel Processing Majid AlMeshari John W. Conklin

Science Advisory Committee Meeting - 20

13

September 3, 2010 • Stanford University

04_Parallel Processing

Status – Current Speed up

Number of Processors

Spe

edup

Page 14: Parallel Processing Majid AlMeshari John W. Conklin

Science Advisory Committee Meeting - 20

14

September 3, 2010 • Stanford University

04_Parallel Processing

Tools for Processing - 1• Run Manager/Scheduler/Version Controller

– Built by Ahmad Aljadaan– Given a batch of options files, it schedules batches of runs,

serial or parallel, on cluster – Facilitates version control by creating a unique directory for

each run with its options file, code and results– Used with large number of test cases– Helped us schedule 1048+ runs since January 2010

» and counting…

Page 15: Parallel Processing Majid AlMeshari John W. Conklin

Science Advisory Committee Meeting - 20

15

September 3, 2010 • Stanford University

04_Parallel Processing

Tools for Processing - 2• Result Viewer

– Built by Ahmad Aljadaan– Allows searching for runs, displays results, plots related

charts– Facilitates comparison of results

Page 16: Parallel Processing Majid AlMeshari John W. Conklin

Science Advisory Committee Meeting - 20

16

September 3, 2010 • Stanford University

04_Parallel Processing

Questions