Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support not writting db in snapshots #2032

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions armi/operators/snapshots.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ def _mainOperate(self):
dbi = self.getInterface("database")
# database is excluded since SS writes by itself
excludeDB = ("database",)
dbActive = dbi.enabled
for ssCycle, ssNode in snapshots:
runLog.important(
"Beginning snapshot ({0:02d}, {1:02d})".format(ssCycle, ssNode)
Expand All @@ -82,14 +83,17 @@ def _mainOperate(self):
# database is excluded since it writes after coupled
self.interactAllEveryNode(ssCycle, ssNode, excludedInterfaceNames=excludeDB)
self._performTightCoupling(ssCycle, ssNode, writeDB=False)
# tight coupling is done, now write to DB
dbi.writeDBEveryNode()

if dbActive:
# tight coupling is done, now write to DB
dbi.writeDBEveryNode()

self.interactAllEOC(self.r.p.cycle)

# run things that happen at EOL, like reports, plotters, etc.
self.interactAllEOL(excludedInterfaceNames=excludeDB)
dbi.closeDB() # dump the database to file
if dbActive:
dbi.closeDB() # dump the database to file
runLog.important("Done with ARMI snapshots case.")

@staticmethod
Expand Down