Problem with with convert for inplace conversion
Hi, I observe that the Mat.convert method does not behave as I would expected for inplace conversion.
#Create the Nested Matrix
C=PETSc.Mat().createNest([[A, A], [None, 2*A]])
C.convert(mat_type=PETSc.Mat.Type.AIJ) # fails
It seems not possible to rewrite the matrix inplace (except with mpirun -n 1). However the synthax
B=PETSc.Mat()
C.convert(PETSc.Mat.Type.AIJ,B)
with an auxiliary B matrix works fine.
Sorry if it is due to a misconception, but inplace conversion work fine with transpose and both methods seem to share the same interface with 'reuse' and MAT_INPLACE_MATRIX
C.transpose() # Ok!
info : petsc4py, Version: 3.9.0, arch-linux2-c-optim, complex
Benoit
Comments (6)
-
-
It needs to be implemented. I think it's pretty easy, but I don't have any free cycles for at least a week or two.
-
- changed status to on hold
-
is there a possibility for this bug to be fixed ?
-
This is not a petsc4py issue. You should submit a bug report/feature request to PETSc https://gitlab.com/petsc/petsc/-/issues .
-
- changed status to closed
Submit bug reports and feature requests to https://gitlab.com/petsc/petsc/-/issues
- Log in to comment
This is not a petsc4py issue. It seems that
MatConvert()
forMATNEST
withreuse=MAT_INPLACE_MATRIX
is not supported in core PETSc.@BarryFSmith @jedbrown @stefano_zampini What should we do about it?