Project

General

Profile

Feature #2651

Feature #2585: Infrastructure supporting external API

clean up mdrun log file handling

Added by Mark Abraham 12 months ago. Updated 12 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
mdrun
Target version:
Difficulty:
uncategorized
Close

Description

With a bit of effort, the mess that is the handling of the log file within mdrun can be cleaned up so that we open and close it in a single place, whether or not we are doing an appending restart.

This might also help implement aspects of gmxapi, or at least clarify how things can work in the long term.

Associated revisions

Revision 31f817da (diff)
Added by Mark Abraham 12 months ago

Clarify distinct paths for mdrun log file handling

Opening for appending is actually handled in the checkpointing code,
which is now explicit in mdrunner.

Also handled the error case when the log file cannot be opened.

Also removed unnecessary dependency on commrec.

Refs #2651

Change-Id: I0b8c7756a08c3d786571e7936e7f8f327fd17947

Revision e35e44e5 (diff)
Added by Mark Abraham 12 months ago

Extract helper functions for preparing for appending

This simplifies code so we can handle the log file pointer better.

Refs #2651

Change-Id: Ifa3114d125e89bf22081b05c5e739693c996f01b

Revision 5877facd (diff)
Added by Mark Abraham 12 months ago

Check log and other files differently during appending restart

We need to do different operations on the log file than the other
files, so it makes sense to separate those aspects of its handling,
while calling a common function for those that are common. That will
also prepare to clean up the opening of the log file in Mdrunner, so
we can do it in only one place.

Checked all the offsets were valid before doing any file operations.

Used a bit less preprocessing, too.

Refs #2651

Change-Id: I23cfba550b57d169c021d72618341ff017a3e7de

Revision 539eca89 (diff)
Added by Mark Abraham 12 months ago

Open mdrun log file only once

The log file is now kept open with a t_fileio held RAII style, which
permits the appending restart code to truncate it if needed, so that
we don't have the opening and closing of the checkpoint file being
managed in several places.

Fixes #2651

Change-Id: I6105bf55a9a10aaf15ed2f11ef8955a47743bb91

History

#1 Updated by Mark Abraham 12 months ago

I have a patch series mostly ready that I think CLI mdrun should anyway want to have, but I'll leave it to Eric to judge whether it actually helps him integrate anything for gmxapi and 2019 release. If not, then we should not prioritize it at this stage.

#2 Updated by Gerrit Code Review Bot 12 months ago

Gerrit received a related patchset '1' for Issue #2651.
Uploader: Mark Abraham ()
Change-Id: gromacs~master~I0b8c7756a08c3d786571e7936e7f8f327fd17947
Gerrit URL: https://gerrit.gromacs.org/8422

#3 Updated by Gerrit Code Review Bot 12 months ago

Gerrit received a related DRAFT patchset '1' for Issue #2651.
Uploader: Mark Abraham ()
Change-Id: gromacs~master~Ifa3114d125e89bf22081b05c5e739693c996f01b
Gerrit URL: https://gerrit.gromacs.org/8425

#4 Updated by Gerrit Code Review Bot 12 months ago

Gerrit received a related DRAFT patchset '1' for Issue #2651.
Uploader: Mark Abraham ()
Change-Id: gromacs~master~I23cfba550b57d169c021d72618341ff017a3e7de
Gerrit URL: https://gerrit.gromacs.org/8426

#5 Updated by Gerrit Code Review Bot 12 months ago

Gerrit received a related DRAFT patchset '1' for Issue #2651.
Uploader: Mark Abraham ()
Change-Id: gromacs~master~I6105bf55a9a10aaf15ed2f11ef8955a47743bb91
Gerrit URL: https://gerrit.gromacs.org/8427

#6 Updated by Mark Abraham 12 months ago

  • Status changed from New to Resolved

#7 Updated by Mark Abraham 12 months ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF