distributed and parallel computing with matlab

28
© 2007 The MathWorks, Inc. ® ® Distributed and Parallel Computing with MATLAB ®

Upload: others

Post on 12-Sep-2021

15 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Distributed and Parallel Computing with MATLAB

© 2

007

Th

e M

athW

orks

, In

c.

® ®

Distributed and Parallel Computing with MATLAB®

Page 2: Distributed and Parallel Computing with MATLAB

2

® ®

Example: Land Classification

National Land Cover Dataset from U.S. Geological Survey (~30GB)

“Where are wetlands, forests, etc concentrated?” “How does the distribution compare with other datasets?”

Page 3: Distributed and Parallel Computing with MATLAB

3

® ®

Long-running &

computationally

intensive

Solving Big Technical Problems

Large data set

Problem

Wait

Load data onto multiple machines that work together in parallel

Solutions

Run similar tasks on independent processors in parallel

Reduce sizeof problem

You could…

Page 4: Distributed and Parallel Computing with MATLAB

4

® ®

Single processor Multi-core Multi-processor Clusters Grids

From Single Processor to Grids

Page 5: Distributed and Parallel Computing with MATLAB

5

® ®

Distributed Computing with MATLAB

Solves two types of problems:

1. Problems that take too much time

3. Problems that involve too much data

Page 6: Distributed and Parallel Computing with MATLAB

6

® ®

Parallel and Distributed Computing with MATLAB

DistributedComputing

ToolboxTOOLBOXES

BLOCKSETS

Computer Cluster

CPU

CPU

CPU

CPU

MATLAB Distributed Computing Engine

Scheduler

Worker

Worker

Worker

Worker

Page 7: Distributed and Parallel Computing with MATLAB

7

® ®

Agenda

Task-parallel applications (too much time)

Data-parallel applications (too much data)

Operational Requirements

Page 8: Distributed and Parallel Computing with MATLAB

8

® ®

Multiple independent problems

Page 9: Distributed and Parallel Computing with MATLAB

9

® ®

Agenda

Task-parallel applications (too much time)

Data-parallel applications (too much data)

Operational Requirements

Page 10: Distributed and Parallel Computing with MATLAB

10

® ®

Large Data Sets (Data Parallel)

11 26 41

12 27 42

13 28 43

14 29 44

15 30 45

16 31 46

17 32 47

17 33 48

19 34 49

20 35 50

21 36 51

22 37 52

11 26 41

12 27 42

13 28 43

14 29 44

15 30 45

16 31 46

17 32 47

17 33 48

19 34 49

20 35 50

21 36 51

22 37 52

Page 11: Distributed and Parallel Computing with MATLAB

11

® ®

Job

Page 12: Distributed and Parallel Computing with MATLAB

12

® ®

Page 13: Distributed and Parallel Computing with MATLAB

13

® ®

Parallel for loops

parfor (i = 1 : n)

% do something with i

end

Run loops on a pool of MATLAB resources

Iterations must be order-independent

M-Lint analysis helps to identify if existing for loops can be changed to parfor

Page 14: Distributed and Parallel Computing with MATLAB

14

® ®

Using FORTRAN and MPI Using MATLAB and MPI

Using Distributed Arrays

P>> E = D’

Transposing a Distributed Matrix

Page 15: Distributed and Parallel Computing with MATLAB

15

® ®

Agenda

Task-parallel applications (too much time)

Data-parallel applications (too much data)

Operational Requirements

Page 16: Distributed and Parallel Computing with MATLAB

Run four local workers with a DCT license

Experiment with explicit parallelism on multi-core machines

Develop parallel applications on local computer

Take full advantage of desktop power

No separate computing cluster required

Distributed Computing

Toolbox

Page 17: Distributed and Parallel Computing with MATLAB

Supported on all MATLAB platforms

Page 18: Distributed and Parallel Computing with MATLAB

Flexible Hardware

Homogeneous cluster Heterogeneous cluster

Page 19: Distributed and Parallel Computing with MATLAB

19

Computer cluster

CPU

CPU

CPU

CPU

MATLAB Distributed Computing Engine

Scheduler

Client Machine

Third Party Schedulers

DistributedComputing

ToolboxTOOLBOXES

BLOCKSETS

Third-PartyScheduler

Page 20: Distributed and Parallel Computing with MATLAB

20

Computer cluster

CPU

CPU

CPU

CPUScheduler

Worker

Worker

Worker

Worker

Dynamic Licensing

Page 21: Distributed and Parallel Computing with MATLAB

21

Computer cluster

CPU

CPU

CPU

CPUScheduler

Worker

Worker

Worker

Worker

Dynamic Licensing

Page 22: Distributed and Parallel Computing with MATLAB

22

Computer cluster

CPU

CPU

CPU

CPUScheduler

Worker

Worker

Worker

Worker

Dynamic Licensing

Page 23: Distributed and Parallel Computing with MATLAB

23

Computer cluster

CPU

CPU

CPU

CPUScheduler

Worker

Worker

Worker

Worker

Dynamic Licensing

Page 24: Distributed and Parallel Computing with MATLAB

24

® ®

Research Engineers Advance Design of the International Linear Collider with MathWorks Tools

The ChallengeTo design a control system for ensuring the precise alignment of particle beams in the International Linear Collider

The SolutionUse MATLAB, Simulink, the Distributed Computing Toolbox, and the Instrument Control Toolbox to design, model, and simulate the accelerator and alignment control system

The Results Simulation time reduced by an order of magnitude Development integrated Existing work leveraged

“With the Distributed Computing

Toolbox, we saw a linear

improvement in speed. MathWorks

tools have enabled us to accomplish

work that was once impossible."

Dr. Glen White, University of London

Page 25: Distributed and Parallel Computing with MATLAB

25

® ®

“Using the Distributed Computing

Toolbox, we simply deployed our

simulation on a large group cluster.

We saw a linear improvement in

speed, and we could run 100

simulations at once. MathWorks tools

have enabled us to accomplish work

that was once impossible.”

Dr. Glen White,

Queen Mary, University of London

The ChallengeTo design a control system for ensuring theprecise alignment of particle beams in theInternational Linear Collider

The SolutionUse MATLAB, Simulink, the Distributed Computing Toolbox, and the Instrument Control Toolbox todesign, model, and simulate the accelerator andalignment control system

The Results Simulation time reduced by an order of magnitude Development integrated Existing work leveraged

Research Engineers Advance Design of the International Linear Collider withMathWorks Tools

Queen Mary high-throughput cluster

Page 26: Distributed and Parallel Computing with MATLAB

26

® ®

University of Geneva Develops Advanced Portfolio Optimization Techniques with MathWorks Tools

The ChallengeTo develop and implement a general-purpose,data-driven heuristic for portfolio optimization

The SolutionUse MATLAB® and Distributed Computing Toolbox to develop algorithms, visualize results, and rapidly compute solutions

The Results Solutions found in minutes Efficiency improved through visualization Students gain practical experience

“For years I have said that people

who use Excel or C to do advanced

financial analysis are wasting their

time. For any kind of numerical

computation, I can’t see using

anything other than MATLAB.”

Professor Manfred Gilli,

University of Geneva

Objective function for value-at-risk minimization for a portfolio ofthree assets.

Page 27: Distributed and Parallel Computing with MATLAB

27

® ®

EIM Group Develops Quantitative Tools for Hedge Fund Portfolio Management

The ChallengeTo develop quantitative tools for hedge fund portfolio optimization and analysis

The SolutionUse MathWorks tools to develop distributed algorithms and models, accelerate simulation, and streamline user interface development and deployment

The Results Development time cut in half Simulation time reduced by 80% Development and deployment streamlined

“With MathWorks tools, we

provide answers to complex

portfolio management questions

rapidly. Responding quickly to

our clients with quantitative

analysis is a competitive

advantage for EIM.”Dr. Stéphane Daul,

EIM Group

Application developed with MATLAB ® to access simulation results and perform calculations.

Page 28: Distributed and Parallel Computing with MATLAB

28

® ®

Massachusetts Institute of Technology Integrates Cancer Research in the Lab and Classroom with MathWorks Tools

The ChallengeTo improve diagnostic techniques for cancer by identifying proteins and analyzing their interactions

The SolutionUse MathWorks tools to enable students and researchers to analyze mass spectrometry data, model complex protein interactions, and visualize results

The Results Education integrated with research Computation time shortened by an order of

magnitude Research grant won

“Using a distributed approach

with MATLAB® code, we ran our

analysis on a computer cluster

and reduced computation time

by an order of magnitude—from

about a week to much less than

a day.”-- Dr. Gil Alterovitz,

MIT and Harvard

University

3-D visualization of the human massome of protein interactions.