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

Barry Smith bsmith at mcs.anl.gov
Thu Sep 30 10:30:05 CDT 2010


On Sep 30, 2010, at 12:35 AM, Jed Brown wrote:

> PetscObjectName for Matlab names is not ideal,

   True

> how should the Matlab user find out what the name of the loaded vector is?

   Whose

> It won't be the same on consecutive identical runs.

   True, though likely it will be the same.

> Or should it practically become mandatory to name objects that will go to Matlab?

   I hate that, someone's been running some computation and then it stops suddenly because they forgot to name an output variable.

   Barry

> 
> Jed
> 
> 
>> On Sep 30, 2010 2:56 AM, "Barry Smith" <bsmith at mcs.anl.gov> wrote:
>> 
>> 
>>  I have added PetscObjectPrintClassNamePrefixType() which is now (in theory) used uniformly in all the XXXView ASCII info formats to display this information appropriately. A nice improvement, eliminated lots of duplicate code and makes it easier to have uniform output.
>> 
>>  PetscObjects are NOT given names by default, you should call PetscObjectSetName() to give it a name.  In a small number of places when an object NEEDS a name, for example when it is saved to Matlab with that variable name then PetscObjectName() is called to generate a "unique" name.
>> 
>>   Thanks for the suggestion,
>> 
>>   Barry
>> 
>> > What does PetscObjectName() do??Generate a random name??
>> 
>> Currently it generates a name that loo...
>> 
>> 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
>> > 
>> >...
>> 
> 




More information about the petsc-dev mailing list