Avoid using function calls in OpenMP directives
[alexxy/gromacs.git] / src / gromacs / mdlib / update.c
index 787135f7158cd12b23bac96a7446d7de8d8e44a7..93b7f59c1ec4dc7faffce100b5b1f1f51920c478 100644 (file)
@@ -1771,7 +1771,9 @@ void update_constraints(FILE             *fplog,
         }
         else
         {
-#pragma omp parallel for num_threads(gmx_omp_nthreads_get(emntUpdate)) schedule(static)
+            nth = gmx_omp_nthreads_get(emntUpdate);
+
+#pragma omp parallel for num_threads(nth) schedule(static)
             for (i = start; i < nrend; i++)
             {
                 copy_rvec(upd->xp[i], state->x[i]);