[petsc-dev] plans for testing examples?

Jed Brown jedbrown at mcs.anl.gov
Mon Sep 17 11:03:23 CDT 2012


On Mon, Sep 17, 2012 at 10:35 AM, Barry Smith <bsmith at mcs.anl.gov> wrote:

>  Almost there. We need a unique way of mapping from each test to a unique
> key that can be used to look in your big old output database.  It would be
> best if this key came automatically, unfortunately the command line options
> are not unique to a run and if we did a hash on the source code that would
> change with every trivial change to the source code.  I don't want to use
> the filename and or directory name because that makes moving examples
> around more painful.  Hash the help string AND the command line options
> together is that close enough to unique?
>

The problem is that different command line options _intentionally_ produce
the same output. The SHA1 is intended to be unique identification of the
output, not unique identification of the input. Simply hashing the output
file is an easy way to do that.

Note also that command line options occasionally change while doing exactly
the same thing. I think explicit listing of the output SHA1 is a reasonable
thing. It's very similar to the problem we have of uniquely identifying
commits with distributed SCM.

Note that the object store I'm describing is basically the same as Git's
object store, where the "pointers" into it are stored in our source code.

http://git-scm.com/book/en/Git-Internals-Git-Objects

Note that any object not currently pointed at becomes eligible for garbage
collection.


>
>    Note also: in the same place in the example code we provide the "chunk
> of python for registering tests" we can provide a "chunk of python to
> register information about the example": what dimension, what equation,
> what type of solver (TS, SNES, KSP) what type of DM etc thus generate
> automatically a decent searchable database of examples.
>

Yes


>  By using "a chunk of python" rather than defining some "doctext" language
> we can avoid any need to parse.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20120917/a538b938/attachment.html>


More information about the petsc-dev mailing list