Fix bug in GPU list balancing
authorBerk Hess <hess@kth.se>
Fri, 3 Jul 2015 20:28:52 +0000 (22:28 +0200)
committerGerrit Code Review <gerrit@gerrit.gromacs.org>
Sun, 5 Jul 2015 08:38:10 +0000 (10:38 +0200)
commit466e36339dfce3cbb7a36d43741779a39f5bd5c6
treeca8c4bd13bd53885ff1c77a33b896e4816cdaa45
parentf8259e4b36efbaf8dae21b4946a64ef64a6a5dc9
Fix bug in GPU list balancing

The function split_sci_entry could produce empty lists, which can
cause illegal memory access or incorrect energies. Before commit
6106367b this bug was never triggered, since nsp_max was never smaller
than a full cj4 entry. But 6106367b introduced a but that could
produce negative nsp_max.

Fixes #1767.

Change-Id: I2007cf6851f94f4f2ca62f609a0628725014dbe7
src/gromacs/mdlib/nbnxn_search.c