HI Srinivas,
- Of course, removing the barrier bears the potential of race conditions. If you do it you have to make sure that the program is still correct. This includes not using data that is still being modified in the loop.
- Atomic always refers to single statements, so there is not even the possibility to break out of it. In a critical region, break makes no sense since it is not a loop. Of course you can get a similar effect using a simple conditional.
- "omp parallel for" is a loop that uses the combined "parallel for" directive to parallelize the loop. Before and after the loop, execution is sequential. With "omp for", a loop is distributed among threads that are already running (i.e., in a parallel region). After the loop, threads continue executing whatever comes next, in parallel.
Hope this helps,
Georg.