<div dir="ltr">I have two KSP contexts, helm%ksp and proj%ksp. I switch between the two by calling KSPSetOperators. There was no performance difference, just a different answer. <br></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Thu, Jul 11, 2013 at 3:41 PM, Jed Brown <span dir="ltr"><<a href="mailto:jedbrown@mcs.anl.gov" target="_blank">jedbrown@mcs.anl.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">John Mousel <<a href="mailto:john.mousel@gmail.com">john.mousel@gmail.com</a>> writes:<br>
<br>
> Jed,<br>
><br>
> I alternate between solving Helmholtz and Poisson equations in an outer<br>
> loop. The matrix is fixed for both operators during the process, and only<br>
> the right-hand side is updated for each system.<br>
<br>
</div>Do you have one KSP or two?  If one, I assume you're trying to preserve<br>
memory, but there is likely more memory in the preconditioner than the<br>
Krylov space and if you want to reuse the preconditioner, you have to<br>
set it up anew each time.<br>
<div class="im"><br>
> I just tried -random_seed 1, and it seems to have made all the difference<br>
> in the world!<br>
<br>
</div>That's disconcerting because we would like the algorithm to be<br>
insensitive to such things.  How big was the performance difference?<br>
Can you give us some information to reproduce?  (Maybe a smallish<br>
example matrix that demonstrates this problem.)<br>
</blockquote></div><br></div>