-
Notifications
You must be signed in to change notification settings - Fork 21
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
Add missing blocks to the dycore Jacobian #2427
Conversation
366ddfc
to
1bf5f63
Compare
Is this ready for testing? Maybe @akshaysridhar could try running some topography simulations. |
1bf5f63
to
c4258e5
Compare
I think the topography run breaks faster: https://buildkite.com/clima/climaatmos-longruns/builds/1294#018c6032-e583-4164-b3fe-3df08ce1277c :( |
9874154
to
f7927db
Compare
CPU longruns: https://buildkite.com/clima/climaatmos-longruns/builds/1303 @szy21 Would you mind taking a look at the results before I merge this in? |
I looked at some of the dycore simulations that are done and they look good. Feel free to merge this in. Thanks! |
The GPU pipeline seems to be 40% slower though. Is this as expected? (The CPU timeline is likely slower too as many simulations are timing out.) |
Yeah this PR replaces the simple diagonal solver for the diffusion matrix with an iterative solver. This needs to run on every iteration of the higher-level solver for the full Jacobian, so it'll have a significant performance effect. This PR also adds a bunch of additional blocks to the Jacobian, and these currently take a while to compute. |
Ok, sounds good to me. Just want to let people who work on performance know (@simonbyrne @sriharshakandala). |
From the flame graphs, it looks like the new blocks are the main source of the performance hit. So, we might want to change something in ClimaCore to speed up long chains of matrix-matrix multiplications. I'll look into this when I get back. |
I did want to know whether this helps with the topography runs though. I'm ok with merging it in for now as 40% is not too bad, or @akshaysridhar can test with this branch. Either way is fine. |
Hmm, looks like more memory increases are required. Before I merge this in, I'll try dropping some of the new Jacobian blocks in simulations without topography, which will probably improve the performance of those simulations. |
9740d6a
to
38e535b
Compare
CPU longruns: https://buildkite.com/clima/climaatmos-longruns/builds/1355 Performance issues appear to be resolved. I'll merge this in when the longruns are done. |
38e535b
to
a57b7d6
Compare
The longrun looks fine. Feel free to merge it. |
Purpose
This PR adds a couple of missing blocks to the dycore Jacobian and modifies the linear solver to handle them. This improves the stability of two longrun simulations that were previously failing (Held-Suarez with topography and aquaplanet with topography).
Content
update_implicit_equation_jacobian!
and cache several matrix Fields in order to improve performance. Remove outdated code comments (new documentation will be ported from Overleaf in a future PR).