Fix segfault with EM, DD and group scheme
authorBerk Hess <hess@kth.se>
Wed, 6 Feb 2019 12:39:55 +0000 (13:39 +0100)
committerMark Abraham <mark.j.abraham@gmail.com>
Wed, 6 Feb 2019 16:58:10 +0000 (17:58 +0100)
commitc5c3743d3a5dfc0d90f5940815e94a9e6cd332d6
tree1e8bb8b3bcb036feaf9f2b31bbeaeae31262f9ca
parent4576f802ac81b07a49c7c4ad21d3bf15831979a7
Fix segfault with EM, DD and group scheme

Resetting to an old DD state during EM would leave the cg sorting array
used with the group scheme in an invalid state. This could cause
out of bounds vector access one DD step after rejecting an EM step.

When merging this into master branch, prefer to change to use ssize
rather than the static_cast.

Fixes #2813

Change-Id: I7f13b46d7ff5352ce41838b813c46f2e90c93b1c
docs/release-notes/2019/2019.1.rst
src/gromacs/domdec/partition.cpp