<div dir="ltr">I think the manual is also insufficient in this case. The vector must be VECMPI and contains only the portion in the local process. Is that correct?<div><br clear="all"><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Giang</div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jan 23, 2013 at 5:24 PM Nachiket Gokhale <<a href="mailto:gokhalen@gmail.com">gokhalen@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Thanks, I guess I misinterpreted the manual.<br>
<br>
-Nachiket<br>
<br>
On Wed, Jan 23, 2013 at 11:20 AM, Jed Brown <<a href="mailto:jedbrown@mcs.anl.gov" target="_blank">jedbrown@mcs.anl.gov</a>> wrote:<br>
> It works in serial. In parallel, it currently gives the diagonal of the<br>
> "diagonal blocks" induced by the row and column distributions. That only<br>
> matches the true diagonal for square matrices, though an actual diagonal<br>
> doesn't typically make algorithmic sense for a non-square parallel matrix.<br>
><br>
><br>
> On Wed, Jan 23, 2013 at 10:16 AM, Nachiket Gokhale <<a href="mailto:gokhalen@gmail.com" target="_blank">gokhalen@gmail.com</a>><br>
> wrote:<br>
>><br>
>> Any chance of making this work in serial?<br>
>><br>
>><br>
>> <a href="http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Mat/MatGetDiagonal.html" rel="noreferrer" target="_blank">http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Mat/MatGetDiagonal.html</a><br>
>><br>
>> Not a show stopper, I am trying to get the diagonal of some small<br>
>> projected, dense matrices (which come from large sparse matrices). I<br>
>> am running in serial because 1) Since my projected matrices are small,<br>
>> and 2) PETSc does not do certain matrix multiplications involving a<br>
>> dense matrix in parallel,<br>
>><br>
>> -Nachiket<br>
><br>
><br>
</blockquote></div>