OpenMP “Danger Zones”
3 major SMP programming errors:
- Race Conditions
- the outcome of the program depends on the detailed timing of the threads in the team
- Deadlock
- threads lock up waiting on a locked resource that will never come free
- Livelock
- multiple threads working individual tasks which the ensemble can not finish
- Death traps:
- thread safe libraries?
- Simultaneous access to shared data
- I/O inside parallel region
- shared memory not coherent (FLUSH)
- implied barriers removed (NOWAIT)