[petsc-users] Measuring memory consumption
Barry Smith
bsmith at petsc.dev
Wed Aug 12 23:17:20 CDT 2020
Pascal,
Do
KSPGetPC(ksp,&pc);
PCFactorGetMatrix(pc,fact)
PetscViewerPushFormat(PETSC_VIEWER_STDOUT_(PetscObjectComm((PetscObject)fact)),PETSC_VIEWER_ASCII_INFO);
MatView(fact,PETSC_VIEWER_STDOUT_(PetscObjectComm((PetscObject)fact);
PetscViewerPopFormat(PETSC_VIEWER_STDOUT_(PetscObjectComm((PetscObject)fact));
after
SNES/KSPSolve
this should print the various MUMPS variables related to memory usage.
This is processed in /src/mat/impls/aij/mpi/mumps/mumps.c
If you want to process the values directly in the application code you can look at this file and see how it is extracting the memory values from the mumps variables and use the variables directly in your code.
Barry
> On Aug 12, 2020, at 6:52 PM, Kraft, Pascal (IANM) <pascal.kraft at kit.edu> wrote:
>
> Dear PETSc Users,
>
> I use the MUMPS wrapper in PETSc (loaded from dealii). I know that MUMPS computes a factorization based on the mulrifrontal method and since I have a very memory-strapped problem, I would like to run some test on the memory requirements for the factorizations across some sets of parameters in my underlying FEM-problem.
> My question is if there is a native way to check memory (as a measure of fill-in) for the MUMPS factorization in PETSc. I would prefer not to go through the operating system since that feels somewhat inconclusive to me. Does PETSc provide such functionality in any way?
> I would prefer to know the memory consumption for storing the factorization if that is possible, I would also take the total memory consumption of the direct solver if there is no other way, and, if nothing else is possible, I guess I would have to go with the memory requirement of the whole application if all else fails.
> Is anyone aware of something I can do?
>
> Kind regards,
> Pascal
>
> --------------------------------------------------------------------------
> Karlsruhe Institute of Technology (KIT)
> Institute for Applied and Numerical Mathematics
>
> Kraft, Pascal
> Research scientist
>
> Englerstraße 2
> Gebäude 20.30
> 76130, Germany
>
> Phone: +49 721 608-42801
> Mobile: +49 163 6927612
> E-mail: pascal.kraft∂kit.edu <http://kit.edu/>
> Web: www.math.kit.edu/ianm2/~kraft/de <http://www.math.kit.edu/ianm2/~kraft/de>
> KIT – The Research University in the Helmholtz Association
>
> Since 2010, the KIT has been certified as a family-friendly university.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20200812/d8e4b303/attachment.html>
More information about the petsc-users
mailing list