[Swift-commit] r6808 - SwiftApps/Scattering/paintgrid/docs

davidk at ci.uchicago.edu davidk at ci.uchicago.edu
Thu Aug 8 15:01:02 CDT 2013


Author: davidk
Date: 2013-08-08 15:01:02 -0500 (Thu, 08 Aug 2013)
New Revision: 6808

Modified:
   SwiftApps/Scattering/paintgrid/docs/README
   SwiftApps/Scattering/paintgrid/docs/tutorial.html
Log:
How to run on different sites


Modified: SwiftApps/Scattering/paintgrid/docs/README
===================================================================
--- SwiftApps/Scattering/paintgrid/docs/README	2013-08-08 19:43:57 UTC (rev 6807)
+++ SwiftApps/Scattering/paintgrid/docs/README	2013-08-08 20:01:02 UTC (rev 6808)
@@ -164,5 +164,57 @@
 } 
 -----
 
+There are several command line options you can pass to the swift script to
+define how it runs. Below is a list of arguments and a description of what they
+do.
+
+.paintgrid.swift arguments
+[options="header"]
+|==========================
+|Parameter       |Description
+|-params=file    |Name of params file to use. Defaults to genpoints.params.
+|-image=file     |Name of image file to analyze. Defaults to data.0001.tiny.
+|-runTime=seconds|Sleep time value for processPoints.py (floating point seconds)
+|==========================
+
+NOTE: Command line arguments to swift scripts must come after the name of the
+script. For example: swift paintgrid.swift -params=myfile -image=myimage
+
 How to run
 ----------
+The following steps will explain how to run paintgrid.swift on different sites.
+
+Localhost
+~~~~~~~~~
+The paintgrid.swift script can run locally on a laptop, desktop, or on the 
+head node of a cluster. In order to avoid overloading a single machine, the
+localhost configuration is set up to run only 1 job at a time.
+
+To run:
+-----
+$ swift paintgrid.swift                         # Default values 
+$ swift paintgrid.swift -params=onepoint.params # To use a specific parameter file 
+-----
+
+Orthros
+~~~~~~~
+To run paintgrid.swift on the Orthros cluster, you must point Swift to an xml
+file that describes information about the scheduler.
+
+To run:
+-----
+$ swift -sites.file orthros.xml paintgrid.swift                       # Default values
+$ swift -sites.file orthros.xml paintgrid.swift -image=data.0001.tif  # To specify an image
+-----
+
+Beagle
+~~~~~~
+To run on Beagle, you must run another step that configures an SSH tunnel.
+
+To run:
+-----
+$ ./start-beagle
+$ swift -sites.file beagle.xml paintgrid.swift              # Default values 
+$ swift -sites.file beagle.xml paintgrid.swift -runTime=1   # A 1 second sleep time for processPoints.py
+$ ./stop-beagle
+-----

Modified: SwiftApps/Scattering/paintgrid/docs/tutorial.html
===================================================================
--- SwiftApps/Scattering/paintgrid/docs/tutorial.html	2013-08-08 19:43:57 UTC (rev 6807)
+++ SwiftApps/Scattering/paintgrid/docs/tutorial.html	2013-08-08 20:01:02 UTC (rev 6808)
@@ -782,14 +782,64 @@
 <div class="paragraph"><p><span class="image">
 <img src="paintGrid.png" alt="paintGrid.png" />
 </span></p></div>
-<div class="paragraph"><p>swift -tc.file apps -sites.file amd.xml paintgrid.swift -runDir=$PWD -params=genpoints.params -image=data.0001.tiny</p></div>
+<div class="paragraph"><p>The paintgrid Swift script first runs genPoints.py to create a list of point
+files. The processpoints.py script is then run for each of the point files that
+genPoints.py creates. Below is the paintgrid.swift script.</p></div>
+<div class="listingblock">
+<div class="content">
+<pre><tt>type file;
+
+# External app to generate sets of input data points
+
+app (file plist) genPoints (file pyscript, file paramFile)
+{
+  local_python @pyscript @paramFile runDir stdout=@plist;
+}
+
+# External app to process a set of data points (a mockup of paintGrid)
+
+app (file ofile) processPoints (file pyscript, file imageFile, file points)
+{
+  python @pyscript @imageFile @points runTime stdout=@ofile;
+}
+
+# The actual python scripts for the app() functions above
+
+file genPoints_script     <"genpoints.py">;
+file processPoints_script <"processpoints.py">;
+
+# Command line args to this script
+
+file   params   <single_file_mapper;file=@arg("params", "genpoints.params")>;
+file   image    <single_file_mapper;file=@arg("image",  "UNSPECIFIED.tif")>;
+global string runTime = @arg("runTime","0.0");
+global string runDir  = @java("java.lang.System","getProperty","user.dir");
+
+# Main script:
+#   Call genPoints to make a set of files, each of which contains a set of data points to process
+#   The params file specifies the range of points to generate, and how to batch them into files
+#   (In this example the input points are triples in 3-space)
+
+string pointSetFileNames[]=readData(genPoints(genPoints_script,params));
+file   pointSets[] <array_mapper; files=pointSetFileNames>;
+
+foreach pointSet, i in pointSets {
+  file ofile<single_file_mapper; file=@strcat("out/out.", at strcut(@strcat("00000",i),"(.....$)"))>;
+  ofile = processPoints(processPoints_script, image, pointSet);
+}</tt></pre>
+</div></div>
 </div>
 </div>
+<div class="sect1">
+<h2 id="_how_to_run">How to run</h2>
+<div class="sectionbody">
 </div>
+</div>
+</div>
 <div id="footnotes"><hr /></div>
 <div id="footer">
 <div id="footer-text">
-Last updated 2013-08-08 14:30:35 CDT
+Last updated 2013-08-08 14:39:22 CDT
 </div>
 </div>
 </body>




More information about the Swift-commit mailing list