parallel animated image file generation
play

Parallel Animated Image File Generation Nishad Patel Department of - PowerPoint PPT Presentation

Parallel Animated Image File Generation Nishad Patel Department of Computer Science Rochester Institute of Technology May 2012 Introduction Animated images Parallel generation Agenda Background Framework Hypotheses


  1. Parallel Animated Image File Generation Nishad Patel Department of Computer Science Rochester Institute of Technology May 2012

  2. Introduction • Animated images • Parallel generation

  3. Agenda • Background • Framework • Hypotheses • Simulations • The File Format • Performance • Conclusions

  4. Background Parallel Simulation and Visualization Modern-day simulations • Limited resources • Large data – Study offline • Simulate over time – moving images • Difficulty - performance

  5. Background File formats • Lossless compression • Few formats exist – File size vs. Data Integrity • None support parallel generation • MNG – Multiple-image Network Graphics – Lossless – High compression (Network-oriented) – No support for parallel generation

  6. Framework • PJGMovie – int[][] matrix – PJGColorFrame • 24-bit Run-length encoding – PJGHueFrame • 24-bit Huffman encoding – PJGGrayFrame • 8-bit Huffman encoding

  7. Framework • write(frame) • writeColSlice(Range, frame) • writeRowSlice(Range, frame) • writePatch (Range, Range, frame) • getPixelDataSegmentParameters() • readSegment()

  8. Hypotheses • Serial PJM processing times vs. Parallel PJM processing times – Parallel PJM should be quicker • Post-processing times vs. In-situ processing times – In-situ processing should be quicker • PJM processing times vs. processing times for other formats – PJM processing times will be smaller • PJM file sizes vs. file sizes for other formats – PJM file sizes expected to be larger

  9. Simulations Belushov-Zhabotinsky Reaction • Temporally oscillating chemical reaction • Reaction-diffusion system • Three substrate model • Solution in 2-D plane • Equations defined in (Turner, 2009)* A + B -> 2A B + C -> 2B C + A -> 2C *Turner, A. (March 2009). A Simple Model of the Belousov-Zhabotinsky Reaction from First Principles. Implemenation Note, University College London, Bartlett School of Graduate Studies, London

  10. Simulations Belushov-Zhabotinsky Reaction • Reduced to a t+1 = a t + a t (b t − c t ) b t+1 = b t + b t (c t − a t ) c t+1 = c t + c t (a t − b t ) • Diffusion effect From Wikipedia en.wikipedia.org/wiki/File:The_Belousov-Zhabotinsky_Reaction.gif

  11. Simulations Belushov-Zhabotinsky Reaction Parallelizing the program • Split frames into slices

  12. Simulations Antiproton n-body simulation • All antiprotons have equal negative charges • Repulsive force between two antiprotons – Directly proportional to product of charges – Inversely proportional to distance between them • Perpendicular magnetic field – Forcing circular motion • Also in 2-D space

  13. Simulations Antiproton n-body simulation Position calculation: v' = v + δ a p' = p + δ v + 1/2 ( δ * δ ) a

  14. Simulations Antiproton n-body simulation Parallelizing the program • Split the antiprotons over the processes • Each process stores – Entire position array – Slice of velocity array – Slice of acceleration array • All-gather

  15. File Format • Header segment 0x00, 0x50, 0x4A, 0x4D, 0x00, 0x00, 0x00, 0x01 • Image type segment • Height segment • Width segment • Number of Frames segment • Frame rate segment • Creation time segment • Comment segment • Run length encoded 24-bit color pixel data segment • Huffman delta encoded 8-bit grayscale pixel data segment • Huffman delta encoded 24-bit hue pixel data segment

  16. Performance Serial PJM processing times vs. Parallel PJM processing times B-Z Reaction 200 x 200 400 x 400 NT T Speedup NT T Speedup Serial 17753 Serial 78486 1 19280 0.921 1 68876 1.140 2 9225 1.924 2 35217 2.229 3 6433 2.760 3 24214 3.241 4 5160 3.441 4 18713 4.194 8 3596 4.937 8 10541 7.446 Serial Post-processing vs Parallel Post- Serial Post-processing vs Parallel Post- processing processing 100000 Running Times (msecs) Running Times (msecs) 10000 400 x 400 200 x 200 10000 1000 1 10 1 10 Number of Threads Number of Threads

  17. Performance Post-processing times vs. In-situ processing times 200 x 200 B-Z Reaction 400 x 400 NT T TT Speedup NT T TT Speedup 1 16129 43734 2.712 1 74079 175886 2.374 2 8634 22036 2.552 2 36071 88119 2.442 3 6206 15335 2.471 3 24436 60197 2.463 4 4982 12198 2.448 4 18848 46599 2.472 8 3299 7906 2.396 8 11141 34181 3.068 Post-processing vs Insitu-processing Post-processing vs Insitu-processing 100000 Running Times (msecs) Running Times (msecs) 100000 Post-processing 10000 Insitu-processing 1000 10000 1 10 1 10 Number of Threads Number of Threads

  18. Performance Post-processing times vs. In-situ processing times Antiproton Simulation NT T TT Speedup Serial 200182 202010 1.009 400 Antiprotons 1 194127 192680 0.993 2 118412 120321 1.016 3 98029 100449 1.025 4 84279 85547 1.015 Post-processing vs Insitu-processing 8 77303 78574 1.016 Running Times (msecs) Post-processing Insitu-processing 50000 1 10 Number of Threads

  19. Performance PJM processing times vs. processing times for other formats B-Z Reaction 200 x 200 400 x 400 NT T Speedup NT T Speedup MNG File 22527 MNG File 108769 1 16129 1.397 1 74079 1.468 2 8634 2.609 2 36071 3.015 3 6206 3.630 3 24436 4.451 4 4982 4.521 4 18848 5.771 8 3299 6.828 8 11141 9.762 PJM vs MNG PJM vs MNG 100000 Running Times (msecs) 10000 PJM MNG 1000 10000 1 10 1 10 Number of Threads Number of Threads

  20. Performance PJM processing times vs. processing times for other formats Antiproton Simulation NP T TM Speedup 200 Antiprotons 1 54058 175979 3.255 2 41873 161936 3.867 3 39719 161859 4.076 4 41351 163864 3.963 8 53834 177052 3.289 PJM vs MNG Running Times (msecs) 100000 MNG PJM 10000 1 10 Number of Threads

  21. Performance PJM file sizes vs. File sizes for other formats MNG bytes PJM bytes Larger by % 200 x 200 pixels 20901545 22578512 8.023 400 x 400 pixels 83593947 91148715 9.037 PJM vs MNG 100000000 90000000 80000000 70000000 File size (bytes) 60000000 50000000 MNG 40000000 PJM 30000000 20000000 10000000 0 200 x 200 400 x 400 Size of image

  22. Performance PJM file sizes vs. File sizes for other formats MNG bytes MNG bytes PJM bytes Larger by % Larger by % Antiprotons Compression 1 Compression 9 Compression 1 Compression 9 200 420515 116927 241407 -42.593 106.457 400 451694 129942 277286 -38.612 113.921 PJM vs MNG 500000 450000 400000 350000 File size (bytes) 300000 250000 MNG 1 200000 PJM 150000 MNG 9 100000 50000 0 200 400 Number of Antiprotons (N)

  23. Conclusions • Serial PJM processing times vs. Parallel PJM processing times – Parallel PJM is quicker • Post-processing times vs. In-situ processing times – In-situ processing is quicker • PJM processing times vs. processing times for other formats – PJM processing times are smaller • PJM file sizes vs. file sizes for other formats – PJM file sizes expected are larger - generally

  24. Future Work • Delta encoding • Player features

  25. Thank you. • Questions?

Recommend


More recommend