MATLAB*P 2.0: User Friendly, Interactive Environment for Parallel Scientific Computing

18
MATLAB*P 2.0: User Friendly, Interactive Environment for Parallel Scientific Computing Ron Choy, Alan Edelman Ron Choy, Alan Edelman Lab. For Computer Science Lab. For Computer Science MIT MIT

description

MATLAB*P 2.0: User Friendly, Interactive Environment for Parallel Scientific Computing. Ron Choy, Alan Edelman Lab. For Computer Science MIT. MATLAB*P: a parallel MATLAB project. We all love MATLAB It’s useful for numerical experiments as well as for real production systems - PowerPoint PPT Presentation

Transcript of MATLAB*P 2.0: User Friendly, Interactive Environment for Parallel Scientific Computing

Page 1: MATLAB*P 2.0: User Friendly, Interactive Environment for Parallel Scientific Computing

MATLAB*P 2.0: User Friendly, Interactive Environment for

Parallel Scientific ComputingRon Choy, Alan EdelmanRon Choy, Alan Edelman

Lab. For Computer ScienceLab. For Computer Science

MITMIT

Page 2: MATLAB*P 2.0: User Friendly, Interactive Environment for Parallel Scientific Computing

MATLAB*P: a parallel MATLAB project We all love MATLABWe all love MATLAB It’s useful for numerical experiments as It’s useful for numerical experiments as

well as for real production systemswell as for real production systems Don’t you wish it runs faster?Don’t you wish it runs faster?

Page 3: MATLAB*P 2.0: User Friendly, Interactive Environment for Parallel Scientific Computing

Outline

Project backgroundProject background The systemThe system How to use?How to use? BenchmarksBenchmarks

Page 4: MATLAB*P 2.0: User Friendly, Interactive Environment for Parallel Scientific Computing

Why parallel MATLAB

MATLAB only runs on single processorMATLAB only runs on single processor It was fine before, but the size of interesting It was fine before, but the size of interesting

problems grows faster than CPU speedproblems grows faster than CPU speed Solution:Solution:

Use compiled language – hard(er)Use compiled language – hard(er) Make a parallel MATLABMake a parallel MATLAB

Page 5: MATLAB*P 2.0: User Friendly, Interactive Environment for Parallel Scientific Computing

Parallel MATLAB Survey

26 projects26 projects 4 approaches4 approaches

Message passingMessage passing Embarrassingly parallelEmbarrassingly parallel CompilationCompilation Backend support MATLAB*PBackend support MATLAB*P

Page 6: MATLAB*P 2.0: User Friendly, Interactive Environment for Parallel Scientific Computing

MATLAB*P

Provide a parallel backend to MATLABProvide a parallel backend to MATLAB Backend is based on popular numerical Backend is based on popular numerical

libraries:libraries: ScaLAPACKScaLAPACK FFTWFFTW PARPACKPARPACK ……

Page 7: MATLAB*P 2.0: User Friendly, Interactive Environment for Parallel Scientific Computing

Focus

Require minimal learning on user’s partRequire minimal learning on user’s part Reuse of existing scriptsReuse of existing scripts Mimic MATLAB behaviourMimic MATLAB behaviour Data stay on backend until explicitly Data stay on backend until explicitly

retrieved by userretrieved by user Extendable backendExtendable backend

Page 8: MATLAB*P 2.0: User Friendly, Interactive Environment for Parallel Scientific Computing

Example

A = randn(1024*p,1024*p);A = randn(1024*p,1024*p); E = eig(A);E = eig(A); e = pp2matlab(E);e = pp2matlab(E); plot(e,’*’);plot(e,’*’);

Page 9: MATLAB*P 2.0: User Friendly, Interactive Environment for Parallel Scientific Computing
Page 10: MATLAB*P 2.0: User Friendly, Interactive Environment for Parallel Scientific Computing

Example 2

J = 1:n;J = 1:n; J = J(ones(n,1),:);J = J(ones(n,1),:); I = J’;I = J’; E = ones(n,n);E = ones(n,n); H = E./(I+J-1);H = E./(I+J-1);

Page 11: MATLAB*P 2.0: User Friendly, Interactive Environment for Parallel Scientific Computing

Example 3

d = randn(10000*p,1);d = randn(10000*p,1); a = 1:9999*P;a = 1:9999*P; z = mm(‘chi2rnd’,a);z = mm(‘chi2rnd’,a); e = stebz(d,z)e = stebz(d,z)

Page 12: MATLAB*P 2.0: User Friendly, Interactive Environment for Parallel Scientific Computing

Example 4

Index = 1:100*p;Index = 1:100*p; B = mm(‘mywork’, Index);B = mm(‘mywork’, Index);

Page 13: MATLAB*P 2.0: User Friendly, Interactive Environment for Parallel Scientific Computing

Visualization package

A term project done by a group of students A term project done by a group of students in a parallel computing class at MITin a parallel computing class at MIT

Provides the equivalent of mesh, surf and Provides the equivalent of mesh, surf and spy to distributed matricesspy to distributed matrices

Page 14: MATLAB*P 2.0: User Friendly, Interactive Environment for Parallel Scientific Computing
Page 15: MATLAB*P 2.0: User Friendly, Interactive Environment for Parallel Scientific Computing

Benchmarks

Does all this power and convenience come Does all this power and convenience come at a cost?at a cost?

Sadly it doesSadly it does Communication between MATLAB and Communication between MATLAB and

serverserver Data distribution to mimic MATLAB Data distribution to mimic MATLAB

Good news: it amortizesGood news: it amortizes

Page 16: MATLAB*P 2.0: User Friendly, Interactive Environment for Parallel Scientific Computing
Page 17: MATLAB*P 2.0: User Friendly, Interactive Environment for Parallel Scientific Computing
Page 18: MATLAB*P 2.0: User Friendly, Interactive Environment for Parallel Scientific Computing

To obtain more information …

Parallel MATLAB surveyParallel MATLAB survey http://supertech.lcs.mit.edu/~cly/survey.hhttp://supertech.lcs.mit.edu/~cly/survey.h

tmltml MATLAB*P homepageMATLAB*P homepage

http://supertech.lcs.mit.edu/~cly/matlabp.http://supertech.lcs.mit.edu/~cly/matlabp.htmlhtml

My email address: [email protected] email address: [email protected]