[petsc-users] Problem: matrix is missing diagonal entry

Thomas Witkowski Thomas.Witkowski at tu-dresden.de
Thu Dec 8 07:51:33 CST 2011


Maybe some more note on my problem: I've thounds of matrices in my  
code, where doing this works fine! The only difference here is, that  
row 1129 of the matrix is owned by rank 0, but all of its entries are  
created on rank 1. For all of the other matrices in my codes, at least  
the diagonal element is created on the rank that owns the matrix row.

Thomas

Zitat von Thomas Witkowski <Thomas.Witkowski at tu-dresden.de>:

> I've some strange problem: I create a mpiaij matrix, fill it with some
> values and want to make use of it in kspsolve. But I get the error
>
> [15]PETSC ERROR: Object is in wrong state!
> [15]PETSC ERROR: Matrix is missing diagonal entry 1129!
>
> I've checked the following  things:
> - There is a MatSetValues call that contains the entry 1129/1129 with
> some value
> - MatView shows that there exists the value 1129/1129
> - MatAssemblyBegin/End is called correctly
> - valgrind says: 0 errors
> - ddt also cannot find anything unusual
>
> I use petsc 3.2-p5, its compiled in debug mode. What could I check to
> solve this problem? Any hints?
>
> Thomas




More information about the petsc-users mailing list