![Page 1: Parallelizing a Real-Time Steering Simulation for Computer Games with OpenMP by Bjoern Knafla and Claudia Leopold (now Fohry)](https://reader033.vdocument.in/reader033/viewer/2022060108/554dc524b4c905bd488b5035/html5/thumbnails/1.jpg)
Parallelizinga Real-Time
Steering Simulation for Computer Games
withOpenMP
Bjoern Knafla and Claudia LeopoldUniversity of Kassel (Germany)
1Dienstag, 11. September 2007
![Page 2: Parallelizing a Real-Time Steering Simulation for Computer Games with OpenMP by Bjoern Knafla and Claudia Leopold (now Fohry)](https://reader033.vdocument.in/reader033/viewer/2022060108/554dc524b4c905bd488b5035/html5/thumbnails/2.jpg)
2Dienstag, 11. September 2007
![Page 3: Parallelizing a Real-Time Steering Simulation for Computer Games with OpenMP by Bjoern Knafla and Claudia Leopold (now Fohry)](https://reader033.vdocument.in/reader033/viewer/2022060108/554dc524b4c905bd488b5035/html5/thumbnails/3.jpg)
Steering a flock of birds
2Dienstag, 11. September 2007
![Page 4: Parallelizing a Real-Time Steering Simulation for Computer Games with OpenMP by Bjoern Knafla and Claudia Leopold (now Fohry)](https://reader033.vdocument.in/reader033/viewer/2022060108/554dc524b4c905bd488b5035/html5/thumbnails/4.jpg)
3Dienstag, 11. September 2007
![Page 5: Parallelizing a Real-Time Steering Simulation for Computer Games with OpenMP by Bjoern Knafla and Claudia Leopold (now Fohry)](https://reader033.vdocument.in/reader033/viewer/2022060108/554dc524b4c905bd488b5035/html5/thumbnails/5.jpg)
3Dienstag, 11. September 2007
![Page 6: Parallelizing a Real-Time Steering Simulation for Computer Games with OpenMP by Bjoern Knafla and Claudia Leopold (now Fohry)](https://reader033.vdocument.in/reader033/viewer/2022060108/554dc524b4c905bd488b5035/html5/thumbnails/6.jpg)
3Dienstag, 11. September 2007
![Page 7: Parallelizing a Real-Time Steering Simulation for Computer Games with OpenMP by Bjoern Knafla and Claudia Leopold (now Fohry)](https://reader033.vdocument.in/reader033/viewer/2022060108/554dc524b4c905bd488b5035/html5/thumbnails/7.jpg)
Bird
3Dienstag, 11. September 2007
![Page 8: Parallelizing a Real-Time Steering Simulation for Computer Games with OpenMP by Bjoern Knafla and Claudia Leopold (now Fohry)](https://reader033.vdocument.in/reader033/viewer/2022060108/554dc524b4c905bd488b5035/html5/thumbnails/8.jpg)
BirdBoid
3Dienstag, 11. September 2007
![Page 9: Parallelizing a Real-Time Steering Simulation for Computer Games with OpenMP by Bjoern Knafla and Claudia Leopold (now Fohry)](https://reader033.vdocument.in/reader033/viewer/2022060108/554dc524b4c905bd488b5035/html5/thumbnails/9.jpg)
BirdBoid
Agent
3Dienstag, 11. September 2007
![Page 10: Parallelizing a Real-Time Steering Simulation for Computer Games with OpenMP by Bjoern Knafla and Claudia Leopold (now Fohry)](https://reader033.vdocument.in/reader033/viewer/2022060108/554dc524b4c905bd488b5035/html5/thumbnails/10.jpg)
4Dienstag, 11. September 2007
![Page 11: Parallelizing a Real-Time Steering Simulation for Computer Games with OpenMP by Bjoern Knafla and Claudia Leopold (now Fohry)](https://reader033.vdocument.in/reader033/viewer/2022060108/554dc524b4c905bd488b5035/html5/thumbnails/11.jpg)
CPU
core
4Dienstag, 11. September 2007
![Page 12: Parallelizing a Real-Time Steering Simulation for Computer Games with OpenMP by Bjoern Knafla and Claudia Leopold (now Fohry)](https://reader033.vdocument.in/reader033/viewer/2022060108/554dc524b4c905bd488b5035/html5/thumbnails/12.jpg)
4Dienstag, 11. September 2007
![Page 13: Parallelizing a Real-Time Steering Simulation for Computer Games with OpenMP by Bjoern Knafla and Claudia Leopold (now Fohry)](https://reader033.vdocument.in/reader033/viewer/2022060108/554dc524b4c905bd488b5035/html5/thumbnails/13.jpg)
CPU
core
CPU
core
CPU
core
CPU
core
CPU
core
CPU
core
CPU
core
CPU
core
CPU
core
CPU
core
CPU
core
CPU
core
CPU
core
CPU
core
CPU
core
CPU
core
4Dienstag, 11. September 2007
![Page 14: Parallelizing a Real-Time Steering Simulation for Computer Games with OpenMP by Bjoern Knafla and Claudia Leopold (now Fohry)](https://reader033.vdocument.in/reader033/viewer/2022060108/554dc524b4c905bd488b5035/html5/thumbnails/14.jpg)
4Dienstag, 11. September 2007
![Page 15: Parallelizing a Real-Time Steering Simulation for Computer Games with OpenMP by Bjoern Knafla and Claudia Leopold (now Fohry)](https://reader033.vdocument.in/reader033/viewer/2022060108/554dc524b4c905bd488b5035/html5/thumbnails/15.jpg)
Outline
5Dienstag, 11. September 2007
![Page 16: Parallelizing a Real-Time Steering Simulation for Computer Games with OpenMP by Bjoern Knafla and Claudia Leopold (now Fohry)](https://reader033.vdocument.in/reader033/viewer/2022060108/554dc524b4c905bd488b5035/html5/thumbnails/16.jpg)
Outline
1. Steering behaviors
5Dienstag, 11. September 2007
![Page 17: Parallelizing a Real-Time Steering Simulation for Computer Games with OpenMP by Bjoern Knafla and Claudia Leopold (now Fohry)](https://reader033.vdocument.in/reader033/viewer/2022060108/554dc524b4c905bd488b5035/html5/thumbnails/17.jpg)
Outline
1. Steering behaviors
2. OpenSteerDemo
5Dienstag, 11. September 2007
![Page 18: Parallelizing a Real-Time Steering Simulation for Computer Games with OpenMP by Bjoern Knafla and Claudia Leopold (now Fohry)](https://reader033.vdocument.in/reader033/viewer/2022060108/554dc524b4c905bd488b5035/html5/thumbnails/18.jpg)
Outline
1. Steering behaviors
2. OpenSteerDemo
3. Bad parallelization
5Dienstag, 11. September 2007
![Page 19: Parallelizing a Real-Time Steering Simulation for Computer Games with OpenMP by Bjoern Knafla and Claudia Leopold (now Fohry)](https://reader033.vdocument.in/reader033/viewer/2022060108/554dc524b4c905bd488b5035/html5/thumbnails/19.jpg)
Outline
1. Steering behaviors
2. OpenSteerDemo
3. Bad parallelization
4. Parallelization that works
5Dienstag, 11. September 2007
![Page 20: Parallelizing a Real-Time Steering Simulation for Computer Games with OpenMP by Bjoern Knafla and Claudia Leopold (now Fohry)](https://reader033.vdocument.in/reader033/viewer/2022060108/554dc524b4c905bd488b5035/html5/thumbnails/20.jpg)
Outline
1. Steering behaviors
2. OpenSteerDemo
3. Bad parallelization
4. Parallelization that works
5. Performance
5Dienstag, 11. September 2007
![Page 21: Parallelizing a Real-Time Steering Simulation for Computer Games with OpenMP by Bjoern Knafla and Claudia Leopold (now Fohry)](https://reader033.vdocument.in/reader033/viewer/2022060108/554dc524b4c905bd488b5035/html5/thumbnails/21.jpg)
Outline
1. Steering behaviors
2. OpenSteerDemo
3. Bad parallelization
4. Parallelization that works
5. Performance
6. Summary
5Dienstag, 11. September 2007
![Page 22: Parallelizing a Real-Time Steering Simulation for Computer Games with OpenMP by Bjoern Knafla and Claudia Leopold (now Fohry)](https://reader033.vdocument.in/reader033/viewer/2022060108/554dc524b4c905bd488b5035/html5/thumbnails/22.jpg)
Steering behaviors
6Dienstag, 11. September 2007
![Page 23: Parallelizing a Real-Time Steering Simulation for Computer Games with OpenMP by Bjoern Knafla and Claudia Leopold (now Fohry)](https://reader033.vdocument.in/reader033/viewer/2022060108/554dc524b4c905bd488b5035/html5/thumbnails/23.jpg)
7Dienstag, 11. September 2007
![Page 24: Parallelizing a Real-Time Steering Simulation for Computer Games with OpenMP by Bjoern Knafla and Claudia Leopold (now Fohry)](https://reader033.vdocument.in/reader033/viewer/2022060108/554dc524b4c905bd488b5035/html5/thumbnails/24.jpg)
7Dienstag, 11. September 2007
![Page 25: Parallelizing a Real-Time Steering Simulation for Computer Games with OpenMP by Bjoern Knafla and Claudia Leopold (now Fohry)](https://reader033.vdocument.in/reader033/viewer/2022060108/554dc524b4c905bd488b5035/html5/thumbnails/25.jpg)
7Dienstag, 11. September 2007
![Page 26: Parallelizing a Real-Time Steering Simulation for Computer Games with OpenMP by Bjoern Knafla and Claudia Leopold (now Fohry)](https://reader033.vdocument.in/reader033/viewer/2022060108/554dc524b4c905bd488b5035/html5/thumbnails/26.jpg)
7Dienstag, 11. September 2007
![Page 27: Parallelizing a Real-Time Steering Simulation for Computer Games with OpenMP by Bjoern Knafla and Claudia Leopold (now Fohry)](https://reader033.vdocument.in/reader033/viewer/2022060108/554dc524b4c905bd488b5035/html5/thumbnails/27.jpg)
Alignment8Dienstag, 11. September 2007
![Page 28: Parallelizing a Real-Time Steering Simulation for Computer Games with OpenMP by Bjoern Knafla and Claudia Leopold (now Fohry)](https://reader033.vdocument.in/reader033/viewer/2022060108/554dc524b4c905bd488b5035/html5/thumbnails/28.jpg)
OpenSteerDemo
9Dienstag, 11. September 2007
![Page 29: Parallelizing a Real-Time Steering Simulation for Computer Games with OpenMP by Bjoern Knafla and Claudia Leopold (now Fohry)](https://reader033.vdocument.in/reader033/viewer/2022060108/554dc524b4c905bd488b5035/html5/thumbnails/29.jpg)
OpenSteerDemo
Testbed for the open source library OpenSteer from Craig W. Reynods
9Dienstag, 11. September 2007
![Page 30: Parallelizing a Real-Time Steering Simulation for Computer Games with OpenMP by Bjoern Knafla and Claudia Leopold (now Fohry)](https://reader033.vdocument.in/reader033/viewer/2022060108/554dc524b4c905bd488b5035/html5/thumbnails/30.jpg)
OpenSteerDemo
Testbed for the open source library OpenSteer from Craig W. Reynods
Simulates steering behavior of agents
9Dienstag, 11. September 2007
![Page 31: Parallelizing a Real-Time Steering Simulation for Computer Games with OpenMP by Bjoern Knafla and Claudia Leopold (now Fohry)](https://reader033.vdocument.in/reader033/viewer/2022060108/554dc524b4c905bd488b5035/html5/thumbnails/31.jpg)
OpenSteerDemo
Testbed for the open source library OpenSteer from Craig W. Reynods
Simulates steering behavior of agents
Game-like C++ real-time application
9Dienstag, 11. September 2007
![Page 32: Parallelizing a Real-Time Steering Simulation for Computer Games with OpenMP by Bjoern Knafla and Claudia Leopold (now Fohry)](https://reader033.vdocument.in/reader033/viewer/2022060108/554dc524b4c905bd488b5035/html5/thumbnails/32.jpg)
OpenSteerDemo
Testbed for the open source library OpenSteer from Craig W. Reynods
Simulates steering behavior of agents
Game-like C++ real-time application
OpenGL
9Dienstag, 11. September 2007
![Page 33: Parallelizing a Real-Time Steering Simulation for Computer Games with OpenMP by Bjoern Knafla and Claudia Leopold (now Fohry)](https://reader033.vdocument.in/reader033/viewer/2022060108/554dc524b4c905bd488b5035/html5/thumbnails/33.jpg)
OpenSteerDemo
Testbed for the open source library OpenSteer from Craig W. Reynods
Simulates steering behavior of agents
Game-like C++ real-time application
OpenGL
http://opensteer.sourceforge.net
9Dienstag, 11. September 2007
![Page 34: Parallelizing a Real-Time Steering Simulation for Computer Games with OpenMP by Bjoern Knafla and Claudia Leopold (now Fohry)](https://reader033.vdocument.in/reader033/viewer/2022060108/554dc524b4c905bd488b5035/html5/thumbnails/34.jpg)
Main loop
10Dienstag, 11. September 2007
![Page 35: Parallelizing a Real-Time Steering Simulation for Computer Games with OpenMP by Bjoern Knafla and Claudia Leopold (now Fohry)](https://reader033.vdocument.in/reader033/viewer/2022060108/554dc524b4c905bd488b5035/html5/thumbnails/35.jpg)
Main loop
Input Update Output
10Dienstag, 11. September 2007
![Page 36: Parallelizing a Real-Time Steering Simulation for Computer Games with OpenMP by Bjoern Knafla and Claudia Leopold (now Fohry)](https://reader033.vdocument.in/reader033/viewer/2022060108/554dc524b4c905bd488b5035/html5/thumbnails/36.jpg)
Input Update Graph-
ics
Main loop
11Dienstag, 11. September 2007
![Page 37: Parallelizing a Real-Time Steering Simulation for Computer Games with OpenMP by Bjoern Knafla and Claudia Leopold (now Fohry)](https://reader033.vdocument.in/reader033/viewer/2022060108/554dc524b4c905bd488b5035/html5/thumbnails/37.jpg)
Input stage
Time step t
Input Update Graph-
ics
12Dienstag, 11. September 2007
![Page 38: Parallelizing a Real-Time Steering Simulation for Computer Games with OpenMP by Bjoern Knafla and Claudia Leopold (now Fohry)](https://reader033.vdocument.in/reader033/viewer/2022060108/554dc524b4c905bd488b5035/html5/thumbnails/38.jpg)
Update stage
Time step t
Input Update Graph-
ics
13Dienstag, 11. September 2007
![Page 39: Parallelizing a Real-Time Steering Simulation for Computer Games with OpenMP by Bjoern Knafla and Claudia Leopold (now Fohry)](https://reader033.vdocument.in/reader033/viewer/2022060108/554dc524b4c905bd488b5035/html5/thumbnails/39.jpg)
Graphics stage
Time step t
Input Update Graph-
ics
14Dienstag, 11. September 2007
![Page 40: Parallelizing a Real-Time Steering Simulation for Computer Games with OpenMP by Bjoern Knafla and Claudia Leopold (now Fohry)](https://reader033.vdocument.in/reader033/viewer/2022060108/554dc524b4c905bd488b5035/html5/thumbnails/40.jpg)
Next main loop cycle
Time step t+1
Input Update Graph-
ics
15Dienstag, 11. September 2007
![Page 41: Parallelizing a Real-Time Steering Simulation for Computer Games with OpenMP by Bjoern Knafla and Claudia Leopold (now Fohry)](https://reader033.vdocument.in/reader033/viewer/2022060108/554dc524b4c905bd488b5035/html5/thumbnails/41.jpg)
Update stage
Input Update Graph-
ics
16Dienstag, 11. September 2007
![Page 42: Parallelizing a Real-Time Steering Simulation for Computer Games with OpenMP by Bjoern Knafla and Claudia Leopold (now Fohry)](https://reader033.vdocument.in/reader033/viewer/2022060108/554dc524b4c905bd488b5035/html5/thumbnails/42.jpg)
Agent update
Update
agent
Neighbors Random.Agent
state
read + write read + write read + write
references
Graphics
write
17Dienstag, 11. September 2007
![Page 43: Parallelizing a Real-Time Steering Simulation for Computer Games with OpenMP by Bjoern Knafla and Claudia Leopold (now Fohry)](https://reader033.vdocument.in/reader033/viewer/2022060108/554dc524b4c905bd488b5035/html5/thumbnails/43.jpg)
Time step t
Sequentialagent
updateorder
Update
agent
0
Update
agent
1
Update
agent
2
Update
agent
n
...
In state t-1
18Dienstag, 11. September 2007
![Page 44: Parallelizing a Real-Time Steering Simulation for Computer Games with OpenMP by Bjoern Knafla and Claudia Leopold (now Fohry)](https://reader033.vdocument.in/reader033/viewer/2022060108/554dc524b4c905bd488b5035/html5/thumbnails/44.jpg)
Time step t
Sequentialagent
updateorder
Neighbors
In state t-1
Update
agent
0
Update
agent
1
Update
agent
2
Update
agent
n
...
In state t-1
18Dienstag, 11. September 2007
![Page 45: Parallelizing a Real-Time Steering Simulation for Computer Games with OpenMP by Bjoern Knafla and Claudia Leopold (now Fohry)](https://reader033.vdocument.in/reader033/viewer/2022060108/554dc524b4c905bd488b5035/html5/thumbnails/45.jpg)
Time step t
Sequentialagent
updateorder
Update
agent
0
Update
agent
1
Update
agent
2
Update
agent
n
...
In state t-1
19Dienstag, 11. September 2007
![Page 46: Parallelizing a Real-Time Steering Simulation for Computer Games with OpenMP by Bjoern Knafla and Claudia Leopold (now Fohry)](https://reader033.vdocument.in/reader033/viewer/2022060108/554dc524b4c905bd488b5035/html5/thumbnails/46.jpg)
Time step t
Sequentialagent
updateorder
Update
agent
0
Update
agent
1
Update
agent
2
Update
agent
n
...
In state t-1In state t
20Dienstag, 11. September 2007
![Page 47: Parallelizing a Real-Time Steering Simulation for Computer Games with OpenMP by Bjoern Knafla and Claudia Leopold (now Fohry)](https://reader033.vdocument.in/reader033/viewer/2022060108/554dc524b4c905bd488b5035/html5/thumbnails/47.jpg)
Time step t
Sequentialagent
updateorder
Update
agent
0
Update
agent
1
Update
agent
2
Update
agent
n
...
In state t-1In state t
21Dienstag, 11. September 2007
![Page 48: Parallelizing a Real-Time Steering Simulation for Computer Games with OpenMP by Bjoern Knafla and Claudia Leopold (now Fohry)](https://reader033.vdocument.in/reader033/viewer/2022060108/554dc524b4c905bd488b5035/html5/thumbnails/48.jpg)
Time step t
Sequentialagent
updateorder
Neighbors
In state ?
Update
agent
0
Update
agent
1
Update
agent
2
Update
agent
n
...
In state t-1In state t
21Dienstag, 11. September 2007
![Page 49: Parallelizing a Real-Time Steering Simulation for Computer Games with OpenMP by Bjoern Knafla and Claudia Leopold (now Fohry)](https://reader033.vdocument.in/reader033/viewer/2022060108/554dc524b4c905bd488b5035/html5/thumbnails/49.jpg)
Bad parallelization
22Dienstag, 11. September 2007
![Page 50: Parallelizing a Real-Time Steering Simulation for Computer Games with OpenMP by Bjoern Knafla and Claudia Leopold (now Fohry)](https://reader033.vdocument.in/reader033/viewer/2022060108/554dc524b4c905bd488b5035/html5/thumbnails/50.jpg)
23Dienstag, 11. September 2007
![Page 51: Parallelizing a Real-Time Steering Simulation for Computer Games with OpenMP by Bjoern Knafla and Claudia Leopold (now Fohry)](https://reader033.vdocument.in/reader033/viewer/2022060108/554dc524b4c905bd488b5035/html5/thumbnails/51.jpg)
Questionable reliabilityand correctness
23Dienstag, 11. September 2007
![Page 52: Parallelizing a Real-Time Steering Simulation for Computer Games with OpenMP by Bjoern Knafla and Claudia Leopold (now Fohry)](https://reader033.vdocument.in/reader033/viewer/2022060108/554dc524b4c905bd488b5035/html5/thumbnails/52.jpg)
No speedup
24Dienstag, 11. September 2007
![Page 53: Parallelizing a Real-Time Steering Simulation for Computer Games with OpenMP by Bjoern Knafla and Claudia Leopold (now Fohry)](https://reader033.vdocument.in/reader033/viewer/2022060108/554dc524b4c905bd488b5035/html5/thumbnails/53.jpg)
No speedup
24Dienstag, 11. September 2007
![Page 54: Parallelizing a Real-Time Steering Simulation for Computer Games with OpenMP by Bjoern Knafla and Claudia Leopold (now Fohry)](https://reader033.vdocument.in/reader033/viewer/2022060108/554dc524b4c905bd488b5035/html5/thumbnails/54.jpg)
Mainparallelization problems
25Dienstag, 11. September 2007
![Page 55: Parallelizing a Real-Time Steering Simulation for Computer Games with OpenMP by Bjoern Knafla and Claudia Leopold (now Fohry)](https://reader033.vdocument.in/reader033/viewer/2022060108/554dc524b4c905bd488b5035/html5/thumbnails/55.jpg)
26Dienstag, 11. September 2007
![Page 56: Parallelizing a Real-Time Steering Simulation for Computer Games with OpenMP by Bjoern Knafla and Claudia Leopold (now Fohry)](https://reader033.vdocument.in/reader033/viewer/2022060108/554dc524b4c905bd488b5035/html5/thumbnails/56.jpg)
Race conditions
26Dienstag, 11. September 2007
![Page 57: Parallelizing a Real-Time Steering Simulation for Computer Games with OpenMP by Bjoern Knafla and Claudia Leopold (now Fohry)](https://reader033.vdocument.in/reader033/viewer/2022060108/554dc524b4c905bd488b5035/html5/thumbnails/57.jpg)
Race conditions
Global variables, deep inheritance hierarchies, strongly interdependent classes
26Dienstag, 11. September 2007
![Page 58: Parallelizing a Real-Time Steering Simulation for Computer Games with OpenMP by Bjoern Knafla and Claudia Leopold (now Fohry)](https://reader033.vdocument.in/reader033/viewer/2022060108/554dc524b4c905bd488b5035/html5/thumbnails/58.jpg)
Race conditions
Global variables, deep inheritance hierarchies, strongly interdependent classes
Non-determinism
26Dienstag, 11. September 2007
![Page 59: Parallelizing a Real-Time Steering Simulation for Computer Games with OpenMP by Bjoern Knafla and Claudia Leopold (now Fohry)](https://reader033.vdocument.in/reader033/viewer/2022060108/554dc524b4c905bd488b5035/html5/thumbnails/59.jpg)
Race conditions
Global variables, deep inheritance hierarchies, strongly interdependent classes
Non-determinism
Order of agent updates and random numbers
26Dienstag, 11. September 2007
![Page 60: Parallelizing a Real-Time Steering Simulation for Computer Games with OpenMP by Bjoern Knafla and Claudia Leopold (now Fohry)](https://reader033.vdocument.in/reader033/viewer/2022060108/554dc524b4c905bd488b5035/html5/thumbnails/60.jpg)
Race conditions
Global variables, deep inheritance hierarchies, strongly interdependent classes
Non-determinism
Order of agent updates and random numbers
Non-thread-safe functions
26Dienstag, 11. September 2007
![Page 61: Parallelizing a Real-Time Steering Simulation for Computer Games with OpenMP by Bjoern Knafla and Claudia Leopold (now Fohry)](https://reader033.vdocument.in/reader033/viewer/2022060108/554dc524b4c905bd488b5035/html5/thumbnails/61.jpg)
Parallelizationthat works
27Dienstag, 11. September 2007
![Page 62: Parallelizing a Real-Time Steering Simulation for Computer Games with OpenMP by Bjoern Knafla and Claudia Leopold (now Fohry)](https://reader033.vdocument.in/reader033/viewer/2022060108/554dc524b4c905bd488b5035/html5/thumbnails/62.jpg)
Guiding ideas
28Dienstag, 11. September 2007
![Page 63: Parallelizing a Real-Time Steering Simulation for Computer Games with OpenMP by Bjoern Knafla and Claudia Leopold (now Fohry)](https://reader033.vdocument.in/reader033/viewer/2022060108/554dc524b4c905bd488b5035/html5/thumbnails/63.jpg)
Guiding ideas
Update order independent simulation
28Dienstag, 11. September 2007
![Page 64: Parallelizing a Real-Time Steering Simulation for Computer Games with OpenMP by Bjoern Knafla and Claudia Leopold (now Fohry)](https://reader033.vdocument.in/reader033/viewer/2022060108/554dc524b4c905bd488b5035/html5/thumbnails/64.jpg)
Guiding ideas
Update order independent simulation
Agent modification only dependent on its steering vector
28Dienstag, 11. September 2007
![Page 65: Parallelizing a Real-Time Steering Simulation for Computer Games with OpenMP by Bjoern Knafla and Claudia Leopold (now Fohry)](https://reader033.vdocument.in/reader033/viewer/2022060108/554dc524b4c905bd488b5035/html5/thumbnails/65.jpg)
Guiding ideas
Update order independent simulation
Agent modification only dependent on its steering vector
Minimize synchronization
28Dienstag, 11. September 2007
![Page 66: Parallelizing a Real-Time Steering Simulation for Computer Games with OpenMP by Bjoern Knafla and Claudia Leopold (now Fohry)](https://reader033.vdocument.in/reader033/viewer/2022060108/554dc524b4c905bd488b5035/html5/thumbnails/66.jpg)
Guiding ideas
Update order independent simulation
Agent modification only dependent on its steering vector
Minimize synchronization
Finish parallel processing before graphics stage
28Dienstag, 11. September 2007
![Page 67: Parallelizing a Real-Time Steering Simulation for Computer Games with OpenMP by Bjoern Knafla and Claudia Leopold (now Fohry)](https://reader033.vdocument.in/reader033/viewer/2022060108/554dc524b4c905bd488b5035/html5/thumbnails/67.jpg)
Guiding ideas
Update order independent simulation
Agent modification only dependent on its steering vector
Minimize synchronization
Finish parallel processing before graphics stage
Interfaces for explicit context
28Dienstag, 11. September 2007
![Page 68: Parallelizing a Real-Time Steering Simulation for Computer Games with OpenMP by Bjoern Knafla and Claudia Leopold (now Fohry)](https://reader033.vdocument.in/reader033/viewer/2022060108/554dc524b4c905bd488b5035/html5/thumbnails/68.jpg)
Refactorization
29Dienstag, 11. September 2007
![Page 69: Parallelizing a Real-Time Steering Simulation for Computer Games with OpenMP by Bjoern Knafla and Claudia Leopold (now Fohry)](https://reader033.vdocument.in/reader033/viewer/2022060108/554dc524b4c905bd488b5035/html5/thumbnails/69.jpg)
Split agent update
Agentupdateorder
Sim.
agent
Modify
agent
Agent update
30Dienstag, 11. September 2007
![Page 70: Parallelizing a Real-Time Steering Simulation for Computer Games with OpenMP by Bjoern Knafla and Claudia Leopold (now Fohry)](https://reader033.vdocument.in/reader033/viewer/2022060108/554dc524b4c905bd488b5035/html5/thumbnails/70.jpg)
Simulate agent stage
Agent public
Agent private
Sim.
agent
Random.
Agent
state
Agent
stateNeighbors
Render-
Feeder
references
readread
read + write
write
Steering
Vector
31Dienstag, 11. September 2007
![Page 71: Parallelizing a Real-Time Steering Simulation for Computer Games with OpenMP by Bjoern Knafla and Claudia Leopold (now Fohry)](https://reader033.vdocument.in/reader033/viewer/2022060108/554dc524b4c905bd488b5035/html5/thumbnails/71.jpg)
Simulate agent stage
Agent public
Agent private
Sim.
agent
Random.
Agent
state
Agent
stateNeighbors
Render-
Feeder
references
readread
read + write
write
Steering
Vectorconst
const
31Dienstag, 11. September 2007
![Page 72: Parallelizing a Real-Time Steering Simulation for Computer Games with OpenMP by Bjoern Knafla and Claudia Leopold (now Fohry)](https://reader033.vdocument.in/reader033/viewer/2022060108/554dc524b4c905bd488b5035/html5/thumbnails/72.jpg)
Modify agent stage
Agent public
Agent private
Modify
agent
Random.
Agent
state
Agent
stateNeighbors
Render-
Feeder
references
read + write
read
Steering
Vector
32Dienstag, 11. September 2007
![Page 73: Parallelizing a Real-Time Steering Simulation for Computer Games with OpenMP by Bjoern Knafla and Claudia Leopold (now Fohry)](https://reader033.vdocument.in/reader033/viewer/2022060108/554dc524b4c905bd488b5035/html5/thumbnails/73.jpg)
Modify neighbor data structure
Agent public
Agent private
Modify
neigh-
bors
Random.
Agent
state
Agent
stateNeighbors
Render-
Feeder
references
write
Steering
Vector read
33Dienstag, 11. September 2007
![Page 74: Parallelizing a Real-Time Steering Simulation for Computer Games with OpenMP by Bjoern Knafla and Claudia Leopold (now Fohry)](https://reader033.vdocument.in/reader033/viewer/2022060108/554dc524b4c905bd488b5035/html5/thumbnails/74.jpg)
Input Update Output
Refactor update stage
34Dienstag, 11. September 2007
![Page 75: Parallelizing a Real-Time Steering Simulation for Computer Games with OpenMP by Bjoern Knafla and Claudia Leopold (now Fohry)](https://reader033.vdocument.in/reader033/viewer/2022060108/554dc524b4c905bd488b5035/html5/thumbnails/75.jpg)
Split update stage
Sub-stages: simulation and modification
Sim. Modify
Update stage
35Dienstag, 11. September 2007
![Page 76: Parallelizing a Real-Time Steering Simulation for Computer Games with OpenMP by Bjoern Knafla and Claudia Leopold (now Fohry)](https://reader033.vdocument.in/reader033/viewer/2022060108/554dc524b4c905bd488b5035/html5/thumbnails/76.jpg)
Old update stage
Sequentialprocessing
order
Sim.
agent
0
Modify
agent
0
Sim.
agent
1
Modify
agent
1
Sim.
agent
n
Modify
agent
n
...
Update agent Update agent Update agent
36Dienstag, 11. September 2007
![Page 77: Parallelizing a Real-Time Steering Simulation for Computer Games with OpenMP by Bjoern Knafla and Claudia Leopold (now Fohry)](https://reader033.vdocument.in/reader033/viewer/2022060108/554dc524b4c905bd488b5035/html5/thumbnails/77.jpg)
Time step t
Sequentialprocessing
order
Sim.
agent
0
Modify
agent
0
Sim.
agent
1
Modify
agent
1
Sim.
agent
n
Modify
agent
n
...
Agents in state t-1
37Dienstag, 11. September 2007
![Page 78: Parallelizing a Real-Time Steering Simulation for Computer Games with OpenMP by Bjoern Knafla and Claudia Leopold (now Fohry)](https://reader033.vdocument.in/reader033/viewer/2022060108/554dc524b4c905bd488b5035/html5/thumbnails/78.jpg)
Time step t
Sequentialprocessing
order
Sim.
agent
0
Modify
agent
0
Sim.
agent
1
Modify
agent
1
Sim.
agent
n
Modify
agent
n
...
Agent in state t Agents in state t-1
38Dienstag, 11. September 2007
![Page 79: Parallelizing a Real-Time Steering Simulation for Computer Games with OpenMP by Bjoern Knafla and Claudia Leopold (now Fohry)](https://reader033.vdocument.in/reader033/viewer/2022060108/554dc524b4c905bd488b5035/html5/thumbnails/79.jpg)
New update stage
Sequentialprocessing
order
Sim.
agent
0
Sim.
agent
1
...
Sim.
agent
n
Modify
agent
0
Modify
agent
1
...
Modify
agent
n
Simulation sub-stage Modification sub-stage
39Dienstag, 11. September 2007
![Page 80: Parallelizing a Real-Time Steering Simulation for Computer Games with OpenMP by Bjoern Knafla and Claudia Leopold (now Fohry)](https://reader033.vdocument.in/reader033/viewer/2022060108/554dc524b4c905bd488b5035/html5/thumbnails/80.jpg)
Time step t
Sequentialprocessing
order
Sim.
agent
0
Sim.
agent
1
...
Sim.
agent
n
Modify
agent
0
Modify
agent
1
...
Modify
agent
n
Agents in public state t-1
40Dienstag, 11. September 2007
![Page 81: Parallelizing a Real-Time Steering Simulation for Computer Games with OpenMP by Bjoern Knafla and Claudia Leopold (now Fohry)](https://reader033.vdocument.in/reader033/viewer/2022060108/554dc524b4c905bd488b5035/html5/thumbnails/81.jpg)
Time step t
Sequentialprocessing
order
Sim.
agent
0
Sim.
agent
1
...
Sim.
agent
n
Modify
agent
0
Modify
agent
1
...
Modify
agent
n
Agents in public state t-1
41Dienstag, 11. September 2007
![Page 82: Parallelizing a Real-Time Steering Simulation for Computer Games with OpenMP by Bjoern Knafla and Claudia Leopold (now Fohry)](https://reader033.vdocument.in/reader033/viewer/2022060108/554dc524b4c905bd488b5035/html5/thumbnails/82.jpg)
Time step t
Sequentialprocessing
order
Sim.
agent
0
Sim.
agent
1
...
Sim.
agent
n
Modify
agent
0
Modify
agent
1
...
Modify
agent
n
Agents in public state t-1
42Dienstag, 11. September 2007
![Page 83: Parallelizing a Real-Time Steering Simulation for Computer Games with OpenMP by Bjoern Knafla and Claudia Leopold (now Fohry)](https://reader033.vdocument.in/reader033/viewer/2022060108/554dc524b4c905bd488b5035/html5/thumbnails/83.jpg)
Time step t
Each agent is modifiedbased solely on its ownstate
Sequentialprocessing
order
Sim.
agent
0
Sim.
agent
1
...
Sim.
agent
n
Modify
agent
0
Modify
agent
1
...
Modify
agent
n
Agents in public state t-1
42Dienstag, 11. September 2007
![Page 84: Parallelizing a Real-Time Steering Simulation for Computer Games with OpenMP by Bjoern Knafla and Claudia Leopold (now Fohry)](https://reader033.vdocument.in/reader033/viewer/2022060108/554dc524b4c905bd488b5035/html5/thumbnails/84.jpg)
Parallelization
43Dienstag, 11. September 2007
![Page 85: Parallelizing a Real-Time Steering Simulation for Computer Games with OpenMP by Bjoern Knafla and Claudia Leopold (now Fohry)](https://reader033.vdocument.in/reader033/viewer/2022060108/554dc524b4c905bd488b5035/html5/thumbnails/85.jpg)
Parallel update stage
S M
B
a
r
r
i
e
r
P
a
r
a
l
l
e
l
Simulation
B
a
r
r
i
e
r
P
a
r
a
l
l
e
l
Modification
Update
neigh-
bors
Possibly
parallelS S
S S
S S S
S S
SS
M M
M M M
M M M
M M M
M M M
44Dienstag, 11. September 2007
![Page 86: Parallelizing a Real-Time Steering Simulation for Computer Games with OpenMP by Bjoern Knafla and Claudia Leopold (now Fohry)](https://reader033.vdocument.in/reader033/viewer/2022060108/554dc524b4c905bd488b5035/html5/thumbnails/86.jpg)
Parallel simulationsub-stage
S
B
a
r
r
i
e
r
P
a
r
a
l
l
e
l
Simulation
B
a
r
r
i
e
r
P
a
r
a
l
l
e
l
Modification
Update
neigh-
bors
Possibly
parallelS S
S S
S S S
S S
SS
45Dienstag, 11. September 2007
![Page 87: Parallelizing a Real-Time Steering Simulation for Computer Games with OpenMP by Bjoern Knafla and Claudia Leopold (now Fohry)](https://reader033.vdocument.in/reader033/viewer/2022060108/554dc524b4c905bd488b5035/html5/thumbnails/87.jpg)
Parallel modificationsub-stage
M
B
a
r
r
i
e
r
P
a
r
a
l
l
e
l
Simulation
B
a
r
r
i
e
r
P
a
r
a
l
l
e
l
Modification
Update
neigh-
bors
Possibly
parallelM M
M M M
M M M
M M M
M M M
46Dienstag, 11. September 2007
![Page 88: Parallelizing a Real-Time Steering Simulation for Computer Games with OpenMP by Bjoern Knafla and Claudia Leopold (now Fohry)](https://reader033.vdocument.in/reader033/viewer/2022060108/554dc524b4c905bd488b5035/html5/thumbnails/88.jpg)
Parallel modificationsub-stage
B
a
r
r
i
e
r
P
a
r
a
l
l
e
l
Simulation
B
a
r
r
i
e
r
P
a
r
a
l
l
e
l
Modification
Update
neigh-
bors
Possibly
parallel
47Dienstag, 11. September 2007
![Page 89: Parallelizing a Real-Time Steering Simulation for Computer Games with OpenMP by Bjoern Knafla and Claudia Leopold (now Fohry)](https://reader033.vdocument.in/reader033/viewer/2022060108/554dc524b4c905bd488b5035/html5/thumbnails/89.jpg)
Performance
48Dienstag, 11. September 2007
![Page 90: Parallelizing a Real-Time Steering Simulation for Computer Games with OpenMP by Bjoern Knafla and Claudia Leopold (now Fohry)](https://reader033.vdocument.in/reader033/viewer/2022060108/554dc524b4c905bd488b5035/html5/thumbnails/90.jpg)
Dual-processor dual-core 2 GHz AMD Opteron with 2 GB Ram
2x Nvidia 7800 GTX graphics cards in SLI mode
Linux OS
Test-computer
49Dienstag, 11. September 2007
![Page 91: Parallelizing a Real-Time Steering Simulation for Computer Games with OpenMP by Bjoern Knafla and Claudia Leopold (now Fohry)](https://reader033.vdocument.in/reader033/viewer/2022060108/554dc524b4c905bd488b5035/html5/thumbnails/91.jpg)
Max speedups
50Dienstag, 11. September 2007
![Page 92: Parallelizing a Real-Time Steering Simulation for Computer Games with OpenMP by Bjoern Knafla and Claudia Leopold (now Fohry)](https://reader033.vdocument.in/reader033/viewer/2022060108/554dc524b4c905bd488b5035/html5/thumbnails/92.jpg)
Comparison of OpenSteerDemo flock of birds simulation with 4 threads with OpenMP-disabled version
Max speedups
50Dienstag, 11. September 2007
![Page 93: Parallelizing a Real-Time Steering Simulation for Computer Games with OpenMP by Bjoern Knafla and Claudia Leopold (now Fohry)](https://reader033.vdocument.in/reader033/viewer/2022060108/554dc524b4c905bd488b5035/html5/thumbnails/93.jpg)
Comparison of OpenSteerDemo flock of birds simulation with 4 threads with OpenMP-disabled version
Whole application: !2.84
Max speedups
50Dienstag, 11. September 2007
![Page 94: Parallelizing a Real-Time Steering Simulation for Computer Games with OpenMP by Bjoern Knafla and Claudia Leopold (now Fohry)](https://reader033.vdocument.in/reader033/viewer/2022060108/554dc524b4c905bd488b5035/html5/thumbnails/94.jpg)
Comparison of OpenSteerDemo flock of birds simulation with 4 threads with OpenMP-disabled version
Whole application: !2.84
Update stage: !! ! 3.54
Max speedups
50Dienstag, 11. September 2007
![Page 95: Parallelizing a Real-Time Steering Simulation for Computer Games with OpenMP by Bjoern Knafla and Claudia Leopold (now Fohry)](https://reader033.vdocument.in/reader033/viewer/2022060108/554dc524b4c905bd488b5035/html5/thumbnails/95.jpg)
Summary
51Dienstag, 11. September 2007
![Page 96: Parallelizing a Real-Time Steering Simulation for Computer Games with OpenMP by Bjoern Knafla and Claudia Leopold (now Fohry)](https://reader033.vdocument.in/reader033/viewer/2022060108/554dc524b4c905bd488b5035/html5/thumbnails/96.jpg)
52Dienstag, 11. September 2007
![Page 97: Parallelizing a Real-Time Steering Simulation for Computer Games with OpenMP by Bjoern Knafla and Claudia Leopold (now Fohry)](https://reader033.vdocument.in/reader033/viewer/2022060108/554dc524b4c905bd488b5035/html5/thumbnails/97.jpg)
Refactored first
52Dienstag, 11. September 2007
![Page 98: Parallelizing a Real-Time Steering Simulation for Computer Games with OpenMP by Bjoern Knafla and Claudia Leopold (now Fohry)](https://reader033.vdocument.in/reader033/viewer/2022060108/554dc524b4c905bd488b5035/html5/thumbnails/98.jpg)
Refactored first
Simplicity!
52Dienstag, 11. September 2007
![Page 99: Parallelizing a Real-Time Steering Simulation for Computer Games with OpenMP by Bjoern Knafla and Claudia Leopold (now Fohry)](https://reader033.vdocument.in/reader033/viewer/2022060108/554dc524b4c905bd488b5035/html5/thumbnails/99.jpg)
Refactored first
Simplicity!
High-level design to min. synchronization
52Dienstag, 11. September 2007
![Page 100: Parallelizing a Real-Time Steering Simulation for Computer Games with OpenMP by Bjoern Knafla and Claudia Leopold (now Fohry)](https://reader033.vdocument.in/reader033/viewer/2022060108/554dc524b4c905bd488b5035/html5/thumbnails/100.jpg)
Refactored first
Simplicity!
High-level design to min. synchronization
Explicit context
52Dienstag, 11. September 2007
![Page 101: Parallelizing a Real-Time Steering Simulation for Computer Games with OpenMP by Bjoern Knafla and Claudia Leopold (now Fohry)](https://reader033.vdocument.in/reader033/viewer/2022060108/554dc524b4c905bd488b5035/html5/thumbnails/101.jpg)
Refactored first
Simplicity!
High-level design to min. synchronization
Explicit context
Deferred computation
52Dienstag, 11. September 2007
![Page 102: Parallelizing a Real-Time Steering Simulation for Computer Games with OpenMP by Bjoern Knafla and Claudia Leopold (now Fohry)](https://reader033.vdocument.in/reader033/viewer/2022060108/554dc524b4c905bd488b5035/html5/thumbnails/102.jpg)
Refactored first
Simplicity!
High-level design to min. synchronization
Explicit context
Deferred computation
Identified slices for data-parallel computation
52Dienstag, 11. September 2007
![Page 103: Parallelizing a Real-Time Steering Simulation for Computer Games with OpenMP by Bjoern Knafla and Claudia Leopold (now Fohry)](https://reader033.vdocument.in/reader033/viewer/2022060108/554dc524b4c905bd488b5035/html5/thumbnails/103.jpg)
Thank you!
53Dienstag, 11. September 2007