[petsc-dev] nightlybuilds (next vs next-tmp)

Scott Kruger kruger at txcorp.com
Thu Nov 16 14:45:23 CST 2017



On 11/15/17 8:48 PM, Smith, Barry F. wrote:
> 
> 

>>
>> For those of us who have no idea how to do this, could someone please give me a pointer or two on where to look for an example or two or some documentation? I should probably be spending a few minutes a day converting some examples, but I don't know how or where to start.
>>
>> There is a manual chapter on the test system, but for cut & paste semantics, you can look at SNES which has a lot of converted examples.
>> Basically, you take each test entry from the makefile, and move it into the source file itself.
> 
>    Richard,
> 
>     Scott wrote a tool to semi-automatically do it from the makefile but sadly the tool is currently broken (it had no nightly testing) and like most python code is undebuggable. 


I think it's still useful just to generate some boilerplate to get
you going, but yes, you should not expect it to work.  And it's just
not that it wasn't tested, it's that a lot of requested features
were close to impossible for translation without me learning
more about NLP :-)

For example:
cd src/ksp/ksp/examples/tutorials
$PETSC_DIR/bin/maint/convertExamples.py -s $PWD

There will be a bunch of new_ex*.
files.  You can then copy over those tests
and start editing (start with test -> testset).
It will at least get your editing going, but
a lot of tests can/should be merged, for loop
syntax is wrong, etc.

src/ksp/ksp/examples/tutorials/ex10.c
is what I used in my own development of requested
features so is also an examplar.


  Anyways  after you have put a test in the example source code manually 
as Matt says, you run from PETSC_DIR
> 
>      ./config/gmakegentest.py
> 
> this parses all the examples and sets up the scripts that are run to do the testing. Then use, for example,
> 
>    make -f gmakefile test globsearch='*heat*'
> 
> to run all tests that have heat in the example name or path. Or you can do
> 
> 
>    make -f gmakefile test globsearch='dm*'
> 
> to run all tests in the dm directories. Sometimes you need a little trial and error to get the globsearch right to run your example and not others.


I usually do this:

make -f gmakefile print-test globsearch='dm*'

Then, when the tests printed out match the search I want, I edit the 
command line to change print-test to test.

> 
> You will get a little frustrated the first couple times you do it, just bug us and we'll help you get past the stumbling blocks.


After editting a file, it's good just to test the parsing to make
sure you do not have errors (it's YAML format -- easy to get
something wrong).

For example, in ksp/ksp/examples/tutorials:
$PETSC_DIR/config/testparse.py -t ex10.c -v1

testparse.py is the parser used by gmakegentest.py
so if it passes without error, at least you have that
part correct.


Scott



>>
>>    Matt
>>   
>> --Richard
>>
>>
>>
>>>
>>>     Matt
>>>
>>> All logs record time. And Karl's script summarizes those times on the
>>> dashboard. For eg:
>>>
>>> http://ftp.mcs.anl.gov/pub/petsc/nightlylogs/archive/2017/11/11/maint.html
>>>
>>> If you want to do some analysis on those times - you can grab the
>>> [historical] logs and run the required analysis.
>>>
>>> Satish
>>>
>>>
>>>
>>> --
>>> 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
>>>
>>> https://www.cse.buffalo.edu/~knepley/
>>
>>
>>
>>
>>
>> -- 
>> 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
>>
>> https://www.cse.buffalo.edu/~knepley/
> 

-- 
Tech-X Corporation               kruger at txcorp.com
5621 Arapahoe Ave, Suite A       Phone: (720) 974-1841
Boulder, CO 80303                Fax:   (303) 448-7756


More information about the petsc-dev mailing list