How to get information about the off-diagonal submatrix

Satish Balay balay at mcs.anl.gov
Mon Aug 10 10:29:05 CDT 2009


You'll have to look at the code that does MatSetValues(). Perhaps you
can run the code in debugger - and set a break point in
MatSetValues_MPIAIJ - and see when MatSetValues_SeqAIJ_B_Private() is
getting called..

Its also possible that some values are set on other procs and
commuincated..

Note: I should have mentioned earlier: mpiaij->B is an internal
datastructure - so the column indices don't directly correspond to the
original matrix. [there is a cmap in there that stores this map]

Satish

On Mon, 10 Aug 2009, Thomas Witkowski wrote:

> Thanks, that works fine! In my test case (yes, just for debugging!) I've
> expected to have an empty off-diagonal matrix. But the matrix is not empty.
> But how is it possible, when all entries, which are inserted to the matrix via
> MatSetValues, have indices for row and col within the ownership range of the
> processors matrix?
> 
> Thomas
> 
> Satish Balay wrote:
> > alternatively - just access the private datastructe and print..
> > 
> > #include "../src/mat/impls/aij/mpi/mpiaij.h"
> > Mat_MPIAIJ     *mpiaij = (Mat_MPIAIJ*)mat->data;
> > MatView(mpiaij->B,...);
> > 
> > 
> > Satish
> > 
> > 
> > On Mon, 10 Aug 2009, Matthew Knepley wrote:
> > 
> >   
> > > If this is just for debugging, the easiest way I think is to call
> > > MatGetSubmatrix() with
> > > a column IS that omits the local columns.
> > > 
> > >   Matt
> > > 
> > > On Mon, Aug 10, 2009 at 8:28 AM, Thomas Witkowski <
> > > thomas.witkowski at tu-dresden.de> wrote:
> > > 
> > >     
> > > > Hi,
> > > > 
> > > > how is it possible to print just the off-diagonal submatrix of one
> > > > process
> > > > of a parallel mpiaij matrix?
> > > > 
> > > > Thomas
> > > > 
> > > >       
> > > 
> > > 
> > >     
> > 
> > 
> > 
> >   
> 
> 



More information about the petsc-users mailing list