All threads are potentially accessing and changing the same values, maxloc and maxval.
- OpenMP provides several ways to coordinate access to shared values
- Only one thread at a time can execute the following statement (not block). We can use the critical option
- Only one thread at a time can execute the following block
Atomic may be faster than critical but depends on hardware