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. I just tried -random_seed 1, and it seems to have made all the difference in the world!
John On Thu, Jul 11, 2013 at 1:00 PM, Jed Brown <[email protected]> wrote: > John Mousel <[email protected]> writes: > > > I'm trying to reuse the PC constructed by GAMG during a sub-iterative > > procedure where KSPSolve is called with the same matrix repeatedly. The > > right-hand side changes during the sub-iteration. I've been attempting to > > use SAME_PRECONDITIONER for nit = 2..., > > What do you mean by SAME_PRECONDITIONER? If you are solving with the > same matrix, you can just call KSPSolve without KSPSetOperators. > > > Is there a dependence on the right-hand side in GAMG somewhere? > > It uses a pseudo-random number generator for eigenvalue estimation. Try > adding > > -random_seed 1 > > to your run and see if it cuts the variation you see. >
