[petsc-users] PETSc MUMPS interface

Zhang, Hong hzhang at mcs.anl.gov
Sun Jan 16 18:01:41 CST 2022


Varun,
I believe Jose is correct. You may verify it by running your code with option '-log_view', then check the number of calls to MatLUFactorSym.

I guess I can add a flag in PCSetUp() to check if user has already called MatLUFactorSymbolic() and wants to skip it. Normally, users simply allocate sufficient memory in the symbolic factorization. Why do you want to check it?
Hong

________________________________
From: Jose E. Roman <jroman at dsic.upv.es>
Sent: Sunday, January 16, 2022 5:11 AM
To: Varun Hiremath <varunhiremath at gmail.com>
Cc: Zhang, Hong <hzhang at mcs.anl.gov>; Peder Jørgensgaard Olesen via petsc-users <petsc-users at mcs.anl.gov>
Subject: Re: [petsc-users] PETSc MUMPS interface

Hong may give a better answer, but if you look at PCSetUp_LU() https://petsc.org/main/src/ksp/pc/impls/factor/lu/lu.c.html#PCSetUp_LU you will see that MatLUFactorSymbolic() is called unconditionally during the first PCSetUp(). Currently there is no way to check if the user has already called MatLUFactorSymbolic().

Jose


> El 16 ene 2022, a las 10:40, Varun Hiremath <varunhiremath at gmail.com> escribió:
>
> Hi Hong,
>
> Thank you, this is very helpful!
>
> Using this method I am able to get the memory estimates before the actual solve, however, I think my code may be causing the symbolic factorization to be run twice. Attached is my code where I am using SLEPc to compute eigenvalues, and I use MUMPS for factorization. I have commented above the code that computes the memory estimates, could you please check and tell me if this would cause the symbolic factor to be computed twice (a second time inside EPSSolve?), as I am seeing a slight increase in the overall computation time?
>
> Regards,
> Varun
>
> On Wed, Jan 12, 2022 at 7:58 AM Zhang, Hong <hzhang at mcs.anl.gov> wrote:
> PCFactorSetMatSolverType(pc,MATSOLVERMUMPS);
>   PCFactorSetUpMatSolverType(pc);
>   PCFactorGetMatrix(pc,&F);
>
>   MatLUFactorSymbolic(F,A,...)
>   You must provide row and column permutations etc,    petsc/src/mat/tests/ex125.c may give you a clue on how to get these inputs.
>
> Hong
>
>
> From: petsc-users <petsc-users-bounces at mcs.anl.gov> on behalf of Junchao Zhang <junchao.zhang at gmail.com>
> Sent: Wednesday, January 12, 2022 9:03 AM
> To: Varun Hiremath <varunhiremath at gmail.com>
> Cc: Peder Jørgensgaard Olesen via petsc-users <petsc-users at mcs.anl.gov>
> Subject: Re: [petsc-users] PETSc MUMPS interface
>
> Calling PCSetUp() before KSPSetUp()?
>
> --Junchao Zhang
>
>
> On Wed, Jan 12, 2022 at 3:00 AM Varun Hiremath <varunhiremath at gmail.com> wrote:
> Hi All,
>
> I want to collect MUMPS memory estimates based on the initial symbolic factorization analysis before the actual numerical factorization starts to check if the estimated memory requirements fit the available memory.
>
> I am following the steps from https://petsc.org/main/src/ksp/ksp/tutorials/ex52.c.html
>
>   PCFactorSetMatSolverType(pc,MATSOLVERMUMPS);
>   PCFactorSetUpMatSolverType(pc);
>   PCFactorGetMatrix(pc,&F);
>
>   KSPSetUp(ksp);
>   MatMumpsGetInfog(F,...)
>
> But it appears KSPSetUp calls both symbolic and numerical factorization. So is there some other way to get these statistics before the actual factorization starts?
>
> Thanks,
> Varun
> <slepc_eps_mumps_test.cpp>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20220117/2fbb2bde/attachment.html>


More information about the petsc-users mailing list