<div class="gmail_quote">On Thu, May 24, 2012 at 2:29 PM, Abdul Hanan Sheikh <span dir="ltr"><<a href="mailto:hanangul12@yahoo.co.uk" target="_blank">hanangul12@yahoo.co.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><div style="font-size:10pt;font-family:verdana,helvetica,sans-serif"><div><span>Thanks for early response Jed!, <br></span></div><div><span>I fixed outer Krylov as PREONLY so it does not use any vectors (I guess). </span></div>
<div><span>Standard Vcycle includes 1 pre and 1 post smoothing. <br></span></div><div><span>KSP-Richardson + PC-Jacobi are ingredients for pre-smoothing and  post smoothing. </span></div><div><span>To my understanding, 2 Vectors are used by KSP Richardson + 1 Vector is used by PC-Jacobi </span></div>
<div><span>at pre and post smoothing. This makes 6 vectors at each level and for 5 levels, they should be 30! <br></span></div></div></div></blockquote><div><br></div><div>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.</div>
<div><br></div><div>Are you seeing the memory used by those vectors being a significant part of the overall memory usage of the program?</div><div><br></div><div>Barry, </div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><div style="font-size:10pt;font-family:verdana,helvetica,sans-serif"><div><span></span></div><div><span><br></span></div><div><span>Do I think right ? <br></span></div><div>Further hint to make PCMG more memory-efficient is appreciated. <br>
with warm regard, Abdul <br></div><br><div><br><blockquote style="border-left:2px solid rgb(16,16,255);margin-left:5px;margin-top:5px;padding-left:5px">  <div style="font-family:verdana,helvetica,sans-serif;font-size:10pt">
 <div style="font-family:times new roman,new york,times,serif;font-size:12pt"> <div dir="ltr"> <font face="Arial"> <hr size="1">  <b><span style="font-weight:bold">From:</span></b> Jed Brown <<a href="mailto:jedbrown@mcs.anl.gov" target="_blank">jedbrown@mcs.anl.gov</a>><br>
 <b><span style="font-weight:bold">To:</span></b> Abdul Hanan Sheikh <<a href="mailto:hanangul12@yahoo.co.uk" target="_blank">hanangul12@yahoo.co.uk</a>>; PETSc users list <<a href="mailto:petsc-users@mcs.anl.gov" target="_blank">petsc-users@mcs.anl.gov</a>> <br>
 <b><span style="font-weight:bold">Sent:</span></b> Thursday, 24 May 2012, 21:22<br> <b><span style="font-weight:bold">Subject:</span></b> Re: [petsc-users] Multigrid Vcycle.<br> </font> </div><div><div class="h5"> <br><div>
<div>On Thu, May 24, 2012 at 2:14 PM, Abdul Hanan Sheikh <span dir="ltr"><<a rel="nofollow" href="mailto:hanangul12@yahoo.co.uk" target="_blank">hanangul12@yahoo.co.uk</a>></span> wrote:<br><blockquote style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div><div style="font-size:10pt;font-family:verdana,helvetica,sans-serif"><div><span>Dear all, <br></span></div><div><span>I am quit beginner in PETSc. <br></span></div><div><span>I wrote a code for multigrid Vcycle (as preconditioer) by following the instructions on manual page. </span><span></span><span><br>

</span></div><div><span>I want to see how much memory a Vcycle allocates by default in terms of number of matrices and vectors. <br></span></div><div><span>I made a try to see by comparing with jacobi preconditioner, which surely allocates 1 vector ONLY. <br>

</span></div><div><span>It turns out that a VCycle for FIVE (5) levels including coarsest level allocates memory for 53 vectors and <br></span></div><div><span>subsequently it destroys too.</span></div></div></div></blockquote>

<div><br></div><div>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.</div><div> </div><blockquote style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div><div style="font-size:10pt;font-family:verdana,helvetica,sans-serif"><div><span><br></span></div><div><span>Is it normal ?? <br></span></div><div><span><br></span></div><div><br></div><div>Thanks in advance,
 <br><span></span></div><div>Abdul<br></div><div><span style="color:rgb(0,0,255)"><span style="font-family:verdana,helvetica,sans-serif"><span style="font-family:lucida console,sans-serif"></span></span></span><span style="color:rgb(0,0,255)"><span style="font-family:verdana,helvetica,sans-serif"></span></span></div>

</div></div></blockquote></div><br>
</div><br><br> </div></div></div> </div> </blockquote></div>   </div></div></blockquote></div><br>