Add omp flush directives