[petsc-users] questions about pc_comosite

Barry Smith bsmith at mcs.anl.gov
Fri Sep 29 10:24:03 CDT 2017


  They are all different iteration patterns. They definitely should present different residual results


> On Sep 29, 2017, at 8:19 AM, Xiangdong <epscodes at gmail.com> wrote:
> 
> Hello everyone,
> 
> I have a questions about residuals reported in pc_composite. For the examples in petsc-3.7.6/src/ksp/ksp/examples/tutorials/ex1.c, I found that when I use these three options:
> 
> 1) -pc_type none
> 2)  -pc_type composite -pc_composite_pcs none,none -pc_composite_type multiplicative
> 3) -pc_type composite -pc_composite_pcs none,none -pc_composite_type multiplicative -ksp_norm_type unpreconditioned
> 
> as shown below, it reported different KSP residuals. Given that I use the identity preconditioner (with multiplicative), why does the residual vary for different options?
> 
> Thanks.
> 
> Best,
> Xiangdong
> 
> mpirun -np 1 ./extest -ksp_monitor -pc_type none
> 
> 0 KSP Residual norm 1.414213562373e+00 
>   1 KSP Residual norm 6.324555320337e-01 
>   2 KSP Residual norm 3.779644730092e-01 
>   3 KSP Residual norm 2.581988897472e-01 
>   4 KSP Residual norm 1.906925178491e-01 
>   5 KSP Residual norm 1.616509124176e-15
> 
> mpirun -np 1 ./extest -ksp_monitor -pc_type composite -pc_composite_pcs none,none -pc_composite_type multiplicative
> 
>  0 KSP Residual norm 1.414213562373e+00 
>   1 KSP Residual norm 1.176696810829e+00 
>   2 KSP Residual norm 1.096908636191e+00 
>   3 KSP Residual norm 4.389821446437e-01 
>   4 KSP Residual norm 2.088364906576e-01 
>   5 KSP Residual norm 2.725851091482e-13 
> 
> mpirun -np 1 ./extest -ksp_monitor -pc_type composite -pc_composite_pcs none,none -pc_composite_type multiplicative -ksp_norm_type unpreconditioned
> 0 KSP Residual norm 1.414213562373e+00 
>   1 KSP Residual norm 1.290994448736e+00 
>   2 KSP Residual norm 1.249516035344e+00 
>   3 KSP Residual norm 4.836894336642e-01 
>   4 KSP Residual norm 1.467306491390e-01 
>   5 KSP Residual norm 9.881776494390e-14 



More information about the petsc-users mailing list