[petsc-users] Out of memory while using /src/src/ksp/example/tutorial/ex45.c

Matthew Knepley knepley at gmail.com
Wed Oct 2 07:39:39 CDT 2013


On Mon, Sep 30, 2013 at 5:40 PM, Alan Z. Wei <zhenglun.wei at gmail.com> wrote:

> Dear all,
> I hope you're having a nice day.
> I came across a memory problem while using ex45.c to solve 3D Poisson
> equation. As recommended while using 2D Poisson solver (e.g
> /src/src/ksp/example/tutorial/ex29.c), I used the multigrid
> preconditioner and the setting is listed here:
> mpiexec -np 8 ./ex45 -pc_type mg -ksp_type cg -da_refine 2
> -pc_mg_galerkin -ksp_rtol 1.0e-7 -mg_levels_pc_type jacobi
> -mg_levels_ksp_type chebyshev
> If I apply the same settings to ex45 with np = 32 and it results a 'out
> of memory' error. The case has grid size = 801*385*385. Of course, if I
>

ALWAYS send the full error text.


> reduced the grid size to very small, it would work well. For the test
> case, I tried to play with
> 1, doubleing the number of process (by using np =64, total avaiable
> memory should be aroud 128G)
> 2, reducing the grid size to half
> 3, reducing the level of the MG to 1
> They do not help at all. What should I output in order to detect the
> problem?
>

This is a very stripped down example, so the only memory should be in the
sol+res vectors, Jacobian, DMDA, and Krylov solver. Do you have estimates
for these? Have you looked at what -log_summary reports?

  Thanks,

      Matt


> BTW, the ex45 works well with the same amount of DoF with GAMG and the
> following settings however it is slow,
> mpiexec -np 32 ./ex45 -pc_type gamg -ksp_type cg -pc_gamg_agg_nsmooths 1
> -mg_levels_ksp_max_it 1 -mg_levels_ksp_type richardson -ksp_rtol 1.0e-7.
> I understand that MG requires more memory than GAMG; yet, is there any
> way I can approximately calculate the memory required?
>
> Thanks in advance,
> Alan
>
>
>


-- 
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/20131002/b5b3fddd/attachment.html>


More information about the petsc-users mailing list