[petsc-users] petsc-users Digest, Vol 88, Issue 41

Hong hzhang at mcs.anl.gov
Wed Apr 13 13:54:18 CDT 2016


Yaoyu:

 "MatGetSubMatrices() can extract ONLY sequential submatrices
   (from both sequential and parallel matrices). Use MatGetSubMatrix()
   to extract a parallel submatrix."

Using parallel IS for MatGetSubMatrices() definitely incorrect, unless you
only use one process.

>
> And further. I checked the submatrices I obtained by
> MatGetSubMatrices() with both parallel ISs and sequential ISs. The
> submatrices are identical. Is it means that I could actually use
> parallel IS (created with PETSC_COMM_WORLD) ?
>

What did you compare with?  I do not understand what submatrices would
obtain with parallel IS using more than one process.

Hong

>
> > Yaoyu :
> > MatGetSubMatrices() returns sequential matrices.
> > IS must be sequential, created with PETSC_COMM_SELF.
> > See petsc/src/mat/examples/tests/ex42.c
> >
> > Check your submatrices.
> >
> > Hong
> >
> > Hi everyone,
> >>
> >> I am trying to get values owned by other processors of a parallel
> matrix.
> >>
> >> I tried to create a sub-matrix by using MatGetSubMatrices(), and then
> >> MatGetRow() on the sub-matrix. But MatGetRow() give me the following
> >> error message:
> >>
> >> ===== Error message begins =====
> >>
> >> No support for this operation for this object type
> >> only local rows
> >>
> >> ===== Error message ends =====
> >>
> >> The parallel matrix is a parallel dense matrix. The ISs for
> >> MatGetSubMatrices() are created using ISCreateGeneral() and
> >> PETSC_COMM_WORLD. The row IS is sorted by ISSort().
> >>
> >> What did I mistake while using the above functions? Is there a better
> >> way to get access to matrix values owned by other processor?
> >>
> >> Thanks!
> >>
> >> HU Yaoyu
> >>
> > -------------- next part --------------
> > An HTML attachment was scrubbed...
> > URL: <
> http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20160413/6be45909/attachment.html
> >
> >
> > ------------------------------
> >
> > _______________________________________________
> > petsc-users mailing list
> > petsc-users at mcs.anl.gov
> > https://lists.mcs.anl.gov/mailman/listinfo/petsc-users
> >
> >
> > End of petsc-users Digest, Vol 88, Issue 41
> > *******************************************
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20160413/c23842f8/attachment-0001.html>


More information about the petsc-users mailing list