[Swift-commit] r6475 - in demo/cray: bin swift-1.0/part08-cray-loop

wilde at ci.uchicago.edu wilde at ci.uchicago.edu
Thu Apr 18 12:14:58 CDT 2013


Author: wilde
Date: 2013-04-18 12:14:58 -0500 (Thu, 18 Apr 2013)
New Revision: 6475

Modified:
   demo/cray/bin/cleanup
   demo/cray/swift-1.0/part08-cray-loop/README
Log:
Adjusting part08.

Modified: demo/cray/bin/cleanup
===================================================================
--- demo/cray/bin/cleanup	2013-04-18 16:16:51 UTC (rev 6474)
+++ demo/cray/bin/cleanup	2013-04-18 17:14:58 UTC (rev 6475)
@@ -1,9 +1,15 @@
 #! /bin/sh
 
-echo Removing:
-echo
-ls -ltd *log *.d swiftwork _concurrent output *.kml *.swiftx swift.log 2>/dev/null
-echo
+if [ _$(ls -ltd *log *.d swiftwork _concurrent output *.kml *.swiftx 2>/dev/null) = _ ]; then
+  echo Nothing to clean up.
+  exit
+else
+  echo Removing:
+  echo
+  ls -ltd *log *.d swiftwork _concurrent output *.kml *.swiftx 2>/dev/null
+  echo
+fi
+
 echo Enter y to proceed:
 read ok
 if [ _$ok = _y -o _$ok = _Y -o _$ok = _yes ]; then

Modified: demo/cray/swift-1.0/part08-cray-loop/README
===================================================================
--- demo/cray/swift-1.0/part08-cray-loop/README	2013-04-18 16:16:51 UTC (rev 6474)
+++ demo/cray/swift-1.0/part08-cray-loop/README	2013-04-18 17:14:58 UTC (rev 6475)
@@ -1,8 +1,41 @@
 
-Regular staging with deafult data management:
+The script we'll run here is p8.swift, which executes N mock "simulations" in
+parallel, and runs all the results through an "analysis" program.  This script
+is explained in the demo parts01-06 where it is built up gradually.
 
-  swift -config cf -tc.file apps -sites.file cray.xml  p8.swift -steps=1 -range=1000 -count=6 -nsim=100
+The simulation app reads from data/bias.dat and writes output files to
+the data/output/ directory.
 
+You can use the "cleanup" script to remove logs and the output of prior runs,
+so that its easier to tell what each test run created:
+
+  $ cleanup   # will prompt for 'y' before deleting files
+
+First try running just one simulation (followed by an analysis)
+
+  $ cleanup
+  $ swift -sites.file raven.xml p8.swift -nsim=1
+
+To avoid specifying the sites file every time, copy raven.xml to sites.xml:
+
+  $ cp raven.xml sites.xml    # use the default sites file name
+  $ swift p8.swift -nsim=1    # so you dont need to specify -sites.file
+
+Then you can experiment with different script parameters to set the number of
+simulations you want or to adjust the behavior of each simulation. The
+parameters (from the p8.swift source code) are:
+
+int  nsim  = @toInt(@arg("nsim",  "10"));  # number of simulation programs to run
+int  steps = @toInt(@arg("steps", "1"));   # number of "steps" each simulation (==seconds of runtime)
+int  range = @toInt(@arg("range", "100")); # range of the generated random numbers
+int  count = @toInt(@arg("count", "10"));  # number of random numbers generated per simulation
+
+The default values of these parameters are the second parameter to the @arg() function.
+Try, for example:
+
+  $ swift p8.swift -nsim=10 -steps=5 -range=1000 -count=5 
+
+
 Regular staging with direct data management:
 
   swift -config cf -tc.file apps -sites.file cray.xml -cdm.file dmrules p8.swift -steps=1 -range=1000 -count=6 -nsim=100




More information about the Swift-commit mailing list