problem with mumps and petsc4py with the choice of the ordering (ICNTL(7))
Hello, my problem is the following: i try to set up mumps such that scotch is used during the factorization phase for the ordering of the matrix. For that, I use:
A.setMumpsIcntl(7, 3)
where A is my matrix.
I get the following error message:
petsc4py.PETSc.Error: error code 73
[5] MatMumpsSetIcntl() line 1774 in /xxxx/petsc/src/mat/impls/aij/mpi/mumps/mumps.c
[5] Object is in wrong state
[5] Only for factored matrix
Which seems to indicate that the code expect the matrix to be already factored to set up this option. But the problem is that what i try to set up is a parameter that will be used during the factorization phase, therefore it should be set on non-factored matrices. Is that a bug, or am I missing something ?
Thank you for your help.
Comments (6)
-
-
Thank you for your reply. I have seen this pull request, and it seems to me that what it is saying is that all MatMumps\set return an error if the matrix is not factored. I may be wrong and misunderstanding, but for me this is not a proper behaviour. Speaking of setting a value for Icntl, in many cases, this value while be used by Mumps during the solve phase, therefore it makes sense to set it only for factored matrices. But for example for choosing the ordering (Icntl(7)), then this value is used by mumps during the factorization, therefore it have to be specified before the factorization (i.e. on a non-factored matrix)
Once again, sorry if I completely misunderstand, and if what I am asking is irrelevant. But in the end, I still do not know how to change the value of Icntl(7) before the factorization. If i am misunderstanding the code, then at least I think that the error message should be changed.
-
I hope you understand this is not a petsc4py issue, but rather the way core PETSc behaves. If you rewrite C or Fortran code equivalent to your Python code, you will get the exact same error. I agree this behavior may be somewhat obscure/confusing. You should re-raise your concerns in the petsc-devel mailing list.
-
My point is, I'm not the one who wrote and maintain the related code in core PETSc, so I'm not in a good position to take further actions in face of your complaints/requests.
-
Thank you for this reply, i will follow your advice and try my chance with the Petsc mailing list
-
- changed status to closed
- Log in to comment
You are supposed to the the matrix out of a
PC
factor, see pull request #69.