New methods for ice-shelf velocity inner solve. More FMA edits.#1082
Merged
Hallberg-NOAA merged 7 commits intoApr 29, 2026
Merged
Conversation
Author
|
@Hallberg-NOAA I updated units. This PR should be ready now |
Hallberg-NOAA
approved these changes
Apr 29, 2026
Member
Hallberg-NOAA
left a comment
There was a problem hiding this comment.
I have examined these changes and believe them to be correct.
This PR will be ready to merge into the dev/gfdl branch of MOM6 after it is rebased onto the latest version of dev/gfdl (resolving the minor conflicts in the process) and passed the pipeline testing.
6e5e389 to
c316097
Compare
Added MINRES and CR methods to solve the shallow shelf approximation. Further optimized CG. The new CG is answer changing, but only because IDIAGU/IDIAGv reciprocals are now procomputed to replace per-iteration divisions with multiplications. MINRES and CR can be faster than CG. Also added CG_HALO_SHRINK parameter to disable the halo-shrinking scheme for CG; combined with the other changes, this reduces the number of pass_vector calls to once per iteration, rather than 4 pass_vector calls every nihalo iterations. Disabling the halo-shrinking can be faster for certain combinations of grid properties (halo size, symmetric/nonsymmetric, grid size).
Removed a line that caused an error when compiling in debug mode, where a variable was being set to the value of another variable that was not set yet. This line was not needed.
Added a wrapper subroutine that performs the shared setup for each of the Krylov methods, calls the selected Krylov method, and assigns BCs. Also: made sure the number of iters is returned from each method in the unlikely case of an early exit; slight change to where CG convergence is tested to avoid evaluating extra unneeded code.
c316097 to
90d3840
Compare
Author
|
Ok, rebased and tests passed |
Member
|
This PR has passed pipeline testing at https://gitlab.gfdl.noaa.gov/ogrp/mom6ci/MOM6/-/pipelines/30731. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added new iterative methods (MINRES and CR) for the SSA inner solve, and optimized the existing (default) CG method.
MINRES/CR can be faster than CG, but they minimize different norms. MINRES should be preferred if the problem is ill-conditioned, and its convergence is guaranteed even if SPD is lost (unlikely, but possible with Newton iterations?).
The new CG is answer-changing, but only because the IDIAGU/IDIAGv reciprocals are now pre-computed to replace per-iteration divisions with multiplications. However, the ice-sheet group is not yet concerned with preserving previous answers for dynamics.
Furthermore, new parameter CG_HALO_SHRINK can disable the CG "halo-shrinking" scheme. This scheme set the number of pass_vector calls to 4 per every nihalo iterations, but with the new CG optimization, disabling the halo-shrinking results in a single pass_vector call per iteration. Results are bitwise identical, but setting CG_HALO_SHRINK=False is slightly faster for most combinations of grid size, halo size, and symmetric/non-symmetric.
Also made a few edits for consistent rotation with FMAs.
With this PR, the ice-shelf dynamics passes all rotation and PE layout reproducibility tests, with or without FMAs.