[PETSC #16696] Binary dump of SNES residuals

mspieg mspieg at ldeo.columbia.edu
Mon Sep 10 16:42:08 CDT 2007


Thanks Barry,
      I hacked up something using SNESMonitorSet and a binary viewer  
that works (although not quite 1-3 lines of code).  This will work  
great...thanks...

cheers
marc



On Sep 10, 2007, at 4:38 PM, Barry Smith wrote:

>
>
>> I can certainly use  SNESMonitorSet with a custom monitor that  
>> sets up a
>> binary viewer for SNESMonitorResidual, but I'm being lazy.
>
>   This is currently the way to go: should require 3 lines of code,  
> create the binary
> viewer, call SNESMonitorSet() and then destroy the viewer at the  
> end. You
> can make it one line of code by passing PETSC_BINARY_VIEWER_WORLD  
> into the
> the SNESMonitorSet() call.
>
>   It would be nice to have a very generally solution to this, so  
> one could
> easily direct to many different types of viewers from the options  
> database.
> Maybe a rework of VecView_Private() code being used in conjunction  
> with the
> various -xxx_monitor_residual/solution/update options, for KSP,  
> SNES and TS.
> Do I have time to write it? Heck no, I don't even have time to read  
> my email :-)
>
>    Barry
>
>
>
> On Mon, 10 Sep 2007, mspieg wrote:
>
>> Apologies if this is obvious,  but is there a clean way to dump  
>> out SNES
>> residuals (and or updates) (inside a DMMG) as binary vectors for  
>> debugging.
>>
>>
>> I'm currently using
>>
>> -snes_monitor_residual
>>
>> which is lovely for visualizing the residuals but uses VecView  
>> with the
>> default Viewer set to draw and it would be useful to have a  
>> command line
>> option to change the viewer type to binary (if it doesn't already  
>> exist)
>>
>> I can certainly use  SNESMonitorSet with a custom monitor that  
>> sets up a
>> binary viewer for SNESMonitorResidual, but I'm being lazy.
>>
>> Any and all help greatly appreciated.
>>
>> cheers
>> marc
>>
>>
>>
>> ----------------------------------------------------
>> Marc Spiegelman
>> Lamont-Doherty Earth Observatory
>> Dept. of Applied Physics/Applied Math
>> Columbia University
>> http://www.ldeo.columbia.edu/~mspieg
>> ----------------------------------------------------
>>
>>

----------------------------------------------------
Marc Spiegelman
Lamont-Doherty Earth Observatory
Dept. of Applied Physics/Applied Math
Columbia University
http://www.ldeo.columbia.edu/~mspieg
----------------------------------------------------


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20070910/0f41f70e/attachment.htm>


More information about the petsc-users mailing list