Download presentation

Presentation is loading. Please wait.

Published byIrma Garrett Modified about 1 year ago

1
Chapter 3 Interacting with Distributed Arrays Chung-Wei Chen, Department of Mathematics, National Taiwan University 2011/10/28

2
Outline Introduction to Beamformer Algorithm of Beamformer Code of Beamformer How to Debug Performance Introduction to Parrallel Pipelines

3
Introduction to BeamformerInteracting with Distributed Arrays3 Introduction to Beamformer

4
N b point sources Each source can emit waves of N f different frequencies Wave emitting pattern are recorded at time t 1, …, t Nt Introduction to BeamformerInteracting with Distributed Arrays4 t1t1 f 1, …, f Nf t2t2 t Nt f 1, …, f Nf Source 1 Source 2 Source Nb f 1, …, f Nf NtNt NbNb NfNf

5
Introduction to Beamformer There is a linear array of N s sensors to detect the wave emitting pattern Introduction to BeamformerInteracting with Distributed Arrays5 Source 1 Source 2 Source Nb Sensor 1 Sensor Ns Noise Steering Vector

6
Algorithm of BeamformerInteracting with Distributed Arrays6 Algorithm of Beamformer

7
Serial: Algorithm of BeamformerInteracting with Distributed Arrays7

8
Algorithm of Beamformer Parallel: Algorithm of BeamformerInteracting with Distributed Arrays8

9
Algorithm of Beamformer Interacting with Distributed Arrays9

10
Algorithm of Beamformer Interacting with Distributed Arrays10

11
Code of BeamformerInteracting with Distributed Arrays11 Code of Beamformer

12
Code of Beamformer (1/3) Code of BeamformerInteracting with Distributed Arrays12

13
Code of Beamformer (2/3) Code of BeamformerInteracting with Distributed Arrays13

14
Code of Beamformer (3/3) Code of BeamformerInteracting with Distributed Arrays14

15
How to DebugInteracting with Distributed Arrays15 How to Debug

16
Step 1: run the program in serial on the local machine with the distributed arrays turned off Step 2: run the program in serial on the local machine with the distributed arrays turned on Step 3: run the program in parallel on the local machine Step 4: run the program in parallel on the remote machine Step 5: run the program in parallel on the remote machine but with a problem size of interest How to DebugInteracting with Distributed Arrays16 How to Debug

17
Interacting with Distributed Arrays17 Step 1: run the program in serial on the local machine with the distributed arrays turned off Set PARALLEL=0 Add the following line to the end of the m-file: whos X0 X1 X2 X3 X0loc X1loc X2loc x3 myI_f myV Type pBeamformer at the MATLAB prompt This ensure the basic serial code is correct

18
How to DebugInteracting with Distributed Arrays18 How to Debug

19
Debug Step 2: run the program in serial on the local machine with the distributed arrays turned on Set PARALLEL=1 Type eval(pRUN(‘pBeamformer’,1,{})) at the MATLAB prompt This ensure the parallel code is correct How to DebugInteracting with Distributed Arrays19

20
How to Debug Interacting with Distributed Arrays20

21
How to Debug Step 3: run the program in parallel on the local machine Type eval(pRUN(‘pBeamformer’,4,{})) at the MATLAB prompt Type !type MatMPI\*.out or !more MatMPI/*.out to show the output from the other MATLABs This will detect errors introduced by communications How to DebugInteracting with Distributed Arrays21

22
How to DebugInteracting with Distributed Arrays22 How to Debug

23
Step 4: run the program in parallel on the remote machine Type eval(pRUN(‘pBeamformer’,4,{‘machine1’ ‘machine2’})) at the MATLAB prompt This will detect errors introduced by remote communications Step 5: run the program in parallel on the remote machine but with a problem size of interest How to DebugInteracting with Distributed Arrays23 How to Debug

24
PerformanceInteracting with Distributed Arrays24 Performance

25
Interacting with Distributed Arrays25 Performance in the book Performance of the machine Cambridge in City Cluster

26
Performance The loops of Stage 1 and 2 can be combined into one loop PerformanceInteracting with Distributed Arrays26

27
Introduction to Parallel PipelinesInteracting with Distributed Arrays27 Introduction to Parallel Pipelines

28
Interacting with Distributed Arrays28

29
Introduction to Parallel Pipelines Interacting with Distributed Arrays29 Stage iStage i+1 Original method

30
Parallel Piplines Introduction to Parallel Pipelines Interacting with Distributed Arrays30 Stage iStage i+1

31
Reference Interacting with Distributed Arrays31 “Parallel MATLAB for Multicore and Multinode Systems” by Jeremy Kepner, SIAM Press, 2009 Thanks for your attention!

Similar presentations

© 2016 SlidePlayer.com Inc.

All rights reserved.

Ads by Google