Project

General

Profile

Bug #2394

energy average printing segfaults when no data sets are recorded

Added by Mark Abraham almost 2 years ago. Updated almost 2 years ago.

Status:
Closed
Priority:
Low
Assignee:
Category:
mdrun
Target version:
Affected version - extra info:
probably all of them
Affected version:
Difficulty:
uncategorized
Close

Description

If no calcenergy steps have added data to mdebin, the printing divides by zero when computing the averages. That's unlikely to be a problem in practice.

Associated revisions

Revision fb33d1ce (diff)
Added by Mark Abraham almost 2 years ago

Prevent log file energy average printing dividing by zero

If there's not enough data for averages, skip the average printing
entirely. In principle, pr_ebin could be called from elsewhere than
print_ebin, so now we print "N/A" rather than "nan" or segfaulting.

Added some const correctness. Added some tests. Unfortunately they
currently have to write a file to disk, but we should have the test
before refactoring it to run in memory. The tests needed to be able
to clean up their memory, so runner can now also call done_ebin
but for stability we'll leave that off for now.

TODO When merging to master branch enable the call to done_ebin
in runner().

Fixes #2394

Change-Id: Id2e151664dd4553e49880f96bdd90aacc945f992

History

#1 Updated by Mark Abraham almost 2 years ago

  • Status changed from New to In Progress

#2 Updated by Gerrit Code Review Bot almost 2 years ago

Gerrit received a related patchset '1' for Issue #2394.
Uploader: Mark Abraham ()
Change-Id: gromacs~release-2018~Id2e151664dd4553e49880f96bdd90aacc945f992
Gerrit URL: https://gerrit.gromacs.org/7530

#3 Updated by Mark Abraham almost 2 years ago

  • Status changed from In Progress to Fix uploaded

#4 Updated by Mark Abraham almost 2 years ago

  • Status changed from Fix uploaded to Resolved

#5 Updated by Mark Abraham almost 2 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF