[petsc-users] Ghosted vectors in KSP via SNES

I-Kamenetskiy, Dmitry S dmitry.s.kamenetskiy at boeing.com
Wed Mar 30 10:43:37 CDT 2011


Hello,

I have run in to the following issue with the PETSc SNES usage. The logic of the SNESSolve() routine in my code is that the solution vector x should include ghost points at the boundary of subdomains in the distributed case. This is the 'current solution' vector I provide to the custom EvaluateResidual() function, a pointer to which is passed to the SNES object when calling SNESSetFunction().

However, I would strongly like to avoid using ghosted vectors in the internal SNES's KSP object as, multiplied by a large number of Krylov directions, this leads to a very significant memory overhead in my case. Now: here I am not 100 percent sure that this is what happens, but at least my memory measurements with -ksp_gmres_preallocate option support this hypothesis.

It seems that there is no reason to store/update the ghosted vector components when applying the Matrix-vector multiplication needed to evaluate the next Krylov direction.

My question is: does one have any handle to provide alternative Vec type to the KSP, when it is used from inside the SNES object?

Sorry if I am overly complicating matters, or have invented the problem that is non-existent. Any comments will be much appreciated.

Thank you,

Dmitry Kamenetskiy.






-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20110330/f3f7b685/attachment-0001.htm>


More information about the petsc-users mailing list