[petsc-users] About MatMumpsSetIcntl function

Matthew Knepley knepley at gmail.com
Wed Nov 30 07:44:03 CST 2022


On Wed, Nov 30, 2022 at 8:40 AM 김성익 <ksi2443 at gmail.com> wrote:

> 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
>

The error message is telling you that you cannot alter values in the
factored matrix. This is because
the direct solvers use their own internal storage formats which we cannot
alter, and you should probably
not alter either.

What are you trying to do?

  Thanks,

     Matt


> [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
>>
>>

-- 
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

https://www.cse.buffalo.edu/~knepley/ <http://www.cse.buffalo.edu/~knepley/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20221130/33ce7179/attachment-0001.html>


More information about the petsc-users mailing list