[petsc-users] MatGetSubMatrices error

Matthew Knepley knepley at gmail.com
Thu Mar 3 12:30:28 CST 2011


Mail the stack trace to petsc-maint at mcs.anl.gov.

   Matt

On Thu, Mar 3, 2011 at 11:01 AM, Joshua Booth <jdbst21 at gmail.com> wrote:

>
>>
> Hello,
>
> 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).
>
> So I made
>
> Mat *localB;
> If(rank==1)
> {
>   IS irow;
>       IS icol;
>       ISCreateGeneral(PETSC_COMM_SELF, end_pos-start_pos+1, order_array,
> &irow);
>       ISCreateGeneral(PETSC_COMM_SELF, end_pos-start_pos+1, order_array,
> &icol);
>       MatGetSubMatrices(A, 1, &irow, &icol, MAT_INITIAL_MATRIX, &localB);
> }
> else
>  {
>       IS irow;
>       IS icol;
>       ISCreateStride(PETSC_COMM_SELF, 0, 0, 1, &irow);
>       ISCreateStride(PETSC_COMM_SELF, 0, 0, 1, &icol);
>       MatGetSubMatrices(A,0,&irow,&icol,MAT_INITIAL_MATRIX,&localB);
>
>    }
> However, I get a segmentation violation from MatGetSubMatrices_MPIAIJ_Local
> on rank=0 when I track back with gdb.
> I have already use MatGetSubMatrices on all cores than destroy.
>
> Joshua Booth
>
>


-- 
What most experimenters take for granted before they begin their experiments
is infinitely more interesting than any results to which their experiments
lead.
-- Norbert Wiener
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20110303/7231a708/attachment.htm>


More information about the petsc-users mailing list