Skip to content

improve the checkpoint functionality and add summarize feature - #14

Open
harrisonlabollita wants to merge 1 commit into
TRIQS:unstablefrom
harrisonlabollita:pr/checkpoint-summarize
Open

improve the checkpoint functionality and add summarize feature#14
harrisonlabollita wants to merge 1 commit into
TRIQS:unstablefrom
harrisonlabollita:pr/checkpoint-summarize

Conversation

@harrisonlabollita

Copy link
Copy Markdown
Collaborator

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_data struct 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_data gains four optional fields (c++/triqs_modest/checkpoint.hpp):

field role
Sigma_dc_list CSC double-counting self-energy — restart-required for CSC
Gimp_list impurity Green's function (solver output)
Gloc_list local lattice Green's function (solver input)
Delta_list hybridization (solver input)

All default to {}, so existing call sites are unaffected. mpi_broadcast covers
all of them.

HDF5 layout now mirrors the input/output split

<name>/mu
<name>/inputs/{Gloc_list, Delta_list}
<name>/outputs/{Gimp_list, Sigma_imp_list, Sigma_hartree_list, Sigma_dc_list}

Checkpointer.summarize(file=None) (python/triqs_modest/utils/checkpoint.py)
prints one row per stored iteration — iter, mu, and the orbital-resolved
diagonal occupations from Gimp_list and Gloc_list. Column groups are omitted
when no iteration has the corresponding list populated; individual empty
iterations render --. Master-rank only.

restart() now also carries Sigma_dc_list in the broadcast payload, so a CSC
run 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_list flat under
<name>/; h5_read now opens <name>/inputs and <name>/outputs and will throw
on those archives. Previously generated *.ckpt/iterations.h5 files will not be
backwards compatible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant