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

Bwd compatibility for MeshDLRXXX broken between 3.2.x <-> 3.3.x #946

Open
HugoStrand opened this issue Jun 27, 2024 · 4 comments
Open

Bwd compatibility for MeshDLRXXX broken between 3.2.x <-> 3.3.x #946

HugoStrand opened this issue Jun 27, 2024 · 4 comments

Comments

@HugoStrand
Copy link
Member

Description

There are a few new h5 properties stored for the MeshDLRXXX types in version 3.3.x. This breaks backwards compatibility of reading h5 data stored using triqs 3.2.x.

Steps to Reproduce

  1. Store a DLR Green's function to h5 file using triqs/3.2.x
  2. Try to load the h5 file with triqs/3.3.x
  3. Crash..

Proposed solution

Add checks for the new data stored in the mesh types in 3.3.x and set them to default values if they are not present in the h5 file. (Discussed on the triqs quick updates meeting 2024-06-27).

@HugoStrand
Copy link
Member Author

One of the offending parameters is the symmetrize flag loaded by triqs/3.3.x here,
https://github.com/TRIQS/triqs/blob/3.3.x/c%2B%2B/triqs/mesh/dlr.hpp#L250
which did not exist in triqs/3.2.x, see
https://github.com/TRIQS/triqs/blob/3.2.x/c%2B%2B/triqs/mesh/dlr.hpp#L237

@Wentzell
Copy link
Member

Dear @HugoStrand
I have restored backward compatibility for the dlr meshes IO in commits 77d0339 and 86a7993

@HugoStrand
Copy link
Member Author

Dear @Wentzell,

Thank you for the fix. I am afraid that it by itself is not sufficient for bwd compatibility.

It seems like the cppdlr h5 storage pattern also have diverged from 1.0.x to 1.1.x, see
https://github.com/flatironinstitute/cppdlr/blob/1.0.x/c%2B%2B/cppdlr/dlr_imtime.hpp#L709
and
https://github.com/flatironinstitute/cppdlr/blob/1.1.x/c%2B%2B/cppdlr/dlr_imtime.hpp#L801
the field it2cf_zlu is new and does not have any legacy fallback.

Reading a dlr mesh from 3.2.x with 3.3.x gives

Error in h5::group: it2cf_zlu does not exist in the group /ps/0/cmesh/dlr_it

I have sent a pull request to cppdlr/1.1.x that should fix this issue, please see
flatironinstitute/cppdlr#11

@HugoStrand HugoStrand reopened this Jul 24, 2024
@Wentzell
Copy link
Member

Thank you @HugoStrand for looking into this. There is indeed a backward compatibility break that was introduced in cppdlr. We have reviewed your changes in flatironinstitute/cppdlr#11 and it should be ready for merge.

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

No branches or pull requests

2 participants