Bug #2781
mdrun 2018 using SD integrator segfaults when attempting to read from checkpoint file
Description
We have a small mixture system of water/alkanol using the SD integrator. It runs fine and stable in v. 2018, however it immediately segfaults when trying to restart from .cpt.
Can be reproduced with the attached .tpr:
gmx mdrun -nt 1 -s md.tpr -nsteps 10
gmx mdrun -nt 1 -s md.tpr -cpi
The segv happens in restore_energyhistory_from_state() where the program accesses enerhist->..., however enerhist is a null pointer.
Associated revisions
Fix energy history reading
The energy history could be read as a nullptr from a checkpoint file,
leading to issues when trying to restart a simulation. Fixed the logic
issue and added an assertion to catch it in the future.
Also removed redundant comparisons to nullptr.
Fixes #2781
Change-Id: I99ce1a2b932046cab6918ec24b267fc8ff3850ad
History
#1 Updated by Gerrit Code Review Bot 3 months ago
Gerrit received a related patchset '1' for Issue #2781.
Uploader: Paul Bauer (paul.bauer.q@gmail.com)
Change-Id: gromacs~release-2019~I99ce1a2b932046cab6918ec24b267fc8ff3850ad
Gerrit URL: https://gerrit.gromacs.org/8759
#2 Updated by Paul Bauer 3 months ago
- Assignee set to Paul Bauer
- Target version set to 2019-rc1
- Affected version - extra info set to also in the current HEAD of release-2019
This is also still present in release 2019. I have a possible fix prepared and will upload it shortly.
#3 Updated by Gerrit Code Review Bot 3 months ago
Gerrit received a related patchset '1' for Issue #2781.
Uploader: Paul Bauer (paul.bauer.q@gmail.com)
Change-Id: gromacs~release-2018~Ic584dc92c110065c1650cc1ab0d7ff0a8960fb3a
Gerrit URL: https://gerrit.gromacs.org/8760
#4 Updated by Paul Bauer 3 months ago
- Status changed from New to Resolved
Applied in changeset ad77000af9af50267c9e22891832658e6fdeafa3.
#5 Updated by Paul Bauer 3 months ago
- Status changed from Resolved to Closed
Fix energy history reading
The energy history could be read as a nullptr from a checkpoint file,
leading to issues when trying to restart a simulation. Fixed the logic
issue and added an assertion to catch it in the future.
Also removed redundant comparisons to nullptr.
Separate commit on 2018 as per #2770.
Refs #2781
Change-Id: Ic584dc92c110065c1650cc1ab0d7ff0a8960fb3a