[petsc-users] About MatMumpsSetIcntl function

김성익 ksi2443 at gmail.com
Wed Nov 30 07:39:55 CST 2022


Following your comments,

After matrix assembly end,
PetscCall(KSPGetPC(ksp,&pc));
PetscCall(KSPSetFromOptions(ksp));
PetscCall(KSPSetUp(ksp));
PetscCall(PCFactorGetMatrix(pc,&xGK));

However there is another error as below.
[0]PETSC ERROR: Object is in wrong state
[0]PETSC ERROR: Not for factored matrix
[0]PETSC ERROR: See https://petsc.org/release/faq/ for trouble shooting.
[0]PETSC ERROR: Petsc Release Version 3.18.1, unknown
[0]PETSC ERROR: ./app on a arch-linux-c-debug named ubuntu by ksi2443 Wed
Nov 30 05:37:52 2022
[0]PETSC ERROR: Configure options -download-mumps -download-scalapack
-download-parmetis -download-metis
[0]PETSC ERROR: #1 MatZeroEntries() at
/home/ksi2443/petsc/src/mat/interface/matrix.c:6024
[0]PETSC ERROR: #2 main() at /home/ksi2443/Downloads/coding/a1.c:339
[0]PETSC ERROR: No PETSc Option Table entries

How can I fix this?


Thanks,
Hyung Kim


2022년 11월 30일 (수) 오후 4:18, Jose E. Roman <jroman at dsic.upv.es>님이 작성:

> You have to call PCFactorGetMatrix() first. See any of the examples that
> use MatMumpsSetIcntl(), for instance
> https://petsc.org/release/src/ksp/ksp/tutorials/ex52.c.html
>
> Jose
>
>
> > El 30 nov 2022, a las 6:52, 김성익 <ksi2443 at gmail.com> escribió:
> >
> > Hello,
> >
> >
> > I tried to adopt METIS option in MUMPS by using
> > ' PetscCall(MatMumpsSetIcntl(Mat, 7, 5));'
> >
> > However, there is an error as follows
> >
> > [0]PETSC ERROR: Object is in wrong state
> > [0]PETSC ERROR: Only for factored matrix
> > [0]PETSC ERROR: See https://petsc.org/release/faq/ for trouble shooting.
> > [0]PETSC ERROR: Petsc Release Version 3.18.1, unknown
> > [0]PETSC ERROR: ./app on a arch-linux-c-debug named ubuntu by ksi2443
> Tue Nov 29 21:12:41 2022
> > [0]PETSC ERROR: Configure options -download-mumps -download-scalapack
> -download-parmetis -download-metis
> > [0]PETSC ERROR: #1 MatMumpsSetIcntl() at
> /home/ksi2443/petsc/src/mat/impls/aij/mpi/mumps/mumps.c:2478
> > [0]PETSC ERROR: #2 main() at /home/ksi2443/Downloads/coding/a1.c:149
> > [0]PETSC ERROR: No PETSc Option Table entries
> >
> > How can I fix this error?
> >
> > Thank you for your help.
> >
> >
> > Hyung Kim
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20221130/1541c047/attachment.html>


More information about the petsc-users mailing list