[petsc-users] minres and cholesky or icc preconditioner

Barry Smith bsmith at mcs.anl.gov
Sun Nov 14 11:26:01 CST 2010


On Nov 14, 2010, at 10:40 AM, Umut Tabak wrote:

> Dear all,
> 
> I am trying to solve some linear systems with minres where the operator matrices can become indefinite depending on \lambda and moreover both the operator matrices and the right hand side is changing in a loop.
> 
> A = K - \lambda M;
> 
> I used the basic example, ex1.c, and tried supply some command line arguments to see what is going on for the linear solves with minres.
> 
> Use of -pc_type cholesky or icc  does not return an error however I could not understand this because the operator matrix is not PD(symmetric however) so I did not get how cholesky or icc might be used as a preconditioner in this case.

   By default our ICC automatically shifts the diagonal as needed to force the preconditioner to be positive definite; if you run with -info it will print information about that. For Cholesky so long as non of the pivots are zero it will complete the factorization and produce a good solver. 

> However, the results are fine, but the iteration numbers are a bit high maybe I should play with the tolerance, because I am not looking for the very close approximate solution, a coarse representation of the solution might also help me. This is because I would like to use these solution vectors in some other context mixed with some other vectors.
> 
> And the other question is that backslash of MATLAB solves these systems faster than umfpack or mumps interface of PETSc, is this due to the fact that my PETSc configuration is the default debug one(I read somewhere in the documentation some time ago, mentioning that there can be important performance differences, but could not locate that right now.)?

   It could be that. You can do ANOTHER ./configure --with-debugging=0 using a different PETSC_ARCH to build another set of libraries to compare with. It could also be that the time you are counting with PETSc includes the time to generate the matrix or compute other things as well.

   Barry

> 
> I would appreciate clarification on these points.
> 
> Best,
> Umut
> 
> -- 
> - Hope is a good thing, maybe the best of things
>   and no good thing ever dies...
> The Shawshank Redemption, replique of Tim Robbins
> 



More information about the petsc-users mailing list