[petsc-users] GMRES with matrix-free method and preconditioning matrix for higher performance.

Matthew Knepley knepley at gmail.com
Wed Aug 31 05:07:43 CDT 2016


On Wed, Aug 31, 2016 at 3:49 AM, Choi Kyungjun <kyungjun.choi92 at gmail.com>
wrote:

> Dear Petsc.
>
> I am implementing Petsc library for my CFD flow code.
>
> Thanks to Matt, I got what I wanted last week.
>
> It was the GMRES with matrix-free method, no preconditioning matrix and
> command line options are below.
>
> *-snes_mf    -pc_type none    -..monitor   -..converged_reason*
>
> The solve worked, but performed very poorly.
>
>
> I learned that the efficiency of Krylov-subspace methods depends strongly
> depends on a good preconditioner.
>
> And in the Petsc manual, the matrix-free method is allowed only with no
> preconditioning, a user-provided preconditioner matrix, or a user-provided
> preconditioner shell.
>
>
> Here are my questions.
>
> 1) To improve the solver performance using GMRES, is there any way using
> snes_mf without preconditioning matrix?
>

Not really. The CHEBY preconditioner will work without an explicit matrix,
however its not great by itself.


> 2) For user-provided preconditioner matrix, I saw some example codes that
> provide approx. Jacobian matrix as preconditioner matrix. But this means
> that I should derive approx. Jacobian mat for system, am I right?
>

Yes.


> 3) I'd like to know which is the fastest way to solve with GMRES method.
> Could you tell me or let me know any other examples?
>

1) The solve depends greatly on the physics/matrix you are using. Without
knowing that, we can't say anything. For example, is
the system elliptic? If so, then using Multigrid (MG) is generally a good
idea.

2) In general, I think its a mistake to think of GMRES or any KSP as a
solver. We should think of them as accelerators for solvers,
as they were originally intended. For example, MG is a good solver for
elliptic CFD equations, as long as you somehow deal with
incompressibility. Then you can use GMRES to cleanup some things you miss
when implementing your MG solver.

3) The best thing to do in this case is to look at the literature, which is
voluminous, and find the solver you want to implement. PETSc
really speeds up the actually implementation and testing.

  Thanks,

     Matt


> Thank you very much for your help.
>
> Sincerely,
>
> Kyungjun.
>



-- 
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20160831/57ef34f1/attachment.html>


More information about the petsc-users mailing list