[petsc-users] Multigrid Vcycle.

Matthew Knepley knepley at gmail.com
Fri May 25 12:14:13 CDT 2012


On Fri, May 25, 2012 at 1:12 PM, Abdul Hanan Sheikh
<hanangul12 at yahoo.co.uk>wrote:

> Dear all,
> Are you seeing the memory used by those vectors being a significant part
> of the overall memory usage of the program?
> To this question, I think yes.
>

Measurement?


> Is it also normal, number of vectors is dependent upon how many levels
> used ?
>

How else would you propose to solve problems on each level?


> I experienced this. When I increase levels in PCMG, number of vectors used
> (created and destroyed) increases.
>

Yes.

    Matt


> Thanks,
> 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, 22:06
> *Subject:* Re: [petsc-users] Multigrid Vcycle.
>
> 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
>
>
>
>
>
>
>
>


-- 
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20120525/925f4425/attachment.html>


More information about the petsc-users mailing list