[petsc-dev] plans for testing examples?
Jed Brown
jedbrown at mcs.anl.gov
Mon Sep 17 10:01:09 CDT 2012
On Mon, Sep 17, 2012 at 9:48 AM, Matthew Knepley <knepley at gmail.com> wrote:
> 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.
>
I would create a setup object and refer to it.
with Executable('ex62.c'):
quadrature = dict()
for dim in 1 2 3:
for order in 1 2 3 4:
quadrature[(dim,order)] = GeneratedFile('ex62.h',
command=[os.path.join(petsc_dir,'bin','pythonscripts','PetscGenerateFEMQuadrature.py'),
...])
Test(..., requires=quadrature(2,3))
# ... more tests, sharing one or more generated files
Each test, or group of tests, will normally be run in its own private
temporary directory. A sequence of tests sharing the same dependencies can
reuse the generated file, but if you test with -j48, members of the same
group may be executing concurrently.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20120917/7a965a8a/attachment.html>
More information about the petsc-dev
mailing list