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.


On Thu, Jul 11, 2013 at 3:41 PM, Jed Brown <[email protected]> wrote:

> John Mousel <[email protected]> writes:
>
> > Jed,
> >
> > I alternate between solving Helmholtz and Poisson equations in an outer
> > loop. The matrix is fixed for both operators during the process, and only
> > the right-hand side is updated for each system.
>
> Do you have one KSP or two?  If one, I assume you're trying to preserve
> memory, but there is likely more memory in the preconditioner than the
> Krylov space and if you want to reuse the preconditioner, you have to
> set it up anew each time.
>
> > I just tried -random_seed 1, and it seems to have made all the difference
> > in the world!
>
> That's disconcerting because we would like the algorithm to be
> insensitive to such things.  How big was the performance difference?
> Can you give us some information to reproduce?  (Maybe a smallish
> example matrix that demonstrates this problem.)
>

Reply via email to