On Tue, Oct 23, 2012 at 1:16 AM, shu guo <span dir="ltr"><<a href="mailto:greatgs2008@gmail.com" target="_blank">greatgs2008@gmail.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi PETSc Users,<br>
<br>
I have to subtract a submatrix from a blocked parallel matrix (MPIBAIJ).<br>
<br>
from K_11 K_12 to get K_11<br>
K_21 K_22<br>
<br>
The code is<br>
<br>
call ISCreateStride(PETSC_COMM_WORLD,length,0,1,isrowpp,ierr)<br>
call MatGetSubMatrices(Kmatem,1,isrowpp,isrowpp,<br>
MAT_INITIAL_MATRIX,Kppseq,ierr)<br>
<br>
When I am running it, the command indicates as<br>
<br>
[0]PETSC ERROR: --------------------- Error Message<br>
------------------------------------<br>
[0]PETSC ERROR: Arguments are incompatible!<br>
[0]PETSC ERROR: Indices are not block ordered!<br></blockquote><div><br></div><div>Always send the ENTIRE error message.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
[0]PETSC ERROR:<br>
------------------------------------------------------------------------<br>
<br>
<br>
The reason seems pretty clear that the IS need to be in block format<br>
either. Although the matrix is created as blocked, during the<br>
calculation I have already permute the indices</blockquote><div><br></div><div>Why are you doing this permutation? How does it look in parallel?</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
so that what I need<br>
from the matrix is the square matrix exactly from 0--length. Can<br>
anyone tell me based on my demand, how should I create this blocked IS<br>
to get submatrix? Thank you very much!</blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Best,<br>
Shu<br>
</blockquote></div><br>