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

parallel animated image file generation
SMART_READER_LITE
LIVE PREVIEW

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


slide-1
SLIDE 1

Parallel Animated Image File Generation

Nishad Patel Department of Computer Science Rochester Institute of Technology May 2012

slide-2
SLIDE 2

Introduction

  • Animated images
  • Parallel generation
slide-3
SLIDE 3

Agenda

  • Background
  • Framework
  • Hypotheses
  • Simulations
  • The File Format
  • Performance
  • Conclusions
slide-4
SLIDE 4

Background

Parallel Simulation and Visualization Modern-day simulations

  • Limited resources
  • Large data

– Study offline

  • Simulate over time – moving images
  • Difficulty - performance
slide-5
SLIDE 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

slide-6
SLIDE 6

Framework

  • PJGMovie

– int[][] matrix – PJGColorFrame

  • 24-bit Run-length encoding

– PJGHueFrame

  • 24-bit Huffman encoding

– PJGGrayFrame

  • 8-bit Huffman encoding
slide-7
SLIDE 7

Framework

  • write(frame)
  • writeColSlice(Range, frame)
  • writeRowSlice(Range, frame)
  • writePatch (Range, Range, frame)
  • getPixelDataSegmentParameters()
  • readSegment()
slide-8
SLIDE 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

slide-9
SLIDE 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

slide-10
SLIDE 10

Simulations

Belushov-Zhabotinsky Reaction

  • Reduced to

at+1 = at + at (bt − ct ) bt+1 = bt + bt (ct − at ) ct+1 = ct + ct (at − bt )

  • Diffusion effect

From Wikipedia en.wikipedia.org/wiki/File:The_Belousov-Zhabotinsky_Reaction.gif

slide-11
SLIDE 11

Simulations

Belushov-Zhabotinsky Reaction Parallelizing the program

  • Split frames into slices
slide-12
SLIDE 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
slide-13
SLIDE 13

Simulations

Antiproton n-body simulation Position calculation:

v' = v + δ a p' = p + δ v + 1/2 (δ*δ) a

slide-14
SLIDE 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
slide-15
SLIDE 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
slide-16
SLIDE 16

Performance

Serial PJM processing times vs. Parallel PJM processing times

NT T Speedup Serial 17753 1 19280 0.921 2 9225 1.924 3 6433 2.760 4 5160 3.441 8 3596 4.937 NT T Speedup Serial 78486 1 68876 1.140 2 35217 2.229 3 24214 3.241 4 18713 4.194 8 10541 7.446

1000 10000 1 10 Running Times (msecs) Number of Threads

Serial Post-processing vs Parallel Post- processing

200 x 200 10000 100000 1 10 Running Times (msecs) Number of Threads

Serial Post-processing vs Parallel Post- processing

400 x 400

B-Z Reaction 400 x 400 200 x 200

slide-17
SLIDE 17

Performance

Post-processing times vs. In-situ processing times

NT T TT Speedup 1 16129 43734 2.712 2 8634 22036 2.552 3 6206 15335 2.471 4 4982 12198 2.448 8 3299 7906 2.396

1000 10000 100000 1 10 Running Times (msecs) Number of Threads

Post-processing vs Insitu-processing

Post-processing Insitu-processing

NT T TT Speedup 1 74079 175886 2.374 2 36071 88119 2.442 3 24436 60197 2.463 4 18848 46599 2.472 8 11141 34181 3.068

10000 100000 1 10 Running Times (msecs) Number of Threads

Post-processing vs Insitu-processing

B-Z Reaction 200 x 200 400 x 400

slide-18
SLIDE 18

Performance

Post-processing times vs. In-situ processing times

NT T TT Speedup Serial 200182 202010 1.009 1 194127 192680 0.993 2 118412 120321 1.016 3 98029 100449 1.025 4 84279 85547 1.015 8 77303 78574 1.016

50000 1 10 Running Times (msecs) Number of Threads

Post-processing vs Insitu-processing

Post-processing Insitu-processing

Antiproton Simulation 400 Antiprotons

slide-19
SLIDE 19

Performance

PJM processing times vs. processing times for other formats

NT T Speedup MNG File 22527 1 16129 1.397 2 8634 2.609 3 6206 3.630 4 4982 4.521 8 3299 6.828

1000 10000 1 10 Running Times (msecs) Number of Threads

PJM vs MNG

PJM MNG

NT T Speedup MNG File 108769 1 74079 1.468 2 36071 3.015 3 24436 4.451 4 18848 5.771 8 11141 9.762

10000 100000 1 10 Number of Threads

PJM vs MNG

200 x 200 400 x 400 B-Z Reaction

slide-20
SLIDE 20

Performance

PJM processing times vs. processing times for other formats

NP T TM Speedup 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

10000 100000 1 10 Running Times (msecs) Number of Threads

PJM vs MNG

MNG PJM

Antiproton Simulation 200 Antiprotons

slide-21
SLIDE 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

10000000 20000000 30000000 40000000 50000000 60000000 70000000 80000000 90000000 100000000 200 x 200 400 x 400 File size (bytes) Size of image

PJM vs MNG

MNG PJM

slide-22
SLIDE 22

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

50000 100000 150000 200000 250000 300000 350000 400000 450000 500000 200 400 File size (bytes) Number of Antiprotons (N)

PJM vs MNG

MNG 1 PJM MNG 9

Performance

PJM file sizes vs. File sizes for other formats

slide-23
SLIDE 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

slide-24
SLIDE 24

Future Work

  • Delta encoding
  • Player features
slide-25
SLIDE 25
slide-26
SLIDE 26

Thank you.

  • Questions?