<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, Feb 9, 2017 at 7:48 AM, Pierre Jolivet <span dir="ltr"><<a href="mailto:pierre.jolivet@enseeiht.fr" target="_blank">pierre.jolivet@enseeiht.fr</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div><blockquote type="cite"><div>On Feb 9, 2017, at 2:31 PM, Matthew Knepley <<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>> wrote:</div><br class="m_9118270146108803878Apple-interchange-newline"><div><div dir="ltr" style="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"><div class="gmail_extra"><div class="gmail_quote">On Thu, Feb 9, 2017 at 7:29 AM, Pierre Jolivet<span class="m_9118270146108803878Apple-converted-space"> </span><span dir="ltr"><<a href="mailto:pierre.jolivet@enseeiht.fr" target="_blank">pierre.jolivet@<wbr>enseeiht.fr</a>></span><span class="m_9118270146108803878Apple-converted-space"> </span>wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div style="word-wrap:break-word"><br><div><blockquote type="cite"><div>On Feb 9, 2017, at 2:17 PM, Matthew Knepley <<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>> wrote:</div><br class="m_9118270146108803878m_8641040722046524261Apple-interchange-newline"><div><div dir="ltr" style="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"><div class="gmail_extra"><div class="gmail_quote">On Thu, Feb 9, 2017 at 7:06 AM, Pierre Jolivet<span class="m_9118270146108803878m_8641040722046524261Apple-converted-space"> </span><span dir="ltr"><<a href="mailto:pierre.jolivet@enseeiht.fr" target="_blank">pierre.jolivet@enseei<wbr>ht.fr</a>></span><span class="m_9118270146108803878m_8641040722046524261Apple-converted-space"> </span>wrote:<br><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"><br><div><blockquote type="cite"><div>On Feb 9, 2017, at 1:37 PM, Matthew Knepley <<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>> wrote:</div><br class="m_9118270146108803878m_8641040722046524261gmail-m_-7129509824056556353Apple-interchange-newline"><div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, Feb 9, 2017 at 4:56 AM, Pierre Jolivet<span class="m_9118270146108803878m_8641040722046524261Apple-converted-space"> </span><span dir="ltr"><<a href="mailto:pierre.jolivet@enseeiht.fr" target="_blank">pierre.jolivet@enseei<wbr>ht.fr</a>></span><span class="m_9118270146108803878m_8641040722046524261Apple-converted-space"> </span>wrote:<br><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">Hello,<br>I _might_ be doing something wrong when calling KSPSetFromOptions/KSPSetUp, but still, am I supposed to get this kind of error?<br>[0]PETSC ERROR: No support for this operation for this object type<br>[0]PETSC ERROR: KSP gmres does not support PRECONDITIONED with RIGHT<br><br>If not, I’ll try to send a MWE (it basically depends on where I set the option -ksp_pc_side right).<br></blockquote><div><br></div><div>I believe its telling you that it cannot display the preconditioned residual with right preconditioning, which is true.</div><div>Are you requesting both?</div></div></div></div></div></blockquote><div><br></div><div>No, I’m just using -ksp_view and -ksp_pc_side right. In the “standard” case, it obviously work.</div><div>However, the error is triggered if I set -ksp_pc_side right after a first call to KSPSetOperators()/KSPSetUp() without destroying the KSP.</div><div>Should I destroy my KSP before changing from left- (default) to right-preconditioning if KSPSetOperators()/KSPSetUp has already been called?</div></div></div></blockquote><div><br></div><div>Its likely you have to use</div><div><br></div><div>  <a href="http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/KSP/KSPSetNormType.html" target="_blank">http://www.mcs.anl.gov/petsc<wbr>/petsc-current/docs/manualpage<wbr>s/KSP/KSPSetNormType.html</a></div><div><br></div><div>or</div><div><br></div><div>  <b style="font-family:times;font-size:inherit">-ksp_norm_type unpreconditioned</b></div></div></div></div></div></blockquote><div><br></div><div>If I use this after my first call to KSPSetUp, I now end up with:</div><div>[0]PETSC ERROR: KSP gmres does not support UNPRECONDITIONED with LEFT</div></div></div></blockquote><div><br></div><div>Yes, you would need to use it at the same time that you change the preconditioning side.</div></div></div></div></div></blockquote><div><br></div><div>Yes, I’m using PetscOptionsInsert, and whether I let PETSc parse "-ksp_pc_side right -ksp_norm_type unpreconditioned” or "-ksp_norm_type unpreconditioned -ksp_pc_side right” I end up with the same error afterwards.</div></div></div></blockquote><div><br></div><div>Can you make an example do it (SNES ex5)? Or can you send a small example that does it?</div><div><br></div><div>  Thanks,</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"><div style="word-wrap:break-word"><div><div>Thanks.</div><br><blockquote type="cite"><div><div dir="ltr" style="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"><div class="gmail_extra"><div class="gmail_quote"><div>  Thanks,</div><div><br></div><div>     Matt </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div style="word-wrap:break-word"><div><blockquote type="cite"><div><div dir="ltr" style="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"><div class="gmail_extra"><div class="gmail_quote"><div>since we would not have a chance to change it since its been set already.</div><div><br></div><div> <span class="m_9118270146108803878m_8641040722046524261Apple-converted-space"> </span>Thanks,</div><div><br></div><div>     Matt</div><div><br></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"><div><div>Thanks.</div><br><blockquote type="cite"><div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div> <span class="m_9118270146108803878Apple-converted-space"> </span>Thanks,</div><div><br></div><div>     Matt</div><div> </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">Thanks,<br>Pierre</blockquote></div><br><br clear="all"><span class="m_9118270146108803878HOEnZb"><font color="#888888"><span class="m_9118270146108803878m_8641040722046524261gmail-HOEnZb"><font color="#888888"><div><br></div>--<span class="m_9118270146108803878m_8641040722046524261Apple-converted-space"> </span><br><div class="m_9118270146108803878m_8641040722046524261gmail-m_-7129509824056556353gmail_signature">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></font></span></font></span></div></div></div></blockquote></div><span class="m_9118270146108803878HOEnZb"><font color="#888888"><br></font></span></div></blockquote></div><span class="m_9118270146108803878HOEnZb"><font color="#888888"><br><br clear="all"><span class="HOEnZb"><font color="#888888"><div><br></div>--<span class="m_9118270146108803878m_8641040722046524261Apple-converted-space"> </span><br><div class="m_9118270146108803878m_8641040722046524261gmail_signature">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></font></span></font></span></div></div></div></blockquote></div><span class="HOEnZb"><font color="#888888"><br></font></span></div></blockquote></div><span class="HOEnZb"><font color="#888888"><br><br clear="all"><div><br></div>--<span class="m_9118270146108803878Apple-converted-space"> </span><br><div class="m_9118270146108803878gmail_signature" data-smartmail="gmail_signature">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></font></span></div></div></div></blockquote></div><br></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">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></div>