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

ketan at ci.uchicago.edu ketan at ci.uchicago.edu
Fri May 1 21:23:02 CDT 2015


Author: ketan
Date: 2015-05-01 21:23:01 -0500 (Fri, 01 May 2015)
New Revision: 8445

Modified:
   www/Swift-T/turbine-sites.html
Log:
Edison example

Modified: www/Swift-T/turbine-sites.html
===================================================================
--- www/Swift-T/turbine-sites.html	2015-04-30 17:14:36 UTC (rev 8444)
+++ www/Swift-T/turbine-sites.html	2015-05-02 02:23:01 UTC (rev 8445)
@@ -2353,7 +2353,7 @@
 <div class="paragraph"><p>Edison is a Cray XC30 system at NERSC.</p></div>
 <div class="sect3">
 <h4 id="_install_setup">Install setup</h4>
-<div class="paragraph"><p>Load appropriate modules:</p></div>
+<div class="paragraph"><p>Load (and unload) appropriate modules:</p></div>
 <div class="listingblock">
 <div class="content">
 <pre><code>module unload PrgEnv-intel darshan cray-shmem
@@ -2370,7 +2370,7 @@
 <div class="listingblock">
 <div class="content">
 <pre><code>cd $SCRATCH/exm-0.8.0/c-utils
-./configure --enable-shared --prefix=/scratch2/scratchdirs/ketan/exm-install/c-utils
+./configure --enable-shared --prefix=$SCRATCH/exm-install/c-utils
 make && make install</code></pre>
 </div></div>
 <div class="paragraph"><p>Install adlb:</p></div>
@@ -2386,8 +2386,8 @@
 <div class="listingblock">
 <div class="content">
 <pre><code>cd $SCRATCH/exm-0.8.0/turbine
-./configure --with-adlb=/scratch2/scratchdirs/ketan/exm-install/lb --with-c-utils=/scratch2/scratchdirs/ketan/exm-install/c-utils \
---prefix=/scratch2/scratchdirs/ketan/exm-install/turbine --with-tcl=/global/homes/k/ketan/tcl-install --with-tcl-version=8.6 \
+./configure --with-adlb=$SCRATCH/exm-install/lb --with-c-utils=$SCRATCH/exm-install/c-utils \
+--prefix=$SCRATCH/exm-install/turbine --with-tcl=/global/homes/k/ketan/tcl-install --with-tcl-version=8.6 \
 --with-mpi=/opt/cray/mpt/default/gni/mpich2-gnu/49
 make && make install</code></pre>
 </div></div>
@@ -2395,7 +2395,7 @@
 <div class="listingblock">
 <div class="content">
 <pre><code>cd $SCRATCH/exm-0.8.0/stc
-ant install -Ddist.dir=/scratch2/scratchdirs/ketan/exm-install/stc -Dturbine.home=/scratch2/scratchdirs/ketan/exm-install/turbine</code></pre>
+ant install -Ddist.dir=$SCRATCH/exm-install/stc -Dturbine.home=$SCRATCH/exm-install/turbine</code></pre>
 </div></div>
 </div>
 <div class="sect3">
@@ -2406,6 +2406,12 @@
 <pre><code>export PATH=$PATH:$SCRATCH/exm-install/stc/bin:$SCRATCH/exm-install/turbine/bin:$SCRATCH/exm-install/turbine/scripts/submit/cray
 source ~/.bash.ext</code></pre>
 </div></div>
+<div class="paragraph"><p>Note that with Swift installed as a module, the above steps will disappear and the only step needed will be to load the module:</p></div>
+<div class="listingblock">
+<div class="content">
+<pre><code>module load swift-t
+module load swift-k</code></pre>
+</div></div>
 </div>
 <div class="sect3">
 <h4 id="_a_simple_script">A simple script</h4>
@@ -2423,16 +2429,14 @@
   printf("Hello world!");
 }</code></pre>
 </div></div>
-<div class="paragraph"><p>Compile the above script using stc:</p></div>
+<div class="paragraph"><p>Compile and run the above script using <code>swift-t</code>:</p></div>
 <div class="listingblock">
 <div class="content">
-<pre><code>stc hello.swift</code></pre>
+<pre><code>swift-t -m "cray" hello.swift</code></pre>
 </div></div>
-<div class="paragraph"><p>A TCL (.tic) file will be generated on successful compilation. Run the generated TCL file using turbine-cray submit script:</p></div>
-<div class="listingblock">
-<div class="content">
-<pre><code>turbine-cray-run.zsh -n 2 hello.tic</code></pre>
-</div></div>
+<div class="paragraph"><p>An intermediate TCL (.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>
 <div class="listingblock">
 <div class="content">
@@ -2469,9 +2473,69 @@
 Application 12141240 resources: utime ~0s, stime ~0s, Rss ~118364, inblocks ~2287, outblocks ~50</code></pre>
 </div></div>
 </div>
+<div class="sect3">
+<h4 id="_a_second_example">A second example</h4>
+<div class="paragraph"><p>The following example joins multiple files using the Unix <code>cat</code> utility:</p></div>
+<div class="listingblock">
+<div class="content">
+<pre><code>import files;
+
+app (file out) cat (file inputs[]) {
+  "/bin/cat" inputs @stdout=out
+}
+
+file joined <"joined.txt"> = 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>
+<div class="listingblock">
+<div class="content">
+<pre><code>echo "contents of a.txt">a.txt
+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="listingblock">
+<div class="content">
+<pre><code>#!/bin/bash
+
+cp *.txt $TURBINE_OUTPUT/</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>
+</div></div>
+<div class="paragraph"><p>On successful compilation and job submission, the following output will be produced:</p></div>
+<div class="listingblock">
+<div class="content">
+<pre><code>TURBINE_OUTPUT=/global/homes/k/ketan/turbine-output/2015/05/01/09/44/14
+`./swift-t-catsn.Tgs.tic' -> `/global/homes/k/ketan/turbine-output/2015/05/01/09/44/14/swift-t-catsn.Tgs.tic'
+SCRIPT=./swift-t-catsn.Tgs.tic
+PPN=1
+TURBINE_OUTPUT=/global/homes/k/ketan/turbine-output/2015/05/01/09/44/14
+WALLTIME=00:15:00
+PROCS=2
+NODES=2
+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="listingblock">
+<div class="content">
+<pre><code>cat $TURBINE_OUTPUT/joined.txt</code></pre>
+</div></div>
 </div>
 </div>
 </div>
+</div>
 <div class="sect1">
 <h2 id="_cloud">Cloud</h2>
 <div class="sectionbody">
@@ -2596,7 +2660,7 @@
 <div id="footer">
 <div id="footer-text">
 Version 0.8.0<br />
-Last updated 2015-04-30 11:17:06 CDT
+Last updated 2015-05-01 21:19:26 CDT
 </div>
 </div>
 </body>




More information about the Swift-commit mailing list