<div class="gmail_quote">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 id=":2g5"> How do you map the loops in some of the shell scripts in the makefiles?<br></div></blockquote><div><br></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><br></div><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><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div id=":2g5"><div class="im">
<br>
</div> Where are your magic scripts?<br></div></blockquote><div><br></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> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div id=":2g5">
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><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>