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
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 */