+ All Categories
Home > Documents > Thinking in Parallel – Pipelining New Mexico Supercomputing Challenge in partnership with Intel...

Thinking in Parallel – Pipelining New Mexico Supercomputing Challenge in partnership with Intel...

Date post: 24-Dec-2015
Category:
Upload: bryan-morton
View: 213 times
Download: 0 times
Share this document with a friend
Popular Tags:
32
Thinking in Parallel – Pipelining New Mexico Supercomputing Challenge in partnership with Intel Corp. and NM EPSCoR
Transcript

Thinking in Parallel – Pipelining

New Mexico Supercomputing Challengein partnership with Intel Corp. and NM EPSCoR

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

Agenda

Definition review of pipelining

Steps involved in pipelining

Conceptual example of pipelining

Hands-on pipelining parallel activities

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.

Pipelining

Special kind of task decomposition

“Assembly line” parallelism

Example: 3D rendering in computer graphics

Processing 1 Data Set (Step Definitions)

Model: Determine position, size,

shape of objects in virtual world.

Project:Flatten 3D virtual world onto a 2D

plane, for a given point of view.

Clip:Constrain 2D

plane to logical window size.

Rasterize: Transfer logical window

contents to physical device.

Processing 1 Data Set (Step 1)

Processing one data set in 4 steps

RasterizeClipProjectModel

Processing 1 Data Set (Step 2)

RasterizeClipProjectModel

Processing 1 Data Set (Step 3)

RasterizeClipProjectModel

Processing 1 Data Set (Step 4)

RasterizeClipProjectModel

Processing 2 Data Sets (Step 1)

Using pipelining to process 2 data sets in 5 steps

RasterizeClipProjectModel RasterizeClipProjectModel

Processing 2 Data Sets (Step 2)

RasterizeClipProjectModel

Processing 2 Data Sets (Step 3)

RasterizeClipProjectModel

Processing 2 Data Sets (Step 4)

RasterizeClipProjectModel

Processing 2 Data Sets (Step 5)

RasterizeClipProjectModel

Processing 5 Data Sets (Step 1)

Data set 0

Data set 1

Data set 2

Data set 3

Data set 4

CPU 0 CPU 1 CPU 2 CPU 3

Processing 5 Data Sets (Step 2)

Data set 0

Data set 1

Data set 2

Data set 3

Data set 4

CPU 0 CPU 1 CPU 2 CPU 3

Processing 5 Data Sets (Step 3)

Data set 0

Data set 1

Data set 2

Data set 3

Data set 4

CPU 0 CPU 1 CPU 2 CPU 3

Processing 5 Data Sets (Step 4)

Data set 0

Data set 1

Data set 2

Data set 3

Data set 4

CPU 0 CPU 1 CPU 2 CPU 3

Processing 5 Data Sets (Step 5)

Data set 0

Data set 1

Data set 2

Data set 3

Data set 4

CPU 0 CPU 1 CPU 2 CPU 3

Processing 5 Data Sets (Step 6)

Data set 0

Data set 1

Data set 2

Data set 3

Data set 4

CPU 0 CPU 1 CPU 2 CPU 3

Processing 5 Data Sets (Step 7)

Data set 0

Data set 1

Data set 2

Data set 3

Data set 4

CPU 0 CPU 1 CPU 2 CPU 3

Processing 5 Data Sets (Step 8)

Data set 0

Data set 1

Data set 2

Data set 3

Data set 4

CPU 0 CPU 1 CPU 2 CPU 3

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

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.

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.

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?

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.

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.

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 2 Processor 3 Processor 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.

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?

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.


Recommended