[petsc-users] ISCreateStride and MatGetSubmatrices

shu guo greatgs2008 at gmail.com
Tue Aug 28 10:33:29 CDT 2012


Dear All,

I want to extract a sequential matrix from a MPIBAIJ matrix A with a
dimension of 4n*4n. After assembly A, I use ISCreateStride to define
the index by

          call ISCreateStride(PETSC_COMM_WORLD,n,0,1,isrow,ierr)

And extract the matrix as
          call MatGetSubMatrices(Kmatem,1,isrow,isrow,
     &                           MAT_INITIAL_MATRIX,Kmatemseq)

But it gives me a segmentation fault when I call ISCreateStride. Is
there anything I did wrong? Thanks for any advice.

Shu


More information about the petsc-users mailing list