gmres - restart and Gauss-Seidel

Matthew Knepley knepley at gmail.com
Fri Aug 15 18:38:48 CDT 2008


On Fri, Aug 15, 2008 at 5:40 PM, Lukasz Kaczmarczyk
<lukasz at civil.gla.ac.uk> wrote:
> Barry Smith wrote:
>>  9 KSP Residual norm 3.942287795560e-03
>> 10 KSP Residual norm 4.611215310185e+00
>>                                             ^^^^^^^^^^^^^^^^^^^^^^
>>
>>     This should never happen. This means there is an error
>> in your preconditioner, your smoother is not a linear operator
>> on its input variables. With GMRES, at restart the residual
>> norm should hardly change at all. The fact that it shoots
>> up means that the norm indicated in iteration 9 is totally wrong.
>>
>>   If you run the gmres version with -ksp_monitor_true_residual
>> you will see that the true residual is not actually decreasing
>> like you think it is.
>>
>
> Thank You for answer, result for which you asking are in my previous
> email - look at end of the previous email. If You look there at true
> residual, You will see that results are ok.

That is not the point. The residual may be decreasing, but your PC is not
a linear operator, and thus you can encounter unexpected results with GMRES.
You can switch to FGMRES to handle this.

   Matt

> Regards,
> Lukasz
>
> 2) -ksp_type fgmres -ksp_gmres_restart 100 -ksp_monitor_true_residual
>  0 KSP preconditioned resid norm 8.770931682456e+05 true resid norm
> 8.770931682456e+05 ||Ae||/||Ax|| 2.025559907164e+06
>  1 KSP preconditioned resid norm 1.466659768959e+00 true resid norm
> 1.466659768959e+00 ||Ae||/||Ax|| 3.387105649673e+00
>  2 KSP preconditioned resid norm 2.135783619677e-01 true resid norm
> 2.135783619678e-01 ||Ae||/||Ax|| 4.932380991006e-01
>  3 KSP preconditioned resid norm 1.342354228152e-01 true resid norm
> 1.342354228151e-01 ||Ae||/||Ax|| 3.100034299884e-01
>  4 KSP preconditioned resid norm 7.872906297489e-02 true resid norm
> 7.872906297491e-02 ||Ae||/||Ax|| 1.818169828064e-01
>  5 KSP preconditioned resid norm 3.414496482864e-02 true resid norm
> 3.414496482865e-02 ||Ae||/||Ax|| 7.885441854116e-02
>  6 KSP preconditioned resid norm 2.025183908090e-02 true resid norm
> 2.025183908092e-02 ||Ae||/||Ax|| 4.676961897981e-02
>  7 KSP preconditioned resid norm 1.023707179274e-02 true resid norm
> 1.023707179279e-02 ||Ae||/||Ax|| 2.364150462111e-02
>  8 KSP preconditioned resid norm 4.938281368004e-03 true resid norm
> 4.938281368031e-03 ||Ae||/||Ax|| 1.140447230867e-02
>  9 KSP preconditioned resid norm 2.373276511281e-03 true resid norm
> 2.373276511245e-03 ||Ae||/||Ax|| 5.480847330515e-03
>  10 KSP preconditioned resid norm 1.180493643594e-03 true resid norm
> 1.180493643635e-03 ||Ae||/||Ax|| 2.726233291716e-03
>  11 KSP preconditioned resid norm 7.142592937639e-04 true resid norm
> 7.142592936809e-04 ||Ae||/||Ax|| 1.649511181911e-03
>  12 KSP preconditioned resid norm 4.226036746778e-04 true resid norm
>
>
> 3) -ksp_type fgmres -ksp_gmres_restart 10  -ksp_monitor_true_residual
>  0 KSP preconditioned resid norm 8.770931682456e+05 true resid norm
> 8.770931682456e+05 ||Ae||/||Ax|| 2.025559907164e+06
>  1 KSP preconditioned resid norm 1.466659768959e+00 true resid norm
> 1.466659768959e+00 ||Ae||/||Ax|| 3.387105649673e+00
>  2 KSP preconditioned resid norm 2.135783619677e-01 true resid norm
> 2.135783619678e-01 ||Ae||/||Ax|| 4.932380991006e-01
>  3 KSP preconditioned resid norm 1.342354228152e-01 true resid norm
> 1.342354228151e-01 ||Ae||/||Ax|| 3.100034299884e-01
>  4 KSP preconditioned resid norm 7.872906297489e-02 true resid norm
> 7.872906297491e-02 ||Ae||/||Ax|| 1.818169828064e-01
>  5 KSP preconditioned resid norm 3.414496482864e-02 true resid norm
> 3.414496482865e-02 ||Ae||/||Ax|| 7.885441854116e-02
>  6 KSP preconditioned resid norm 2.025183908090e-02 true resid norm
> 2.025183908092e-02 ||Ae||/||Ax|| 4.676961897981e-02
>  7 KSP preconditioned resid norm 1.023707179274e-02 true resid norm
> 1.023707179279e-02 ||Ae||/||Ax|| 2.364150462111e-02
>  8 KSP preconditioned resid norm 4.938281368004e-03 true resid norm
> 4.938281368031e-03 ||Ae||/||Ax|| 1.140447230867e-02
>  9 KSP preconditioned resid norm 2.373276511281e-03 true resid norm
> 2.373276511245e-03 ||Ae||/||Ax|| 5.480847330515e-03
> 10 KSP preconditioned resid norm 1.180493643635e-03 true resid norm
> 1.180493643635e-03 ||Ae||/||Ax|| 2.726233291716e-03
> 11 KSP preconditioned resid norm 8.973593571160e-04 true resid norm
> 8.973593570913e-04 ||Ae||/||Ax|| 2.072362665506e-03
> 12 KSP preconditioned resid norm 8.954054180580e-04 true resid norm
>
>
>



-- 
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




More information about the petsc-users mailing list