On Wed, Mar 16, 2011 at 8:57 AM, Thomas Witkowski <span dir="ltr"><<a href="mailto:thomas.witkowski@tu-dresden.de">thomas.witkowski@tu-dresden.de</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Matt, it makes the output nicer, but does not help me to understand what's going on inside of PETSc:<div class="im"><br>
<br>
Residual norms for fieldsplit_boundary_ solve.<br>
0 KSP Residual norm 1.790059331071e-04<br></div><div class="im">
1 KSP Residual norm 1.237356212928e-04<br></div><div class="im">
2 KSP Residual norm 7.952220245101e-05<br></div><div class="im">
3 KSP Residual norm 3.502858665398e-05<br></div><div class="im">
4 KSP Residual norm 1.601085190129e-05<br></div><div class="im">
5 KSP Residual norm 8.491161243057e-06<br></div><div class="im">
6 KSP Residual norm 4.778227395989e-06<br></div><div class="im">
7 KSP Residual norm 2.571919352633e-06<br></div><div class="im">
8 KSP Residual norm 1.353979940120e-06<br></div><div class="im">
9 KSP Residual norm 7.408377337496e-07<br></div><div class="im">
10 KSP Residual norm 3.810694345834e-07<br></div><div class="im">
11 KSP Residual norm 1.955889542056e-07<br></div><div class="im">
12 KSP Residual norm 9.938906113920e-08<br></div><div class="im">
13 KSP Residual norm 4.893445675773e-08<br></div><div class="im">
14 KSP Residual norm 2.395128458062e-08<br></div><div class="im">
15 KSP Residual norm <a href="tel:1.2464425896" target="_blank"></a><a href="tel:1.2464425896" target="_blank">1.2464425896</a>57e-08<br></div><div class="im">
16 KSP Residual norm 6.316454504022e-09<br></div><div class="im">
17 KSP Residual norm 3.088668836241e-09<br></div><div class="im">
18 KSP Residual norm 1.593454221996e-09<br></div><div class="im">
0 KSP preconditioned resid norm 5.745043818120e-01 true resid norm 1.584249437360e-01 ||r(i)||/||b|| 1.000000000000e+00<br></div><div class="im">
Residual norms for fieldsplit_boundary_ solve.<br>
0 KSP Residual norm 1.790059331000e-04<br></div><div class="im">
1 KSP Residual norm 1.237356237744e-04<br></div><div class="im">
2 KSP Residual norm 7.952220078415e-05<br></div><div class="im">
3 KSP Residual norm 3.502859285561e-05<br></div><div class="im">
4 KSP Residual norm 1.601086485810e-05<br></div><div class="im">
5 KSP Residual norm 8.491169384185e-06<br></div><div class="im">
6 KSP Residual norm 4.778229157872e-06<br></div><div class="im">
7 KSP Residual norm 2.571917112191e-06<br></div><div class="im">
8 KSP Residual norm 1.353977280183e-06<br></div><div class="im">
9 KSP Residual norm 7.408352317360e-07<br></div><div class="im">
10 KSP Residual norm 3.810710583336e-07<br></div><div class="im">
11 KSP Residual norm 1.955898169394e-07<br></div><div class="im">
12 KSP Residual norm 9.938892788465e-08<br></div><div class="im">
13 KSP Residual norm 4.893428546840e-08<br></div><div class="im">
14 KSP Residual norm 2.395120857135e-08<br></div><div class="im">
15 KSP Residual norm <a href="tel:1.2464367927" target="_blank"></a><a href="tel:1.2464367927" target="_blank">1.2464367927</a>84e-08<br></div><div class="im">
16 KSP Residual norm 6.316409779118e-09<br></div><div class="im">
17 KSP Residual norm 3.088649355374e-09<br></div><div class="im">
18 KSP Residual norm 1.593449602302e-09<br></div><div class="im">
Residual norms for fieldsplit_boundary_ solve.<br>
0 KSP Residual norm 1.593449603155e-09<br></div><div class="im">
1 KSP Residual norm 1.011857676662e-09<br></div><div class="im">
2 KSP Residual norm 5.660892669788e-10<br></div><div class="im">
3 KSP Residual norm 3.046799343903e-10<br></div><div class="im">
4 KSP Residual norm <a href="tel:1.6004713993" target="_blank"></a><a href="tel:1.6004713993" target="_blank">1.6004713993</a>29e-10<br></div><div class="im">
5 KSP Residual norm 8.083216601016e-11<br></div><div class="im">
6 KSP Residual norm 4.308671648345e-11<br></div><div class="im">
7 KSP Residual norm 2.381959817139e-11<br></div><div class="im">
8 KSP Residual norm 1.264839790114e-11<br></div><div class="im">
9 KSP Residual norm 6.435098853282e-12<br></div><div class="im">
10 KSP Residual norm 3.184769579797e-12<br></div><div class="im">
11 KSP Residual norm <a href="tel:1.5022019430" target="_blank"></a><a href="tel:1.5022019430" target="_blank">1.5022019430</a>16e-12<br></div><div class="im">
12 KSP Residual norm 7.099486208425e-13<br></div><div class="im">
13 KSP Residual norm 3.443222176388e-13<br></div><div class="im">
14 KSP Residual norm <a href="tel:1.6478434989" target="_blank"></a><a href="tel:1.6478434989" target="_blank">1.6478434989</a>12e-13<br></div><div class="im">
15 KSP Residual norm 8.208508173926e-14<br></div><div class="im">
16 KSP Residual norm 4.376604355287e-14<br></div><div class="im">
17 KSP Residual norm 2.596069152755e-14<br></div><div class="im">
18 KSP Residual norm 1.335744434252e-14<br></div><div class="im">
1 KSP preconditioned resid norm 2.608069232839e-13 true resid norm 1.449869994655e-13 ||r(i)||/||b|| 9.151778504469e-13<br>
<br>
<br></div>
So, are there now two or one outer iterations?<br></blockquote><div><br></div><div>1 outer (NOT INDENTED) which took two iterates. 1 inner (INDENTED) which ran 3 times.</div><div><br></div><div> Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Thomas<br>
<br>
<br>
<br>
<br>
Matthew Knepley wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div></div><div class="h5">
On Wed, Mar 16, 2011 at 8:27 AM, Thomas Witkowski <<a href="mailto:thomas.witkowski@tu-dresden.de" target="_blank">thomas.witkowski@tu-dresden.de</a> <mailto:<a href="mailto:thomas.witkowski@tu-dresden.de" target="_blank">thomas.witkowski@tu-dresden.de</a>>> wrote:<br>
<br>
Jed Brown wrote:<br>
<br>
On Wed, Mar 16, 2011 at 07:37, Thomas Witkowski<br>
<<a href="mailto:thomas.witkowski@tu-dresden.de" target="_blank">thomas.witkowski@tu-dresden.de</a><br>
<mailto:<a href="mailto:thomas.witkowski@tu-dresden.de" target="_blank">thomas.witkowski@tu-dresden.de</a>><br>
<mailto:<a href="mailto:thomas.witkowski@tu-dresden.de" target="_blank">thomas.witkowski@tu-dresden.de</a><br>
<mailto:<a href="mailto:thomas.witkowski@tu-dresden.de" target="_blank">thomas.witkowski@tu-dresden.de</a>>>> wrote:<br>
<br>
Thanks for explanations! It works fine in my code. But I<br>
have two<br>
questions about it, maybe you can help me with them:<br>
- To the first, is the LU factorization on block A_00 done<br>
only once?<br>
<br>
<br>
Yes, one way to confirm this is to run with -log_summary and<br>
check MatLUFactor{Sym,Num}.<br>
- I have run the code with -fieldsplit_1_ksp_monitor to get<br>
some<br>
more information about the internal solves. I expected to get<br>
information about one iterative solver (for solving the Schur<br>
complement system), but I got three, all of them need around 20<br>
iterations for my example. Could you explain to me what is<br>
actually solved there?<br>
<br>
<br>
I'm going to guess that you still have an outer KSP that (in<br>
the global norm, rather than the partitioned norm used inside<br>
of splits) has a tighter tolerance, therefore it takes a few<br>
outer iterations. If you use loose inner tolerances then the<br>
preconditioner becomes nonlinear and you'll need to use FGMRES<br>
for the outer. When in doubt, run with -ksp_view and show us<br>
the results if you don't understand. Additionally, monitoring<br>
inner solves separately can be useful, e.g.<br>
-fieldsplit_0_ksp_converged_reason -fieldsplit_1_ksp_monitor<br>
-ksp_monitor_true_residual.<br>
<br>
Okay, I run my code with the options "-pc_fieldsplit_type schur<br>
-fieldsplit_interior_ksp_type preonly -fieldsplit_interior_pc_type<br>
bjacobi -fieldsplit_interior_sub_pc_type lu<br>
-fieldsplit_boundary_ksp_monitor -ksp_monitor_true_residual<br>
-fieldsplit_interior_ksp_converged_reason". The splits are named<br>
"interior" and "boundary". The ksp output is as follows:<br>
<br>
Linear solve converged due to CONVERGED_ITS iterations 1<br>
Residual norms for fieldsplit_boundary_ solve.<br>
0 KSP Residual norm 1.790059331071e-04<br>
Linear solve converged due to CONVERGED_ITS iterations 1<br>
1 KSP Residual norm 1.237356212928e-04<br>
Linear solve converged due to CONVERGED_ITS iterations 1<br>
2 KSP Residual norm 7.952220245101e-05<br>
Linear solve converged due to CONVERGED_ITS iterations 1<br>
3 KSP Residual norm 3.502858665398e-05<br>
Linear solve converged due to CONVERGED_ITS iterations 1<br>
4 KSP Residual norm 1.601085190129e-05<br>
Linear solve converged due to CONVERGED_ITS iterations 1<br>
5 KSP Residual norm 8.491161243057e-06<br>
Linear solve converged due to CONVERGED_ITS iterations 1<br>
6 KSP Residual norm 4.778227395989e-06<br>
Linear solve converged due to CONVERGED_ITS iterations 1<br>
7 KSP Residual norm 2.571919352633e-06<br>
Linear solve converged due to CONVERGED_ITS iterations 1<br>
8 KSP Residual norm 1.353979940120e-06<br>
Linear solve converged due to CONVERGED_ITS iterations 1<br>
9 KSP Residual norm 7.408377337496e-07<br>
Linear solve converged due to CONVERGED_ITS iterations 1<br>
10 KSP Residual norm 3.810694345834e-07<br>
Linear solve converged due to CONVERGED_ITS iterations 1<br>
11 KSP Residual norm 1.955889542056e-07<br>
Linear solve converged due to CONVERGED_ITS iterations 1<br>
12 KSP Residual norm 9.938906113920e-08<br>
Linear solve converged due to CONVERGED_ITS iterations 1<br>
13 KSP Residual norm 4.893445675773e-08<br>
Linear solve converged due to CONVERGED_ITS iterations 1<br>
14 KSP Residual norm 2.395128458062e-08<br>
Linear solve converged due to CONVERGED_ITS iterations 1<br></div></div>
15 KSP Residual norm <a href="tel:1.2464425896" target="_blank"></a><a href="tel:1.2464425896" target="_blank">1.2464425896</a> <tel:<a href="tel:1.2464425896" target="_blank"></a><a href="tel:1.2464425896" target="_blank">1.2464425896</a>>57e-08<div>
<div></div><div class="h5"><br>
Linear solve converged due to CONVERGED_ITS iterations 1<br>
16 KSP Residual norm 6.316454504022e-09<br>
Linear solve converged due to CONVERGED_ITS iterations 1<br>
17 KSP Residual norm 3.088668836241e-09<br>
Linear solve converged due to CONVERGED_ITS iterations 1<br>
18 KSP Residual norm 1.593454221996e-09<br>
Linear solve converged due to CONVERGED_ITS iterations 1<br>
[0] Petsc-Iteration 0: 0.574504<br>
0 KSP preconditioned resid norm 5.745043818120e-01 true resid<br>
norm 1.584249437360e-01 ||r(i)||/||b|| 1.000000000000e+00<br>
Linear solve converged due to CONVERGED_ITS iterations 1<br>
Residual norms for fieldsplit_boundary_ solve.<br>
0 KSP Residual norm 1.790059331000e-04<br>
Linear solve converged due to CONVERGED_ITS iterations 1<br>
1 KSP Residual norm 1.237356237744e-04<br>
Linear solve converged due to CONVERGED_ITS iterations 1<br>
2 KSP Residual norm 7.952220078415e-05<br>
Linear solve converged due to CONVERGED_ITS iterations 1<br>
3 KSP Residual norm 3.502859285561e-05<br>
Linear solve converged due to CONVERGED_ITS iterations 1<br>
4 KSP Residual norm 1.601086485810e-05<br>
Linear solve converged due to CONVERGED_ITS iterations 1<br>
5 KSP Residual norm 8.491169384185e-06<br>
Linear solve converged due to CONVERGED_ITS iterations 1<br>
6 KSP Residual norm 4.778229157872e-06<br>
Linear solve converged due to CONVERGED_ITS iterations 1<br>
7 KSP Residual norm 2.571917112191e-06<br>
Linear solve converged due to CONVERGED_ITS iterations 1<br>
8 KSP Residual norm 1.353977280183e-06<br>
Linear solve converged due to CONVERGED_ITS iterations 1<br>
9 KSP Residual norm 7.408352317360e-07<br>
Linear solve converged due to CONVERGED_ITS iterations 1<br>
10 KSP Residual norm 3.810710583336e-07<br>
Linear solve converged due to CONVERGED_ITS iterations 1<br>
11 KSP Residual norm 1.955898169394e-07<br>
Linear solve converged due to CONVERGED_ITS iterations 1<br>
12 KSP Residual norm 9.938892788465e-08<br>
Linear solve converged due to CONVERGED_ITS iterations 1<br>
13 KSP Residual norm 4.893428546840e-08<br>
Linear solve converged due to CONVERGED_ITS iterations 1<br>
14 KSP Residual norm 2.395120857135e-08<br>
Linear solve converged due to CONVERGED_ITS iterations 1<br></div></div>
15 KSP Residual norm <a href="tel:1.2464367927" target="_blank"></a><a href="tel:1.2464367927" target="_blank">1.2464367927</a> <tel:<a href="tel:1.2464367927" target="_blank"></a><a href="tel:1.2464367927" target="_blank">1.2464367927</a>>84e-08<div class="im">
<br>
Linear solve converged due to CONVERGED_ITS iterations 1<br>
16 KSP Residual norm 6.316409779118e-09<br>
Linear solve converged due to CONVERGED_ITS iterations 1<br>
17 KSP Residual norm 3.088649355374e-09<br>
Linear solve converged due to CONVERGED_ITS iterations 1<br>
18 KSP Residual norm 1.593449602302e-09<br>
Linear solve converged due to CONVERGED_ITS iterations 1<br>
Linear solve converged due to CONVERGED_ITS iterations 1<br>
Residual norms for fieldsplit_boundary_ solve.<br>
0 KSP Residual norm 1.593449603155e-09<br>
Linear solve converged due to CONVERGED_ITS iterations 1<br>
1 KSP Residual norm 1.011857676662e-09<br>
Linear solve converged due to CONVERGED_ITS iterations 1<br>
2 KSP Residual norm 5.660892669788e-10<br>
Linear solve converged due to CONVERGED_ITS iterations 1<br>
3 KSP Residual norm 3.046799343903e-10<br>
Linear solve converged due to CONVERGED_ITS iterations 1<br></div>
4 KSP Residual norm <a href="tel:1.6004713993" target="_blank"></a><a href="tel:1.6004713993" target="_blank">1.6004713993</a> <tel:<a href="tel:1.6004713993" target="_blank"></a><a href="tel:1.6004713993" target="_blank">1.6004713993</a>>29e-10<div class="im">
<br>
Linear solve converged due to CONVERGED_ITS iterations 1<br>
5 KSP Residual norm 8.083216601016e-11<br>
Linear solve converged due to CONVERGED_ITS iterations 1<br>
6 KSP Residual norm 4.308671648345e-11<br>
Linear solve converged due to CONVERGED_ITS iterations 1<br>
7 KSP Residual norm 2.381959817139e-11<br>
Linear solve converged due to CONVERGED_ITS iterations 1<br>
8 KSP Residual norm 1.264839790114e-11<br>
Linear solve converged due to CONVERGED_ITS iterations 1<br>
9 KSP Residual norm 6.435098853282e-12<br>
Linear solve converged due to CONVERGED_ITS iterations 1<br>
10 KSP Residual norm 3.184769579797e-12<br>
Linear solve converged due to CONVERGED_ITS iterations 1<br></div>
11 KSP Residual norm <a href="tel:1.5022019430" target="_blank"></a><a href="tel:1.5022019430" target="_blank">1.5022019430</a> <tel:<a href="tel:1.5022019430" target="_blank"></a><a href="tel:1.5022019430" target="_blank">1.5022019430</a>>16e-12<div class="im">
<br>
Linear solve converged due to CONVERGED_ITS iterations 1<br>
12 KSP Residual norm 7.099486208425e-13<br>
Linear solve converged due to CONVERGED_ITS iterations 1<br>
13 KSP Residual norm 3.443222176388e-13<br>
Linear solve converged due to CONVERGED_ITS iterations 1<br></div>
14 KSP Residual norm <a href="tel:1.6478434989" target="_blank"></a><a href="tel:1.6478434989" target="_blank">1.6478434989</a> <tel:<a href="tel:1.6478434989" target="_blank"></a><a href="tel:1.6478434989" target="_blank">1.6478434989</a>>12e-13<div class="im">
<br>
Linear solve converged due to CONVERGED_ITS iterations 1<br>
15 KSP Residual norm 8.208508173926e-14<br>
Linear solve converged due to CONVERGED_ITS iterations 1<br>
16 KSP Residual norm 4.376604355287e-14<br>
Linear solve converged due to CONVERGED_ITS iterations 1<br>
17 KSP Residual norm 2.596069152755e-14<br>
Linear solve converged due to CONVERGED_ITS iterations 1<br>
18 KSP Residual norm 1.335744434252e-14<br>
Linear solve converged due to CONVERGED_ITS iterations 1<br>
1 KSP preconditioned resid norm 2.608069232839e-13 true resid<br>
norm 1.449869994655e-13 ||r(i)||/||b|| 9.151778504469e-13<br>
<br>
I have no idea how to interpret this output! Could you help me<br>
with it?<br>
<br>
<br>
Get rid of -fieldsplit_interior_ksp_converged_reason. It is confusing things. Then you will see<br>
the outer iteration and the inner boundary iteration which is indented.<br>
<br>
Matt<br>
<br>
<br>
Thomas<br>
<br>
<br>
<br>
<br>
-- <br>
What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>
-- Norbert Wiener<br>
</div></blockquote>
<br>
</blockquote></div><br><br clear="all"><br>-- <br>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener<br>