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

Matthew Knepley knepley at gmail.com
Thu Dec 8 08:03:04 CST 2011


On Thu, Dec 8, 2011 at 7:51 AM, Thomas Witkowski <
Thomas.Witkowski at tu-dresden.de> wrote:

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

Did you remember to call MatAssemblyBegin/End()?

  Matt


> Thomas
>
> Zitat von Thomas Witkowski <Thomas.Witkowski at tu-dresden.**de<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
>>
>
>
>


-- 
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20111208/36f8fbee/attachment.htm>


More information about the petsc-users mailing list