[Swift-commit] r8447 - www/Swift-T

ketan at ci.uchicago.edu ketan at ci.uchicago.edu
Mon May 4 11:00:51 CDT 2015


Author: ketan
Date: 2015-05-04 11:00:50 -0500 (Mon, 04 May 2015)
New Revision: 8447

Modified:
   www/Swift-T/turbine-sites.html
Log:
improve documentation

Modified: www/Swift-T/turbine-sites.html
===================================================================
--- www/Swift-T/turbine-sites.html	2015-05-02 02:37:28 UTC (rev 8446)
+++ www/Swift-T/turbine-sites.html	2015-05-04 16:00:50 UTC (rev 8447)
@@ -2352,7 +2352,7 @@
 <h3 id="_edison">Edison</h3>
 <div class="paragraph"><p>Edison is a Cray XC30 system at NERSC.</p></div>
 <div class="sect3">
-<h4 id="_install_setup">Install setup</h4>
+<h4 id="_build_procedure_13">Build Procedure</h4>
 <div class="paragraph"><p>Load (and unload) appropriate modules:</p></div>
 <div class="listingblock">
 <div class="content">
@@ -2415,7 +2415,7 @@
 </div>
 <div class="sect3">
 <h4 id="_a_simple_script">A simple script</h4>
-<div class="paragraph"><p>Now let us try to compile and run a simple Swift/T script over Edison Compute nodes. Following is a simple "Hello World!" script:</p></div>
+<div class="paragraph"><p>To compile and run a simple Swift/T script over Edison Compute nodes. Following is a simple "Hello World!" script:</p></div>
 <div class="listingblock">
 <div class="content">
 <pre><code>/**
@@ -2434,7 +2434,15 @@
 <div class="content">
 <pre><code>swift-t -m "cray" hello.swift</code></pre>
 </div></div>
-<div class="paragraph"><p>An intermediate TCL (.tic) file will be generated on successful compilation.
+<div class="admonitionblock">
+<table><tr>
+<td class="icon">
+<div class="title">Note</div>
+</td>
+<td class="content">The -m flag determines the machine type: "cray", "pbs", "cobalt", etc.</td>
+</tr></table>
+</div>
+<div class="paragraph"><p>A Turbine Intermediate Code (.tic) file will be generated on successful compilation.
 The <code>swift-t</code> command builds a job specification script and submits it to the
 scheduler:</p></div>
 <div class="paragraph"><p>Output from the above command will be similar to the following:</p></div>
@@ -2454,7 +2462,7 @@
 <div class="paragraph"><p>Inspect the results with:</p></div>
 <div class="listingblock">
 <div class="content">
-<pre><code>cat /global/homes/k/ketan/turbine-output/2015/04/30/09/09/53/output.txt.2816478.edique02.out</code></pre>
+<pre><code>cat $TURBINE_OUTPUT/output.txt.2816478.edique02.out</code></pre>
 </div></div>
 <div class="paragraph"><p>The following will be the contents:</p></div>
 <div class="listingblock">
@@ -2479,12 +2487,15 @@
 <div class="listingblock">
 <div class="content">
 <pre><code>import files;
+import string;
 
 app (file out) cat (file inputs[]) {
   "/bin/cat" inputs @stdout=out
 }
 
-file joined <"joined.txt"> = cat(glob("*.txt"));</code></pre>
+foreach i in [0:9]{
+  file joined<sprintf("joined%i.txt", i)> = cat(glob("*.txt"));
+}</code></pre>
 </div></div>
 <div class="paragraph"><p>Save the above script as <code>catsn.swift</code>.</p></div>
 <div class="paragraph"><p>Prepare input files as:</p></div>
@@ -2494,24 +2505,15 @@
 echo "contents of b.txt">b.txt
 echo "contents of c.txt">c.txt</code></pre>
 </div></div>
-<div class="paragraph"><p>Prepare a prerun script as:</p></div>
+<div class="paragraph"><p>Set TURBINE_OUTPUT to current directory:</p></div>
 <div class="listingblock">
 <div class="content">
-<pre><code>#!/bin/bash
-
-cp *.txt $TURBINE_OUTPUT/</code></pre>
+<pre><code>export TURBINE_OUTPUT=$PWD</code></pre>
 </div></div>
-<div class="paragraph"><p>Make sure to set executable permissions for the <code>prerun.sh</code> script:</p></div>
-<div class="listingblock">
-<div class="content">
-<pre><code>chmod 755 prerun.sh</code></pre>
-</div></div>
-<div class="paragraph"><p>The prerun script makes sure that the input txt files are available in the
-working directory ($TURBINE_OUTPUT) at runtime.</p></div>
 <div class="paragraph"><p>Run the script as:</p></div>
 <div class="listingblock">
 <div class="content">
-<pre><code>swift-t -t i:./prerun.sh -m "cray" catsn.swift</code></pre>
+<pre><code>swift-t -m "cray" catsn.swift</code></pre>
 </div></div>
 <div class="paragraph"><p>On successful compilation and job submission, the following output will be produced:</p></div>
 <div class="listingblock">
@@ -2527,10 +2529,10 @@
 wrote: /global/homes/k/ketan/turbine-output/2015/05/01/09/44/14/turbine-cray.sh
 JOB_ID=2821464.edique02</code></pre>
 </div></div>
-<div class="paragraph"><p>Inspect the output file <code>joined.txt</code> produced in the $TURBINE_OUTPUT directory:</p></div>
+<div class="paragraph"><p>Inspect one of the output files <code>joined<n>.txt</code> produced in the $TURBINE_OUTPUT directory:</p></div>
 <div class="listingblock">
 <div class="content">
-<pre><code>cat $TURBINE_OUTPUT/joined.txt</code></pre>
+<pre><code>cat $TURBINE_OUTPUT/joined4.txt</code></pre>
 </div></div>
 </div>
 </div>
@@ -2660,7 +2662,7 @@
 <div id="footer">
 <div id="footer-text">
 Version 0.8.0<br />
-Last updated 2015-05-01 21:36:54 CDT
+Last updated 2015-05-04 10:58:39 CDT
 </div>
 </div>
 </body>




More information about the Swift-commit mailing list