fluidsim - parallel fluid particle simulation and ......
TRANSCRIPT
![Page 1: FluidSim - Parallel fluid particle simulation and ... Parallelfluidparticlesimulationandvisualization PaulBienkowski 2bienkow@informatik.uni-hamburg.de by UNIVERSITÄTHAMBURG PRAKTIKUM„PARALLELEPROGRAMMIERUNG”](https://reader033.vdocument.in/reader033/viewer/2022052421/5b3e7b0e7f8b9afd4f8b479a/html5/thumbnails/1.jpg)
FluidSimParallel fluid particle simulation and visualization
Paul [email protected]
by
UNIVERSITÄT HAMBURGPRAKTIKUM „PARALLELE PROGRAMMIERUNG”
September 24, 2014
![Page 2: FluidSim - Parallel fluid particle simulation and ... Parallelfluidparticlesimulationandvisualization PaulBienkowski 2bienkow@informatik.uni-hamburg.de by UNIVERSITÄTHAMBURG PRAKTIKUM„PARALLELEPROGRAMMIERUNG”](https://reader033.vdocument.in/reader033/viewer/2022052421/5b3e7b0e7f8b9afd4f8b479a/html5/thumbnails/2.jpg)
Contents
2/25
1 – Introduction1.1 Motivation1.2 Particle Model1.3 Force Model
2 – The Simulator2.1 Parallelization2.2 Synchronization2.3 Data output
3 – The Visualizer3.1 Basic Technology3.2 Data Transfer
4 – Results4.1 Did it work?4.2 Live Demonstration4.3 Performance4.4 Difficulties4.5 Problems
5 – Conclusion
![Page 3: FluidSim - Parallel fluid particle simulation and ... Parallelfluidparticlesimulationandvisualization PaulBienkowski 2bienkow@informatik.uni-hamburg.de by UNIVERSITÄTHAMBURG PRAKTIKUM„PARALLELEPROGRAMMIERUNG”](https://reader033.vdocument.in/reader033/viewer/2022052421/5b3e7b0e7f8b9afd4f8b479a/html5/thumbnails/3.jpg)
Introduction 3/25
Introduction
![Page 4: FluidSim - Parallel fluid particle simulation and ... Parallelfluidparticlesimulationandvisualization PaulBienkowski 2bienkow@informatik.uni-hamburg.de by UNIVERSITÄTHAMBURG PRAKTIKUM„PARALLELEPROGRAMMIERUNG”](https://reader033.vdocument.in/reader033/viewer/2022052421/5b3e7b0e7f8b9afd4f8b479a/html5/thumbnails/4.jpg)
Motivation
Introduction 4/25
![Page 5: FluidSim - Parallel fluid particle simulation and ... Parallelfluidparticlesimulationandvisualization PaulBienkowski 2bienkow@informatik.uni-hamburg.de by UNIVERSITÄTHAMBURG PRAKTIKUM„PARALLELEPROGRAMMIERUNG”](https://reader033.vdocument.in/reader033/viewer/2022052421/5b3e7b0e7f8b9afd4f8b479a/html5/thumbnails/5.jpg)
Motivation
Introduction 4/25
![Page 6: FluidSim - Parallel fluid particle simulation and ... Parallelfluidparticlesimulationandvisualization PaulBienkowski 2bienkow@informatik.uni-hamburg.de by UNIVERSITÄTHAMBURG PRAKTIKUM„PARALLELEPROGRAMMIERUNG”](https://reader033.vdocument.in/reader033/viewer/2022052421/5b3e7b0e7f8b9afd4f8b479a/html5/thumbnails/6.jpg)
Motivation
Introduction 4/25
![Page 7: FluidSim - Parallel fluid particle simulation and ... Parallelfluidparticlesimulationandvisualization PaulBienkowski 2bienkow@informatik.uni-hamburg.de by UNIVERSITÄTHAMBURG PRAKTIKUM„PARALLELEPROGRAMMIERUNG”](https://reader033.vdocument.in/reader033/viewer/2022052421/5b3e7b0e7f8b9afd4f8b479a/html5/thumbnails/7.jpg)
Motivation
Introduction 4/25
IdeaSimulate 2D-particles that repel each other
![Page 8: FluidSim - Parallel fluid particle simulation and ... Parallelfluidparticlesimulationandvisualization PaulBienkowski 2bienkow@informatik.uni-hamburg.de by UNIVERSITÄTHAMBURG PRAKTIKUM„PARALLELEPROGRAMMIERUNG”](https://reader033.vdocument.in/reader033/viewer/2022052421/5b3e7b0e7f8b9afd4f8b479a/html5/thumbnails/8.jpg)
Motivation
Introduction 4/25
IdeaSimulate 2D-particles that repel each other
GoalSimulate an airplane wing andmeasure lift
![Page 9: FluidSim - Parallel fluid particle simulation and ... Parallelfluidparticlesimulationandvisualization PaulBienkowski 2bienkow@informatik.uni-hamburg.de by UNIVERSITÄTHAMBURG PRAKTIKUM„PARALLELEPROGRAMMIERUNG”](https://reader033.vdocument.in/reader033/viewer/2022052421/5b3e7b0e7f8b9afd4f8b479a/html5/thumbnails/9.jpg)
Motivation
Introduction 4/25
IdeaSimulate 2D-particles that repel each other
GoalSimulate an airplane wing andmeasure lift
TechnologyC++11, MPI, OpenMP, SFML
![Page 10: FluidSim - Parallel fluid particle simulation and ... Parallelfluidparticlesimulationandvisualization PaulBienkowski 2bienkow@informatik.uni-hamburg.de by UNIVERSITÄTHAMBURG PRAKTIKUM„PARALLELEPROGRAMMIERUNG”](https://reader033.vdocument.in/reader033/viewer/2022052421/5b3e7b0e7f8b9afd4f8b479a/html5/thumbnails/10.jpg)
ParticleModel
Introduction 5/25
Each particle has 3 basic properties:
1. position2. velocity3. force
Only position and velocity need to be stored across iterations, forceis recomputed every iteration.
![Page 11: FluidSim - Parallel fluid particle simulation and ... Parallelfluidparticlesimulationandvisualization PaulBienkowski 2bienkow@informatik.uni-hamburg.de by UNIVERSITÄTHAMBURG PRAKTIKUM„PARALLELEPROGRAMMIERUNG”](https://reader033.vdocument.in/reader033/viewer/2022052421/5b3e7b0e7f8b9afd4f8b479a/html5/thumbnails/11.jpg)
ParticleModel
Introduction 5/25
Each particle has 3 basic properties:
1. position2. velocity3. force
Only position and velocity need to be stored across iterations, forceis recomputed every iteration.
![Page 12: FluidSim - Parallel fluid particle simulation and ... Parallelfluidparticlesimulationandvisualization PaulBienkowski 2bienkow@informatik.uni-hamburg.de by UNIVERSITÄTHAMBURG PRAKTIKUM„PARALLELEPROGRAMMIERUNG”](https://reader033.vdocument.in/reader033/viewer/2022052421/5b3e7b0e7f8b9afd4f8b479a/html5/thumbnails/12.jpg)
ParticleModel
Introduction 6/25
pi pj
Any two particles repel each other:
forcei :=∑j
force(∣∣pi − pj
∣∣) · norm(pi − pj)
The force on a particle affects its velocity:
velocityi := velocityi + forcei · dt
The velocity of a particle affects its position:
positioni := positioni + velocityi · dt
![Page 13: FluidSim - Parallel fluid particle simulation and ... Parallelfluidparticlesimulationandvisualization PaulBienkowski 2bienkow@informatik.uni-hamburg.de by UNIVERSITÄTHAMBURG PRAKTIKUM„PARALLELEPROGRAMMIERUNG”](https://reader033.vdocument.in/reader033/viewer/2022052421/5b3e7b0e7f8b9afd4f8b479a/html5/thumbnails/13.jpg)
ForceModel
Introduction 7/25
force(x) =
{F ·
(1− x−T
D
)P for 0 ≤ x ≤ D+ T0 otherwise
wherex is the distance between the particles.F is the force strength factorD is the influence distanceT is the distance threshold (particle radius)P is the force power
![Page 14: FluidSim - Parallel fluid particle simulation and ... Parallelfluidparticlesimulationandvisualization PaulBienkowski 2bienkow@informatik.uni-hamburg.de by UNIVERSITÄTHAMBURG PRAKTIKUM„PARALLELEPROGRAMMIERUNG”](https://reader033.vdocument.in/reader033/viewer/2022052421/5b3e7b0e7f8b9afd4f8b479a/html5/thumbnails/14.jpg)
ForceModel
Introduction 7/25
force(x) =
{F ·
(1− x−T
D
)P for 0 ≤ x ≤ D+ T0 otherwise
0 0.2 0.4 0.6 0.8 10
0.2
0.4
0.6
0.8
1
distance
force
P=0.2P=1P=2P=3P=20 Changing the
Force Power (P)F = 1D = 1T = 0
![Page 15: FluidSim - Parallel fluid particle simulation and ... Parallelfluidparticlesimulationandvisualization PaulBienkowski 2bienkow@informatik.uni-hamburg.de by UNIVERSITÄTHAMBURG PRAKTIKUM„PARALLELEPROGRAMMIERUNG”](https://reader033.vdocument.in/reader033/viewer/2022052421/5b3e7b0e7f8b9afd4f8b479a/html5/thumbnails/15.jpg)
ForceModel
Introduction 7/25
force(x) =
{F ·
(1− x−T
D
)P for 0 ≤ x ≤ D+ T0 otherwise
0 0.2 0.4 0.6 0.8 10
0.2
0.4
0.6
0.8
1
distance
force
T=0.0T=0.1T=0.2T=0.3 Changing the
DistanceThreshold (T)
F = 1D = 1
P = 10
![Page 16: FluidSim - Parallel fluid particle simulation and ... Parallelfluidparticlesimulationandvisualization PaulBienkowski 2bienkow@informatik.uni-hamburg.de by UNIVERSITÄTHAMBURG PRAKTIKUM„PARALLELEPROGRAMMIERUNG”](https://reader033.vdocument.in/reader033/viewer/2022052421/5b3e7b0e7f8b9afd4f8b479a/html5/thumbnails/16.jpg)
ForceModel
Introduction 7/25
force(x) =
{F ·
(1− x−T
D
)P for 0 ≤ x ≤ D+ T0 otherwise
I found these values work for the wing simulation:
D = 0.001T = 0.06P = 1F = 20
![Page 17: FluidSim - Parallel fluid particle simulation and ... Parallelfluidparticlesimulationandvisualization PaulBienkowski 2bienkow@informatik.uni-hamburg.de by UNIVERSITÄTHAMBURG PRAKTIKUM„PARALLELEPROGRAMMIERUNG”](https://reader033.vdocument.in/reader033/viewer/2022052421/5b3e7b0e7f8b9afd4f8b479a/html5/thumbnails/17.jpg)
Meshes
Introduction 8/25
Amesh is a simple polygon, each segment (line) is checked forcollision with every particle.
Simple linear algebra calculations are made for reflecting particlesoffmesh segments.
Mesh
Particle
This creates a force on the mesh.
![Page 18: FluidSim - Parallel fluid particle simulation and ... Parallelfluidparticlesimulationandvisualization PaulBienkowski 2bienkow@informatik.uni-hamburg.de by UNIVERSITÄTHAMBURG PRAKTIKUM„PARALLELEPROGRAMMIERUNG”](https://reader033.vdocument.in/reader033/viewer/2022052421/5b3e7b0e7f8b9afd4f8b479a/html5/thumbnails/18.jpg)
Meshes
Introduction 8/25
Amesh is a simple polygon, each segment (line) is checked forcollision with every particle.
Simple linear algebra calculations are made for reflecting particlesoffmesh segments.
Mesh
Particle
This creates a force on the mesh.
![Page 19: FluidSim - Parallel fluid particle simulation and ... Parallelfluidparticlesimulationandvisualization PaulBienkowski 2bienkow@informatik.uni-hamburg.de by UNIVERSITÄTHAMBURG PRAKTIKUM„PARALLELEPROGRAMMIERUNG”](https://reader033.vdocument.in/reader033/viewer/2022052421/5b3e7b0e7f8b9afd4f8b479a/html5/thumbnails/19.jpg)
Meshes
Introduction 8/25
Amesh is a simple polygon, each segment (line) is checked forcollision with every particle.
Simple linear algebra calculations are made for reflecting particlesoffmesh segments.
Mesh
Particle
This creates a force on the mesh.
![Page 20: FluidSim - Parallel fluid particle simulation and ... Parallelfluidparticlesimulationandvisualization PaulBienkowski 2bienkow@informatik.uni-hamburg.de by UNIVERSITÄTHAMBURG PRAKTIKUM„PARALLELEPROGRAMMIERUNG”](https://reader033.vdocument.in/reader033/viewer/2022052421/5b3e7b0e7f8b9afd4f8b479a/html5/thumbnails/20.jpg)
The Simulator 9/25
TheSimulator
![Page 21: FluidSim - Parallel fluid particle simulation and ... Parallelfluidparticlesimulationandvisualization PaulBienkowski 2bienkow@informatik.uni-hamburg.de by UNIVERSITÄTHAMBURG PRAKTIKUM„PARALLELEPROGRAMMIERUNG”](https://reader033.vdocument.in/reader033/viewer/2022052421/5b3e7b0e7f8b9afd4f8b479a/html5/thumbnails/21.jpg)
Parallelization
The Simulator 10/25
each particle has to be updated (simple for loop)→ threading trivial with OpenMPparticles can be distributed across multiple processes→ Domain Grid
P0 P1 P2 P3
P4 P5 P6 P7
P8 P9 P10 P11
![Page 22: FluidSim - Parallel fluid particle simulation and ... Parallelfluidparticlesimulationandvisualization PaulBienkowski 2bienkow@informatik.uni-hamburg.de by UNIVERSITÄTHAMBURG PRAKTIKUM„PARALLELEPROGRAMMIERUNG”](https://reader033.vdocument.in/reader033/viewer/2022052421/5b3e7b0e7f8b9afd4f8b479a/html5/thumbnails/22.jpg)
Parallelization
The Simulator 10/25
each particle has to be updated (simple for loop)→ threading trivial with OpenMPparticles can be distributed across multiple processes→ Domain Grid
P0 P1 P2 P3
P4 P5 P6 P7
P8 P9 P10 P11
![Page 23: FluidSim - Parallel fluid particle simulation and ... Parallelfluidparticlesimulationandvisualization PaulBienkowski 2bienkow@informatik.uni-hamburg.de by UNIVERSITÄTHAMBURG PRAKTIKUM„PARALLELEPROGRAMMIERUNG”](https://reader033.vdocument.in/reader033/viewer/2022052421/5b3e7b0e7f8b9afd4f8b479a/html5/thumbnails/23.jpg)
Synchronization
The Simulator 11/25
P0 P1 P2 P3
P4 P5 P6 P7
P8 P9 P10 P11
(a) Checkerboard
P0 P1 P2 P3
P4 P5 P6 P7
P8 P9 P10 P11
(b) StripesModes of Domain coloring
Mode Sending Receiving Directions1. Checkerboard black white N, E, S, W2. Checkerboard white black N, E, S, W3. Stripes black white NE, SE, SW, NW4. Stripes white black NE, SE, SW, NW
![Page 24: FluidSim - Parallel fluid particle simulation and ... Parallelfluidparticlesimulationandvisualization PaulBienkowski 2bienkow@informatik.uni-hamburg.de by UNIVERSITÄTHAMBURG PRAKTIKUM„PARALLELEPROGRAMMIERUNG”](https://reader033.vdocument.in/reader033/viewer/2022052421/5b3e7b0e7f8b9afd4f8b479a/html5/thumbnails/24.jpg)
Data output
The Simulator 12/25
0000000 0020 0000 0001 0000 0004 0000 2710 00000000010 1387 0000 0000 0000 1389 0000 0000 00000000020 8a72 d187 c4bb 3fa1 73d1 4e75 d95f 3fbe0000030 d3f4 2c9a cf42 3fbc b890 9e75 5a61 3fc1...00013a7 9aa6 af8e c353 3fc7 1df2 1539 3ec1 3fc300013b7 c065 7825 f853 3fb3 717a c31f 1f55 3fc3...
Header length: 32 bytesIteration number: 1Number of processes: 4Particle count: 10000Particle count by process: 4999 / 0 / 5001 / 0Particle positions of P1 (x1, y1, x2, y2, ...)Particle velocities of P1
![Page 25: FluidSim - Parallel fluid particle simulation and ... Parallelfluidparticlesimulationandvisualization PaulBienkowski 2bienkow@informatik.uni-hamburg.de by UNIVERSITÄTHAMBURG PRAKTIKUM„PARALLELEPROGRAMMIERUNG”](https://reader033.vdocument.in/reader033/viewer/2022052421/5b3e7b0e7f8b9afd4f8b479a/html5/thumbnails/25.jpg)
The Visualizer 13/25
TheVisualizer
![Page 26: FluidSim - Parallel fluid particle simulation and ... Parallelfluidparticlesimulationandvisualization PaulBienkowski 2bienkow@informatik.uni-hamburg.de by UNIVERSITÄTHAMBURG PRAKTIKUM„PARALLELEPROGRAMMIERUNG”](https://reader033.vdocument.in/reader033/viewer/2022052421/5b3e7b0e7f8b9afd4f8b479a/html5/thumbnails/26.jpg)
Basic Technology
The Visualizer 14/25
SFML for window, input, rendering (OpenGL inside)Load Iterations into memoryPlay/Pause/LiveDifferent display modes (coloring of particles)
![Page 27: FluidSim - Parallel fluid particle simulation and ... Parallelfluidparticlesimulationandvisualization PaulBienkowski 2bienkow@informatik.uni-hamburg.de by UNIVERSITÄTHAMBURG PRAKTIKUM„PARALLELEPROGRAMMIERUNG”](https://reader033.vdocument.in/reader033/viewer/2022052421/5b3e7b0e7f8b9afd4f8b479a/html5/thumbnails/27.jpg)
Data Transfer
The Visualizer 15/25
How is data transfered from Simulator to Visualizer?
Socket/Network/MPI?→ too complicatedSSHFS ,status file contains metadata
number of iterationsgrid size
visualizer reads status in regular intervals
![Page 28: FluidSim - Parallel fluid particle simulation and ... Parallelfluidparticlesimulationandvisualization PaulBienkowski 2bienkow@informatik.uni-hamburg.de by UNIVERSITÄTHAMBURG PRAKTIKUM„PARALLELEPROGRAMMIERUNG”](https://reader033.vdocument.in/reader033/viewer/2022052421/5b3e7b0e7f8b9afd4f8b479a/html5/thumbnails/28.jpg)
Data Transfer
The Visualizer 15/25
How is data transfered from Simulator to Visualizer?Socket/Network/MPI?
→ too complicatedSSHFS ,status file contains metadata
number of iterationsgrid size
visualizer reads status in regular intervals
![Page 29: FluidSim - Parallel fluid particle simulation and ... Parallelfluidparticlesimulationandvisualization PaulBienkowski 2bienkow@informatik.uni-hamburg.de by UNIVERSITÄTHAMBURG PRAKTIKUM„PARALLELEPROGRAMMIERUNG”](https://reader033.vdocument.in/reader033/viewer/2022052421/5b3e7b0e7f8b9afd4f8b479a/html5/thumbnails/29.jpg)
Data Transfer
The Visualizer 15/25
How is data transfered from Simulator to Visualizer?Socket/Network/MPI?→ too complicated
SSHFS ,status file contains metadata
number of iterationsgrid size
visualizer reads status in regular intervals
![Page 30: FluidSim - Parallel fluid particle simulation and ... Parallelfluidparticlesimulationandvisualization PaulBienkowski 2bienkow@informatik.uni-hamburg.de by UNIVERSITÄTHAMBURG PRAKTIKUM„PARALLELEPROGRAMMIERUNG”](https://reader033.vdocument.in/reader033/viewer/2022052421/5b3e7b0e7f8b9afd4f8b479a/html5/thumbnails/30.jpg)
Data Transfer
The Visualizer 15/25
How is data transfered from Simulator to Visualizer?Socket/Network/MPI?→ too complicatedSSHFS ,
status file contains metadatanumber of iterationsgrid size
visualizer reads status in regular intervals
![Page 31: FluidSim - Parallel fluid particle simulation and ... Parallelfluidparticlesimulationandvisualization PaulBienkowski 2bienkow@informatik.uni-hamburg.de by UNIVERSITÄTHAMBURG PRAKTIKUM„PARALLELEPROGRAMMIERUNG”](https://reader033.vdocument.in/reader033/viewer/2022052421/5b3e7b0e7f8b9afd4f8b479a/html5/thumbnails/31.jpg)
Data Transfer
The Visualizer 15/25
How is data transfered from Simulator to Visualizer?Socket/Network/MPI?→ too complicatedSSHFS ,status file contains metadata
number of iterationsgrid size
visualizer reads status in regular intervals
![Page 32: FluidSim - Parallel fluid particle simulation and ... Parallelfluidparticlesimulationandvisualization PaulBienkowski 2bienkow@informatik.uni-hamburg.de by UNIVERSITÄTHAMBURG PRAKTIKUM„PARALLELEPROGRAMMIERUNG”](https://reader033.vdocument.in/reader033/viewer/2022052421/5b3e7b0e7f8b9afd4f8b479a/html5/thumbnails/32.jpg)
Results 16/25
Results
![Page 33: FluidSim - Parallel fluid particle simulation and ... Parallelfluidparticlesimulationandvisualization PaulBienkowski 2bienkow@informatik.uni-hamburg.de by UNIVERSITÄTHAMBURG PRAKTIKUM„PARALLELEPROGRAMMIERUNG”](https://reader033.vdocument.in/reader033/viewer/2022052421/5b3e7b0e7f8b9afd4f8b479a/html5/thumbnails/33.jpg)
Did it work?
Results 17/25
![Page 34: FluidSim - Parallel fluid particle simulation and ... Parallelfluidparticlesimulationandvisualization PaulBienkowski 2bienkow@informatik.uni-hamburg.de by UNIVERSITÄTHAMBURG PRAKTIKUM„PARALLELEPROGRAMMIERUNG”](https://reader033.vdocument.in/reader033/viewer/2022052421/5b3e7b0e7f8b9afd4f8b479a/html5/thumbnails/34.jpg)
Did it work?
Results 17/25
![Page 35: FluidSim - Parallel fluid particle simulation and ... Parallelfluidparticlesimulationandvisualization PaulBienkowski 2bienkow@informatik.uni-hamburg.de by UNIVERSITÄTHAMBURG PRAKTIKUM„PARALLELEPROGRAMMIERUNG”](https://reader033.vdocument.in/reader033/viewer/2022052421/5b3e7b0e7f8b9afd4f8b479a/html5/thumbnails/35.jpg)
Live Demonstration
Results 18/25
![Page 36: FluidSim - Parallel fluid particle simulation and ... Parallelfluidparticlesimulationandvisualization PaulBienkowski 2bienkow@informatik.uni-hamburg.de by UNIVERSITÄTHAMBURG PRAKTIKUM„PARALLELEPROGRAMMIERUNG”](https://reader033.vdocument.in/reader033/viewer/2022052421/5b3e7b0e7f8b9afd4f8b479a/html5/thumbnails/36.jpg)
Performance
Results 19/25
All measurements were made with IO disabled, no particledata was recorded.
![Page 37: FluidSim - Parallel fluid particle simulation and ... Parallelfluidparticlesimulationandvisualization PaulBienkowski 2bienkow@informatik.uni-hamburg.de by UNIVERSITÄTHAMBURG PRAKTIKUM„PARALLELEPROGRAMMIERUNG”](https://reader033.vdocument.in/reader033/viewer/2022052421/5b3e7b0e7f8b9afd4f8b479a/html5/thumbnails/37.jpg)
Performance
Results 19/25
All measurements were made with IO disabled, no particledata was recorded.
![Page 38: FluidSim - Parallel fluid particle simulation and ... Parallelfluidparticlesimulationandvisualization PaulBienkowski 2bienkow@informatik.uni-hamburg.de by UNIVERSITÄTHAMBURG PRAKTIKUM„PARALLELEPROGRAMMIERUNG”](https://reader033.vdocument.in/reader033/viewer/2022052421/5b3e7b0e7f8b9afd4f8b479a/html5/thumbnails/38.jpg)
Performance
Results 19/25
All measurements were made with IO disabled, no particledata was recorded.
![Page 39: FluidSim - Parallel fluid particle simulation and ... Parallelfluidparticlesimulationandvisualization PaulBienkowski 2bienkow@informatik.uni-hamburg.de by UNIVERSITÄTHAMBURG PRAKTIKUM„PARALLELEPROGRAMMIERUNG”](https://reader033.vdocument.in/reader033/viewer/2022052421/5b3e7b0e7f8b9afd4f8b479a/html5/thumbnails/39.jpg)
Difficulties
Results 20/25
MPI file input/output was hard to get working,miscalculated seek offsets etc.
lots of segmentation faults and uninitialized values ,Cannot insert: Count 0xdeafbeed >= Size 0xdeafbeed.fluidsim: Quickset.hpp:14: Assertion ‘count < size’ failed.Aborted.
Segmentation fault.(gdb) frame 3(gdb) print buf$1 = 0xdeafbeeddeafbeed;
2D collisions are not that trivialthe model (uplift) did not work out until I implementedsurface damping
![Page 40: FluidSim - Parallel fluid particle simulation and ... Parallelfluidparticlesimulationandvisualization PaulBienkowski 2bienkow@informatik.uni-hamburg.de by UNIVERSITÄTHAMBURG PRAKTIKUM„PARALLELEPROGRAMMIERUNG”](https://reader033.vdocument.in/reader033/viewer/2022052421/5b3e7b0e7f8b9afd4f8b479a/html5/thumbnails/40.jpg)
Difficulties
Results 20/25
MPI file input/output was hard to get working,miscalculated seek offsets etc.lots of segmentation faults and uninitialized values ,Cannot insert: Count 0xdeafbeed >= Size 0xdeafbeed.fluidsim: Quickset.hpp:14: Assertion ‘count < size’ failed.Aborted.
Segmentation fault.(gdb) frame 3(gdb) print buf$1 = 0xdeafbeeddeafbeed;
2D collisions are not that trivialthe model (uplift) did not work out until I implementedsurface damping
![Page 41: FluidSim - Parallel fluid particle simulation and ... Parallelfluidparticlesimulationandvisualization PaulBienkowski 2bienkow@informatik.uni-hamburg.de by UNIVERSITÄTHAMBURG PRAKTIKUM„PARALLELEPROGRAMMIERUNG”](https://reader033.vdocument.in/reader033/viewer/2022052421/5b3e7b0e7f8b9afd4f8b479a/html5/thumbnails/41.jpg)
Difficulties
Results 20/25
MPI file input/output was hard to get working,miscalculated seek offsets etc.lots of segmentation faults and uninitialized values ,Cannot insert: Count 0xdeafbeed >= Size 0xdeafbeed.fluidsim: Quickset.hpp:14: Assertion ‘count < size’ failed.Aborted.
Segmentation fault.(gdb) frame 3(gdb) print buf$1 = 0xdeafbeeddeafbeed;
2D collisions are not that trivial
the model (uplift) did not work out until I implementedsurface damping
![Page 42: FluidSim - Parallel fluid particle simulation and ... Parallelfluidparticlesimulationandvisualization PaulBienkowski 2bienkow@informatik.uni-hamburg.de by UNIVERSITÄTHAMBURG PRAKTIKUM„PARALLELEPROGRAMMIERUNG”](https://reader033.vdocument.in/reader033/viewer/2022052421/5b3e7b0e7f8b9afd4f8b479a/html5/thumbnails/42.jpg)
Difficulties
Results 20/25
MPI file input/output was hard to get working,miscalculated seek offsets etc.lots of segmentation faults and uninitialized values ,Cannot insert: Count 0xdeafbeed >= Size 0xdeafbeed.fluidsim: Quickset.hpp:14: Assertion ‘count < size’ failed.Aborted.
Segmentation fault.(gdb) frame 3(gdb) print buf$1 = 0xdeafbeeddeafbeed;
2D collisions are not that trivialthe model (uplift) did not work out until I implementedsurface damping
![Page 43: FluidSim - Parallel fluid particle simulation and ... Parallelfluidparticlesimulationandvisualization PaulBienkowski 2bienkow@informatik.uni-hamburg.de by UNIVERSITÄTHAMBURG PRAKTIKUM„PARALLELEPROGRAMMIERUNG”](https://reader033.vdocument.in/reader033/viewer/2022052421/5b3e7b0e7f8b9afd4f8b479a/html5/thumbnails/43.jpg)
Problems
Results 21/25
software not optimized for RAM usage→ can’t run more than 6 processes locally /
memcpy is slow16 send/receive operations on a 12-node cluster,probably room for improvement,
however this methodscales to every cluster size
![Page 44: FluidSim - Parallel fluid particle simulation and ... Parallelfluidparticlesimulationandvisualization PaulBienkowski 2bienkow@informatik.uni-hamburg.de by UNIVERSITÄTHAMBURG PRAKTIKUM„PARALLELEPROGRAMMIERUNG”](https://reader033.vdocument.in/reader033/viewer/2022052421/5b3e7b0e7f8b9afd4f8b479a/html5/thumbnails/44.jpg)
Problems
Results 21/25
software not optimized for RAM usage→ can’t run more than 6 processes locally /memcpy is slow
16 send/receive operations on a 12-node cluster,probably room for improvement,
however this methodscales to every cluster size
![Page 45: FluidSim - Parallel fluid particle simulation and ... Parallelfluidparticlesimulationandvisualization PaulBienkowski 2bienkow@informatik.uni-hamburg.de by UNIVERSITÄTHAMBURG PRAKTIKUM„PARALLELEPROGRAMMIERUNG”](https://reader033.vdocument.in/reader033/viewer/2022052421/5b3e7b0e7f8b9afd4f8b479a/html5/thumbnails/45.jpg)
Problems
Results 21/25
software not optimized for RAM usage→ can’t run more than 6 processes locally /memcpy is slow16 send/receive operations on a 12-node cluster,probably room for improvement,
however this methodscales to every cluster size
![Page 46: FluidSim - Parallel fluid particle simulation and ... Parallelfluidparticlesimulationandvisualization PaulBienkowski 2bienkow@informatik.uni-hamburg.de by UNIVERSITÄTHAMBURG PRAKTIKUM„PARALLELEPROGRAMMIERUNG”](https://reader033.vdocument.in/reader033/viewer/2022052421/5b3e7b0e7f8b9afd4f8b479a/html5/thumbnails/46.jpg)
Problems
Results 21/25
software not optimized for RAM usage→ can’t run more than 6 processes locally /memcpy is slow16 send/receive operations on a 12-node cluster,probably room for improvement,
however this methodscales to every cluster size
![Page 47: FluidSim - Parallel fluid particle simulation and ... Parallelfluidparticlesimulationandvisualization PaulBienkowski 2bienkow@informatik.uni-hamburg.de by UNIVERSITÄTHAMBURG PRAKTIKUM„PARALLELEPROGRAMMIERUNG”](https://reader033.vdocument.in/reader033/viewer/2022052421/5b3e7b0e7f8b9afd4f8b479a/html5/thumbnails/47.jpg)
Problems
Results 21/25
software not optimized for RAM usage→ can’t run more than 6 processes locally /memcpy is slow16 send/receive operations on a 12-node cluster,probably room for improvement, however this methodscales to every cluster size
![Page 48: FluidSim - Parallel fluid particle simulation and ... Parallelfluidparticlesimulationandvisualization PaulBienkowski 2bienkow@informatik.uni-hamburg.de by UNIVERSITÄTHAMBURG PRAKTIKUM„PARALLELEPROGRAMMIERUNG”](https://reader033.vdocument.in/reader033/viewer/2022052421/5b3e7b0e7f8b9afd4f8b479a/html5/thumbnails/48.jpg)
Conclusion 22/25
Conclusion
![Page 49: FluidSim - Parallel fluid particle simulation and ... Parallelfluidparticlesimulationandvisualization PaulBienkowski 2bienkow@informatik.uni-hamburg.de by UNIVERSITÄTHAMBURG PRAKTIKUM„PARALLELEPROGRAMMIERUNG”](https://reader033.vdocument.in/reader033/viewer/2022052421/5b3e7b0e7f8b9afd4f8b479a/html5/thumbnails/49.jpg)
Conclusion
Conclusion 23/25
Yes, it works!Even in real-time!Even thoughO(n2 + nm)with n ∈ O(10000)
It looks kind of fancy...I learned a lot.
![Page 50: FluidSim - Parallel fluid particle simulation and ... Parallelfluidparticlesimulationandvisualization PaulBienkowski 2bienkow@informatik.uni-hamburg.de by UNIVERSITÄTHAMBURG PRAKTIKUM„PARALLELEPROGRAMMIERUNG”](https://reader033.vdocument.in/reader033/viewer/2022052421/5b3e7b0e7f8b9afd4f8b479a/html5/thumbnails/50.jpg)
Furtherworks
Conclusion 24/25
Load Balancer, based on number of particles inrows/columns
SIMD“Ball” particle model (elastic collision of circle shapes)different World Scenarios / presets (gravity, water, ...)animation export
![Page 51: FluidSim - Parallel fluid particle simulation and ... Parallelfluidparticlesimulationandvisualization PaulBienkowski 2bienkow@informatik.uni-hamburg.de by UNIVERSITÄTHAMBURG PRAKTIKUM„PARALLELEPROGRAMMIERUNG”](https://reader033.vdocument.in/reader033/viewer/2022052421/5b3e7b0e7f8b9afd4f8b479a/html5/thumbnails/51.jpg)
Furtherworks
Conclusion 24/25
Load Balancer, based on number of particles inrows/columnsSIMD
“Ball” particle model (elastic collision of circle shapes)different World Scenarios / presets (gravity, water, ...)animation export
![Page 52: FluidSim - Parallel fluid particle simulation and ... Parallelfluidparticlesimulationandvisualization PaulBienkowski 2bienkow@informatik.uni-hamburg.de by UNIVERSITÄTHAMBURG PRAKTIKUM„PARALLELEPROGRAMMIERUNG”](https://reader033.vdocument.in/reader033/viewer/2022052421/5b3e7b0e7f8b9afd4f8b479a/html5/thumbnails/52.jpg)
Furtherworks
Conclusion 24/25
Load Balancer, based on number of particles inrows/columnsSIMD“Ball” particle model (elastic collision of circle shapes)
different World Scenarios / presets (gravity, water, ...)animation export
![Page 53: FluidSim - Parallel fluid particle simulation and ... Parallelfluidparticlesimulationandvisualization PaulBienkowski 2bienkow@informatik.uni-hamburg.de by UNIVERSITÄTHAMBURG PRAKTIKUM„PARALLELEPROGRAMMIERUNG”](https://reader033.vdocument.in/reader033/viewer/2022052421/5b3e7b0e7f8b9afd4f8b479a/html5/thumbnails/53.jpg)
Furtherworks
Conclusion 24/25
Load Balancer, based on number of particles inrows/columnsSIMD“Ball” particle model (elastic collision of circle shapes)different World Scenarios / presets (gravity, water, ...)
animation export
![Page 54: FluidSim - Parallel fluid particle simulation and ... Parallelfluidparticlesimulationandvisualization PaulBienkowski 2bienkow@informatik.uni-hamburg.de by UNIVERSITÄTHAMBURG PRAKTIKUM„PARALLELEPROGRAMMIERUNG”](https://reader033.vdocument.in/reader033/viewer/2022052421/5b3e7b0e7f8b9afd4f8b479a/html5/thumbnails/54.jpg)
Furtherworks
Conclusion 24/25
Load Balancer, based on number of particles inrows/columnsSIMD“Ball” particle model (elastic collision of circle shapes)different World Scenarios / presets (gravity, water, ...)animation export
![Page 55: FluidSim - Parallel fluid particle simulation and ... Parallelfluidparticlesimulationandvisualization PaulBienkowski 2bienkow@informatik.uni-hamburg.de by UNIVERSITÄTHAMBURG PRAKTIKUM„PARALLELEPROGRAMMIERUNG”](https://reader033.vdocument.in/reader033/viewer/2022052421/5b3e7b0e7f8b9afd4f8b479a/html5/thumbnails/55.jpg)
Conclusion 25/25
Thank you for your attention!
Questions?