<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">Yaoyu:</div><div class="gmail_quote"><br></div><div class="gmail_quote"><div class="gmail_quote"> "MatGetSubMatrices() can extract ONLY sequential submatrices</div><div class="gmail_quote"> (from both sequential and parallel matrices). Use MatGetSubMatrix()</div><div class="gmail_quote"> to extract a parallel submatrix."</div><div class="gmail_quote"><br></div><div class="gmail_quote">Using parallel IS for MatGetSubMatrices() definitely incorrect, unless you only use one process.</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><br>
And further. I checked the submatrices I obtained by<br>
MatGetSubMatrices() with both parallel ISs and sequential ISs. The<br>
submatrices are identical. Is it means that I could actually use<br>
parallel IS (created with PETSC_COMM_WORLD) ?<br></blockquote><div><br></div><div>What did you compare with? I do not understand what submatrices would obtain with parallel IS using more than one process.</div><div><br></div><div>Hong</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<br>
> Yaoyu :<br>
> MatGetSubMatrices() returns sequential matrices.<br>
> IS must be sequential, created with PETSC_COMM_SELF.<br>
> See petsc/src/mat/examples/tests/ex42.c<br>
><br>
> Check your submatrices.<br>
><br>
> Hong<br>
><br>
> Hi everyone,<br>
>><br>
>> I am trying to get values owned by other processors of a parallel matrix.<br>
>><br>
>> I tried to create a sub-matrix by using MatGetSubMatrices(), and then<br>
>> MatGetRow() on the sub-matrix. But MatGetRow() give me the following<br>
>> error message:<br>
>><br>
>> ===== Error message begins =====<br>
>><br>
>> No support for this operation for this object type<br>
>> only local rows<br>
>><br>
>> ===== Error message ends =====<br>
>><br>
>> The parallel matrix is a parallel dense matrix. The ISs for<br>
>> MatGetSubMatrices() are created using ISCreateGeneral() and<br>
>> PETSC_COMM_WORLD. The row IS is sorted by ISSort().<br>
>><br>
>> What did I mistake while using the above functions? Is there a better<br>
>> way to get access to matrix values owned by other processor?<br>
>><br>
>> Thanks!<br>
>><br>
>> HU Yaoyu<br>
>><br>
> -------------- next part --------------<br>
> An HTML attachment was scrubbed...<br>
> URL: <<a href="http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20160413/6be45909/attachment.html" rel="noreferrer" target="_blank">http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20160413/6be45909/attachment.html</a>><br>
><br>
> ------------------------------<br>
><br>
> _______________________________________________<br>
> petsc-users mailing list<br>
> <a href="mailto:petsc-users@mcs.anl.gov">petsc-users@mcs.anl.gov</a><br>
> <a href="https://lists.mcs.anl.gov/mailman/listinfo/petsc-users" rel="noreferrer" target="_blank">https://lists.mcs.anl.gov/mailman/listinfo/petsc-users</a><br>
><br>
><br>
> End of petsc-users Digest, Vol 88, Issue 41<br>
> *******************************************<br>
</blockquote></div><br></div></div>