3 10 07 11 15 26 36 tottime csep 524 parallel

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: hamberlain x+z z (idenCty for root) 27 0.1 Task 0 Scans, Step 2: Propagate Back 0.2 Task 1 0.3 Task 2 0.7 0.3 0.4 Task 3 0.5 Task 4 0.7 0.8 Task 6 0.6 Task 5 Task 7 1.5 1.1 x y z x+z 0.0 1.0 totTime CSEP 524: Parallel ComputaCon x+y Winter 2013: Chamberlain z (idenCty for root) 28 0.1 Task 0 Scans, Step 2: Propagate Back 0.2 Task 1 0.3 Task 2 0.7 0.3 0.0 0.3 0.4 Task 3 0.5 Task 4 0.7 0.8 Task 6 0.6 Task 5 Task 7 1.5 1.1 1.0 2.1 x y z x+z 0.0 1.0 totTime CSEP 524: Parallel ComputaCon x+y Winter 2013: Chamberlain z (idenCty for root) 29 Scans, Step 2: Propagate Back 0.1 0.2 Task 0 Task 1 0.0 0.1 0.0 0.3 0.3 0.4 Task 2 Task 3 0.3 0.6 0.5 0.6 Task 4 Task 5 1.0 1.5 0.7 0.8 Task 6 Task 7 2.1 2.8 1.0 2.1 x y z x+z 0.0 1.0 totTime CSEP 524: Parallel ComputaCon x+y Winter 2013: Chamberlain z (idenCty for root) 30 0.1 + 0.0 = 0.1 Scans, Step 3: Update Local Values 0.2 + 0.1 = 0.3 Task 0 Task 1 0.0 0.1 0.0 0.3 0.3 + 0.3 = 0.6 0.4 + 0.6 = 1.0 Task 2 Task 3 0.3 0.6 0.5 + 1.0 = 1.5 0.6 + 1.5 = 2.1 Task 4 Task 5 1.0 1.5 0.7 + 2.1 = 2.8 0.8 + 2.8 = 3.6 Task 6 Task 7 2.1 2.8 1.0 2.1 0.0 1.0 totTime CSEP 524: Parallel ComputaCon Winter 2013: Chamberlain 31 0.1 0.3 Task 0 Task 1 0.0 0.1 0.0 0.3 Scans, Step 4: Done 0.6 1.0 Task 2 Task 3 0.3 0.6 1.5 2.1 Task 4 Task 5 1.0 1.5 2.8 3.6 Task 6 Task 7 2.1 2.8 1.0 2.1 Depth: O(log2#tasks) Conten3on: O(1) 0.0 1.0 totTime CSEP 524: Parallel ComputaCon Winter 2013: Chamberlain 32 Scan: When would I ever use this? CSEP 524: Parallel ComputaCon Winter 2013: Chamberlain 33 Scan: When would I ever use this? Problem: Have p tasks write data to a file in parallel pleasingly! Trivial Case: Binary file (embarrassingly parallel) –  Each task can trivially compute where its data should go: 1)  seek to file offset: sizeof(type) * myTaskID 2)  write my data More Interes3ng Case: Text file –  Number of characters required per value may vary greatly –  So each task should: 1.  2.  3.  4.  compute # of characters required to print my value + ‘ ’ compute a sum- scan of the offsets seek to file offset corresponding to my result value write my data CSEP 524: Parallel...
View Full Document

This document was uploaded on 04/04/2014.

Ask a homework question - tutors are online