<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On 18 Sep 2019, at 3:48 PM, Matthew Knepley <<a href="mailto:knepley@gmail.com" class="">knepley@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><div dir="ltr" class="">On Wed, Sep 18, 2019 at 2:49 AM Pierre Jolivet via petsc-dev <<a href="mailto:petsc-dev@mcs.anl.gov" class="">petsc-dev@mcs.anl.gov</a>> wrote:<br class=""></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204); padding-left: 1ex;"><div style="word-wrap: break-word;" class="">Hello,<div class="">I’m solving the following dummy system <a href="http://jolivet.perso.enseeiht.fr/composite_ksp.tar.gz" target="_blank" class="">http://jolivet.perso.enseeiht.fr/composite_ksp.tar.gz</a></div><div class="">[A, B];[C, D], with a PCFIELDSPLIT. For the PC of D, I’m using a PCCOMPOSITE with two sub PCs. One of which is a PCKSP.</div><div class="">Could you please help me figure out what is wrong in the following piece of code, that may be launched with the following arguments:</div><div class="">$ mpirun -n 1 ./a.out -ksp_type preonly -pc_type fieldsplit -fieldsplit_1_pc_type composite -fieldsplit_1_sub_1_pc_type ksp -fieldsplit_1_sub_1_ksp_ksp_type gmres -fieldsplit_1_sub_1_ksp_pc_type gamg -fieldsplit_1_sub_1_ksp_ksp_converged_reason -fieldsplit_1_sub_1_ksp_pc_gamg_sym_graph 1 -fieldsplit_1_sub_1_ksp_pc_gamg_square_graph 10 -fieldsplit_1_sub_1_ksp_ksp_rtol 1e-8</div><div class=""><br class=""></div><div class="">It solves the dummy system twice, with a varying block D.</div></div></blockquote><div class=""><br class=""></div><div class="">Its not the PC, its the matrix. Everything in the PC gets resetup just like you want.</div><div class=""><br class=""></div><div class="">I did MatEqual(S2_1, S2_001, &equal) and equal was false.</div></div></div></div></blockquote><div><br class=""></div><div>They are not supposed to be equal, so that’s a good thing.</div><div>Or are you doing the comparison _after_ the MatCopy?</div><div>I’m not sure of what is your point, sorry.</div><div><br class=""></div><div>Thanks,</div><div>Pierre</div><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><div class="gmail_quote"><div class="">  Thanks,</div><div class=""><br class=""></div><div class="">     Matt</div><div class=""> </div><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204); padding-left: 1ex;"><div style="word-wrap: break-word;" class=""><div class="">It should give you:</div><div class=""><div class="">     <span class="Apple-converted-space"> </span>Linear fieldsplit_1_sub_1_ksp_ solve converged due to CONVERGED_RTOL iterations 8</div><div class="">solve #0: 16098.3</div><div class="">     <span class="Apple-converted-space"> </span>Linear fieldsplit_1_sub_1_ksp_ solve did not converge due to DIVERGED_PC_FAILED iterations 0</div><div class="">                     PC_FAILED due to SUBPC_ERROR</div><div class="">solve #1: inf</div></div><div class=""><br class=""></div><div class="">If I switch line 70 to #if 0, I get the expected output:</div><div class=""><div class="">     <span class="Apple-converted-space"> </span>Linear fieldsplit_1_sub_1_ksp_ solve converged due to CONVERGED_RTOL iterations 8</div><div class="">solve #0: 16098.3</div><div class="">     <span class="Apple-converted-space"> </span>Linear fieldsplit_1_sub_1_ksp_ solve converged due to CONVERGED_RTOL iterations 8</div><div class="">solve #1: 325.448</div></div><div class=""><br class=""></div><div class="">I’m realizing that this has probably nothing to do with the outer PCFIELDSPLIT, but this comes from a rather large FSI solver, so reproducing this behavior in “only” 97 SLOC is good enough for your I hope.</div><div class=""><br class=""></div><div class="">Thanks in advance,</div><div class="">Pierre</div></div></blockquote></div><br clear="all" class=""><div class=""><br class=""></div>--<span class="Apple-converted-space"> </span><br class=""><div dir="ltr" class="gmail_signature"><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div class="">What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br class="">-- Norbert Wiener</div><div class=""><br class=""></div><div class=""><a href="http://www.cse.buffalo.edu/~knepley/" target="_blank" class="">https://www.cse.buffalo.edu/~knepley/</a></div></div></div></div></div></div></div></div></div></blockquote></div><br class=""></body></html>