fix the omp pragmas, reduce contention by removing critical sections