Download presentation
Presentation is loading. Please wait.
Published byBryan Morton Modified over 9 years ago
1
Thinking in Parallel – Pipelining New Mexico Supercomputing Challenge in partnership with Intel Corp. and NM EPSCoR
2
Copyrights and Acknowledgments Intel and the Intel logo are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States or other countries. New Mexico EPSCoR Program is funded in part by the National Science Foundation award #0814449 and the State of New Mexico. Any opinions, findings, conclusions, or recommendations expressed in the material are those of the author(s) and do not necessarily reflect the views of the National Science Foundation. For questions about the Supercomputing Challenge, a 501(c)3 organization, contact us at: consult @ challenge.nm.org
3
Agenda Definition review of pipelining Steps involved in pipelining Conceptual example of pipelining Hands-on pipelining parallel activities
4
Methodology Domain decomposition – Used when the same operation is performed on a large number of similar data items. Task decomposition – Used when some different operations can be performed at the same time. Pipelining – Used when there are sequential operations on a large amount of data.
5
Pipelining Special kind of task decomposition “Assembly line” parallelism Example: 3D rendering in computer graphics
6
Processing 1 Data Set (Step Definitions)
7
Processing 1 Data Set (Step 1) Processing one data set in 4 steps
8
Processing 1 Data Set (Step 2)
9
Processing 1 Data Set (Step 3)
10
Processing 1 Data Set (Step 4)
11
Processing 2 Data Sets (Step 1) Using pipelining to process 2 data sets in 5 steps
12
Processing 2 Data Sets (Step 2)
13
Processing 2 Data Sets (Step 3)
14
Processing 2 Data Sets (Step 4)
15
Processing 2 Data Sets (Step 5)
16
Processing 5 Data Sets (Step 1)
17
Processing 5 Data Sets (Step 2)
18
Processing 5 Data Sets (Step 3)
19
Processing 5 Data Sets (Step 4)
20
Processing 5 Data Sets (Step 5)
21
Processing 5 Data Sets (Step 6)
22
Processing 5 Data Sets (Step 7)
23
Processing 5 Data Sets (Step 8)
24
Activity 1 – Domain Decomposition Your team will explore how to use domain decomposition to accomplish the job of stuffing, sealing, addressing, stamping, and mailing multiple envelopes. *See handout for detailed instructions
25
Activity 1 – Setup 1.Cut up sample address table, giving each processor a portion of the addresses. 2.Divide up the envelopes, stamps, and address labels so that each processor gets has the materials needed for their assigned sample addresses. 3.Give a pen or pencil to each processor. 4.Designate an area of the room to be the mailbox.
26
Activity 1 – Execution 1.After all of the processors are given the instructions, start timer. 2.Each processor should perform these steps as quickly as possible: a.Fold scrap paper. b.Stuff paper into envelope. c.Pretend to seal envelope (so we can re-use them later). d.Fix a stamp to the envelope. e.Complete an address label, for the next sample address. f.Fix address label to the envelope. g.Place envelope in the mail box. h.Repeat steps a - g for all sample addresses. 3.Stop timer.
27
Activity 1 – Debrief 1.Which task(s) took the longest? 2.Which task(s) took the shortest? 3.Were any processors idle for periods of time?
28
Activity 2 – Task Decomposition and Pipelining Your team will explore how to use a pipeline task decomposition of the job of folding, stuffing, sealing, addressing, stamping, and mailing multiple envelopes.
29
Activity 2 – Setup 1.Number the four team members as processor 1, 2, 3, and 4. 2.Give 16 pieces of scrap paper and 16 envelopes to processor 1. 3.Give 16 stamps to processor 2. 4.Give processor 3 sample addresses, 16 address labels, and a pen or pencil.
30
Activity 2 – Execution 1.After all of the processors are given the instructions, start timer. 2.Each processor should perform their required steps as quickly as possible, forwarding their completed work to the next processor, and repeating until all envelopes are stuffed, stamped, addressed, and mailed: 1.Stop Timer Processor 1 Processor 2Processor 3Processor 4 – Fold scrap paper. – Stuff paper into envelope. – Pretend to seal envelope (so we can re-use them later). – Fix a stamp to the envelope. – Complete an address label, for the next sample address. – Fix address label to the envelope. – Place envelope in the mail box.
31
Activity 2 – Debrief 1.Which task(s) took the longest? 2.Which task(s) took the shortest? 3.Were any processors idle for periods of time? 4.Was this approach faster than activity 1? a.If so, discuss reasons why. b.If not, discuss reasons why. 5.Do you think it would be possible to speed up this approach? How?
32
Optional Activity – Task Decomposition and Pipelining If time permits, have teams redistribute the tasks among the processors, to decrease idle time and overall time required for completion. For example: Multiple processors assigned to the same task. Multiple tasks assigned to one processor. Note: To ensure pipeline processing, a processor may not be assigned every task.
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.