Merged
Conversation
Author
|
Note that the directory name uniqueness would be required even if it is later decided to move the scratch directory into |
kyle-larkin
approved these changes
Mar 13, 2026
kyle-larkin
left a comment
There was a problem hiding this comment.
Worked as expected, I like the changes, and the plan outlined in the TODO.
| So use cases such as self._output_obj.outPath in `bmi_model.py` would need to be updated | ||
| to use a new configuration key for specifying the output directory for (optionally) storing permanent results. | ||
| The process of writing to outPath could still leverage /tmp/ while the file is incomplete / in-process, | ||
| using a OS rename to move the file to the shared location once writing has completed and the file handle has been closed. |
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.
This causes the provided scratch directory to be a parent of the actual scratch directory. The actual scratch directory is now created as a child of the directory specified in the configuration file. The name of the child directory is a random string, and it is shared among all MPI ranks.
This is to avoid file contention during concurrent execution.
The cleanup function was also changed some.
TODO: note that when running through
ngen, the MPI exit handling logic does not seem to be triggering the cleanup step in cases when forcing engine crashes.The forcing cleanup is triggering during normal exit when running through
ngen, and is triggering under crash conditions and normal exits when running through the debugger (run_bmi_forcing.pywithmpirun).Additions
ConfigOptions._scratch_dir_has_been_uniquefiedused for state management to ensure the uniquefication method is called no more than once.Removals
Changes
Testing
Screenshots
Notes
Todos
Checklist
Testing checklist
Target Environment support