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

store list of non-NULL fields in dump/load #1767

Open
stevengj opened this issue Sep 24, 2021 · 0 comments
Open

store list of non-NULL fields in dump/load #1767

stevengj opened this issue Sep 24, 2021 · 0 comments

Comments

@stevengj
Copy link
Collaborator

As discussed for #1738, it would be improve robustness to also save a list of which fields are non-NULL.

That is, for each field that is dumped (e.g. f_u) it should save a NUM_FIELD_COMPONENTS * 2 array of boolean values (indicating whether e.g. f_u[c][cmp] != NULL).

Then, when loading the fields, you check this array against the fields that are allocated, and throw an error if they don't match. (Alternatively, if a field is not allocated but is present in the file, then we could allocate it and then load it.)

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

No branches or pull requests

1 participant