SSOR problem

SUN Chun Chun.SUN at 3ds.com
Mon Apr 27 08:13:15 CDT 2009


Hello,

I have an *particular* Ax=b which I want to solve with CG preconditioned
by SSOR using PETSc. Then some specific strange things happen. Please
allow me to describe all the symptoms that I found here. Thanks for your
help:

0) All solves are in serial. 

1) A 20-line academic code and another matlab code converge the solution
with identical residual history and number of iterations (76), they
match well. If I run without SSOR (just diagonal scaled CG): PETSc,
academic code, and matlab all match well with same number (180) of
iterations.

2) PETSc with SSOR seems to give me -8 indefinite pc. If I play with
omega other than using 1.0 (as in Gauss-Seidel), sometimes (with
omega=1.2) I see stagnation and it won't converge then exceeds the
maximum iteration allowed (500). Residuals even don't go down. If I
don't say -ksp_diagonal_scale, I get -8 too. So, PETSc with SSOR either
gives me -8 or -3.

3) The above was run with -pc_sor_symmetric. However, if I ran with
-pc_sor_forward, I got a convergence curve identical to what I have
without any preconditioner, with same iterations (180). If I ran with
-pc_sor_backward, it gives me -8 indefinite pc.

4) If I increase any of the number of -pc_sor_its (or lits) to 2, it
converges (but still don't match the matlab/academic code).

5) The matrix has good condition number (~8000), maximum diagonal is
about 6, minimum diagonal is about 1.1. There's no zero or negative
diagonal entries in this matrix. It's spd otherwise matlab won't be able
to solve it.

6) The behavior is independent of rhs. I've tried random rhs and get the
same scenario.

7) Here is the confusing part: All other matrices that we have except
for this one can be solved by PETSc with same settings very well. And
they match the academic code and matlab code. It's just this matrix that
exhibits the strange behavior. I tend to eliminate the possibility of
interface problem because all other matrices and other preconditioner
settings work well.

We're running out of ideas here, if you have any insight please say
anything or point any directions.

Thanks a lot,
Chun





More information about the petsc-users mailing list