oduplessis / cusp-library

Automatically exported from code.google.com/p/cusp-library
0 stars 0 forks source link

GMRES + SA-AMG fails to converge or gives false convergence. #80

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I am evaluating the preconditioned krylov solvers on a variety of problems. 
Running into some difficulties with GMRES when preconditioning with SA-AMG. I 
have included below the SA level info and residual history for the test problem 
as well as a more details.

Thanks in advance.

What steps will reproduce the problem?
1. Initial Saad problem on 32x32 grid.
2. Solve with GMRES(8) + AMG (theta=0)

What is the expected output? What do you see instead?

I expect the solution to converge at approximately the same rate as BiCGSTAB. 
Instead, the solution never converges.

What version of the product are you using? On what operating system?

CUSP 0.2.0, Thrust 1.4, CUDA 4.0.

Centos 5.4

Please provide any additional information below.

My "real" problem is a 3d structured-grid variable-coefficient Poisson equation 
using a 7-pt stencil. I can solve this very efficiently with PCG or BiCGSTAB 
and SA-AMG (or more slowly with diagonal preconditioner). It fails with 
GMRES+AMG but works with GMRES+diagonal. I'm using CSR or DIA storage (9 bands 
due to periodicity). This is quite large and cumbersome to debug so I've also 
tried a canonical test problem ...

My "test" problem is the Saad test matrix -- 2d poisson equation on uniform 
structured grid with adjustable asymmetry: A(i-1,i) = -1-d, A(i+1,i) = -1+d and 
d varies from 0-1 to switch from symmetric to very asymmetric. Again, PCG and 
BiCGSTAB converge with AMG. Actually, they converge in 1 step which is 
unexpected. I'm assuming this could be due to the coarse-grid correction being 
"exact". Non-preconditioned GMRES and GMRES + diagonal preconditioning 
converge. GMRES + AMG "converges" to a solution only if no restarts (e.g., m ~ 
64) are done. But, the converged result is not correct. The Saad problem has an 
exact solution so this is easy to test. If I set the restart size smaller 
(e.g., 8), the residual oscilates. This is often termed "false convergence" -- 
the preconditioned system converges but the real residual doesn't.

Any ideas on why this doesn't work? I'm not terribly familiar with SA-AMG. Is 
it not constant or symmetric? That is, perhaps a Flexible-GMRES solver is 
needed?

Here's the AMG level info and the residual info. I've tried different values of 
theta but they make not difference.

CUDA   v4.0
Thrust v1.4
Cusp   v0.2
create_csr time = 0.144572
        Theta:           0.000000
        Number of Levels:       4
        Operator Complexity:    1.32655
        Grid Complexity:        1.15174
        level   unknowns        nonzeros:
        0       15876           78876   [75.3835%]
        1       2263            23911   [22.8523%]
        2       139             1803    [1.72317%]
        3       7               43      [0.041096%]
create_precon time = 0.121997
Solver will continue until residual norm 2.2683e-05 or reaching 50 iterations 
  Iteration Number  | Residual Norm
                1       1.395041e-01
                2       4.290034e-02
                3       2.057088e-02
                4       9.858274e-03
                5       6.889908e-03
                6       3.742655e-03
                7       1.743747e-03
                8       8.636988e-04
                9       4.800268e-02
               10       1.550331e-02
               11       7.600042e-03
               12       3.452017e-03
               13       2.266460e-03
               14       1.241635e-03
               15       6.485656e-04
               16       3.264166e-04
               17       1.309980e-02
               18       4.548008e-03
               19       2.092356e-03
               20       1.038360e-03
               21       5.349126e-04
               22       2.644240e-04
               23       1.457322e-04
               24       8.117217e-05
               25       1.413563e-02
               26       5.006000e-03
               27       2.143444e-03
               28       1.169363e-03
               29       8.349676e-04
               30       4.231815e-04
               31       2.054099e-04
               32       8.322459e-05
               33       1.833584e-02
               34       6.340947e-03
               35       2.862313e-03
               36       1.386684e-03
               37       9.798074e-04
               38       5.227778e-04
               39       2.501821e-04
               40       1.147575e-04
               41       1.905712e-02
               42       6.547127e-03
               43       3.110740e-03
               44       1.386898e-03
               45       9.178780e-04
               46       4.812218e-04
               47       2.487507e-04
               48       1.204713e-04
               49       1.805143e-02
               50       6.230285e-03
Failed to converge after 50 iterations.

Original issue reported on code.google.com by chrstphr...@gmail.com on 26 Oct 2011 at 8:56