<div dir="ltr">Note, pc_redistibute is a great idea but you lose the block size, which is obvious after you realize it, but is error prone.<div>Maybe it would be better to throw an error if bs > 1 and add a -pc_redistribute_ignore_block_size or something for users that want to press on.</div><div><br></div><div>Thanks,</div><div>Mark</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Jan 27, 2024 at 1:26 PM Mark Adams <<a href="mailto:mfadams@lbl.gov">mfadams@lbl.gov</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Well, that puts the reason after the iterations, which is progress.<div><br></div><div>Oh, I see the preconditioned norm goes down a lot, but the reported residual that you would think is used for testing (see first post) does not go down 12 digits.</div><div>This matrix is very ill conditioned. LU just gets about 7 digits.</div><div><div><br></div><div>Thanks,</div><div>Mark</div><div><br><div>Residual norms for redistribute_ solve.<br> 0 KSP preconditioned resid norm 3.988887683909e+16 true resid norm 6.646245659859e+06 ||r(i)||/||b|| 1.000000000000e+00<br> 1 KSP preconditioned resid norm 3.257912040767e+02 true resid norm 1.741027565497e-04 ||r(i)||/||b|| 2.619565472898e-11<br> Linear redistribute_ solve converged due to CONVERGED_RTOL iterations 1<br>KSP Object: (redistribute_) 1 MPI process<br> type: gmres<br> restart=30, using Classical (unmodified) Gram-Schmidt Orthogonalization with no iterative refinement<br> happy breakdown tolerance 1e-30<br> maximum iterations=10000, initial guess is zero<br> tolerances: relative=1e-12, absolute=1e-50, divergence=10000.<br> left preconditioning<br> using PRECONDITIONED norm type for convergence test<br>PC Object: (redistribute_) 1 MPI process<br> type: bjacobi<br> number of blocks = 1<br> Local solver information for first block is in the following KSP and PC objects on rank 0:<br> Use -redistribute_ksp_view ::ascii_info_detail to display information for all blocks<br> KSP Object: (redistribute_sub_) 1 MPI process<br> type: preonly<br> maximum iterations=10000, initial guess is zero<br> tolerances: relative=1e-05, absolute=1e-50, divergence=10000.<br> left preconditioning<br> using NONE norm type for convergence test<br> PC Object: (redistribute_sub_) 1 MPI process<br> type: lu<br> out-of-place factorization<br> tolerance for zero pivot 2.22045e-14<br> matrix ordering: external<br> factor fill ratio given 0., needed 0.<br> Factored matrix follows:<br> Mat Object: (redistribute_sub_) 1 MPI process<br> type: mumps<br> rows=44378, cols=44378<br> package used to perform factorization: mumps<br> total: nonzeros=50309372, allocated nonzeros=50309372<br> MUMPS run parameters:<br></div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Jan 27, 2024 at 12:51 PM Matthew Knepley <<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Okay, so the tolerance is right. It must be using ||b|| instead of ||r0||. Run with<div><br></div><div> -redistribute_ksp_monitor_true_residual</div><div><br></div><div>You might have to force r0.</div><div><br></div><div> Thanks,</div><div><br></div><div> Matt</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Jan 27, 2024 at 11:44 AM Mark Adams <<a href="mailto:mfadams@lbl.gov" target="_blank">mfadams@lbl.gov</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">KSP Object: (redistribute_) 1 MPI process<br> type: gmres<br> restart=30, using Classical (unmodified) Gram-Schmidt Orthogonalization with no iterative refinement<br> happy breakdown tolerance 1e-30<br> maximum iterations=10000, initial guess is zero<br><b> tolerances: relative=1e-12, absolute=1e-50, divergence=10000.<br></b> left preconditioning<br> using PRECONDITIONED norm type for convergence test<br>PC Object: (redistribute_) 1 MPI process<br> type: bjacobi<br> number of blocks = 1<br> Local solver information for first block is in the following KSP and PC objects on rank 0:<br> Use -redistribute_ksp_view ::ascii_info_detail to display information for all blocks<br> KSP Object: (redistribute_sub_) 1 MPI process<br> type: preonly<br> maximum iterations=10000, initial guess is zero<br> tolerances: relative=1e-05, absolute=1e-50, divergence=10000.<br> left preconditioning<br> using NONE norm type for convergence test<br> PC Object: (redistribute_sub_) 1 MPI process<br> type: lu<br> out-of-place factorization<br> tolerance for zero pivot 2.22045e-14<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Jan 27, 2024 at 10:24 AM Matthew Knepley <<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">View the solver.<div><br></div><div> Matt</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Jan 27, 2024 at 9:43 AM Mark Adams <<a href="mailto:mfadams@lbl.gov" target="_blank">mfadams@lbl.gov</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>I am not getting ksp_rtol 1e-12 into pc_redistribute correctly?</div><div><br></div> <b> Linear redistribute_ solve converged due to CONVERGED_RTOL iterations 1<br> 0 KSP Residual norm 2.182384017537e+02 <br> 1 KSP Residual norm 1.889764161573e-04 </b><br>Number of iterations = 1 N = 47628<br>Residual norm 8.65917e-07<br>#PETSc Option Table entries:<br>-f S.bin # (source: command line)<br>-ksp_monitor # (source: command line)<br>-ksp_type preonly # (source: command line)<br>-mat_block_size 36 # (source: command line)<br>-mat_view ascii::ascii_info # (source: command line)<br>-options_left # (source: command line)<br>-pc_type redistribute # (source: command line)<br>-redistribute_ksp_converged_reason # (source: command line)<br><b>-redistribute_ksp_rtol 1e-12 # (source: command line)<br></b>-redistribute_ksp_type gmres # (source: command line)<br>-redistribute_pc_type bjacobi # (source: command line)<br>-redistribute_sub_pc_factor_mat_solver_type mumps # (source: command line)<br>-redistribute_sub_pc_type lu # (source: command line)<br><div>#End of PETSc Option Table entries<br><b>There are no unused options.</b><br></div></div>
</blockquote></div><br clear="all"><div><br></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>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</div><div><br></div><div><a href="http://www.cse.buffalo.edu/~knepley/" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div></div></div>
</blockquote></div>
</blockquote></div><br clear="all"><div><br></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>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</div><div><br></div><div><a href="http://www.cse.buffalo.edu/~knepley/" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div></div></div>
</blockquote></div>
</blockquote></div>