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
Probable bug in the Krylov solver #365
Comments
@lukeolson I havent done a diff on the krylov routines yet, but has anything changed in their implementation in recent years that you recall? This was a strange issue, hierarchies appeared to match exactly and Ahsan realized GMRES was the only obvious culprit. rhoasymp means final convergence factor, so note how the GMRES in main has slowed down a ton while in the old gen AIR branch is more or less the same as initial |
There have been changes, including the stopping criteria. One thing to try is the same experiment but with unpreconditioned gmres. |
@436ahsan , nice work tracking this down. Have you compared the residual norm histories between the two different GMRES? Are the residual norms different? Then, Luke raises a good point. I would change your code to directly call GMRES x = A, b, x0=None, tol=1e-5, restrt=None, maxiter=None, xtype=None, instead of the solver_name.solve(...) interface that your using. The multigrid preconditioner M can be obtained with M = solver_name.aspreconditioner() You'll have to fill in x0, tol, maxiter, and so on to match your current experiments. Then, you can run GMRES with no preconditioning. If there is a difference between the two GMRES, this will be a good way to track it down. |
@jbschroder In my earlier tests, yes, my residuals norms are different. I am now looking into the suggested experiments and keep you all updated on this issue. |
@436ahsan , can you try again on the air_pr branch and gen_air branch? If i copy your test and run
on these two branches I get identical results. Also, I manually set the postsmoother due to different defaults in the two branches. Here if I use accel in pyamg or external, I still get more or les identical results. |
I have been testing AIR solver performance in some of my experiments from two different air branches :gen_air and master_air and it turns out after setting all the parameters same when I use AIR as pre-conditioner to GMRES, i.e. accelerated AIR solver then the solver results are different. For example:
Accelerated AIR solver results using gen_air branch
n | iter | rho | rhoasymp | OpCx | GdCx | Work
279000 | 10 | 0.1 | 0.11 | 1.2 | 1.9 | 1.2
Accelerated AIR solver results using master_air branch
n | iter | rho | rhoasymp | OpCx | GdCx | Work
279000 | 15 | 0.14 | 0.91 | 1.2 | 1.9 | 1.4
It turns out, this result differences only arises when I was using accel=‘gmres’ in the multilevel solver, so there could be a possible bug in the Krylov solvers. Standalone AIR solvers seems to be doing fine from both gen_air and master_air branches and the results are exactly same for both case.
The text was updated successfully, but these errors were encountered: