Use FGCRODR instead of GMRES for "Newton-Krylov" adjoint#2782
Open
pcarruscag wants to merge 9 commits intodevelopfrom
Open
Use FGCRODR instead of GMRES for "Newton-Krylov" adjoint#2782pcarruscag wants to merge 9 commits intodevelopfrom
pcarruscag wants to merge 9 commits intodevelopfrom
Conversation
Member
Author
|
Updated the description. |
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.
Proposed Changes
It allows using a smaller restart period than GMRES, especially for more challenging problems.
It's been used, or at least researched, in Tau, and in https://arc.aiaa.org/doi/abs/10.2514/6.2026-2015
TLDR
These are the relevant options:
FGCRODR with 0 deflation vectors (
LINEAR_SOLVER_RESTART_DEFLATION= 0) is equivalent to GMRES.Comparison
With a restart period N, and M deflation vectors, FGCRODR does about the same number of matrix-vector products as GMRES(N - M) and uses the same memory as GMRES(N + 2M).
Note that the current implementation is not fully optimized for memory use, the memory equivalence can be lowered to N + M.
In any case, I'll compare apples to apples as it is now (N + 2M). We can look at convergence performance, residual vs wall time, for the "same matrix-vector products" and "same memory usage" bounds. The former also corresponds to about the same wall time per outer iteration.
30P30N (single zone RANS)

With rough best practices and without tuning, the performance is approximately equivalent at the "memory usage" bound.
Note that convergence stalled for GMRES(30) above. If we try to use the smallest restart period that allows GMRES to converge well (which is important for larger problems to limit memory usage). We get a time-to-solution benefit at the "memory usage" bound.

Small FSI case ("Airfoil 2D" regression, multizone, GMRES only on fluid)

Here, there is a clear benefit, perhaps because the overall convergence rate is also limited by the FSI coupling, and thus any additional convergence from GMRES(60) is "wasted".
PR Checklist
pre-commit run --allto format old commits.