[petsc-dev] printing the matrix name via -mat_view_info

abhyshr at mcs.anl.gov abhyshr at mcs.anl.gov
Wed Sep 29 15:55:40 CDT 2010


----- "Barry Smith" <bsmith at mcs.anl.gov> wrote:

> Good idea. But why just for Matrices, why not for all objects? 
> 
>    If no name is set do we use PetscObjectName() to generate one at
> that time 

 What does PetscObjectName() do??Generate a random name??

or only print a name if it already has one (I lean toward
> that).
> 
>    I'll start on this.
> 
> 
> 
>    Barry
> 
> 
> On Sep 29, 2010, at 2:28 PM, Shri wrote:
> 
> > Is there a way to print the matrix name so that -mat_view_info
> prints it out.
> > 
> > Instead of
> > 
> > Matrix Object:
> >  type=mpiaij, rows=200, cols=200
> >  total: nonzeros=40000, allocated nonzeros=40000
> >  total number of mallocs used during MatSetVal
> > 
> > it should print
> > 
> > Matrix Object: <MATRIX_NAME>
> >  type=mpiaij, rows=200, cols=200
> >  total: nonzeros=40000, allocated nonzeros=40000
> >  total number of mallocs used during MatSetVal
> > 
> > It'll be nice to have the matrix name printed out cause sometimes it
> gets confusing when there are a lot of matrices you are working with.
> 
> > Either the user can set a name and it could be printed out in
> mat_view_info or even better if in some way the variable name can be
> used directly.
> > 
> > What do you think?
> > 
> > Shri



More information about the petsc-dev mailing list