[petsc-dev] Regression tests

Matthew Knepley knepley at gmail.com
Thu Jul 26 11:37:03 CDT 2012


On Thu, Jul 26, 2012 at 11:32 AM, Jed Brown <jedbrown at mcs.anl.gov> wrote:

> On Thu, Jul 26, 2012 at 11:08 AM, Satish Balay <balay at mcs.anl.gov> wrote:
>
>> I think python is fine - as long as the run targets still remain in
>> the makefile.
>>
>> Are you saying each 'run' target in the makefile will be tagged - and
>> the python script will parse this tag?
>>
>
> I meant getting them out of the makefile so we can declare the test in
> Python. An example syntax would be
>
> test.py:
> from Petsc.Test import InModule, Exec, Test, Main
>
> with Exec(sources='ex19.c'): # ex19 inferred from name, could specify
> explicitly
>   Test('fas', np=8, args='-snes_type fas -snes_monitor_draw', requires='X')
>
> if __name__ == '__main__': Main()
>
> The Test() declaration would register itself as being associated with
> ex19.c. We can add keywords to create batches. The output file is inferred
> from the test name, so here we would compare with output/ex19_fas.out. This
> should allow
>
> ./test.py build ex19
>
> ./test.py check ex19_fas
>
> ./test.py check ex19_\* # run all the ex19 tests
>
> ./test.py check -n 16 --if '(X || Fortran) && !Complex'
>
> The last line would mean to run all tests requiring X or Fortran, but not
> complex, using up to 16 MPI processes total.
>
> We could preserve "make runex19_fas" in the transition period, but I'd
> like to be able to do everything from test.py.
>

builder already does all of this, and more stuff for code generation.

   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/20120726/cbed2fb5/attachment.html>


More information about the petsc-dev mailing list