improve the checkpoint functionality and add summarize feature - #14
Open
harrisonlabollita wants to merge 1 commit into
Open
improve the checkpoint functionality and add summarize feature#14harrisonlabollita wants to merge 1 commit into
harrisonlabollita wants to merge 1 commit into
Conversation
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.
Summary
The checkpoint feature in modest was envisioned to provide high-level abstractions so that the user can quickly save their DMFT data with minimal additions lines of code in their Python scripts. The goal of this PR is to complete the checkpointing feature providing a fully-fledged checkpointing class. Now the user does not have to write any hdf5 boilerplate in their python scripts and their data is automatically saved in an organized archive. Using the checkpoint class now standardizes the output formats, which will be useful for future features like mixers, etc.
Previously, the
iteration_datastruct carried only the minimal restart set (mu,Sigma_imp_list,Sigma_hartree_list). However, CSC calculations and post-processing tasks often require more, e.g., DC self-energy to restart the CSC loop or the solver's inputs/outputs to what the loop actually did. This PR adds those fields. Additionally, we provide a convenient `.summarize()' method to quickly create convergence logs of the DMFT loop.Changes
iteration_datagains four optional fields (c++/triqs_modest/checkpoint.hpp):Sigma_dc_listGimp_listGloc_listDelta_listAll default to
{}, so existing call sites are unaffected.mpi_broadcastcoversall of them.
HDF5 layout now mirrors the input/output split
Checkpointer.summarize(file=None)(python/triqs_modest/utils/checkpoint.py)prints one row per stored iteration —
iter,mu, and the orbital-resolveddiagonal occupations from
Gimp_listandGloc_list. Column groups are omittedwhen no iteration has the corresponding list populated; individual empty
iterations render
--. Master-rank only.restart()now also carriesSigma_dc_listin the broadcast payload, so a CSCrun can resume its DC.
Compatibility
This changes the on-disk layout of
iteration_data, with no fallback.4.0.0 and 4.0.1 wrote
Sigma_imp_list/Sigma_hartree_listflat under<name>/;h5_readnow opens<name>/inputsand<name>/outputsand will throwon those archives. Previously generated
*.ckpt/iterations.h5files will not bebackwards compatible.