<div dir="ltr">The resulting matrix is dependent on the number of processes you use (e.g., if you run with only one process, you will get a zero matrix).  Think it over if this is really what you want.<div><br clear="all"><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">--Junchao Zhang</div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jun 22, 2020 at 6:14 AM Eda Oktay <<a href="mailto:eda.oktay@metu.edu.tr">eda.oktay@metu.edu.tr</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">Hello everyone,<br>
<br>
I am trying to find elements in off diagonal blocks of a parallel<br>
sparse matrix. That is why, I want to use MatGetDiagonalBlock and from<br>
the matrix I obtain, I want to obtain off diagonal elements by<br>
subtracting it from my original matrix by using MatAXPY.<br>
<br>
However, since MatGetDiagonalBlock gives a sequential matrix and my<br>
original one is parallel, I can't use MatAXPY. That's why I want to<br>
change the type of one of the matrices.<br>
<br>
How can I change a MATSEQAIJ to MATMPIAIJ or vice versa?<br>
<br>
Thanks!<br>
</blockquote></div>