From: Mark Abraham Date: Thu, 8 Sep 2016 10:40:51 +0000 (+0200) Subject: Merge branch release-5-1 into release-2016 X-Git-Url: http://biod.pnpi.spb.ru/gitweb/?a=commitdiff_plain;h=73d91d6c56f9478697ad888149b75a864de2b7fc;p=alexxy%2Fgromacs.git Merge branch release-5-1 into release-2016 Trivial conflicts in minimize.cpp from bug fix in same region that now has exceptions caught within an OpenMP region. Change-Id: I8b3c269a2afd7d4967e0f7310c96af6022533ddd --- 73d91d6c56f9478697ad888149b75a864de2b7fc diff --cc src/gromacs/mdlib/minimize.cpp index 591e20a7dc,a6ffb5c793..2d5290d4b9 --- a/src/gromacs/mdlib/minimize.cpp +++ b/src/gromacs/mdlib/minimize.cpp @@@ -631,43 -590,39 +626,44 @@@ static bool do_em_step(t_commrec *cr, t nthreads = gmx_omp_nthreads_get(emntUpdate); #pragma omp parallel num_threads(nthreads) { - int gf, i, m; + rvec *x1 = s1->x; + rvec *x2 = s2->x; - gf = 0; + int gf = 0; #pragma omp for schedule(static) nowait - for (i = start; i < end; i++) + for (int i = start; i < end; i++) { - if (md->cFREEZE) - { - gf = md->cFREEZE[i]; - } - for (int m = 0; m < DIM; m++) + try { - if (ir->opts.nFreeze[gf][m]) + if (md->cFREEZE) { - x2[i][m] = x1[i][m]; + gf = md->cFREEZE[i]; } - for (m = 0; m < DIM; m++) - else ++ for (int m = 0; m < DIM; m++) { - x2[i][m] = x1[i][m] + a*f[i][m]; + if (ir->opts.nFreeze[gf][m]) + { + x2[i][m] = x1[i][m]; + } + else + { + x2[i][m] = x1[i][m] + a*f[i][m]; + } } } + GMX_CATCH_ALL_AND_EXIT_WITH_FATAL_ERROR; } if (s2->flags & (1<cg_p; - x2 = s2->cg_p; + rvec *p1 = s1->cg_p; + rvec *p2 = s2->cg_p; #pragma omp for schedule(static) nowait - for (i = start; i < end; i++) + for (int i = start; i < end; i++) { + // Trivial OpenMP block that does not throw - copy_rvec(x1[i], x2[i]); + copy_rvec(p1[i], p2[i]); } }