[petsc-dev] Example cleanup
Matthew Knepley
knepley at gmail.com
Sun Feb 10 08:40:25 CST 2013
On Sun, Feb 10, 2013 at 1:05 AM, Jed Brown <jedbrown at mcs.anl.gov> wrote:
>
> 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?
>
Does the Bear(y) shit in the woods?
> 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.
>
The phrase "may as well" is very slippery. Python arrays are just [x, y,
z], whereas JSON needs a library.
However, the format is is now way crucial to the scheme. I want to get the
workflow up an running with
the simplest format. We will inevitably tweak it was we add tons of crap on
top if it works.
Matt
--
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20130210/092a0fef/attachment.html>
More information about the petsc-dev
mailing list