[WIP] Fail fast if prepare fails in external engines#1118
Open
dwhswenson wants to merge 3 commits intoopenpathsampling:masterfrom
Open
[WIP] Fail fast if prepare fails in external engines#1118dwhswenson wants to merge 3 commits intoopenpathsampling:masterfrom
prepare fails in external engines#1118dwhswenson wants to merge 3 commits intoopenpathsampling:masterfrom
Conversation
The `prepare` command in external engines can be used to, e.g, create input for a given trajectory. For example, in Gromacs, this runs the grompp command to incorporate snapshot-independent information in the mdp with the specific trr snapshot. Previously, there was no catch for an error in `prepare`. This meant that the engine would try to run the trajetory, and, not finding required files, would fail with the unhelpful message "engine died unexpectedly." This PR provides a clearer error message in the case that the `prepare` step fails. It provides a specific error for the Gromacs engine, and a generic error for any engine that returns a non-zero result code from `prepare`, but which hasn't already raised the error.
prepare fails in external enginesprepare fails in external engines
Codecov Report
@@ Coverage Diff @@
## master #1118 +/- ##
==========================================
- Coverage 81.75% 81.75% -0.01%
==========================================
Files 142 142
Lines 15612 15614 +2
==========================================
+ Hits 12764 12765 +1
- Misses 2848 2849 +1
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
preparecommand in external engines can be used to, e.g, create input for a given trajectory. For example, in Gromacs, this runs the grompp command to incorporate snapshot-independent information in the mdp with the specific trr snapshot.Previously, there was no catch for an error in
prepare. This meant that the engine would try to run the trajetory, and, not finding required files, would fail with the unhelpful message "engine died unexpectedly." This PR provides a clearer error message in the case that thepreparestep fails.It provides a specific error for the Gromacs engine, and a generic error for any engine that returns a non-zero result code from
prepare, but which hasn't already raised the error.EDIT: Waiting on some test coverage here, although the actual gmx is outside our normal coverage since we don't install gmx in the test env. That said, I think we need some mechanism for also testing gmx integration in CI. I think there was no official conda-forge package when we first started with gmx integration, but there is now. (We have tests that test the integration, but they skip if there's no
gmxin the$PATH.)