OpenMP Synchronization
Critical section - a section of code that must be executed completely by one thread. Non-reentrant
C$OMP CRITICAL
- Implies synchronization and one thread of execution at a time.
Use C$OMP ATOMIC
- Multiple threads may execute it, but it must run to completion.