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

make spiner piecewise grids backwards compatible #92

Merged
merged 1 commit into from
Aug 12, 2024

Conversation

Yurlungur
Copy link
Collaborator

@Yurlungur Yurlungur commented Aug 6, 2024

PR Summary

In the piecewise grids MR in singularity-eos, @chadmeyer raised a concern that piecewise grids are not backwards compatible with old tables. This MR fixes that issue.

PR Checklist

  • Code is formatted. (You can use the format_spiner make target.)
  • Adds a test for any bugs fixed. Adds tests for new features.
  • If preparing for a new release, update the version in cmake.

@dholladay00
Copy link
Collaborator

I have to admit I am not really familiar with the hdf5 bits of this code or the hdf5 interface. That said, I think this should go through the testing on lanl git before being merged.

@Yurlungur
Copy link
Collaborator Author

I have to admit I am not really familiar with the hdf5 bits of this code or the hdf5 interface. That said, I think this should go through the testing on lanl git before being merged.

I don't think it's possible that this will have an impact. But pipeline triggered.

@Yurlungur
Copy link
Collaborator Author

The HDF5 machinery only works on host. And all this is doing is it's checking to see if a file contains only a RegularGrid1D or if it contains a PiecewiseGrid1D if the latter, it loads the whole piecewise grid. If the former, it loads a piecewise grid containing only one segment, the regular grid in the file.

@dholladay00
Copy link
Collaborator

I see, it wasn't clear to me that the GitHub testing ran the test you added. Either way, probably still a good idea to run the lanl git testing.

@dholladay00
Copy link
Collaborator

@Yurlungur refresh my memory. The template parameter describes the max number of grids but the actual number can be <= to that and is settable at runtime, is that right? Is that what is being done here?

Copy link
Collaborator

@jhp-lanl jhp-lanl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I admit I'm not familiar with this code, but it seems like an appropriate fix in isolation.

@Yurlungur
Copy link
Collaborator Author

@Yurlungur refresh my memory. The template parameter describes the max number of grids but the actual number can be <= to that and is settable at runtime, is that right? Is that what is being done here?

Yes exactly. :)

@Yurlungur
Copy link
Collaborator Author

Tests passing on re-git. @dholladay00 do you approve?

@Yurlungur Yurlungur merged commit 0d0d747 into main Aug 12, 2024
4 checks passed
@Yurlungur Yurlungur deleted the jmm/backwards-compatible-grids branch August 12, 2024 17:23
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.

4 participants