#include <string.h>
#include <time.h>
-#include "gromacs/legacyheaders/network.h"
-#include "gromacs/legacyheaders/nrnb.h"
+#include "gromacs/fileio/confio.h"
+#include "gromacs/fileio/mtxio.h"
+#include "gromacs/fileio/trajectory_writing.h"
+#include "gromacs/imd/imd.h"
+#include "gromacs/legacyheaders/bonded-threading.h"
+#include "gromacs/legacyheaders/constr.h"
+#include "gromacs/legacyheaders/domdec.h"
#include "gromacs/legacyheaders/force.h"
+#include "gromacs/legacyheaders/gmx_omp_nthreads.h"
#include "gromacs/legacyheaders/macros.h"
+#include "gromacs/legacyheaders/md_logging.h"
+#include "gromacs/legacyheaders/md_support.h"
+#include "gromacs/legacyheaders/mdatoms.h"
+#include "gromacs/legacyheaders/mdebin.h"
+#include "gromacs/legacyheaders/mdrun.h"
#include "gromacs/legacyheaders/names.h"
+#include "gromacs/legacyheaders/network.h"
+#include "gromacs/legacyheaders/nrnb.h"
+#include "gromacs/legacyheaders/ns.h"
+#include "gromacs/legacyheaders/pme.h"
+#include "gromacs/legacyheaders/sim_util.h"
+#include "gromacs/legacyheaders/tgroup.h"
#include "gromacs/legacyheaders/txtdump.h"
#include "gromacs/legacyheaders/typedefs.h"
#include "gromacs/legacyheaders/update.h"
-#include "gromacs/legacyheaders/constr.h"
-#include "gromacs/legacyheaders/tgroup.h"
-#include "gromacs/legacyheaders/mdebin.h"
#include "gromacs/legacyheaders/vsite.h"
-#include "gromacs/legacyheaders/force.h"
-#include "gromacs/legacyheaders/mdrun.h"
-#include "gromacs/legacyheaders/md_support.h"
-#include "gromacs/legacyheaders/sim_util.h"
-#include "gromacs/legacyheaders/domdec.h"
-#include "gromacs/legacyheaders/mdatoms.h"
-#include "gromacs/legacyheaders/ns.h"
-#include "gromacs/topology/mtop_util.h"
-#include "gromacs/legacyheaders/pme.h"
-#include "gromacs/legacyheaders/bonded-threading.h"
-#include "gromacs/legacyheaders/gmx_omp_nthreads.h"
-#include "gromacs/legacyheaders/md_logging.h"
-
-#include "gromacs/fileio/confio.h"
-#include "gromacs/fileio/mtxio.h"
-#include "gromacs/fileio/trajectory_writing.h"
-#include "gromacs/imd/imd.h"
#include "gromacs/legacyheaders/types/commrec.h"
#include "gromacs/linearalgebra/sparsematrix.h"
#include "gromacs/math/vec.h"
#include "gromacs/pbcutil/pbc.h"
#include "gromacs/timing/wallcycle.h"
#include "gromacs/timing/walltime_accounting.h"
+#include "gromacs/topology/mtop_util.h"
#include "gromacs/utility/cstringutil.h"
#include "gromacs/utility/fatalerror.h"
#include "gromacs/utility/smalloc.h"
int start, end;
rvec *x1, *x2;
real dvdl_constr;
+ int nthreads gmx_unused;
s1 = &ems1->s;
s2 = &ems2->s;
x1 = s1->x;
x2 = s2->x;
-#pragma omp parallel num_threads(gmx_omp_nthreads_get(emntUpdate))
+ nthreads = gmx_omp_nthreads_get(emntUpdate);
+#pragma omp parallel num_threads(nthreads)
{
int gf, i, m;