How to get information about the off-diagonal submatrix
Satish Balay
balay at mcs.anl.gov
Mon Aug 10 10:38:53 CDT 2009
On Mon, 10 Aug 2009, Thomas Witkowski wrote:
> Satish Balay wrote:
> > Its also possible that some values are set on other procs and
> > commuincated..
> >
> That's the reason, I've forgotten to check it. Thanks for the hint! Is there
> any way to get information from petsc to check how many matrix entries had to
> be communicated during assembling?
You can run the code with '-info' - and look for 'stash' - that gives
the message lenghts that got commuicated for matrix assembly.
Also - you can use MatSetOption(MAT_IGNORE_OFF_PROC_ENTRIES,PETSC_TRUE).
This will cause MatSetValues() to ignore off-proc entries during
assembly. After this - you can check if the assembled matrix is what
you expect..
Satish
>
> Thomas
>
>
>
> > 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