#include "mtop_util.h"
#include "gmxfio.h"
#include "gmx_omp_nthreads.h"
+#include "gmx_omp.h"
typedef struct {
int b0; /* first constraint for this thread */
}
/* The (only) OpenMP parallel region of constrain_lincs */
+#pragma omp parallel num_threads(lincsd->nth)
{
- int th;
-
-#pragma omp parallel for num_threads(lincsd->nth) schedule(static)
- for(th=0; th<lincsd->nth; th++)
- {
- do_lincs(x,xprime,box,pbc,lincsd,th,
- md->invmass,cr,
- bCalcVir || (ir->efep != efepNO),
- ir->LincsWarnAngle,&warn,
- invdt,v,bCalcVir,rmdr);
- }
+ int th=gmx_omp_get_thread_num();
+ do_lincs(x,xprime,box,pbc,lincsd,th,
+ md->invmass,cr,
+ bCalcVir || (ir->efep != efepNO),
+ ir->LincsWarnAngle,&warn,
+ invdt,v,bCalcVir,rmdr);
}
if (ir->efep != efepNO)
#include "gmx_parallel_3dfft.h"
#include "pdbio.h"
#include "gmx_cyclecounter.h"
+#include "gmx_omp.h"
/* Single precision, with SSE2 or higher available */
#if defined(GMX_X86_SSE2) && !defined(GMX_DOUBLE)
}
/* Here we start a large thread parallel region */
-#pragma omp parallel for num_threads(pme->nthread) schedule(static)
- for(thread=0; thread<pme->nthread; thread++)
+#pragma omp parallel num_threads(pme->nthread) private(thread)
{
+ thread=gmx_omp_get_thread_num();
if (flags & GMX_PME_SOLVE)
{
int loop_count;