[petsc-users] can MatGetSubMatrix extract remote rows?

Matthew Knepley knepley at gmail.com
Tue May 19 18:36:49 CDT 2015


On Tue, May 19, 2015 at 5:54 PM, Barry Smith <bsmith at mcs.anl.gov> wrote:

>
> > On May 19, 2015, at 5:47 PM, Fande Kong <fande.kong at colorado.edu> wrote:
> >
> > If I am interested in extracting some remote and local rows and columns
> but as another sequential matrix, then I have to use  MatGetSubMatrices?
>
>   Yes
>
> > There are no ways to use MatGetSubMatrix to get a sequential matrix?
>
>   No


Well, you could use MatGetSubMatrix() where only 1 proc gets rows and
columns, then extract the
serial submatrix.

   Matt


>
> > Because I am only interested in one sequential matrix per core not multi
> matrices.
>
>   You can just ask for one matrix with MatGetSubMatrices() will give you
> one sequential matrix per MPI process.
>
>
> >
> > Fande,
> >
> > On Tue, May 19, 2015 at 4:40 PM, Barry Smith <bsmith at mcs.anl.gov> wrote:
> >
> > > On May 19, 2015, at 5:33 PM, Fande Kong <fande.kong at colorado.edu>
> wrote:
> > >
> > > Hi all,
> > >
> > > I am confused with MatGetSubMatrix and MatGetSubMatrices.  In my
> understanding, I think MatGetSubMatrix extracts local rows and columns to
> form another parallel matrix with the same communicator, while
> MatGetSubMatrices extracts both local and remote entities to construct some
> sequential matrices. Is it right?
> >
> >   Yes except that MatGetSubMatrix can also use remote rows (and columns)
> for the part that is on a particular processor. That is it is not
> restricted to only grabbing local rows/columns in the new parallel matrix.
> >
> >
> > >
> > > Thanks,
> > >
> > > Fande,
> >
> >
>
>


-- 
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/20150519/291144d4/attachment.html>


More information about the petsc-users mailing list