From: Berk Hess Date: Sat, 2 Aug 2014 08:53:31 +0000 (+0200) Subject: Fixed PME bug with high OpenMP thread count X-Git-Url: http://biod.pnpi.spb.ru/gitweb/?a=commitdiff_plain;h=27189bbaad21147893b239b2457843f515e69d77;p=alexxy%2Fgromacs.git Fixed PME bug with high OpenMP thread count PME energies and forces could be incorrect with combined MPI+OpenMP parallelization. This would, only, happen when pmegrids->nthread_comm[YY] >= 2, which can only occur with high OpenMP thread count with multiple large prime factors. It's unlikely that this issue affected production runs. Fixes #1572. Change-Id: I03b38c279c8f8ab2e111dad0976edad88b3ea93b --- diff --git a/src/mdlib/pme.c b/src/mdlib/pme.c index 9ca121ca76..494bc1a988 100644 --- a/src/mdlib/pme.c +++ b/src/mdlib/pme.c @@ -3746,7 +3746,8 @@ reduce_threadgrid_overlap(gmx_pme_t pme, if (bCommY) { commbuf = commbuf_y; - buf_my = ty1 - offy; + /* The y-size of the communication buffer is order-1 */ + buf_my = pmegrid->order - 1; if (bCommX) { /* We index commbuf modulo the local grid size */