[petsc-dev] plans for testing examples?

Matthew Knepley knepley at gmail.com
Mon Sep 17 09:48:30 CDT 2012


On Mon, Sep 17, 2012 at 9:36 AM, Jed Brown <jedbrown at mcs.anl.gov> wrote:

> On Mon, Sep 17, 2012 at 9:08 AM, Barry Smith <bsmith at mcs.anl.gov> wrote:
>
>>  How do you map the loops in some of the shell scripts in the makefiles?
>>
>
> Not all the loop constructs are parsed now, but I can add that in an hour
> or so. It'll look like
>
> with Executable('ex19.c'):
>   for mtype in 'aij baij sbaij'.split():
>     for vecscatter in 'rsend ssend alltoall'.split():
>       Test(id=('thename', mtype, vecscatter), args='-mat_type %s
> -vecscatter_%s' % (mtype,vecscatter), compare='ex19_thename')
>

This cannot yet do what I need for ex62. I have a 'setup' directive that
executes code before the test. I like
this done for sets of tests to save time.

  Matt


> This registers "separate tests" for each, but they all compare against the
> same reference output. We can then run this group by globbing
>
> ./ptest.py test 'ex19_thename_*'
>
> or a single one by
>
> ./ptest.py test ex19_thename_baij_ssend
>
>
>>     Where are your magic scripts?
>>
>
> I was just mirroring the makefiles, so src/ts/examples/tutorials/makefile
> was parsed and converted to src/ts/examples/tutorials/ptest.py (not a great
> name since it also says how to build executables).
>
>
>>     What if I proposed moving the Test(id='2', args='-da_grid_x 20
>> -da_grid_y 20 -boundary 0 -ts_max_steps 10 -Jtype 2', compare='ex15_1')
>> type data into the examples and generating the makefiles for the example
>> directories automatically?  Then we'd have one set of scripts that could
>> scarf info from the examples and it would put it into several formats.
>>
>
> We could do this, but (especially if we are making something for users),
> there can be different ways to link based on configuration tests. Also,
> applications may use many sources. Putting that information inside whatever
> file contains main() is clutter, in my opinion, and harder to see what is
> going on. Of course the code that figures out what needs to be done (by
> looking in all the various places) could have nice output of what was
> happening and why, but I think it's no simpler.
>



-- 
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/20120917/486dfeca/attachment.html>


More information about the petsc-dev mailing list