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

Barry Smith bsmith at mcs.anl.gov
Thu Dec 8 08:03:24 CST 2011


  Thomas,

   As always including the ENTIRE error message makes determining the issue much easier. It tells us what functions are being called at this point and the line numbers. Without we would only be speculating.

   In this case the error message is printed on process of rank 15 at location 1129 ON THAT PROCESS so the you need to determine the global row of location 1129 on the 15th process.  That row is missing the diagonal.

   Barry

The reason I know it is the not the global row 1129 but the 1129th row on process 15 is because the I know the check for diagonal entries is done in the factorization that is taking place on each process (each factorization is running at the same time on different processes). This would be clear with the entire error message.


On Dec 8, 2011, at 7:49 AM, Thomas Witkowski wrote:

> 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