Due to an indexing issue, it was unlikely that calc_grid, and thus
grompp, would choose a PME grid of 84*2^n and instead use a factor 96.
For a cubic box, this could increase the FFT cost by a factor 1.5.
Fixes #1605.
Change-Id: I8d6a85a98267af053b66867722fc5626ef907964
/* Determine how many pre-factors of 2 we need */
fac2 = 1;
i = g_baseNR - 1;
/* Determine how many pre-factors of 2 we need */
fac2 = 1;
i = g_baseNR - 1;
- while (fac2*grid_base[i-1] < nmin)
+ while (fac2*grid_base[i] < nmin)