[petsc-users] Use block Jacobi preconditioner with SNES
Jed Brown
jed at jedbrown.org
Wed Aug 29 14:20:38 CDT 2018
Ali Reza Khaz'ali <arkhazali at cc.iut.ac.ir> writes:
>> It looks like you have forgotten to destroy all of your objects. If you
>> clean up after yourself, you'll also see the totaly memory used by each
>> of the PETSc classes that you use.
>
> That is because of PetscLogView was placed before the destroy functions.
> I moved it after them, and here is the new log: (additionally, this is
> the log of one time step only, so all of the objects won't be destroyed
> before all time steps have been finished)
You can just use the run-time option and let PetscFinalize handle this
output.
> Memory usage is given in bytes:
>
> Object Type Creations Destructions Memory Descendants' Mem.
> Reports information only for process 0.
>
> --- Event Stage 0: Main Stage
>
> SNES 1 1 1372 0.
> DMSNES 1 1 672 0.
> SNESLineSearch 1 1 1000 0.
> Vector 20 20 17313120 0.
> Matrix 1 1 105843212 0.
As estimated previously, PETSc uses a little over 100 MB in total.
> Distributed Mesh 2 2 9504 0.
> Star Forest Graph 4 4 3200 0.
> Discrete System 2 2 1856 0.
> Krylov Solver 1 1 18416 0.
> DMKSP interface 1 1 656 0.
> Preconditioner 1 1 832 0.
> Viewer 1 0 0 0.
More information about the petsc-users
mailing list