Megatest

Diff
Login

Differences From Artifact [11cb03643b]:

To Artifact [7c208fddee]:


376
377
378
379
380
381
382
383
384


385
386
387
388
389
390
391
376
377
378
379
380
381
382


383
384
385
386
387
388
389
390
391







-
-
+
+







</div>
<h2 class="Section">
<a class="toc" name="toc-Section-3.2">3.2</a> Simple Test with Multiple Steps 
</h2>
<div class="Unindented">
To run multiple steps simply add them to the main.csh file. Here we add a step to test “cpu2”. The second step that tests cpu2 will only run after the step that tested “cpu1” completes.
</div>
<div class="Indented">
<div class="listing">
<div class="Paragraph">
<a class="toc" name="toc-Paragraph-9"></a><div class="listing">
<pre class="listing">#!/bin/tcsh -x
​
# run the cpu1 simulation.
#   The step name is "run_simulation"
#   The commandline being run for this step is "runsim cpu1"
#   The logpro file to validate the output from the run is "runsim.logpro"
​
401
402
403
404
405
406
407
408

409
410
411
412
413
414
415
401
402
403
404
405
406
407

408
409
410
411
412
413
414
415







-
+







<h3 class="Subsection">
<a class="toc" name="toc-Subsection-3.3.1">3.3.1</a> The Makefile
</h3>
<div class="Unindented">
A good way to run steps in parallel within a single test, especially when there are following steps, is to use the Unix Make utility. Writing Makefiles is beyond the scope of this document but here is a minimal example that will run “runsim cpu1” and “runsim cpu2” in parallel. For more information on make try “info make” at the Linux command prompt.
</div>
<div class="Paragraph">
<a class="toc" name="toc-Paragraph-9"></a><div class="listing">
<a class="toc" name="toc-Paragraph-10"></a><div class="listing">
<pre class="listing"># Example Makefile to run two steps in parallel
​
RTLDIR=/path/to/rtl
CPUS = cpu1 cpu2
​
run_simulation_$(CPUS).html : $(RTLDIR)/$(CPUS)
	$(MEGATEST) -runstep run_simulation_$(CPUS) -logpro runsim.logpro "runsim $(CPUS)
438
439
440
441
442
443
444
445

446
447
448
449
450
451
452
453
454
455
456
457
458
459

460
461
462
463
464
465
466
438
439
440
441
442
443
444

445
446
447
448
449
450
451
452
453
454
455
456
457
458

459
460
461
462
463
464
465
466







-
+













-
+







<div class="Unindented">
Since no jobs run after the cpu1 and cpu2 simulations in this test it is possible to use iterated mode.
</div>
<h3 class="Subsection">
<a class="toc" name="toc-Subsection-3.4.1">3.4.1</a> Update you testconfig file for iteration
</h3>
<div class="Paragraph">
<a class="toc" name="toc-Paragraph-10"></a><div class="listing">
<a class="toc" name="toc-Paragraph-11"></a><div class="listing">
<pre class="listing">[setup]
runscript main.csh
​
[items]
CPU cpu1 cpu2
</pre>
</div>

</div>
<h3 class="Subsection">
<a class="toc" name="toc-Subsection-3.4.2">3.4.2</a> Rewrite your main.csh for iteration
</h3>
<div class="Paragraph">
<a class="toc" name="toc-Paragraph-11"></a><div class="listing">
<a class="toc" name="toc-Paragraph-12"></a><div class="listing">
<pre class="listing">#!/bin/tcsh -x
​
# run the cpu simulation but now use the environment variable $CPU
# to select what cpu to run the simulation against
​
$MEGATEST -runstep run_simulation -logpro runsim.logpro "runsim $CPU"
</pre>
1379
1380
1381
1382
1383
1384
1385
1386

1387
1388
1389
1390
1379
1380
1381
1382
1383
1384
1385

1386
1387
1388
1389
1390







-
+





</table>

</div>

<hr class="footer"/>
<div class="footer" id="generated-by">
Document generated by <a href="http://elyxer.nongnu.org/">eLyXer 1.0.0 (2010-07-21)</a> on <span class="create-date">2011-05-16T23:57:12.951749</span>
Document generated by <a href="http://elyxer.nongnu.org/">eLyXer 1.0.0 (2010-07-21)</a> on <span class="create-date">2011-05-16T23:58:44.766440</span>
</div>
</div>
</body>
</html>