<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Jan 17, 2017 at 4:19 PM, Matthew Knepley <span dir="ltr"><<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span class="">On Fri, Jan 13, 2017 at 4:16 PM, Barry Smith <span dir="ltr"><<a href="mailto:bsmith@mcs.anl.gov" target="_blank">bsmith@mcs.anl.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
   PETSc developers,<br>
<br>
     Scott Kruger has been implementing a new "test harness" for PETSc. Rather than having tests implemented as bash lines in the makefiles, the tests will be defined within the source code for each example with a simple format and the actual scripts that run the tests will be automatically generated. This offers three advantages over the current system<br>
<br>
1) test definitions can be given in a very concise format that is independent of how the test is run<br>
2) multiple approaches to actually running the tests can be implemented without requiring any changes to the test definitions for each example.<br>
3) the tests can be compiled and run in parallel (eventually we hope to see much faster times for testing).<br>
<br>
   Here is an example of the format that defines tests<br>
<br>
     test:<br>
<br>
   test:<br>
      suffix: yaml<br>
      requires: yaml !complex<br>
      args: -options_file_yaml bag.yml -options_view<br>
      filter:  grep -v saws_port_auto_select<br>
      localrunfiles: bag.yml<br></blockquote><div><br></div></span><div>How do I specify the number of processes to use for the test? Or where would I look this up?</div></div></div></div></blockquote><div><br></div><div>Also, how do I put comments inside these blocks to tell me what the test is about?</div><div><br></div><div>   Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>  Thanks,</div><div><br></div><div>     Matt</div><span class=""><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
The first is a test that takes no command line arguments and does no filtering of output. The second takes command line arguments, does some filtering of the output and this example also requires a data file associated with that example.  The expected output of tests continues to reside in the output directory with the previously naming convention of XXX_1.out XXX_2.out where XXX is the name of the example or XXX_suffix.out where suffix is defined in the test definition.<br>
<br>
  So far in the master branch we have only converted over two directories of examples sys/examples/tutorials and sys/examples/tests so you can look in those directories for other examples. Over the next few weeks we hope to convert over all the rest of the directories.<br>
<br>
  Special thanks to Scott, Satish, and Jed for all the work they have done to set up the new test harness.<br>
<br>
   Barry<br>
<br>
   Technical details: the new python script ./config/gmakegentest.py which is normally automatically run at configure walks through the examples directories looking for the formatted test definitions, for each test it generates in the directory $PETSC_ARCH/test/src/XXX/examp<wbr>les/tests or tutorials/ a shell script that can run that test. In addition config/gmakegentest.py  adds dependencies to the $PETSC_DIR/gmakefile for all the tests that it has found. The rule make alltests then executes all those dependencies.<br>
<br>
   We will be refining both the testing harness and the test definitions as we convert the rest of the examples over to the new approach.<br>
<br>
<br>
<br>
<br>
<br>
</blockquote></span></div><span class="HOEnZb"><font color="#888888"><br><br clear="all"><div><br></div>-- <br><div class="m_-765113248844234632gmail_signature" data-smartmail="gmail_signature">What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener</div>
</font></span></div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener</div>
</div></div>