<div dir="ltr">On Mon, Sep 30, 2013 at 5:40 PM, Alan Z. Wei <span dir="ltr"><<a href="mailto:zhenglun.wei@gmail.com" target="_blank">zhenglun.wei@gmail.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Dear all,<br>
I hope you're having a nice day.<br>
I came across a memory problem while using ex45.c to solve 3D Poisson<br>
equation. As recommended while using 2D Poisson solver (e.g<br>
/src/src/ksp/example/tutorial/ex29.c), I used the multigrid<br>
preconditioner and the setting is listed here:<br>
mpiexec -np 8 ./ex45 -pc_type mg -ksp_type cg -da_refine 2<br>
-pc_mg_galerkin -ksp_rtol 1.0e-7 -mg_levels_pc_type jacobi<br>
-mg_levels_ksp_type chebyshev<br>
If I apply the same settings to ex45 with np = 32 and it results a 'out<br>
of memory' error. The case has grid size = 801*385*385. Of course, if I<br></blockquote><div><br></div><div>ALWAYS send the full error text.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
reduced the grid size to very small, it would work well. For the test<br>
case, I tried to play with<br>
1, doubleing the number of process (by using np =64, total avaiable<br>
memory should be aroud 128G)<br>
2, reducing the grid size to half<br>
3, reducing the level of the MG to 1<br>
They do not help at all. What should I output in order to detect the<br>
problem?<br></blockquote><div><br></div><div>This is a very stripped down example, so the only memory should be in the</div><div>sol+res vectors, Jacobian, DMDA, and Krylov solver. Do you have estimates</div><div>for these? Have you looked at what -log_summary reports?</div>
<div><br></div><div> Thanks,</div><div><br></div><div> Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
BTW, the ex45 works well with the same amount of DoF with GAMG and the<br>
following settings however it is slow,<br>
mpiexec -np 32 ./ex45 -pc_type gamg -ksp_type cg -pc_gamg_agg_nsmooths 1<br>
-mg_levels_ksp_max_it 1 -mg_levels_ksp_type richardson -ksp_rtol 1.0e-7.<br>
I understand that MG requires more memory than GAMG; yet, is there any<br>
way I can approximately calculate the memory required?<br>
<br>
Thanks in advance,<br>
Alan<br>
<br>
<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>
-- Norbert Wiener
</div></div>