[petsc-dev] Example cleanup

Jed Brown jedbrown at mcs.anl.gov
Sun Feb 10 00:05:07 CST 2013


On Sat, Feb 9, 2013 at 8:04 PM, Matthew Knepley <knepley at gmail.com> wrote:
>
> What's your plan for implementing this?
>>
>
> My plan was to try the easiest thing I could think of first:
>
>   a) Make a replacement monitor for SNES and KSP
>
>       It would have a big honking sentinel before each solve and
> iterations in Python array format
>
>   b) Run a braindead Python parser over this which snips out the monitors
>
>   c) Diff the monitor sections with a numerical tolerance
>
>   d) Diff the whole thing, and throw out differences in the monitor
> sections, since we know the line numbers.
>       Maybe it would be easier to just remove those lines, but we need to
> experiment a little.
>

Okay, so this would all be implemented in C?

If you want Python array format, you may as well use JSON since it's more
of an exchange standard and it's the most convenient format for monitoring
in a web-based GUI. There are a bunch of good JSON libraries, ranging from
the ultra-compact http://zserge.bitbucket.org/jsmn.html and
http://ccodearchive.net/info/json.html, to the object-oriented
http://www.digip.org/jansson/doc/dev/tutorial.html.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20130210/e4dd2b8a/attachment.html>


More information about the petsc-dev mailing list