petsc-dev
Threads by month
- ----- 2026 -----
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2005 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
March 2011
- 25 participants
- 329 discussions
El 16/03/2011, a las 21:37, Jed Brown escribió:
> Jose, thanks for adding pARMS.
>
> I wonder if there is something wrong or if I'm just not using it correctly. I'm testing with ksp ex2 and it works fine in serial:
>
> $ mpiexec -n 1 ./ex2 -m 50 -n 50 -ksp_converged_reason -pc_type parms
> Linear solve converged due to CONVERGED_RTOL iterations 10
> Norm of error 9.34118e-05 iterations 10
>
> but it diverges in parallel:
>
> $ mpiexec -n 2 ./ex2 -m 50 -n 50 -ksp_converged_reason -pc_type parms
> Linear solve did not converge due to DIVERGED_DTOL iterations 630
> Norm of error 3.12589e+06 iterations 630
>
> I can make it "converge" by turning off restart, but the algebraic residual is actually large indicating that the preconditioner is actually nonlinear.
>
> $ mpiexec -n 2 ./ex2 -m 50 -n 50 -ksp_converged_reason -pc_type parms -ksp_gmres_restart 1000
> Linear solve converged due to CONVERGED_RTOL iterations 81
> Norm of error 30.4982 iterations 81
>
> Indeed, using FGMRES makes it converge
>
> $ mpiexec -n 2 ./ex2 -m 50 -n 50 -ksp_converged_reason -pc_type parms -ksp_gmres_restart 1000 -ksp_type fgmres
> Linear solve converged due to CONVERGED_RTOL iterations 71
> Norm of error 0.000150845 iterations 71
>
> but avoiding restarts is really critical
>
> $ mpiexec -n 2 ./ex2 -m 50 -n 50 -ksp_converged_reason -pc_type parms -ksp_gmres_restart 30 -ksp_type fgmres
> Linear solve converged due to CONVERGED_RTOL iterations 771
> Norm of error 0.00202382 iterations 771
>
>
> What do you think about making the preconditioner linear by default? Is there a way to make it more tolerant of restarts, at least for such a simple problem (2D Laplace, 5-point stencil, uniform grid)?
Yes, I am aware of this. I added a note to the PCPARMS manpage stating that this preconditioner should be used with flexible methods (fgmres, gcr). But it is true that it would be better to default to something more stable. Maybe it is better to make RAS the default global method, instead of the Schur complement. Anyway, I will think about this, and also ask for advice to the pARMS developers.
Please feel free to add fixes that you consider useful.
Thanks.
Jose
1
0
Jose, thanks for adding pARMS.
I wonder if there is something wrong or if I'm just not using it correctly.
I'm testing with ksp ex2 and it works fine in serial:
$ mpiexec -n 1 ./ex2 -m 50 -n 50 -ksp_converged_reason -pc_type parms
Linear solve converged due to CONVERGED_RTOL iterations 10
Norm of error 9.34118e-05 iterations 10
but it diverges in parallel:
$ mpiexec -n 2 ./ex2 -m 50 -n 50 -ksp_converged_reason -pc_type parms
Linear solve did not converge due to DIVERGED_DTOL iterations 630
Norm of error 3.12589e+06 iterations 630
I can make it "converge" by turning off restart, but the algebraic residual
is actually large indicating that the preconditioner is actually nonlinear.
$ mpiexec -n 2 ./ex2 -m 50 -n 50 -ksp_converged_reason -pc_type parms
-ksp_gmres_restart 1000
Linear solve converged due to CONVERGED_RTOL iterations 81
Norm of error 30.4982 iterations 81
Indeed, using FGMRES makes it converge
$ mpiexec -n 2 ./ex2 -m 50 -n 50 -ksp_converged_reason -pc_type parms
-ksp_gmres_restart 1000 -ksp_type fgmres
Linear solve converged due to CONVERGED_RTOL iterations 71
Norm of error 0.000150845 iterations 71
but avoiding restarts is really critical
$ mpiexec -n 2 ./ex2 -m 50 -n 50 -ksp_converged_reason -pc_type parms
-ksp_gmres_restart 30 -ksp_type fgmres
Linear solve converged due to CONVERGED_RTOL iterations 771
Norm of error 0.00202382 iterations 771
What do you think about making the preconditioner linear by default? Is
there a way to make it more tolerant of restarts, at least for such a simple
problem (2D Laplace, 5-point stencil, uniform grid)?
1
0
Re: [petsc-dev] Lagging the numerical factorization for one of the fields of fieldsplit preconditioner
by Shri 16 Mar '11
by Shri 16 Mar '11
16 Mar '11
> One fix may be to make PCSetUp() smarter and know the matrix has not
> changed and hence it doesn't have to be refactored (instead of only
> relying on the flag passed to KSPSetOperators()).
>
I feel that for the fieldsplit preconditioner the control of 'which' submatrix gets refactorized and 'when' should be with
the user and not petsc.
> Barry
>
>
>
> > Since,A is constant
> > it needs to be factorized only once while (df_dx -
> > df_dy*inv(A)*dg_dx) is not constant and needs to be refactorized.
> >
> >> This will be
> >> tricky because we don't have a mechanism to pass this information
> >> down
> >> into PCFIELDSPLIT. Tell me exactly what you want to do that it
> >> cannot
> >> currently do and I'll what we can do about it.
> >
> > Currently,the factorization is done for 'both or none'.I wanted the
> > factorization to be done for 'either,both,or none'.
> > I was thinking about having an option say
> > -fieldsplit_xxx_lag_preconditioner <niterations> which
> > will delay the refactorization for field xxx by niterations and if
> > niterations
> > is set to -1 then it will not update the factorization.
> >
> > Thanks,
> > Shri
> >
> >>
> >> Barry
> >>
> >>
> >>
> >> On Mar 14, 2011, at 4:41 PM, Shri wrote:
> >>
> >>>
> >>> | A B | |dx| |fx|
> >>> Jacobian = =
> >>> | C D | |dy| |fy|
> >>>
> >>> While solving this linear system with a fieldsplit precondioner,is
> >>> there a way to lag the numerical factorization of the A matrix.
> >>> The
> >>> A matrix in my application is constant and is about 3-4 times
> >>> bigger
> >>> than the D matrix. The log summary shows that about 90% of the
> >>> time
> >>> is spent in the numerical factorization phase. So i would like to
> >>> do
> >>> the numerical factorization for A matrix just once and not have it
> >>> factorized for all the snes iterations.
> >>> Speaking on the same note, should snes lag_preconditioner
> >>> functionality be moved to ksp or maybe a
> >>> -fieldsplit_xxx_lag_preconditioner option?
> >>>
> >>> Thanks,
> >>> Shri
1
0
On Mar 16, 2011, at 8:57 AM, Thomas Witkowski wrote:
-pc_fieldsplit_type schur -fieldsplit_interior_ksp_type preonly -fieldsplit_interior_pc_type bjacobi -fieldsplit_interior_sub_pc_type lu -fieldsplit_boundary_ksp_monitor -ksp_monitor_true_residual
> Residual norms for fieldsplit_boundary_ solve.
> 0 KSP Residual norm 1.790059331071e-04
> .....
> 18 KSP Residual norm 1.593454221996e-09
> 0 KSP preconditioned resid norm 5.745043818120e-01 true resid norm 1.584249437360e-01 ||r(i)||/||b|| 1.000000000000e+00
This is the norms on the outer iteration variables
> Residual norms for fieldsplit_boundary_ solve.
> 0 KSP Residual norm 1.790059331000e-04
This is the norms on the Schur complement iteration
> ....
> 18 KSP Residual norm 1.593449602302e-09
It is unclear to me why it starts up another solve here, starting basically where it left off. I think it should just kick out to print the norm of the residual of the outer iteration.
> Residual norms for fieldsplit_boundary_ solve.
> 0 KSP Residual norm 1.593449603155e-09
> ...
> 18 KSP Residual norm 1.335744434252e-14
> 1 KSP preconditioned resid norm 2.608069232839e-13 true resid norm 1.449869994655e-13 ||r(i)||/||b|| 9.151778504469e-13
>
Are you running with petsc-dev?
Please run with -ksp_view and send the output.
When I run tutorials/multiphysics/mp.c with the options ./mp -couple -snes_monitor_short -pc_type fieldsplit -ksp_monitor -pc_fieldsplit_type schur -fieldsplit_ksp_monitor -fieldsplit_1_ksp_type fgmres -fieldsplit_0_ksp_type gmres -snes_view I do not see the "double" iteration business.
Barry
>
> So, are there now two or one outer iterations?
>
> Thomas
>
>
>
>
> Matthew Knepley wrote:
>> On Wed, Mar 16, 2011 at 8:27 AM, Thomas Witkowski <thomas.witkowski(a)tu-dresden.de <mailto:[email protected]>> wrote:
>>
>> Jed Brown wrote:
>>
>> On Wed, Mar 16, 2011 at 07:37, Thomas Witkowski
>> <thomas.witkowski(a)tu-dresden.de
>> <mailto:[email protected]>
>> <mailto:[email protected]
>> <mailto:[email protected]>>> wrote:
>>
>> Thanks for explanations! It works fine in my code. But I
>> have two
>> questions about it, maybe you can help me with them:
>> - To the first, is the LU factorization on block A_00 done
>> only once?
>>
>>
>> Yes, one way to confirm this is to run with -log_summary and
>> check MatLUFactor{Sym,Num}.
>> - I have run the code with -fieldsplit_1_ksp_monitor to get
>> some
>> more information about the internal solves. I expected to get
>> information about one iterative solver (for solving the Schur
>> complement system), but I got three, all of them need around 20
>> iterations for my example. Could you explain to me what is
>> actually solved there?
>>
>>
>> I'm going to guess that you still have an outer KSP that (in
>> the global norm, rather than the partitioned norm used inside
>> of splits) has a tighter tolerance, therefore it takes a few
>> outer iterations. If you use loose inner tolerances then the
>> preconditioner becomes nonlinear and you'll need to use FGMRES
>> for the outer. When in doubt, run with -ksp_view and show us
>> the results if you don't understand. Additionally, monitoring
>> inner solves separately can be useful, e.g.
>> -fieldsplit_0_ksp_converged_reason -fieldsplit_1_ksp_monitor
>> -ksp_monitor_true_residual.
>>
>> Okay, I run my code with the options "-pc_fieldsplit_type schur
>> -fieldsplit_interior_ksp_type preonly -fieldsplit_interior_pc_type
>> bjacobi -fieldsplit_interior_sub_pc_type lu
>> -fieldsplit_boundary_ksp_monitor -ksp_monitor_true_residual
>> -fieldsplit_interior_ksp_converged_reason". The splits are named
>> "interior" and "boundary". The ksp output is as follows:
>>
>> Linear solve converged due to CONVERGED_ITS iterations 1
>> Residual norms for fieldsplit_boundary_ solve.
>> 0 KSP Residual norm 1.790059331071e-04
>> Linear solve converged due to CONVERGED_ITS iterations 1
>> 1 KSP Residual norm 1.237356212928e-04
>> Linear solve converged due to CONVERGED_ITS iterations 1
>> 2 KSP Residual norm 7.952220245101e-05
>> Linear solve converged due to CONVERGED_ITS iterations 1
>> 3 KSP Residual norm 3.502858665398e-05
>> Linear solve converged due to CONVERGED_ITS iterations 1
>> 4 KSP Residual norm 1.601085190129e-05
>> Linear solve converged due to CONVERGED_ITS iterations 1
>> 5 KSP Residual norm 8.491161243057e-06
>> Linear solve converged due to CONVERGED_ITS iterations 1
>> 6 KSP Residual norm 4.778227395989e-06
>> Linear solve converged due to CONVERGED_ITS iterations 1
>> 7 KSP Residual norm 2.571919352633e-06
>> Linear solve converged due to CONVERGED_ITS iterations 1
>> 8 KSP Residual norm 1.353979940120e-06
>> Linear solve converged due to CONVERGED_ITS iterations 1
>> 9 KSP Residual norm 7.408377337496e-07
>> Linear solve converged due to CONVERGED_ITS iterations 1
>> 10 KSP Residual norm 3.810694345834e-07
>> Linear solve converged due to CONVERGED_ITS iterations 1
>> 11 KSP Residual norm 1.955889542056e-07
>> Linear solve converged due to CONVERGED_ITS iterations 1
>> 12 KSP Residual norm 9.938906113920e-08
>> Linear solve converged due to CONVERGED_ITS iterations 1
>> 13 KSP Residual norm 4.893445675773e-08
>> Linear solve converged due to CONVERGED_ITS iterations 1
>> 14 KSP Residual norm 2.395128458062e-08
>> Linear solve converged due to CONVERGED_ITS iterations 1
>> 15 KSP Residual norm 1.2464425896 <tel:1.2464425896>57e-08
>> Linear solve converged due to CONVERGED_ITS iterations 1
>> 16 KSP Residual norm 6.316454504022e-09
>> Linear solve converged due to CONVERGED_ITS iterations 1
>> 17 KSP Residual norm 3.088668836241e-09
>> Linear solve converged due to CONVERGED_ITS iterations 1
>> 18 KSP Residual norm 1.593454221996e-09
>> Linear solve converged due to CONVERGED_ITS iterations 1
>> [0] Petsc-Iteration 0: 0.574504
>> 0 KSP preconditioned resid norm 5.745043818120e-01 true resid
>> norm 1.584249437360e-01 ||r(i)||/||b|| 1.000000000000e+00
>> Linear solve converged due to CONVERGED_ITS iterations 1
>> Residual norms for fieldsplit_boundary_ solve.
>> 0 KSP Residual norm 1.790059331000e-04
>> Linear solve converged due to CONVERGED_ITS iterations 1
>> 1 KSP Residual norm 1.237356237744e-04
>> Linear solve converged due to CONVERGED_ITS iterations 1
>> 2 KSP Residual norm 7.952220078415e-05
>> Linear solve converged due to CONVERGED_ITS iterations 1
>> 3 KSP Residual norm 3.502859285561e-05
>> Linear solve converged due to CONVERGED_ITS iterations 1
>> 4 KSP Residual norm 1.601086485810e-05
>> Linear solve converged due to CONVERGED_ITS iterations 1
>> 5 KSP Residual norm 8.491169384185e-06
>> Linear solve converged due to CONVERGED_ITS iterations 1
>> 6 KSP Residual norm 4.778229157872e-06
>> Linear solve converged due to CONVERGED_ITS iterations 1
>> 7 KSP Residual norm 2.571917112191e-06
>> Linear solve converged due to CONVERGED_ITS iterations 1
>> 8 KSP Residual norm 1.353977280183e-06
>> Linear solve converged due to CONVERGED_ITS iterations 1
>> 9 KSP Residual norm 7.408352317360e-07
>> Linear solve converged due to CONVERGED_ITS iterations 1
>> 10 KSP Residual norm 3.810710583336e-07
>> Linear solve converged due to CONVERGED_ITS iterations 1
>> 11 KSP Residual norm 1.955898169394e-07
>> Linear solve converged due to CONVERGED_ITS iterations 1
>> 12 KSP Residual norm 9.938892788465e-08
>> Linear solve converged due to CONVERGED_ITS iterations 1
>> 13 KSP Residual norm 4.893428546840e-08
>> Linear solve converged due to CONVERGED_ITS iterations 1
>> 14 KSP Residual norm 2.395120857135e-08
>> Linear solve converged due to CONVERGED_ITS iterations 1
>> 15 KSP Residual norm 1.2464367927 <tel:1.2464367927>84e-08
>> Linear solve converged due to CONVERGED_ITS iterations 1
>> 16 KSP Residual norm 6.316409779118e-09
>> Linear solve converged due to CONVERGED_ITS iterations 1
>> 17 KSP Residual norm 3.088649355374e-09
>> Linear solve converged due to CONVERGED_ITS iterations 1
>> 18 KSP Residual norm 1.593449602302e-09
>> Linear solve converged due to CONVERGED_ITS iterations 1
>> Linear solve converged due to CONVERGED_ITS iterations 1
>> Residual norms for fieldsplit_boundary_ solve.
>> 0 KSP Residual norm 1.593449603155e-09
>> Linear solve converged due to CONVERGED_ITS iterations 1
>> 1 KSP Residual norm 1.011857676662e-09
>> Linear solve converged due to CONVERGED_ITS iterations 1
>> 2 KSP Residual norm 5.660892669788e-10
>> Linear solve converged due to CONVERGED_ITS iterations 1
>> 3 KSP Residual norm 3.046799343903e-10
>> Linear solve converged due to CONVERGED_ITS iterations 1
>> 4 KSP Residual norm 1.6004713993 <tel:1.6004713993>29e-10
>> Linear solve converged due to CONVERGED_ITS iterations 1
>> 5 KSP Residual norm 8.083216601016e-11
>> Linear solve converged due to CONVERGED_ITS iterations 1
>> 6 KSP Residual norm 4.308671648345e-11
>> Linear solve converged due to CONVERGED_ITS iterations 1
>> 7 KSP Residual norm 2.381959817139e-11
>> Linear solve converged due to CONVERGED_ITS iterations 1
>> 8 KSP Residual norm 1.264839790114e-11
>> Linear solve converged due to CONVERGED_ITS iterations 1
>> 9 KSP Residual norm 6.435098853282e-12
>> Linear solve converged due to CONVERGED_ITS iterations 1
>> 10 KSP Residual norm 3.184769579797e-12
>> Linear solve converged due to CONVERGED_ITS iterations 1
>> 11 KSP Residual norm 1.5022019430 <tel:1.5022019430>16e-12
>> Linear solve converged due to CONVERGED_ITS iterations 1
>> 12 KSP Residual norm 7.099486208425e-13
>> Linear solve converged due to CONVERGED_ITS iterations 1
>> 13 KSP Residual norm 3.443222176388e-13
>> Linear solve converged due to CONVERGED_ITS iterations 1
>> 14 KSP Residual norm 1.6478434989 <tel:1.6478434989>12e-13
>> Linear solve converged due to CONVERGED_ITS iterations 1
>> 15 KSP Residual norm 8.208508173926e-14
>> Linear solve converged due to CONVERGED_ITS iterations 1
>> 16 KSP Residual norm 4.376604355287e-14
>> Linear solve converged due to CONVERGED_ITS iterations 1
>> 17 KSP Residual norm 2.596069152755e-14
>> Linear solve converged due to CONVERGED_ITS iterations 1
>> 18 KSP Residual norm 1.335744434252e-14
>> Linear solve converged due to CONVERGED_ITS iterations 1
>> 1 KSP preconditioned resid norm 2.608069232839e-13 true resid
>> norm 1.449869994655e-13 ||r(i)||/||b|| 9.151778504469e-13
>>
>> I have no idea how to interpret this output! Could you help me
>> with it?
>>
>>
>> Get rid of -fieldsplit_interior_ksp_converged_reason. It is confusing things. Then you will see
>> the outer iteration and the inner boundary iteration which is indented.
>>
>> Matt
>>
>>
>> Thomas
>>
>>
>>
>>
>> --
>> 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
>
1
0
On Wed, Mar 16, 2011 at 14:27, Thomas Witkowski <
thomas.witkowski(a)tu-dresden.de> wrote:
>
>> I'm going to guess that you still have an outer KSP that (in the global
>> norm, rather than the partitioned norm used inside of splits) has a tighter
>> tolerance, therefore it takes a few outer iterations. If you use loose inner
>> tolerances then the preconditioner becomes nonlinear and you'll need to use
>> FGMRES for the outer. When in doubt, run with -ksp_view and show us the
>> results if you don't understand. Additionally, monitoring inner solves
>> separately can be useful, e.g. -fieldsplit_0_ksp_converged_reason
>> -fieldsplit_1_ksp_monitor -ksp_monitor_true_residual.
>>
> Okay, I run my code with the options "-pc_fieldsplit_type schur
> -fieldsplit_interior_ksp_type preonly -fieldsplit_interior_pc_type bjacobi
> -fieldsplit_interior_sub_pc_type lu -fieldsplit_boundary_ksp_monitor
> -ksp_monitor_true_residual -fieldsplit_interior_ksp_converged_reason". The
> splits are named "interior" and "boundary". The ksp output is as follows:
>
> Linear solve converged due to CONVERGED_ITS iterations 1
>
This is the initial interior solve.
> Residual norms for fieldsplit_boundary_ solve.
> 0 KSP Residual norm 1.790059331071e-04
> Linear solve converged due to CONVERGED_ITS iterations 1
> 1 KSP Residual norm 1.237356212928e-04
> Linear solve converged due to CONVERGED_ITS iterations 1
> 2 KSP Residual norm 7.952220245101e-05
> Linear solve converged due to CONVERGED_ITS iterations 1
>
[...]
Each iteration on the boundary problem requires an interior solve. We see
alternating boundary residual and interior solves.
>
> [0] Petsc-Iteration 0: 0.574504
>
You must be printing this somewhere.
> 0 KSP preconditioned resid norm 5.745043818120e-01 true resid norm
> 1.584249437360e-01 ||r(i)||/||b|| 1.000000000000e+00
>
This is the norm of P^{-1} b, upon which all following norms are computed.
Note that this is not actually a "preconditioned residual" because the
initial guess was zero, however. In fact, since P is an exact preconditioner
for your problem, it is the solution of your problem, but GMRES can't check
that until it does one more iteration (the output below). You can use
-ksp_type richardson to cheaply confirm that the norm is small, it should
show a small residual after one iteration. Once you are happy that the inner
solve really is solving your system, you can switch to -ksp_type preonly.
> Linear solve converged due to CONVERGED_ITS iterations 1
> Residual norms for fieldsplit_boundary_ solve.
> 0 KSP Residual norm 1.790059331000e-04
> Linear solve converged due to CONVERGED_ITS iterations 1
> 1 KSP Residual norm 1.237356237744e-04
> Linear solve converged due to CONVERGED_ITS iterations 1
> 2 KSP Residual norm 7.952220078415e-05
> Linear solve converged due to CONVERGED_ITS iterations 1
> 3 KSP Residual norm 3.502859285561e-05
> Linear solve converged due to CONVERGED_ITS iterations 1
> 4 KSP Residual norm 1.601086485810e-05
> Linear solve converged due to CONVERGED_ITS iterations 1
> 5 KSP Residual norm 8.491169384185e-06
> Linear solve converged due to CONVERGED_ITS iterations 1
> 6 KSP Residual norm 4.778229157872e-06
> Linear solve converged due to CONVERGED_ITS iterations 1
> 7 KSP Residual norm 2.571917112191e-06
> Linear solve converged due to CONVERGED_ITS iterations 1
> 8 KSP Residual norm 1.353977280183e-06
> Linear solve converged due to CONVERGED_ITS iterations 1
> 9 KSP Residual norm 7.408352317360e-07
> Linear solve converged due to CONVERGED_ITS iterations 1
> 10 KSP Residual norm 3.810710583336e-07
> Linear solve converged due to CONVERGED_ITS iterations 1
> 11 KSP Residual norm 1.955898169394e-07
> Linear solve converged due to CONVERGED_ITS iterations 1
> 12 KSP Residual norm 9.938892788465e-08
> Linear solve converged due to CONVERGED_ITS iterations 1
> 13 KSP Residual norm 4.893428546840e-08
> Linear solve converged due to CONVERGED_ITS iterations 1
> 14 KSP Residual norm 2.395120857135e-08
> Linear solve converged due to CONVERGED_ITS iterations 1
> 15 KSP Residual norm <1.2464367927> <1.2464367927> <1.2464367927>
> 1.246436792784e-08
> Linear solve converged due to CONVERGED_ITS iterations 1
> 16 KSP Residual norm 6.316409779118e-09
> Linear solve converged due to CONVERGED_ITS iterations 1
> 17 KSP Residual norm 3.088649355374e-09
> Linear solve converged due to CONVERGED_ITS iterations 1
> 18 KSP Residual norm 1.593449602302e-09
> Linear solve converged due to CONVERGED_ITS iterations 1
>
The way GMRES computes residuals explains why we needed this Schur solve,
but it shouldn't do the one below. Are you using GMRES or some other Krylov
solver (perhaps set in an options file or inside your code, -ksp_view would
help)?
> Linear solve converged due to CONVERGED_ITS iterations 1
> Residual norms for fieldsplit_boundary_ solve.
> 0 KSP Residual norm 1.593449603155e-09
> Linear solve converged due to CONVERGED_ITS iterations 1
> 1 KSP Residual norm 1.011857676662e-09
> Linear solve converged due to CONVERGED_ITS iterations 1
> 2 KSP Residual norm 5.660892669788e-10
> Linear solve converged due to CONVERGED_ITS iterations 1
> 3 KSP Residual norm 3.046799343903e-10
> Linear solve converged due to CONVERGED_ITS iterations 1
> 4 KSP Residual norm <1.6004713993> <1.6004713993> <1.6004713993>
> 1.600471399329e-10
> Linear solve converged due to CONVERGED_ITS iterations 1
> 5 KSP Residual norm 8.083216601016e-11
> Linear solve converged due to CONVERGED_ITS iterations 1
> 6 KSP Residual norm 4.308671648345e-11
> Linear solve converged due to CONVERGED_ITS iterations 1
> 7 KSP Residual norm 2.381959817139e-11
> Linear solve converged due to CONVERGED_ITS iterations 1
> 8 KSP Residual norm 1.264839790114e-11
> Linear solve converged due to CONVERGED_ITS iterations 1
> 9 KSP Residual norm 6.435098853282e-12
> Linear solve converged due to CONVERGED_ITS iterations 1
> 10 KSP Residual norm 3.184769579797e-12
> Linear solve converged due to CONVERGED_ITS iterations 1
> 11 KSP Residual norm <1.5022019430> <1.5022019430> <1.5022019430>
> 1.502201943016e-12
> Linear solve converged due to CONVERGED_ITS iterations 1
> 12 KSP Residual norm 7.099486208425e-13
> Linear solve converged due to CONVERGED_ITS iterations 1
> 13 KSP Residual norm 3.443222176388e-13
> Linear solve converged due to CONVERGED_ITS iterations 1
> 14 KSP Residual norm <1.6478434989> <1.6478434989> <1.6478434989>
> 1.647843498912e-13
> Linear solve converged due to CONVERGED_ITS iterations 1
> 15 KSP Residual norm 8.208508173926e-14
> Linear solve converged due to CONVERGED_ITS iterations 1
> 16 KSP Residual norm 4.376604355287e-14
> Linear solve converged due to CONVERGED_ITS iterations 1
> 17 KSP Residual norm 2.596069152755e-14
> Linear solve converged due to CONVERGED_ITS iterations 1
> 18 KSP Residual norm 1.335744434252e-14
> Linear solve converged due to CONVERGED_ITS iterations 1
> 1 KSP preconditioned resid norm 2.608069232839e-13 true resid norm
> 1.449869994655e-13 ||r(i)||/||b|| 9.151778504469e-13
>
> I have no idea how to interpret this output! Could you help me with it?
>
> Thomas
>
1
0
Matthew Knepley wrote:
> On Wed, Mar 16, 2011 at 8:57 AM, Thomas Witkowski
> <thomas.witkowski(a)tu-dresden.de
> <mailto:[email protected]>> wrote:
>
> Matt, it makes the output nicer, but does not help me to
> understand what's going on inside of PETSc:
>
>
> Residual norms for fieldsplit_boundary_ solve.
> 0 KSP Residual norm 1.790059331071e-04
> 1 KSP Residual norm 1.237356212928e-04
> 2 KSP Residual norm 7.952220245101e-05
> 3 KSP Residual norm 3.502858665398e-05
> 4 KSP Residual norm 1.601085190129e-05
> 5 KSP Residual norm 8.491161243057e-06
> 6 KSP Residual norm 4.778227395989e-06
> 7 KSP Residual norm 2.571919352633e-06
> 8 KSP Residual norm 1.353979940120e-06
> 9 KSP Residual norm 7.408377337496e-07
> 10 KSP Residual norm 3.810694345834e-07
> 11 KSP Residual norm 1.955889542056e-07
> 12 KSP Residual norm 9.938906113920e-08
> 13 KSP Residual norm 4.893445675773e-08
> 14 KSP Residual norm 2.395128458062e-08
> 15 KSP Residual norm 1.2464425896 <tel:1.2464425896>57e-08
> 16 KSP Residual norm 6.316454504022e-09
> 17 KSP Residual norm 3.088668836241e-09
> 18 KSP Residual norm 1.593454221996e-09
> 0 KSP preconditioned resid norm 5.745043818120e-01 true resid
> norm 1.584249437360e-01 ||r(i)||/||b|| 1.000000000000e+00
> Residual norms for fieldsplit_boundary_ solve.
> 0 KSP Residual norm 1.790059331000e-04
> 1 KSP Residual norm 1.237356237744e-04
> 2 KSP Residual norm 7.952220078415e-05
> 3 KSP Residual norm 3.502859285561e-05
> 4 KSP Residual norm 1.601086485810e-05
> 5 KSP Residual norm 8.491169384185e-06
> 6 KSP Residual norm 4.778229157872e-06
> 7 KSP Residual norm 2.571917112191e-06
> 8 KSP Residual norm 1.353977280183e-06
> 9 KSP Residual norm 7.408352317360e-07
> 10 KSP Residual norm 3.810710583336e-07
> 11 KSP Residual norm 1.955898169394e-07
> 12 KSP Residual norm 9.938892788465e-08
> 13 KSP Residual norm 4.893428546840e-08
> 14 KSP Residual norm 2.395120857135e-08
> 15 KSP Residual norm 1.2464367927 <tel:1.2464367927>84e-08
> 16 KSP Residual norm 6.316409779118e-09
> 17 KSP Residual norm 3.088649355374e-09
> 18 KSP Residual norm 1.593449602302e-09
> Residual norms for fieldsplit_boundary_ solve.
> 0 KSP Residual norm 1.593449603155e-09
> 1 KSP Residual norm 1.011857676662e-09
> 2 KSP Residual norm 5.660892669788e-10
> 3 KSP Residual norm 3.046799343903e-10
> 4 KSP Residual norm 1.6004713993 <tel:1.6004713993>29e-10
> 5 KSP Residual norm 8.083216601016e-11
> 6 KSP Residual norm 4.308671648345e-11
> 7 KSP Residual norm 2.381959817139e-11
> 8 KSP Residual norm 1.264839790114e-11
> 9 KSP Residual norm 6.435098853282e-12
> 10 KSP Residual norm 3.184769579797e-12
> 11 KSP Residual norm 1.5022019430 <tel:1.5022019430>16e-12
> 12 KSP Residual norm 7.099486208425e-13
> 13 KSP Residual norm 3.443222176388e-13
> 14 KSP Residual norm 1.6478434989 <tel:1.6478434989>12e-13
> 15 KSP Residual norm 8.208508173926e-14
> 16 KSP Residual norm 4.376604355287e-14
> 17 KSP Residual norm 2.596069152755e-14
> 18 KSP Residual norm 1.335744434252e-14
> 1 KSP preconditioned resid norm 2.608069232839e-13 true resid
> norm 1.449869994655e-13 ||r(i)||/||b|| 9.151778504469e-13
>
>
> So, are there now two or one outer iterations?
>
>
> 1 outer (NOT INDENTED) which took two iterates. 1 inner (INDENTED)
> which ran 3 times.
Mh, I've some problems to understand the whole situation, so sorry for
recurrent questions. Why does the "Schur fieldsplit solver" needs two
iterations? I thought that if the A_00 block is directly factorized and
the Schur system is solved accurately than whole system should be solved
within one iteration. And why does the first iteration make on solve of
fieldsplit_boundary_ solve, but the second iteration runs this two times?
Thomas
>
> Matt
>
>
> Thomas
>
>
>
>
> Matthew Knepley wrote:
>
> On Wed, Mar 16, 2011 at 8:27 AM, Thomas Witkowski
> <thomas.witkowski(a)tu-dresden.de
> <mailto:[email protected]>
> <mailto:[email protected]
> <mailto:[email protected]>>> wrote:
>
> Jed Brown wrote:
>
> On Wed, Mar 16, 2011 at 07:37, Thomas Witkowski
> <thomas.witkowski(a)tu-dresden.de
> <mailto:[email protected]>
> <mailto:[email protected]
> <mailto:[email protected]>>
> <mailto:[email protected]
> <mailto:[email protected]>
> <mailto:[email protected]
> <mailto:[email protected]>>>> wrote:
>
> Thanks for explanations! It works fine in my code. But I
> have two
> questions about it, maybe you can help me with them:
> - To the first, is the LU factorization on block
> A_00 done
> only once?
>
>
> Yes, one way to confirm this is to run with
> -log_summary and
> check MatLUFactor{Sym,Num}.
> - I have run the code with
> -fieldsplit_1_ksp_monitor to get
> some
> more information about the internal solves. I
> expected to get
> information about one iterative solver (for solving
> the Schur
> complement system), but I got three, all of them
> need around 20
> iterations for my example. Could you explain to me
> what is
> actually solved there?
>
>
> I'm going to guess that you still have an outer KSP
> that (in
> the global norm, rather than the partitioned norm used
> inside
> of splits) has a tighter tolerance, therefore it takes
> a few
> outer iterations. If you use loose inner tolerances
> then the
> preconditioner becomes nonlinear and you'll need to use
> FGMRES
> for the outer. When in doubt, run with -ksp_view and
> show us
> the results if you don't understand. Additionally,
> monitoring
> inner solves separately can be useful, e.g.
> -fieldsplit_0_ksp_converged_reason
> -fieldsplit_1_ksp_monitor
> -ksp_monitor_true_residual.
>
> Okay, I run my code with the options "-pc_fieldsplit_type schur
> -fieldsplit_interior_ksp_type preonly
> -fieldsplit_interior_pc_type
> bjacobi -fieldsplit_interior_sub_pc_type lu
> -fieldsplit_boundary_ksp_monitor -ksp_monitor_true_residual
> -fieldsplit_interior_ksp_converged_reason". The splits are
> named
> "interior" and "boundary". The ksp output is as follows:
>
> Linear solve converged due to CONVERGED_ITS iterations 1
> Residual norms for fieldsplit_boundary_ solve.
> 0 KSP Residual norm 1.790059331071e-04
> Linear solve converged due to CONVERGED_ITS iterations 1
> 1 KSP Residual norm 1.237356212928e-04
> Linear solve converged due to CONVERGED_ITS iterations 1
> 2 KSP Residual norm 7.952220245101e-05
> Linear solve converged due to CONVERGED_ITS iterations 1
> 3 KSP Residual norm 3.502858665398e-05
> Linear solve converged due to CONVERGED_ITS iterations 1
> 4 KSP Residual norm 1.601085190129e-05
> Linear solve converged due to CONVERGED_ITS iterations 1
> 5 KSP Residual norm 8.491161243057e-06
> Linear solve converged due to CONVERGED_ITS iterations 1
> 6 KSP Residual norm 4.778227395989e-06
> Linear solve converged due to CONVERGED_ITS iterations 1
> 7 KSP Residual norm 2.571919352633e-06
> Linear solve converged due to CONVERGED_ITS iterations 1
> 8 KSP Residual norm 1.353979940120e-06
> Linear solve converged due to CONVERGED_ITS iterations 1
> 9 KSP Residual norm 7.408377337496e-07
> Linear solve converged due to CONVERGED_ITS iterations 1
> 10 KSP Residual norm 3.810694345834e-07
> Linear solve converged due to CONVERGED_ITS iterations 1
> 11 KSP Residual norm 1.955889542056e-07
> Linear solve converged due to CONVERGED_ITS iterations 1
> 12 KSP Residual norm 9.938906113920e-08
> Linear solve converged due to CONVERGED_ITS iterations 1
> 13 KSP Residual norm 4.893445675773e-08
> Linear solve converged due to CONVERGED_ITS iterations 1
> 14 KSP Residual norm 2.395128458062e-08
> Linear solve converged due to CONVERGED_ITS iterations 1
> 15 KSP Residual norm 1.2464425896 <tel:1.2464425896>
> <tel:1.2464425896 <tel:1.2464425896>>57e-08
>
> Linear solve converged due to CONVERGED_ITS iterations 1
> 16 KSP Residual norm 6.316454504022e-09
> Linear solve converged due to CONVERGED_ITS iterations 1
> 17 KSP Residual norm 3.088668836241e-09
> Linear solve converged due to CONVERGED_ITS iterations 1
> 18 KSP Residual norm 1.593454221996e-09
> Linear solve converged due to CONVERGED_ITS iterations 1
> [0] Petsc-Iteration 0: 0.574504
> 0 KSP preconditioned resid norm 5.745043818120e-01 true resid
> norm 1.584249437360e-01 ||r(i)||/||b|| 1.000000000000e+00
> Linear solve converged due to CONVERGED_ITS iterations 1
> Residual norms for fieldsplit_boundary_ solve.
> 0 KSP Residual norm 1.790059331000e-04
> Linear solve converged due to CONVERGED_ITS iterations 1
> 1 KSP Residual norm 1.237356237744e-04
> Linear solve converged due to CONVERGED_ITS iterations 1
> 2 KSP Residual norm 7.952220078415e-05
> Linear solve converged due to CONVERGED_ITS iterations 1
> 3 KSP Residual norm 3.502859285561e-05
> Linear solve converged due to CONVERGED_ITS iterations 1
> 4 KSP Residual norm 1.601086485810e-05
> Linear solve converged due to CONVERGED_ITS iterations 1
> 5 KSP Residual norm 8.491169384185e-06
> Linear solve converged due to CONVERGED_ITS iterations 1
> 6 KSP Residual norm 4.778229157872e-06
> Linear solve converged due to CONVERGED_ITS iterations 1
> 7 KSP Residual norm 2.571917112191e-06
> Linear solve converged due to CONVERGED_ITS iterations 1
> 8 KSP Residual norm 1.353977280183e-06
> Linear solve converged due to CONVERGED_ITS iterations 1
> 9 KSP Residual norm 7.408352317360e-07
> Linear solve converged due to CONVERGED_ITS iterations 1
> 10 KSP Residual norm 3.810710583336e-07
> Linear solve converged due to CONVERGED_ITS iterations 1
> 11 KSP Residual norm 1.955898169394e-07
> Linear solve converged due to CONVERGED_ITS iterations 1
> 12 KSP Residual norm 9.938892788465e-08
> Linear solve converged due to CONVERGED_ITS iterations 1
> 13 KSP Residual norm 4.893428546840e-08
> Linear solve converged due to CONVERGED_ITS iterations 1
> 14 KSP Residual norm 2.395120857135e-08
> Linear solve converged due to CONVERGED_ITS iterations 1
> 15 KSP Residual norm 1.2464367927 <tel:1.2464367927>
> <tel:1.2464367927 <tel:1.2464367927>>84e-08
>
> Linear solve converged due to CONVERGED_ITS iterations 1
> 16 KSP Residual norm 6.316409779118e-09
> Linear solve converged due to CONVERGED_ITS iterations 1
> 17 KSP Residual norm 3.088649355374e-09
> Linear solve converged due to CONVERGED_ITS iterations 1
> 18 KSP Residual norm 1.593449602302e-09
> Linear solve converged due to CONVERGED_ITS iterations 1
> Linear solve converged due to CONVERGED_ITS iterations 1
> Residual norms for fieldsplit_boundary_ solve.
> 0 KSP Residual norm 1.593449603155e-09
> Linear solve converged due to CONVERGED_ITS iterations 1
> 1 KSP Residual norm 1.011857676662e-09
> Linear solve converged due to CONVERGED_ITS iterations 1
> 2 KSP Residual norm 5.660892669788e-10
> Linear solve converged due to CONVERGED_ITS iterations 1
> 3 KSP Residual norm 3.046799343903e-10
> Linear solve converged due to CONVERGED_ITS iterations 1
> 4 KSP Residual norm 1.6004713993 <tel:1.6004713993>
> <tel:1.6004713993 <tel:1.6004713993>>29e-10
>
> Linear solve converged due to CONVERGED_ITS iterations 1
> 5 KSP Residual norm 8.083216601016e-11
> Linear solve converged due to CONVERGED_ITS iterations 1
> 6 KSP Residual norm 4.308671648345e-11
> Linear solve converged due to CONVERGED_ITS iterations 1
> 7 KSP Residual norm 2.381959817139e-11
> Linear solve converged due to CONVERGED_ITS iterations 1
> 8 KSP Residual norm 1.264839790114e-11
> Linear solve converged due to CONVERGED_ITS iterations 1
> 9 KSP Residual norm 6.435098853282e-12
> Linear solve converged due to CONVERGED_ITS iterations 1
> 10 KSP Residual norm 3.184769579797e-12
> Linear solve converged due to CONVERGED_ITS iterations 1
> 11 KSP Residual norm 1.5022019430 <tel:1.5022019430>
> <tel:1.5022019430 <tel:1.5022019430>>16e-12
>
> Linear solve converged due to CONVERGED_ITS iterations 1
> 12 KSP Residual norm 7.099486208425e-13
> Linear solve converged due to CONVERGED_ITS iterations 1
> 13 KSP Residual norm 3.443222176388e-13
> Linear solve converged due to CONVERGED_ITS iterations 1
> 14 KSP Residual norm 1.6478434989 <tel:1.6478434989>
> <tel:1.6478434989 <tel:1.6478434989>>12e-13
>
> Linear solve converged due to CONVERGED_ITS iterations 1
> 15 KSP Residual norm 8.208508173926e-14
> Linear solve converged due to CONVERGED_ITS iterations 1
> 16 KSP Residual norm 4.376604355287e-14
> Linear solve converged due to CONVERGED_ITS iterations 1
> 17 KSP Residual norm 2.596069152755e-14
> Linear solve converged due to CONVERGED_ITS iterations 1
> 18 KSP Residual norm 1.335744434252e-14
> Linear solve converged due to CONVERGED_ITS iterations 1
> 1 KSP preconditioned resid norm 2.608069232839e-13 true resid
> norm 1.449869994655e-13 ||r(i)||/||b|| 9.151778504469e-13
>
> I have no idea how to interpret this output! Could you help me
> with it?
>
>
> Get rid of -fieldsplit_interior_ksp_converged_reason. It is
> confusing things. Then you will see
> the outer iteration and the inner boundary iteration which is
> indented.
>
> Matt
>
>
> Thomas
>
>
>
>
> --
> 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
>
>
>
>
>
> --
> 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
1
0
On Wed, Mar 16, 2011 at 8:57 AM, Thomas Witkowski <
thomas.witkowski(a)tu-dresden.de> wrote:
> Matt, it makes the output nicer, but does not help me to understand what's
> going on inside of PETSc:
>
>
> Residual norms for fieldsplit_boundary_ solve.
> 0 KSP Residual norm 1.790059331071e-04
> 1 KSP Residual norm 1.237356212928e-04
> 2 KSP Residual norm 7.952220245101e-05
> 3 KSP Residual norm 3.502858665398e-05
> 4 KSP Residual norm 1.601085190129e-05
> 5 KSP Residual norm 8.491161243057e-06
> 6 KSP Residual norm 4.778227395989e-06
> 7 KSP Residual norm 2.571919352633e-06
> 8 KSP Residual norm 1.353979940120e-06
> 9 KSP Residual norm 7.408377337496e-07
> 10 KSP Residual norm 3.810694345834e-07
> 11 KSP Residual norm 1.955889542056e-07
> 12 KSP Residual norm 9.938906113920e-08
> 13 KSP Residual norm 4.893445675773e-08
> 14 KSP Residual norm 2.395128458062e-08
> 15 KSP Residual norm <1.2464425896>1.246442589657e-08
> 16 KSP Residual norm 6.316454504022e-09
> 17 KSP Residual norm 3.088668836241e-09
> 18 KSP Residual norm 1.593454221996e-09
> 0 KSP preconditioned resid norm 5.745043818120e-01 true resid norm
> 1.584249437360e-01 ||r(i)||/||b|| 1.000000000000e+00
> Residual norms for fieldsplit_boundary_ solve.
> 0 KSP Residual norm 1.790059331000e-04
> 1 KSP Residual norm 1.237356237744e-04
> 2 KSP Residual norm 7.952220078415e-05
> 3 KSP Residual norm 3.502859285561e-05
> 4 KSP Residual norm 1.601086485810e-05
> 5 KSP Residual norm 8.491169384185e-06
> 6 KSP Residual norm 4.778229157872e-06
> 7 KSP Residual norm 2.571917112191e-06
> 8 KSP Residual norm 1.353977280183e-06
> 9 KSP Residual norm 7.408352317360e-07
> 10 KSP Residual norm 3.810710583336e-07
> 11 KSP Residual norm 1.955898169394e-07
> 12 KSP Residual norm 9.938892788465e-08
> 13 KSP Residual norm 4.893428546840e-08
> 14 KSP Residual norm 2.395120857135e-08
> 15 KSP Residual norm <1.2464367927>1.246436792784e-08
> 16 KSP Residual norm 6.316409779118e-09
> 17 KSP Residual norm 3.088649355374e-09
> 18 KSP Residual norm 1.593449602302e-09
> Residual norms for fieldsplit_boundary_ solve.
> 0 KSP Residual norm 1.593449603155e-09
> 1 KSP Residual norm 1.011857676662e-09
> 2 KSP Residual norm 5.660892669788e-10
> 3 KSP Residual norm 3.046799343903e-10
> 4 KSP Residual norm <1.6004713993>1.600471399329e-10
> 5 KSP Residual norm 8.083216601016e-11
> 6 KSP Residual norm 4.308671648345e-11
> 7 KSP Residual norm 2.381959817139e-11
> 8 KSP Residual norm 1.264839790114e-11
> 9 KSP Residual norm 6.435098853282e-12
> 10 KSP Residual norm 3.184769579797e-12
> 11 KSP Residual norm <1.5022019430>1.502201943016e-12
> 12 KSP Residual norm 7.099486208425e-13
> 13 KSP Residual norm 3.443222176388e-13
> 14 KSP Residual norm <1.6478434989>1.647843498912e-13
> 15 KSP Residual norm 8.208508173926e-14
> 16 KSP Residual norm 4.376604355287e-14
> 17 KSP Residual norm 2.596069152755e-14
> 18 KSP Residual norm 1.335744434252e-14
> 1 KSP preconditioned resid norm 2.608069232839e-13 true resid norm
> 1.449869994655e-13 ||r(i)||/||b|| 9.151778504469e-13
>
>
> So, are there now two or one outer iterations?
>
1 outer (NOT INDENTED) which took two iterates. 1 inner (INDENTED) which ran
3 times.
Matt
> Thomas
>
>
>
>
> Matthew Knepley wrote:
>
>> On Wed, Mar 16, 2011 at 8:27 AM, Thomas Witkowski <
>> thomas.witkowski(a)tu-dresden.de <mailto:[email protected]>>
>> wrote:
>>
>> Jed Brown wrote:
>>
>> On Wed, Mar 16, 2011 at 07:37, Thomas Witkowski
>> <thomas.witkowski(a)tu-dresden.de
>> <mailto:[email protected]>
>> <mailto:[email protected]
>> <mailto:[email protected]>>> wrote:
>>
>> Thanks for explanations! It works fine in my code. But I
>> have two
>> questions about it, maybe you can help me with them:
>> - To the first, is the LU factorization on block A_00 done
>> only once?
>>
>>
>> Yes, one way to confirm this is to run with -log_summary and
>> check MatLUFactor{Sym,Num}.
>> - I have run the code with -fieldsplit_1_ksp_monitor to
>> get
>> some
>> more information about the internal solves. I expected to get
>> information about one iterative solver (for solving the Schur
>> complement system), but I got three, all of them need around 20
>> iterations for my example. Could you explain to me what is
>> actually solved there?
>>
>>
>> I'm going to guess that you still have an outer KSP that (in
>> the global norm, rather than the partitioned norm used inside
>> of splits) has a tighter tolerance, therefore it takes a few
>> outer iterations. If you use loose inner tolerances then the
>> preconditioner becomes nonlinear and you'll need to use FGMRES
>> for the outer. When in doubt, run with -ksp_view and show us
>> the results if you don't understand. Additionally, monitoring
>> inner solves separately can be useful, e.g.
>> -fieldsplit_0_ksp_converged_reason -fieldsplit_1_ksp_monitor
>> -ksp_monitor_true_residual.
>>
>> Okay, I run my code with the options "-pc_fieldsplit_type schur
>> -fieldsplit_interior_ksp_type preonly -fieldsplit_interior_pc_type
>> bjacobi -fieldsplit_interior_sub_pc_type lu
>> -fieldsplit_boundary_ksp_monitor -ksp_monitor_true_residual
>> -fieldsplit_interior_ksp_converged_reason". The splits are named
>> "interior" and "boundary". The ksp output is as follows:
>>
>> Linear solve converged due to CONVERGED_ITS iterations 1
>> Residual norms for fieldsplit_boundary_ solve.
>> 0 KSP Residual norm 1.790059331071e-04
>> Linear solve converged due to CONVERGED_ITS iterations 1
>> 1 KSP Residual norm 1.237356212928e-04
>> Linear solve converged due to CONVERGED_ITS iterations 1
>> 2 KSP Residual norm 7.952220245101e-05
>> Linear solve converged due to CONVERGED_ITS iterations 1
>> 3 KSP Residual norm 3.502858665398e-05
>> Linear solve converged due to CONVERGED_ITS iterations 1
>> 4 KSP Residual norm 1.601085190129e-05
>> Linear solve converged due to CONVERGED_ITS iterations 1
>> 5 KSP Residual norm 8.491161243057e-06
>> Linear solve converged due to CONVERGED_ITS iterations 1
>> 6 KSP Residual norm 4.778227395989e-06
>> Linear solve converged due to CONVERGED_ITS iterations 1
>> 7 KSP Residual norm 2.571919352633e-06
>> Linear solve converged due to CONVERGED_ITS iterations 1
>> 8 KSP Residual norm 1.353979940120e-06
>> Linear solve converged due to CONVERGED_ITS iterations 1
>> 9 KSP Residual norm 7.408377337496e-07
>> Linear solve converged due to CONVERGED_ITS iterations 1
>> 10 KSP Residual norm 3.810694345834e-07
>> Linear solve converged due to CONVERGED_ITS iterations 1
>> 11 KSP Residual norm 1.955889542056e-07
>> Linear solve converged due to CONVERGED_ITS iterations 1
>> 12 KSP Residual norm 9.938906113920e-08
>> Linear solve converged due to CONVERGED_ITS iterations 1
>> 13 KSP Residual norm 4.893445675773e-08
>> Linear solve converged due to CONVERGED_ITS iterations 1
>> 14 KSP Residual norm 2.395128458062e-08
>> Linear solve converged due to CONVERGED_ITS iterations 1
>> 15 KSP Residual norm <1.2464425896>1.2464425896 <tel: <1.2464425896>
>> 1.2464425896>57e-08
>>
>> Linear solve converged due to CONVERGED_ITS iterations 1
>> 16 KSP Residual norm 6.316454504022e-09
>> Linear solve converged due to CONVERGED_ITS iterations 1
>> 17 KSP Residual norm 3.088668836241e-09
>> Linear solve converged due to CONVERGED_ITS iterations 1
>> 18 KSP Residual norm 1.593454221996e-09
>> Linear solve converged due to CONVERGED_ITS iterations 1
>> [0] Petsc-Iteration 0: 0.574504
>> 0 KSP preconditioned resid norm 5.745043818120e-01 true resid
>> norm 1.584249437360e-01 ||r(i)||/||b|| 1.000000000000e+00
>> Linear solve converged due to CONVERGED_ITS iterations 1
>> Residual norms for fieldsplit_boundary_ solve.
>> 0 KSP Residual norm 1.790059331000e-04
>> Linear solve converged due to CONVERGED_ITS iterations 1
>> 1 KSP Residual norm 1.237356237744e-04
>> Linear solve converged due to CONVERGED_ITS iterations 1
>> 2 KSP Residual norm 7.952220078415e-05
>> Linear solve converged due to CONVERGED_ITS iterations 1
>> 3 KSP Residual norm 3.502859285561e-05
>> Linear solve converged due to CONVERGED_ITS iterations 1
>> 4 KSP Residual norm 1.601086485810e-05
>> Linear solve converged due to CONVERGED_ITS iterations 1
>> 5 KSP Residual norm 8.491169384185e-06
>> Linear solve converged due to CONVERGED_ITS iterations 1
>> 6 KSP Residual norm 4.778229157872e-06
>> Linear solve converged due to CONVERGED_ITS iterations 1
>> 7 KSP Residual norm 2.571917112191e-06
>> Linear solve converged due to CONVERGED_ITS iterations 1
>> 8 KSP Residual norm 1.353977280183e-06
>> Linear solve converged due to CONVERGED_ITS iterations 1
>> 9 KSP Residual norm 7.408352317360e-07
>> Linear solve converged due to CONVERGED_ITS iterations 1
>> 10 KSP Residual norm 3.810710583336e-07
>> Linear solve converged due to CONVERGED_ITS iterations 1
>> 11 KSP Residual norm 1.955898169394e-07
>> Linear solve converged due to CONVERGED_ITS iterations 1
>> 12 KSP Residual norm 9.938892788465e-08
>> Linear solve converged due to CONVERGED_ITS iterations 1
>> 13 KSP Residual norm 4.893428546840e-08
>> Linear solve converged due to CONVERGED_ITS iterations 1
>> 14 KSP Residual norm 2.395120857135e-08
>> Linear solve converged due to CONVERGED_ITS iterations 1
>> 15 KSP Residual norm <1.2464367927>1.2464367927 <tel: <1.2464367927>
>> 1.2464367927>84e-08
>>
>> Linear solve converged due to CONVERGED_ITS iterations 1
>> 16 KSP Residual norm 6.316409779118e-09
>> Linear solve converged due to CONVERGED_ITS iterations 1
>> 17 KSP Residual norm 3.088649355374e-09
>> Linear solve converged due to CONVERGED_ITS iterations 1
>> 18 KSP Residual norm 1.593449602302e-09
>> Linear solve converged due to CONVERGED_ITS iterations 1
>> Linear solve converged due to CONVERGED_ITS iterations 1
>> Residual norms for fieldsplit_boundary_ solve.
>> 0 KSP Residual norm 1.593449603155e-09
>> Linear solve converged due to CONVERGED_ITS iterations 1
>> 1 KSP Residual norm 1.011857676662e-09
>> Linear solve converged due to CONVERGED_ITS iterations 1
>> 2 KSP Residual norm 5.660892669788e-10
>> Linear solve converged due to CONVERGED_ITS iterations 1
>> 3 KSP Residual norm 3.046799343903e-10
>> Linear solve converged due to CONVERGED_ITS iterations 1
>> 4 KSP Residual norm <1.6004713993>1.6004713993 <tel: <1.6004713993>
>> 1.6004713993>29e-10
>>
>> Linear solve converged due to CONVERGED_ITS iterations 1
>> 5 KSP Residual norm 8.083216601016e-11
>> Linear solve converged due to CONVERGED_ITS iterations 1
>> 6 KSP Residual norm 4.308671648345e-11
>> Linear solve converged due to CONVERGED_ITS iterations 1
>> 7 KSP Residual norm 2.381959817139e-11
>> Linear solve converged due to CONVERGED_ITS iterations 1
>> 8 KSP Residual norm 1.264839790114e-11
>> Linear solve converged due to CONVERGED_ITS iterations 1
>> 9 KSP Residual norm 6.435098853282e-12
>> Linear solve converged due to CONVERGED_ITS iterations 1
>> 10 KSP Residual norm 3.184769579797e-12
>> Linear solve converged due to CONVERGED_ITS iterations 1
>> 11 KSP Residual norm <1.5022019430>1.5022019430 <tel: <1.5022019430>
>> 1.5022019430>16e-12
>>
>> Linear solve converged due to CONVERGED_ITS iterations 1
>> 12 KSP Residual norm 7.099486208425e-13
>> Linear solve converged due to CONVERGED_ITS iterations 1
>> 13 KSP Residual norm 3.443222176388e-13
>> Linear solve converged due to CONVERGED_ITS iterations 1
>> 14 KSP Residual norm <1.6478434989>1.6478434989 <tel: <1.6478434989>
>> 1.6478434989>12e-13
>>
>> Linear solve converged due to CONVERGED_ITS iterations 1
>> 15 KSP Residual norm 8.208508173926e-14
>> Linear solve converged due to CONVERGED_ITS iterations 1
>> 16 KSP Residual norm 4.376604355287e-14
>> Linear solve converged due to CONVERGED_ITS iterations 1
>> 17 KSP Residual norm 2.596069152755e-14
>> Linear solve converged due to CONVERGED_ITS iterations 1
>> 18 KSP Residual norm 1.335744434252e-14
>> Linear solve converged due to CONVERGED_ITS iterations 1
>> 1 KSP preconditioned resid norm 2.608069232839e-13 true resid
>> norm 1.449869994655e-13 ||r(i)||/||b|| 9.151778504469e-13
>>
>> I have no idea how to interpret this output! Could you help me
>> with it?
>>
>>
>> Get rid of -fieldsplit_interior_ksp_converged_reason. It is confusing
>> things. Then you will see
>> the outer iteration and the inner boundary iteration which is indented.
>>
>> Matt
>>
>>
>> Thomas
>>
>>
>>
>>
>> --
>> 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
>>
>
>
--
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
1
0
Matt, it makes the output nicer, but does not help me to understand
what's going on inside of PETSc:
Residual norms for fieldsplit_boundary_ solve.
0 KSP Residual norm 1.790059331071e-04
1 KSP Residual norm 1.237356212928e-04
2 KSP Residual norm 7.952220245101e-05
3 KSP Residual norm 3.502858665398e-05
4 KSP Residual norm 1.601085190129e-05
5 KSP Residual norm 8.491161243057e-06
6 KSP Residual norm 4.778227395989e-06
7 KSP Residual norm 2.571919352633e-06
8 KSP Residual norm 1.353979940120e-06
9 KSP Residual norm 7.408377337496e-07
10 KSP Residual norm 3.810694345834e-07
11 KSP Residual norm 1.955889542056e-07
12 KSP Residual norm 9.938906113920e-08
13 KSP Residual norm 4.893445675773e-08
14 KSP Residual norm 2.395128458062e-08
15 KSP Residual norm 1.246442589657e-08
16 KSP Residual norm 6.316454504022e-09
17 KSP Residual norm 3.088668836241e-09
18 KSP Residual norm 1.593454221996e-09
0 KSP preconditioned resid norm 5.745043818120e-01 true resid norm
1.584249437360e-01 ||r(i)||/||b|| 1.000000000000e+00
Residual norms for fieldsplit_boundary_ solve.
0 KSP Residual norm 1.790059331000e-04
1 KSP Residual norm 1.237356237744e-04
2 KSP Residual norm 7.952220078415e-05
3 KSP Residual norm 3.502859285561e-05
4 KSP Residual norm 1.601086485810e-05
5 KSP Residual norm 8.491169384185e-06
6 KSP Residual norm 4.778229157872e-06
7 KSP Residual norm 2.571917112191e-06
8 KSP Residual norm 1.353977280183e-06
9 KSP Residual norm 7.408352317360e-07
10 KSP Residual norm 3.810710583336e-07
11 KSP Residual norm 1.955898169394e-07
12 KSP Residual norm 9.938892788465e-08
13 KSP Residual norm 4.893428546840e-08
14 KSP Residual norm 2.395120857135e-08
15 KSP Residual norm 1.246436792784e-08
16 KSP Residual norm 6.316409779118e-09
17 KSP Residual norm 3.088649355374e-09
18 KSP Residual norm 1.593449602302e-09
Residual norms for fieldsplit_boundary_ solve.
0 KSP Residual norm 1.593449603155e-09
1 KSP Residual norm 1.011857676662e-09
2 KSP Residual norm 5.660892669788e-10
3 KSP Residual norm 3.046799343903e-10
4 KSP Residual norm 1.600471399329e-10
5 KSP Residual norm 8.083216601016e-11
6 KSP Residual norm 4.308671648345e-11
7 KSP Residual norm 2.381959817139e-11
8 KSP Residual norm 1.264839790114e-11
9 KSP Residual norm 6.435098853282e-12
10 KSP Residual norm 3.184769579797e-12
11 KSP Residual norm 1.502201943016e-12
12 KSP Residual norm 7.099486208425e-13
13 KSP Residual norm 3.443222176388e-13
14 KSP Residual norm 1.647843498912e-13
15 KSP Residual norm 8.208508173926e-14
16 KSP Residual norm 4.376604355287e-14
17 KSP Residual norm 2.596069152755e-14
18 KSP Residual norm 1.335744434252e-14
1 KSP preconditioned resid norm 2.608069232839e-13 true resid norm
1.449869994655e-13 ||r(i)||/||b|| 9.151778504469e-13
So, are there now two or one outer iterations?
Thomas
Matthew Knepley wrote:
> On Wed, Mar 16, 2011 at 8:27 AM, Thomas Witkowski
> <thomas.witkowski(a)tu-dresden.de
> <mailto:[email protected]>> wrote:
>
> Jed Brown wrote:
>
> On Wed, Mar 16, 2011 at 07:37, Thomas Witkowski
> <thomas.witkowski(a)tu-dresden.de
> <mailto:[email protected]>
> <mailto:[email protected]
> <mailto:[email protected]>>> wrote:
>
> Thanks for explanations! It works fine in my code. But I
> have two
> questions about it, maybe you can help me with them:
> - To the first, is the LU factorization on block A_00 done
> only once?
>
>
> Yes, one way to confirm this is to run with -log_summary and
> check MatLUFactor{Sym,Num}.
>
> - I have run the code with -fieldsplit_1_ksp_monitor to get
> some
> more information about the internal solves. I expected to get
> information about one iterative solver (for solving the Schur
> complement system), but I got three, all of them need around 20
> iterations for my example. Could you explain to me what is
> actually solved there?
>
>
> I'm going to guess that you still have an outer KSP that (in
> the global norm, rather than the partitioned norm used inside
> of splits) has a tighter tolerance, therefore it takes a few
> outer iterations. If you use loose inner tolerances then the
> preconditioner becomes nonlinear and you'll need to use FGMRES
> for the outer. When in doubt, run with -ksp_view and show us
> the results if you don't understand. Additionally, monitoring
> inner solves separately can be useful, e.g.
> -fieldsplit_0_ksp_converged_reason -fieldsplit_1_ksp_monitor
> -ksp_monitor_true_residual.
>
> Okay, I run my code with the options "-pc_fieldsplit_type schur
> -fieldsplit_interior_ksp_type preonly -fieldsplit_interior_pc_type
> bjacobi -fieldsplit_interior_sub_pc_type lu
> -fieldsplit_boundary_ksp_monitor -ksp_monitor_true_residual
> -fieldsplit_interior_ksp_converged_reason". The splits are named
> "interior" and "boundary". The ksp output is as follows:
>
> Linear solve converged due to CONVERGED_ITS iterations 1
> Residual norms for fieldsplit_boundary_ solve.
> 0 KSP Residual norm 1.790059331071e-04
> Linear solve converged due to CONVERGED_ITS iterations 1
> 1 KSP Residual norm 1.237356212928e-04
> Linear solve converged due to CONVERGED_ITS iterations 1
> 2 KSP Residual norm 7.952220245101e-05
> Linear solve converged due to CONVERGED_ITS iterations 1
> 3 KSP Residual norm 3.502858665398e-05
> Linear solve converged due to CONVERGED_ITS iterations 1
> 4 KSP Residual norm 1.601085190129e-05
> Linear solve converged due to CONVERGED_ITS iterations 1
> 5 KSP Residual norm 8.491161243057e-06
> Linear solve converged due to CONVERGED_ITS iterations 1
> 6 KSP Residual norm 4.778227395989e-06
> Linear solve converged due to CONVERGED_ITS iterations 1
> 7 KSP Residual norm 2.571919352633e-06
> Linear solve converged due to CONVERGED_ITS iterations 1
> 8 KSP Residual norm 1.353979940120e-06
> Linear solve converged due to CONVERGED_ITS iterations 1
> 9 KSP Residual norm 7.408377337496e-07
> Linear solve converged due to CONVERGED_ITS iterations 1
> 10 KSP Residual norm 3.810694345834e-07
> Linear solve converged due to CONVERGED_ITS iterations 1
> 11 KSP Residual norm 1.955889542056e-07
> Linear solve converged due to CONVERGED_ITS iterations 1
> 12 KSP Residual norm 9.938906113920e-08
> Linear solve converged due to CONVERGED_ITS iterations 1
> 13 KSP Residual norm 4.893445675773e-08
> Linear solve converged due to CONVERGED_ITS iterations 1
> 14 KSP Residual norm 2.395128458062e-08
> Linear solve converged due to CONVERGED_ITS iterations 1
> 15 KSP Residual norm 1.2464425896 <tel:1.2464425896>57e-08
> Linear solve converged due to CONVERGED_ITS iterations 1
> 16 KSP Residual norm 6.316454504022e-09
> Linear solve converged due to CONVERGED_ITS iterations 1
> 17 KSP Residual norm 3.088668836241e-09
> Linear solve converged due to CONVERGED_ITS iterations 1
> 18 KSP Residual norm 1.593454221996e-09
> Linear solve converged due to CONVERGED_ITS iterations 1
> [0] Petsc-Iteration 0: 0.574504
> 0 KSP preconditioned resid norm 5.745043818120e-01 true resid
> norm 1.584249437360e-01 ||r(i)||/||b|| 1.000000000000e+00
> Linear solve converged due to CONVERGED_ITS iterations 1
> Residual norms for fieldsplit_boundary_ solve.
> 0 KSP Residual norm 1.790059331000e-04
> Linear solve converged due to CONVERGED_ITS iterations 1
> 1 KSP Residual norm 1.237356237744e-04
> Linear solve converged due to CONVERGED_ITS iterations 1
> 2 KSP Residual norm 7.952220078415e-05
> Linear solve converged due to CONVERGED_ITS iterations 1
> 3 KSP Residual norm 3.502859285561e-05
> Linear solve converged due to CONVERGED_ITS iterations 1
> 4 KSP Residual norm 1.601086485810e-05
> Linear solve converged due to CONVERGED_ITS iterations 1
> 5 KSP Residual norm 8.491169384185e-06
> Linear solve converged due to CONVERGED_ITS iterations 1
> 6 KSP Residual norm 4.778229157872e-06
> Linear solve converged due to CONVERGED_ITS iterations 1
> 7 KSP Residual norm 2.571917112191e-06
> Linear solve converged due to CONVERGED_ITS iterations 1
> 8 KSP Residual norm 1.353977280183e-06
> Linear solve converged due to CONVERGED_ITS iterations 1
> 9 KSP Residual norm 7.408352317360e-07
> Linear solve converged due to CONVERGED_ITS iterations 1
> 10 KSP Residual norm 3.810710583336e-07
> Linear solve converged due to CONVERGED_ITS iterations 1
> 11 KSP Residual norm 1.955898169394e-07
> Linear solve converged due to CONVERGED_ITS iterations 1
> 12 KSP Residual norm 9.938892788465e-08
> Linear solve converged due to CONVERGED_ITS iterations 1
> 13 KSP Residual norm 4.893428546840e-08
> Linear solve converged due to CONVERGED_ITS iterations 1
> 14 KSP Residual norm 2.395120857135e-08
> Linear solve converged due to CONVERGED_ITS iterations 1
> 15 KSP Residual norm 1.2464367927 <tel:1.2464367927>84e-08
> Linear solve converged due to CONVERGED_ITS iterations 1
> 16 KSP Residual norm 6.316409779118e-09
> Linear solve converged due to CONVERGED_ITS iterations 1
> 17 KSP Residual norm 3.088649355374e-09
> Linear solve converged due to CONVERGED_ITS iterations 1
> 18 KSP Residual norm 1.593449602302e-09
> Linear solve converged due to CONVERGED_ITS iterations 1
> Linear solve converged due to CONVERGED_ITS iterations 1
> Residual norms for fieldsplit_boundary_ solve.
> 0 KSP Residual norm 1.593449603155e-09
> Linear solve converged due to CONVERGED_ITS iterations 1
> 1 KSP Residual norm 1.011857676662e-09
> Linear solve converged due to CONVERGED_ITS iterations 1
> 2 KSP Residual norm 5.660892669788e-10
> Linear solve converged due to CONVERGED_ITS iterations 1
> 3 KSP Residual norm 3.046799343903e-10
> Linear solve converged due to CONVERGED_ITS iterations 1
> 4 KSP Residual norm 1.6004713993 <tel:1.6004713993>29e-10
> Linear solve converged due to CONVERGED_ITS iterations 1
> 5 KSP Residual norm 8.083216601016e-11
> Linear solve converged due to CONVERGED_ITS iterations 1
> 6 KSP Residual norm 4.308671648345e-11
> Linear solve converged due to CONVERGED_ITS iterations 1
> 7 KSP Residual norm 2.381959817139e-11
> Linear solve converged due to CONVERGED_ITS iterations 1
> 8 KSP Residual norm 1.264839790114e-11
> Linear solve converged due to CONVERGED_ITS iterations 1
> 9 KSP Residual norm 6.435098853282e-12
> Linear solve converged due to CONVERGED_ITS iterations 1
> 10 KSP Residual norm 3.184769579797e-12
> Linear solve converged due to CONVERGED_ITS iterations 1
> 11 KSP Residual norm 1.5022019430 <tel:1.5022019430>16e-12
> Linear solve converged due to CONVERGED_ITS iterations 1
> 12 KSP Residual norm 7.099486208425e-13
> Linear solve converged due to CONVERGED_ITS iterations 1
> 13 KSP Residual norm 3.443222176388e-13
> Linear solve converged due to CONVERGED_ITS iterations 1
> 14 KSP Residual norm 1.6478434989 <tel:1.6478434989>12e-13
> Linear solve converged due to CONVERGED_ITS iterations 1
> 15 KSP Residual norm 8.208508173926e-14
> Linear solve converged due to CONVERGED_ITS iterations 1
> 16 KSP Residual norm 4.376604355287e-14
> Linear solve converged due to CONVERGED_ITS iterations 1
> 17 KSP Residual norm 2.596069152755e-14
> Linear solve converged due to CONVERGED_ITS iterations 1
> 18 KSP Residual norm 1.335744434252e-14
> Linear solve converged due to CONVERGED_ITS iterations 1
> 1 KSP preconditioned resid norm 2.608069232839e-13 true resid
> norm 1.449869994655e-13 ||r(i)||/||b|| 9.151778504469e-13
>
> I have no idea how to interpret this output! Could you help me
> with it?
>
>
> Get rid of -fieldsplit_interior_ksp_converged_reason. It is confusing
> things. Then you will see
> the outer iteration and the inner boundary iteration which is indented.
>
> Matt
>
>
>
> Thomas
>
>
>
>
> --
> 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
1
0
On Wed, Mar 16, 2011 at 8:27 AM, Thomas Witkowski <
thomas.witkowski(a)tu-dresden.de> wrote:
> Jed Brown wrote:
>
> On Wed, Mar 16, 2011 at 07:37, Thomas Witkowski <
>> thomas.witkowski(a)tu-dresden.de <mailto:[email protected]>>
>> wrote:
>>
>> Thanks for explanations! It works fine in my code. But I have two
>> questions about it, maybe you can help me with them:
>> - To the first, is the LU factorization on block A_00 done only once?
>>
>>
>> Yes, one way to confirm this is to run with -log_summary and check
>> MatLUFactor{Sym,Num}.
>>
>> - I have run the code with -fieldsplit_1_ksp_monitor to get some
>> more information about the internal solves. I expected to get
>> information about one iterative solver (for solving the Schur
>> complement system), but I got three, all of them need around 20
>> iterations for my example. Could you explain to me what is
>> actually solved there?
>>
>>
>> I'm going to guess that you still have an outer KSP that (in the global
>> norm, rather than the partitioned norm used inside of splits) has a tighter
>> tolerance, therefore it takes a few outer iterations. If you use loose inner
>> tolerances then the preconditioner becomes nonlinear and you'll need to use
>> FGMRES for the outer. When in doubt, run with -ksp_view and show us the
>> results if you don't understand. Additionally, monitoring inner solves
>> separately can be useful, e.g. -fieldsplit_0_ksp_converged_reason
>> -fieldsplit_1_ksp_monitor -ksp_monitor_true_residual.
>>
> Okay, I run my code with the options "-pc_fieldsplit_type schur
> -fieldsplit_interior_ksp_type preonly -fieldsplit_interior_pc_type bjacobi
> -fieldsplit_interior_sub_pc_type lu -fieldsplit_boundary_ksp_monitor
> -ksp_monitor_true_residual -fieldsplit_interior_ksp_converged_reason". The
> splits are named "interior" and "boundary". The ksp output is as follows:
>
> Linear solve converged due to CONVERGED_ITS iterations 1
> Residual norms for fieldsplit_boundary_ solve.
> 0 KSP Residual norm 1.790059331071e-04
> Linear solve converged due to CONVERGED_ITS iterations 1
> 1 KSP Residual norm 1.237356212928e-04
> Linear solve converged due to CONVERGED_ITS iterations 1
> 2 KSP Residual norm 7.952220245101e-05
> Linear solve converged due to CONVERGED_ITS iterations 1
> 3 KSP Residual norm 3.502858665398e-05
> Linear solve converged due to CONVERGED_ITS iterations 1
> 4 KSP Residual norm 1.601085190129e-05
> Linear solve converged due to CONVERGED_ITS iterations 1
> 5 KSP Residual norm 8.491161243057e-06
> Linear solve converged due to CONVERGED_ITS iterations 1
> 6 KSP Residual norm 4.778227395989e-06
> Linear solve converged due to CONVERGED_ITS iterations 1
> 7 KSP Residual norm 2.571919352633e-06
> Linear solve converged due to CONVERGED_ITS iterations 1
> 8 KSP Residual norm 1.353979940120e-06
> Linear solve converged due to CONVERGED_ITS iterations 1
> 9 KSP Residual norm 7.408377337496e-07
> Linear solve converged due to CONVERGED_ITS iterations 1
> 10 KSP Residual norm 3.810694345834e-07
> Linear solve converged due to CONVERGED_ITS iterations 1
> 11 KSP Residual norm 1.955889542056e-07
> Linear solve converged due to CONVERGED_ITS iterations 1
> 12 KSP Residual norm 9.938906113920e-08
> Linear solve converged due to CONVERGED_ITS iterations 1
> 13 KSP Residual norm 4.893445675773e-08
> Linear solve converged due to CONVERGED_ITS iterations 1
> 14 KSP Residual norm 2.395128458062e-08
> Linear solve converged due to CONVERGED_ITS iterations 1
> 15 KSP Residual norm <1.2464425896>1.246442589657e-08
> Linear solve converged due to CONVERGED_ITS iterations 1
> 16 KSP Residual norm 6.316454504022e-09
> Linear solve converged due to CONVERGED_ITS iterations 1
> 17 KSP Residual norm 3.088668836241e-09
> Linear solve converged due to CONVERGED_ITS iterations 1
> 18 KSP Residual norm 1.593454221996e-09
> Linear solve converged due to CONVERGED_ITS iterations 1
> [0] Petsc-Iteration 0: 0.574504
> 0 KSP preconditioned resid norm 5.745043818120e-01 true resid norm
> 1.584249437360e-01 ||r(i)||/||b|| 1.000000000000e+00
> Linear solve converged due to CONVERGED_ITS iterations 1
> Residual norms for fieldsplit_boundary_ solve.
> 0 KSP Residual norm 1.790059331000e-04
> Linear solve converged due to CONVERGED_ITS iterations 1
> 1 KSP Residual norm 1.237356237744e-04
> Linear solve converged due to CONVERGED_ITS iterations 1
> 2 KSP Residual norm 7.952220078415e-05
> Linear solve converged due to CONVERGED_ITS iterations 1
> 3 KSP Residual norm 3.502859285561e-05
> Linear solve converged due to CONVERGED_ITS iterations 1
> 4 KSP Residual norm 1.601086485810e-05
> Linear solve converged due to CONVERGED_ITS iterations 1
> 5 KSP Residual norm 8.491169384185e-06
> Linear solve converged due to CONVERGED_ITS iterations 1
> 6 KSP Residual norm 4.778229157872e-06
> Linear solve converged due to CONVERGED_ITS iterations 1
> 7 KSP Residual norm 2.571917112191e-06
> Linear solve converged due to CONVERGED_ITS iterations 1
> 8 KSP Residual norm 1.353977280183e-06
> Linear solve converged due to CONVERGED_ITS iterations 1
> 9 KSP Residual norm 7.408352317360e-07
> Linear solve converged due to CONVERGED_ITS iterations 1
> 10 KSP Residual norm 3.810710583336e-07
> Linear solve converged due to CONVERGED_ITS iterations 1
> 11 KSP Residual norm 1.955898169394e-07
> Linear solve converged due to CONVERGED_ITS iterations 1
> 12 KSP Residual norm 9.938892788465e-08
> Linear solve converged due to CONVERGED_ITS iterations 1
> 13 KSP Residual norm 4.893428546840e-08
> Linear solve converged due to CONVERGED_ITS iterations 1
> 14 KSP Residual norm 2.395120857135e-08
> Linear solve converged due to CONVERGED_ITS iterations 1
> 15 KSP Residual norm <1.2464367927>1.246436792784e-08
> Linear solve converged due to CONVERGED_ITS iterations 1
> 16 KSP Residual norm 6.316409779118e-09
> Linear solve converged due to CONVERGED_ITS iterations 1
> 17 KSP Residual norm 3.088649355374e-09
> Linear solve converged due to CONVERGED_ITS iterations 1
> 18 KSP Residual norm 1.593449602302e-09
> Linear solve converged due to CONVERGED_ITS iterations 1
> Linear solve converged due to CONVERGED_ITS iterations 1
> Residual norms for fieldsplit_boundary_ solve.
> 0 KSP Residual norm 1.593449603155e-09
> Linear solve converged due to CONVERGED_ITS iterations 1
> 1 KSP Residual norm 1.011857676662e-09
> Linear solve converged due to CONVERGED_ITS iterations 1
> 2 KSP Residual norm 5.660892669788e-10
> Linear solve converged due to CONVERGED_ITS iterations 1
> 3 KSP Residual norm 3.046799343903e-10
> Linear solve converged due to CONVERGED_ITS iterations 1
> 4 KSP Residual norm <1.6004713993>1.600471399329e-10
> Linear solve converged due to CONVERGED_ITS iterations 1
> 5 KSP Residual norm 8.083216601016e-11
> Linear solve converged due to CONVERGED_ITS iterations 1
> 6 KSP Residual norm 4.308671648345e-11
> Linear solve converged due to CONVERGED_ITS iterations 1
> 7 KSP Residual norm 2.381959817139e-11
> Linear solve converged due to CONVERGED_ITS iterations 1
> 8 KSP Residual norm 1.264839790114e-11
> Linear solve converged due to CONVERGED_ITS iterations 1
> 9 KSP Residual norm 6.435098853282e-12
> Linear solve converged due to CONVERGED_ITS iterations 1
> 10 KSP Residual norm 3.184769579797e-12
> Linear solve converged due to CONVERGED_ITS iterations 1
> 11 KSP Residual norm <1.5022019430>1.502201943016e-12
> Linear solve converged due to CONVERGED_ITS iterations 1
> 12 KSP Residual norm 7.099486208425e-13
> Linear solve converged due to CONVERGED_ITS iterations 1
> 13 KSP Residual norm 3.443222176388e-13
> Linear solve converged due to CONVERGED_ITS iterations 1
> 14 KSP Residual norm <1.6478434989>1.647843498912e-13
> Linear solve converged due to CONVERGED_ITS iterations 1
> 15 KSP Residual norm 8.208508173926e-14
> Linear solve converged due to CONVERGED_ITS iterations 1
> 16 KSP Residual norm 4.376604355287e-14
> Linear solve converged due to CONVERGED_ITS iterations 1
> 17 KSP Residual norm 2.596069152755e-14
> Linear solve converged due to CONVERGED_ITS iterations 1
> 18 KSP Residual norm 1.335744434252e-14
> Linear solve converged due to CONVERGED_ITS iterations 1
> 1 KSP preconditioned resid norm 2.608069232839e-13 true resid norm
> 1.449869994655e-13 ||r(i)||/||b|| 9.151778504469e-13
>
> I have no idea how to interpret this output! Could you help me with it?
Get rid of -fieldsplit_interior_ksp_converged_reason. It is confusing
things. Then you will see
the outer iteration and the inner boundary iteration which is indented.
Matt
>
> Thomas
>
--
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
1
0
Jed Brown wrote:
> On Wed, Mar 16, 2011 at 07:37, Thomas Witkowski
> <thomas.witkowski(a)tu-dresden.de
> <mailto:[email protected]>> wrote:
>
> Thanks for explanations! It works fine in my code. But I have two
> questions about it, maybe you can help me with them:
> - To the first, is the LU factorization on block A_00 done only once?
>
>
> Yes, one way to confirm this is to run with -log_summary and check
> MatLUFactor{Sym,Num}.
>
>
> - I have run the code with -fieldsplit_1_ksp_monitor to get some
> more information about the internal solves. I expected to get
> information about one iterative solver (for solving the Schur
> complement system), but I got three, all of them need around 20
> iterations for my example. Could you explain to me what is
> actually solved there?
>
>
> I'm going to guess that you still have an outer KSP that (in the
> global norm, rather than the partitioned norm used inside of splits)
> has a tighter tolerance, therefore it takes a few outer iterations. If
> you use loose inner tolerances then the preconditioner becomes
> nonlinear and you'll need to use FGMRES for the outer. When in doubt,
> run with -ksp_view and show us the results if you don't understand.
> Additionally, monitoring inner solves separately can be useful, e.g.
> -fieldsplit_0_ksp_converged_reason -fieldsplit_1_ksp_monitor
> -ksp_monitor_true_residual.
Okay, I run my code with the options "-pc_fieldsplit_type schur
-fieldsplit_interior_ksp_type preonly -fieldsplit_interior_pc_type
bjacobi -fieldsplit_interior_sub_pc_type lu
-fieldsplit_boundary_ksp_monitor -ksp_monitor_true_residual
-fieldsplit_interior_ksp_converged_reason". The splits are named
"interior" and "boundary". The ksp output is as follows:
Linear solve converged due to CONVERGED_ITS iterations 1
Residual norms for fieldsplit_boundary_ solve.
0 KSP Residual norm 1.790059331071e-04
Linear solve converged due to CONVERGED_ITS iterations 1
1 KSP Residual norm 1.237356212928e-04
Linear solve converged due to CONVERGED_ITS iterations 1
2 KSP Residual norm 7.952220245101e-05
Linear solve converged due to CONVERGED_ITS iterations 1
3 KSP Residual norm 3.502858665398e-05
Linear solve converged due to CONVERGED_ITS iterations 1
4 KSP Residual norm 1.601085190129e-05
Linear solve converged due to CONVERGED_ITS iterations 1
5 KSP Residual norm 8.491161243057e-06
Linear solve converged due to CONVERGED_ITS iterations 1
6 KSP Residual norm 4.778227395989e-06
Linear solve converged due to CONVERGED_ITS iterations 1
7 KSP Residual norm 2.571919352633e-06
Linear solve converged due to CONVERGED_ITS iterations 1
8 KSP Residual norm 1.353979940120e-06
Linear solve converged due to CONVERGED_ITS iterations 1
9 KSP Residual norm 7.408377337496e-07
Linear solve converged due to CONVERGED_ITS iterations 1
10 KSP Residual norm 3.810694345834e-07
Linear solve converged due to CONVERGED_ITS iterations 1
11 KSP Residual norm 1.955889542056e-07
Linear solve converged due to CONVERGED_ITS iterations 1
12 KSP Residual norm 9.938906113920e-08
Linear solve converged due to CONVERGED_ITS iterations 1
13 KSP Residual norm 4.893445675773e-08
Linear solve converged due to CONVERGED_ITS iterations 1
14 KSP Residual norm 2.395128458062e-08
Linear solve converged due to CONVERGED_ITS iterations 1
15 KSP Residual norm 1.246442589657e-08
Linear solve converged due to CONVERGED_ITS iterations 1
16 KSP Residual norm 6.316454504022e-09
Linear solve converged due to CONVERGED_ITS iterations 1
17 KSP Residual norm 3.088668836241e-09
Linear solve converged due to CONVERGED_ITS iterations 1
18 KSP Residual norm 1.593454221996e-09
Linear solve converged due to CONVERGED_ITS iterations 1
[0] Petsc-Iteration 0: 0.574504
0 KSP preconditioned resid norm 5.745043818120e-01 true resid norm
1.584249437360e-01 ||r(i)||/||b|| 1.000000000000e+00
Linear solve converged due to CONVERGED_ITS iterations 1
Residual norms for fieldsplit_boundary_ solve.
0 KSP Residual norm 1.790059331000e-04
Linear solve converged due to CONVERGED_ITS iterations 1
1 KSP Residual norm 1.237356237744e-04
Linear solve converged due to CONVERGED_ITS iterations 1
2 KSP Residual norm 7.952220078415e-05
Linear solve converged due to CONVERGED_ITS iterations 1
3 KSP Residual norm 3.502859285561e-05
Linear solve converged due to CONVERGED_ITS iterations 1
4 KSP Residual norm 1.601086485810e-05
Linear solve converged due to CONVERGED_ITS iterations 1
5 KSP Residual norm 8.491169384185e-06
Linear solve converged due to CONVERGED_ITS iterations 1
6 KSP Residual norm 4.778229157872e-06
Linear solve converged due to CONVERGED_ITS iterations 1
7 KSP Residual norm 2.571917112191e-06
Linear solve converged due to CONVERGED_ITS iterations 1
8 KSP Residual norm 1.353977280183e-06
Linear solve converged due to CONVERGED_ITS iterations 1
9 KSP Residual norm 7.408352317360e-07
Linear solve converged due to CONVERGED_ITS iterations 1
10 KSP Residual norm 3.810710583336e-07
Linear solve converged due to CONVERGED_ITS iterations 1
11 KSP Residual norm 1.955898169394e-07
Linear solve converged due to CONVERGED_ITS iterations 1
12 KSP Residual norm 9.938892788465e-08
Linear solve converged due to CONVERGED_ITS iterations 1
13 KSP Residual norm 4.893428546840e-08
Linear solve converged due to CONVERGED_ITS iterations 1
14 KSP Residual norm 2.395120857135e-08
Linear solve converged due to CONVERGED_ITS iterations 1
15 KSP Residual norm 1.246436792784e-08
Linear solve converged due to CONVERGED_ITS iterations 1
16 KSP Residual norm 6.316409779118e-09
Linear solve converged due to CONVERGED_ITS iterations 1
17 KSP Residual norm 3.088649355374e-09
Linear solve converged due to CONVERGED_ITS iterations 1
18 KSP Residual norm 1.593449602302e-09
Linear solve converged due to CONVERGED_ITS iterations 1
Linear solve converged due to CONVERGED_ITS iterations 1
Residual norms for fieldsplit_boundary_ solve.
0 KSP Residual norm 1.593449603155e-09
Linear solve converged due to CONVERGED_ITS iterations 1
1 KSP Residual norm 1.011857676662e-09
Linear solve converged due to CONVERGED_ITS iterations 1
2 KSP Residual norm 5.660892669788e-10
Linear solve converged due to CONVERGED_ITS iterations 1
3 KSP Residual norm 3.046799343903e-10
Linear solve converged due to CONVERGED_ITS iterations 1
4 KSP Residual norm 1.600471399329e-10
Linear solve converged due to CONVERGED_ITS iterations 1
5 KSP Residual norm 8.083216601016e-11
Linear solve converged due to CONVERGED_ITS iterations 1
6 KSP Residual norm 4.308671648345e-11
Linear solve converged due to CONVERGED_ITS iterations 1
7 KSP Residual norm 2.381959817139e-11
Linear solve converged due to CONVERGED_ITS iterations 1
8 KSP Residual norm 1.264839790114e-11
Linear solve converged due to CONVERGED_ITS iterations 1
9 KSP Residual norm 6.435098853282e-12
Linear solve converged due to CONVERGED_ITS iterations 1
10 KSP Residual norm 3.184769579797e-12
Linear solve converged due to CONVERGED_ITS iterations 1
11 KSP Residual norm 1.502201943016e-12
Linear solve converged due to CONVERGED_ITS iterations 1
12 KSP Residual norm 7.099486208425e-13
Linear solve converged due to CONVERGED_ITS iterations 1
13 KSP Residual norm 3.443222176388e-13
Linear solve converged due to CONVERGED_ITS iterations 1
14 KSP Residual norm 1.647843498912e-13
Linear solve converged due to CONVERGED_ITS iterations 1
15 KSP Residual norm 8.208508173926e-14
Linear solve converged due to CONVERGED_ITS iterations 1
16 KSP Residual norm 4.376604355287e-14
Linear solve converged due to CONVERGED_ITS iterations 1
17 KSP Residual norm 2.596069152755e-14
Linear solve converged due to CONVERGED_ITS iterations 1
18 KSP Residual norm 1.335744434252e-14
Linear solve converged due to CONVERGED_ITS iterations 1
1 KSP preconditioned resid norm 2.608069232839e-13 true resid norm
1.449869994655e-13 ||r(i)||/||b|| 9.151778504469e-13
I have no idea how to interpret this output! Could you help me with it?
Thomas
1
0