On Mon, Sep 17, 2012 at 9:36 AM, Jed Brown <span dir="ltr"><<a href="mailto:jedbrown@mcs.anl.gov" target="_blank">jedbrown@mcs.anl.gov</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="gmail_quote"><div class="im">On Mon, Sep 17, 2012 at 9:08 AM, 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">

<div> How do you map the loops in some of the shell scripts in the makefiles?<br></div></blockquote><div><br></div></div><div>Not all the loop constructs are parsed now, but I can add that in an hour or so. It'll look like</div>

<div><br></div><div>with Executable('ex19.c'):</div><div>  for mtype in 'aij baij sbaij'.split():</div><div>    for vecscatter in 'rsend ssend alltoall'.split():</div><div>      Test(id=('thename', mtype, vecscatter), args='-mat_type %s -vecscatter_%s' % (mtype,vecscatter), compare='ex19_thename')</div>
</div></blockquote><div><br></div><div>This cannot yet do what I need for ex62. I have a 'setup' directive that executes code before the test. I like</div><div>this done for sets of tests to save time.</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 class="gmail_quote"><div>This registers "separate tests" for each, but they all compare against the same reference output. We can then run this group by globbing</div>
<div><br></div><div>./ptest.py test 'ex19_thename_*'</div>
<div><br></div><div>or a single one by</div><div><br></div><div>./ptest.py test ex19_thename_baij_ssend</div><div class="im"><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div><div>
<br>
</div>    Where are your magic scripts?<br></div></blockquote><div><br></div></div><div>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).</div>
<div class="im">
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>
    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.</div>

</blockquote></div></div><br><div>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.</div>

</blockquote></div><br><br clear="all"><div><br></div>-- <br>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<br>