Gromacs-4.6 introduced SIMD padding in the neighborlists, which works
fine for normal simulations. However, when the neighborlist gets long
and we end up adding a second batch of particles we need to remove the
previous padding, which was not done until now. This will typically only
occur when the list per node is large, e.g. when using long cutoffs
(>2nm) with only a single core. Normal simulations should not have been
affected by it (which is also why we did not find it until now).
Fixes #1341.
Change-Id: Ie64ab6c0313a8dc0d3545a5e7d610f24adae4438
nlist->gid[nri] = gid;
nlist->shift[nri] = shift;
}
+ else
+ {
+ /* Adding to previous list. First remove possible previous padding */
+ if(nlist->simd_padding_width>1)
+ {
+ while(nlist->nrj>0 && nlist->jjnr[nlist->nrj-1]<0)
+ {
+ nlist->nrj--;
+ }
+ }
+ }
}
static inline void close_i_nblist(t_nblist *nlist)