Project

General

Profile

Bug #2781

mdrun 2018 using SD integrator segfaults when attempting to read from checkpoint file

Added by Carsten Kutzner 9 months ago. Updated 9 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
mdrun
Target version:
Affected version - extra info:
also in the current HEAD of release-2019
Affected version:
Difficulty:
uncategorized
Close

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.

md.tpr (275 KB) md.tpr Carsten Kutzner, 11/29/2018 01:50 PM

Associated revisions

Revision d5972f77 (diff)
Added by Paul Bauer 9 months ago

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

Revision ad77000a (diff)
Added by Paul Bauer 9 months ago

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 9 months ago

Gerrit received a related patchset '1' for Issue #2781.
Uploader: Paul Bauer ()
Change-Id: gromacs~release-2019~I99ce1a2b932046cab6918ec24b267fc8ff3850ad
Gerrit URL: https://gerrit.gromacs.org/8759

#2 Updated by Paul Bauer 9 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 9 months ago

Gerrit received a related patchset '1' for Issue #2781.
Uploader: Paul Bauer ()
Change-Id: gromacs~release-2018~Ic584dc92c110065c1650cc1ab0d7ff0a8960fb3a
Gerrit URL: https://gerrit.gromacs.org/8760

#4 Updated by Paul Bauer 9 months ago

  • Status changed from New to Resolved

#5 Updated by Paul Bauer 9 months ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF