[petsc-users] Multigrid Vcycle.

Jed Brown jedbrown at mcs.anl.gov
Thu May 24 15:06:58 CDT 2012


On Thu, May 24, 2012 at 2:29 PM, Abdul Hanan Sheikh
<hanangul12 at yahoo.co.uk>wrote:

> Thanks for early response Jed!,
> I fixed outer Krylov as PREONLY so it does not use any vectors (I guess).
> Standard Vcycle includes 1 pre and 1 post smoothing.
> KSP-Richardson + PC-Jacobi are ingredients for pre-smoothing and  post
> smoothing.
> To my understanding, 2 Vectors are used by KSP Richardson + 1 Vector is
> used by PC-Jacobi
> at pre and post smoothing. This makes 6 vectors at each level and for 5
> levels, they should be 30!
>

DMSetUp_DA_nD creates and destroys two vectors as part of its set up
process. There is also a scaling vector associated with restriction (so
that restriction and prolongation can use the same matrix, which they
usually do), including a momentary work vector used to compute the scaling.
So many of those vectors are not alive at once.

Are you seeing the memory used by those vectors being a significant part of
the overall memory usage of the program?

Barry,


>
> Do I think right ?
> Further hint to make PCMG more memory-efficient is appreciated.
> with warm regard, Abdul
>
>
>   ------------------------------
> *From:* Jed Brown <jedbrown at mcs.anl.gov>
> *To:* Abdul Hanan Sheikh <hanangul12 at yahoo.co.uk>; PETSc users list <
> petsc-users at mcs.anl.gov>
> *Sent:* Thursday, 24 May 2012, 21:22
> *Subject:* Re: [petsc-users] Multigrid Vcycle.
>
> On Thu, May 24, 2012 at 2:14 PM, Abdul Hanan Sheikh <
> hanangul12 at yahoo.co.uk> wrote:
>
> Dear all,
> I am quit beginner in PETSc.
> I wrote a code for multigrid Vcycle (as preconditioer) by following the
> instructions on manual page.
> I want to see how much memory a Vcycle allocates by default in terms of
> number of matrices and vectors.
> I made a try to see by comparing with jacobi preconditioner, which surely
> allocates 1 vector ONLY.
> It turns out that a VCycle for FIVE (5) levels including coarsest level
> allocates memory for 53 vectors and
> subsequently it destroys too.
>
>
> Some of those vectors are very small due to being on the coarse level.
> There are also the vectors used by the outer Krylov method.
>
>
>
> Is it normal ??
>
>
> Thanks in advance,
> Abdul
>
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20120524/f7e22795/attachment.html>


More information about the petsc-users mailing list