-
Notifications
You must be signed in to change notification settings - Fork 3
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
Restructure ThermodynamicsParameters
to reduce metadata size
#233
Comments
I think that this is fine for large, flat, and "uniform" structs. Thermodynamics does have 26 properties. Unfortunately, this isn't really a compose-able solution (as mentioned here). So, if I understand correctly, applying this to I think that we will need to test a few things out in in ClimaAtmos before merging anything. |
The solution will work for nested structs:
|
Is that something we will have to do in CloudMicrophysics.jl too? We have a lot of parameters and spend some significant time to introduce structure to them. We dispatch a lot of things now based on parameter types. Are we now switching back to all flat? |
How much parameter space does the current struct use? We run into parameter space issues regularly with Oceananigans and ClimaOcean. But we find that the issue is usually highly nested structures of things like |
The above design provides a bounded metadata size of about 32 bytes, regardless of number of simple fields in struct. This pattern is prevalent in our parameter structs in various packages! |
That's great. What is the parameter size without this change? (Is the parameter size variable? Why would that be?) |
I agree with @glwagner' points about this, we should probably identify the biggest culprits w.r.t. parameter memory usage, before widely spreading a pattern that reduces our parameter memory by only (for example) 2%.
It's 8 bytes per property, so, 208 bytes for Thermodynamics. |
The concern is mostly about metadata size! |
The Climate Modeling Alliance
Software Design Issue 📜
Purpose
Restructure
ThermodynamicsParameters
to reduce metadata size.Cost/Benefits/Risks
This will help reduce metadata size for GPU kernels
People and Personnel
Components
Restructure the
ThermodynamicsParameters
toand access parameters through functions. E.g.:
or
Inputs
Results and Deliverables
Scope of Work
Tasks
SDI Revision Log
CC
@tapios @sriharshakandala @charleskawczynski @cmbengue
The text was updated successfully, but these errors were encountered: