Merge release-5-0 into master
[alexxy/gromacs.git] / src / gromacs / mdlib / update.c
index 68c30a18e21851d06d9afc369f04dfbe2f17e311..373212ca8a07a46f49551430fd3b6d5c1d365e6f 100644 (file)
  */
 #include "gmxpre.h"
 
-#include <stdio.h>
+#include "gromacs/legacyheaders/update.h"
+
 #include <math.h>
+#include <stdio.h>
 
-#include "gromacs/legacyheaders/types/commrec.h"
-#include "gromacs/legacyheaders/typedefs.h"
-#include "gromacs/legacyheaders/nrnb.h"
-#include "gromacs/math/units.h"
-#include "gromacs/legacyheaders/macros.h"
-#include "gromacs/math/vec.h"
-#include "gromacs/legacyheaders/update.h"
-#include "gromacs/random/random.h"
-#include "gromacs/legacyheaders/tgroup.h"
-#include "gromacs/legacyheaders/force.h"
-#include "gromacs/legacyheaders/names.h"
-#include "gromacs/legacyheaders/txtdump.h"
-#include "gromacs/legacyheaders/mdrun.h"
+#include "gromacs/fileio/confio.h"
 #include "gromacs/legacyheaders/constr.h"
 #include "gromacs/legacyheaders/disre.h"
-#include "gromacs/legacyheaders/orires.h"
+#include "gromacs/legacyheaders/force.h"
 #include "gromacs/legacyheaders/gmx_omp_nthreads.h"
-
-#include "gromacs/fileio/confio.h"
+#include "gromacs/legacyheaders/macros.h"
+#include "gromacs/legacyheaders/mdrun.h"
+#include "gromacs/legacyheaders/names.h"
+#include "gromacs/legacyheaders/nrnb.h"
+#include "gromacs/legacyheaders/orires.h"
+#include "gromacs/legacyheaders/tgroup.h"
+#include "gromacs/legacyheaders/txtdump.h"
+#include "gromacs/legacyheaders/typedefs.h"
+#include "gromacs/legacyheaders/types/commrec.h"
+#include "gromacs/math/units.h"
+#include "gromacs/math/vec.h"
 #include "gromacs/pbcutil/mshift.h"
 #include "gromacs/pbcutil/pbc.h"
 #include "gromacs/pulling/pull.h"
+#include "gromacs/random/random.h"
 #include "gromacs/timing/wallcycle.h"
 #include "gromacs/utility/futil.h"
 #include "gromacs/utility/gmxomp.h"
@@ -1767,7 +1767,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]);