<div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><br></blockquote><div> </div></div><meta http-equiv="content-type" content="text/html; charset=utf-8">Hello,<div>
<br></div><div>I am running a job on two processors and a matmpiaij. I want to set a submatrix of this on the one processor (rank==1).</div><div><br></div><div>So I made</div><div><br></div><div>Mat *localB;</div><div>If(rank==1)</div>
<div>{</div><div><div> IS irow;</div><div> IS icol;</div><div> ISCreateGeneral(PETSC_COMM_SELF, end_pos-start_pos+1, order_array, &irow);</div><div> ISCreateGeneral(PETSC_COMM_SELF, end_pos-start_pos+1, order_array, &icol);</div>
</div><div> MatGetSubMatrices(A, 1, &irow, &icol, MAT_INITIAL_MATRIX, &localB);</div><div>}</div><div>else</div><div><div> {</div><div> IS irow;</div><div> IS icol;</div><div> ISCreateStride(PETSC_COMM_SELF, 0, 0, 1, &irow);</div>
<div> ISCreateStride(PETSC_COMM_SELF, 0, 0, 1, &icol);</div><div> MatGetSubMatrices(A,0,&irow,&icol,MAT_INITIAL_MATRIX,&localB);</div><div><br></div><div> }</div></div><div>However, I get a segmentation violation from MatGetSubMatrices_MPIAIJ_Local on rank=0 when I track back with gdb.</div>
<div>I have already use MatGetSubMatrices on all cores than destroy.</div><div><br></div><div>Joshua Booth</div><div><br></div>