[Swift-commit] r6695 - in SwiftTutorials/tukey: . part01 part02 part03 part04 part05 part06 part07 part08 part09 part10

davidk at ci.uchicago.edu davidk at ci.uchicago.edu
Thu Aug 1 11:04:20 CDT 2013


Author: davidk
Date: 2013-08-01 11:04:20 -0500 (Thu, 01 Aug 2013)
New Revision: 6695

Added:
   SwiftTutorials/tukey/part01/
   SwiftTutorials/tukey/part01/apps
   SwiftTutorials/tukey/part01/clean.sh
   SwiftTutorials/tukey/part01/p1.swift
   SwiftTutorials/tukey/part01/sites.xml
   SwiftTutorials/tukey/part02/
   SwiftTutorials/tukey/part02/apps
   SwiftTutorials/tukey/part02/clean.sh
   SwiftTutorials/tukey/part02/p2.swift
   SwiftTutorials/tukey/part02/sites.xml
   SwiftTutorials/tukey/part03/
   SwiftTutorials/tukey/part03/apps
   SwiftTutorials/tukey/part03/clean.sh
   SwiftTutorials/tukey/part03/p3.swift
   SwiftTutorials/tukey/part03/sites.xml
   SwiftTutorials/tukey/part04/
   SwiftTutorials/tukey/part04/apps
   SwiftTutorials/tukey/part04/clean.sh
   SwiftTutorials/tukey/part04/p4.swift
   SwiftTutorials/tukey/part04/sites.xml
   SwiftTutorials/tukey/part05/
   SwiftTutorials/tukey/part05/apps
   SwiftTutorials/tukey/part05/clean.sh
   SwiftTutorials/tukey/part05/p5.swift
   SwiftTutorials/tukey/part05/sites.xml
   SwiftTutorials/tukey/part06/
   SwiftTutorials/tukey/part06/apps
   SwiftTutorials/tukey/part06/clean.sh
   SwiftTutorials/tukey/part06/p6.swift
   SwiftTutorials/tukey/part06/sites.xml
   SwiftTutorials/tukey/part07/
   SwiftTutorials/tukey/part07/apps
   SwiftTutorials/tukey/part07/clean.sh
   SwiftTutorials/tukey/part07/p7.swift
   SwiftTutorials/tukey/part07/simulate.sh
   SwiftTutorials/tukey/part07/sites.xml
   SwiftTutorials/tukey/part07/stats.sh
   SwiftTutorials/tukey/part08/
   SwiftTutorials/tukey/part08/apps
   SwiftTutorials/tukey/part08/bias.dat
   SwiftTutorials/tukey/part08/clean.sh
   SwiftTutorials/tukey/part08/p8.swift
   SwiftTutorials/tukey/part08/simulate.sh
   SwiftTutorials/tukey/part08/sites.xml
   SwiftTutorials/tukey/part08/stats.sh
   SwiftTutorials/tukey/part09/
   SwiftTutorials/tukey/part09/apps
   SwiftTutorials/tukey/part09/clean.sh
   SwiftTutorials/tukey/part09/dynamic_bias.dat
   SwiftTutorials/tukey/part09/p9.swift
   SwiftTutorials/tukey/part09/simulate.sh
   SwiftTutorials/tukey/part09/sites.xml
   SwiftTutorials/tukey/part09/stats.sh
   SwiftTutorials/tukey/part10/
   SwiftTutorials/tukey/part10/apps
   SwiftTutorials/tukey/part10/clean.sh
   SwiftTutorials/tukey/part10/dynamic_bias.dat
   SwiftTutorials/tukey/part10/find_host.sh
   SwiftTutorials/tukey/part10/p10.swift
   SwiftTutorials/tukey/part10/simulate.sh
   SwiftTutorials/tukey/part10/sites.xml
   SwiftTutorials/tukey/part10/stats.sh
   SwiftTutorials/tukey/setup.sh
Log:
Initial commit of tukey parts


Added: SwiftTutorials/tukey/part01/apps
===================================================================
--- SwiftTutorials/tukey/part01/apps	                        (rev 0)
+++ SwiftTutorials/tukey/part01/apps	2013-08-01 16:04:20 UTC (rev 6695)
@@ -0,0 +1 @@
+localhost simulate simulate.sh

Added: SwiftTutorials/tukey/part01/clean.sh
===================================================================
--- SwiftTutorials/tukey/part01/clean.sh	                        (rev 0)
+++ SwiftTutorials/tukey/part01/clean.sh	2013-08-01 16:04:20 UTC (rev 6695)
@@ -0,0 +1 @@
+rm -rf *.log *.rlog *.d *.kml *.swiftx _concurrent


Property changes on: SwiftTutorials/tukey/part01/clean.sh
___________________________________________________________________
Added: svn:executable
   + *

Added: SwiftTutorials/tukey/part01/p1.swift
===================================================================
--- SwiftTutorials/tukey/part01/p1.swift	                        (rev 0)
+++ SwiftTutorials/tukey/part01/p1.swift	2013-08-01 16:04:20 UTC (rev 6695)
@@ -0,0 +1,8 @@
+type file;
+
+app (file o) mysim ()
+{
+  simulate stdout=@filename(o);
+}
+
+file f = mysim();

Added: SwiftTutorials/tukey/part01/sites.xml
===================================================================
--- SwiftTutorials/tukey/part01/sites.xml	                        (rev 0)
+++ SwiftTutorials/tukey/part01/sites.xml	2013-08-01 16:04:20 UTC (rev 6695)
@@ -0,0 +1,9 @@
+<config>
+   <pool handle="localhost">
+      <execution provider="coaster" jobmanager="local:local"/>
+      <profile namespace="karajan" key="jobThrottle">0</profile>
+      <profile namespace="karajan" key="initialScore">10000</profile>
+      <filesystem provider="local"/>
+      <workdirectory>{env.HOME}/work</workdirectory>
+   </pool>
+</config>

Added: SwiftTutorials/tukey/part02/apps
===================================================================
--- SwiftTutorials/tukey/part02/apps	                        (rev 0)
+++ SwiftTutorials/tukey/part02/apps	2013-08-01 16:04:20 UTC (rev 6695)
@@ -0,0 +1 @@
+localhost simulate simulate.sh

Added: SwiftTutorials/tukey/part02/clean.sh
===================================================================
--- SwiftTutorials/tukey/part02/clean.sh	                        (rev 0)
+++ SwiftTutorials/tukey/part02/clean.sh	2013-08-01 16:04:20 UTC (rev 6695)
@@ -0,0 +1 @@
+rm -rf *.log *.rlog *.d *.kml *.swiftx *.out _concurrent


Property changes on: SwiftTutorials/tukey/part02/clean.sh
___________________________________________________________________
Added: svn:executable
   + *

Added: SwiftTutorials/tukey/part02/p2.swift
===================================================================
--- SwiftTutorials/tukey/part02/p2.swift	                        (rev 0)
+++ SwiftTutorials/tukey/part02/p2.swift	2013-08-01 16:04:20 UTC (rev 6695)
@@ -0,0 +1,9 @@
+type file;
+
+app (file o) mysim ()
+{
+  simulate stdout=@filename(o);
+}
+
+file f <"sim.out">;
+f = mysim();

Added: SwiftTutorials/tukey/part02/sites.xml
===================================================================
--- SwiftTutorials/tukey/part02/sites.xml	                        (rev 0)
+++ SwiftTutorials/tukey/part02/sites.xml	2013-08-01 16:04:20 UTC (rev 6695)
@@ -0,0 +1,9 @@
+<config>
+   <pool handle="localhost">
+      <execution provider="coaster" jobmanager="local:local"/>
+      <profile namespace="karajan" key="jobThrottle">0</profile>
+      <profile namespace="karajan" key="initialScore">10000</profile>
+      <filesystem provider="local"/>
+      <workdirectory>{env.HOME}/work</workdirectory>
+   </pool>
+</config>

Added: SwiftTutorials/tukey/part03/apps
===================================================================
--- SwiftTutorials/tukey/part03/apps	                        (rev 0)
+++ SwiftTutorials/tukey/part03/apps	2013-08-01 16:04:20 UTC (rev 6695)
@@ -0,0 +1 @@
+localhost simulate simulate.sh

Added: SwiftTutorials/tukey/part03/clean.sh
===================================================================
--- SwiftTutorials/tukey/part03/clean.sh	                        (rev 0)
+++ SwiftTutorials/tukey/part03/clean.sh	2013-08-01 16:04:20 UTC (rev 6695)
@@ -0,0 +1 @@
+rm -rf *.log *.rlog *.d *.kml *.swiftx *.out _concurrent


Property changes on: SwiftTutorials/tukey/part03/clean.sh
___________________________________________________________________
Added: svn:executable
   + *

Added: SwiftTutorials/tukey/part03/p3.swift
===================================================================
--- SwiftTutorials/tukey/part03/p3.swift	                        (rev 0)
+++ SwiftTutorials/tukey/part03/p3.swift	2013-08-01 16:04:20 UTC (rev 6695)
@@ -0,0 +1,11 @@
+type file;
+
+app (file o) mysim ()
+{
+  simulate stdout=@filename(o);
+}
+
+foreach i in [0:9] {
+  file f = mysim();
+}
+

Added: SwiftTutorials/tukey/part03/sites.xml
===================================================================
--- SwiftTutorials/tukey/part03/sites.xml	                        (rev 0)
+++ SwiftTutorials/tukey/part03/sites.xml	2013-08-01 16:04:20 UTC (rev 6695)
@@ -0,0 +1,9 @@
+<config>
+   <pool handle="localhost">
+      <execution provider="coaster" jobmanager="local:local"/>
+      <profile namespace="karajan" key="jobThrottle">0</profile>
+      <profile namespace="karajan" key="initialScore">10000</profile>
+      <filesystem provider="local"/>
+      <workdirectory>{env.HOME}/work</workdirectory>
+   </pool>
+</config>

Added: SwiftTutorials/tukey/part04/apps
===================================================================
--- SwiftTutorials/tukey/part04/apps	                        (rev 0)
+++ SwiftTutorials/tukey/part04/apps	2013-08-01 16:04:20 UTC (rev 6695)
@@ -0,0 +1 @@
+localhost simulate simulate.sh

Added: SwiftTutorials/tukey/part04/clean.sh
===================================================================
--- SwiftTutorials/tukey/part04/clean.sh	                        (rev 0)
+++ SwiftTutorials/tukey/part04/clean.sh	2013-08-01 16:04:20 UTC (rev 6695)
@@ -0,0 +1 @@
+rm -rf *.log *.rlog *.d *.kml *.swiftx output _concurrent


Property changes on: SwiftTutorials/tukey/part04/clean.sh
___________________________________________________________________
Added: svn:executable
   + *

Added: SwiftTutorials/tukey/part04/p4.swift
===================================================================
--- SwiftTutorials/tukey/part04/p4.swift	                        (rev 0)
+++ SwiftTutorials/tukey/part04/p4.swift	2013-08-01 16:04:20 UTC (rev 6695)
@@ -0,0 +1,12 @@
+type file;
+
+app (file o) mysim ()
+{
+  simulate stdout=@filename(o);
+}
+
+foreach i in [0:9] {
+  file f <single_file_mapper; file=@strcat("output/sim_",i,".out")>;
+  f = mysim();
+}
+

Added: SwiftTutorials/tukey/part04/sites.xml
===================================================================
--- SwiftTutorials/tukey/part04/sites.xml	                        (rev 0)
+++ SwiftTutorials/tukey/part04/sites.xml	2013-08-01 16:04:20 UTC (rev 6695)
@@ -0,0 +1,9 @@
+<config>
+   <pool handle="localhost">
+      <execution provider="coaster" jobmanager="local:local"/>
+      <profile namespace="karajan" key="jobThrottle">0</profile>
+      <profile namespace="karajan" key="initialScore">10000</profile>
+      <filesystem provider="local"/>
+      <workdirectory>{env.HOME}/work</workdirectory>
+   </pool>
+</config>

Added: SwiftTutorials/tukey/part05/apps
===================================================================
--- SwiftTutorials/tukey/part05/apps	                        (rev 0)
+++ SwiftTutorials/tukey/part05/apps	2013-08-01 16:04:20 UTC (rev 6695)
@@ -0,0 +1,2 @@
+localhost simulate simulate.sh
+localhost stats stats.sh

Added: SwiftTutorials/tukey/part05/clean.sh
===================================================================
--- SwiftTutorials/tukey/part05/clean.sh	                        (rev 0)
+++ SwiftTutorials/tukey/part05/clean.sh	2013-08-01 16:04:20 UTC (rev 6695)
@@ -0,0 +1 @@
+rm -rf *.log *.rlog *.d *.kml *.swiftx output _concurrent


Property changes on: SwiftTutorials/tukey/part05/clean.sh
___________________________________________________________________
Added: svn:executable
   + *

Added: SwiftTutorials/tukey/part05/p5.swift
===================================================================
--- SwiftTutorials/tukey/part05/p5.swift	                        (rev 0)
+++ SwiftTutorials/tukey/part05/p5.swift	2013-08-01 16:04:20 UTC (rev 6695)
@@ -0,0 +1,24 @@
+type file;
+
+app (file o) mysim ()
+{
+  simulate stdout=@filename(o);
+}
+
+app (file o) analyze (file s[])
+{
+  stats @filenames(s) stdout=@filename(o);
+}
+
+file sims[];
+
+int nsim = @toInt(@arg("nsim","10"));
+
+foreach i in [0:nsim-1] {
+  file simout <single_file_mapper; file=@strcat("output/sim_",i,".out")>;
+  simout = mysim();
+  sims[i] = simout;
+}
+
+file stats<"output/average.out">;
+stats = analyze(sims);

Added: SwiftTutorials/tukey/part05/sites.xml
===================================================================
--- SwiftTutorials/tukey/part05/sites.xml	                        (rev 0)
+++ SwiftTutorials/tukey/part05/sites.xml	2013-08-01 16:04:20 UTC (rev 6695)
@@ -0,0 +1,9 @@
+<config>
+   <pool handle="localhost">
+      <execution provider="coaster" jobmanager="local:local"/>
+      <profile namespace="karajan" key="jobThrottle">0</profile>
+      <profile namespace="karajan" key="initialScore">10000</profile>
+      <filesystem provider="local"/>
+      <workdirectory>{env.HOME}/work</workdirectory>
+   </pool>
+</config>

Added: SwiftTutorials/tukey/part06/apps
===================================================================
--- SwiftTutorials/tukey/part06/apps	                        (rev 0)
+++ SwiftTutorials/tukey/part06/apps	2013-08-01 16:04:20 UTC (rev 6695)
@@ -0,0 +1,2 @@
+localhost simulate simulate.sh
+localhost stats stats.sh

Added: SwiftTutorials/tukey/part06/clean.sh
===================================================================
--- SwiftTutorials/tukey/part06/clean.sh	                        (rev 0)
+++ SwiftTutorials/tukey/part06/clean.sh	2013-08-01 16:04:20 UTC (rev 6695)
@@ -0,0 +1 @@
+rm -rf *.log *.rlog *.d *.kml *.swiftx output _concurrent


Property changes on: SwiftTutorials/tukey/part06/clean.sh
___________________________________________________________________
Added: svn:executable
   + *

Added: SwiftTutorials/tukey/part06/p6.swift
===================================================================
--- SwiftTutorials/tukey/part06/p6.swift	                        (rev 0)
+++ SwiftTutorials/tukey/part06/p6.swift	2013-08-01 16:04:20 UTC (rev 6695)
@@ -0,0 +1,24 @@
+type file;
+
+app (file o) mysim (int timesteps)
+{
+  simulate timesteps stdout=@filename(o);
+}
+
+app (file o) analyze (file s[])
+{
+  stats @filenames(s) stdout=@filename(o);
+}
+
+file sims[];
+int  nsim = @toInt(@arg("nsim","10"));
+int steps = @toInt(@arg("steps","1"));
+
+foreach i in [0:nsim-1] {
+  file simout <single_file_mapper; file=@strcat("output/sim_",i,".out")>;
+  simout = mysim(steps);
+  sims[i] = simout;
+}
+
+file stats<"output/average.out">;
+stats = analyze(sims);

Added: SwiftTutorials/tukey/part06/sites.xml
===================================================================
--- SwiftTutorials/tukey/part06/sites.xml	                        (rev 0)
+++ SwiftTutorials/tukey/part06/sites.xml	2013-08-01 16:04:20 UTC (rev 6695)
@@ -0,0 +1,9 @@
+<config>
+   <pool handle="localhost">
+      <execution provider="coaster" jobmanager="local:local"/>
+      <profile namespace="karajan" key="jobThrottle">0</profile>
+      <profile namespace="karajan" key="initialScore">10000</profile>
+      <filesystem provider="local"/>
+      <workdirectory>{env.HOME}/work</workdirectory>
+   </pool>
+</config>

Added: SwiftTutorials/tukey/part07/apps
===================================================================
--- SwiftTutorials/tukey/part07/apps	                        (rev 0)
+++ SwiftTutorials/tukey/part07/apps	2013-08-01 16:04:20 UTC (rev 6695)
@@ -0,0 +1 @@
+uc3 sh /bin/bash

Added: SwiftTutorials/tukey/part07/clean.sh
===================================================================
--- SwiftTutorials/tukey/part07/clean.sh	                        (rev 0)
+++ SwiftTutorials/tukey/part07/clean.sh	2013-08-01 16:04:20 UTC (rev 6695)
@@ -0,0 +1 @@
+rm -rf *.log *.rlog *.d *.kml *.swiftx output _concurrent


Property changes on: SwiftTutorials/tukey/part07/clean.sh
___________________________________________________________________
Added: svn:executable
   + *

Added: SwiftTutorials/tukey/part07/p7.swift
===================================================================
--- SwiftTutorials/tukey/part07/p7.swift	                        (rev 0)
+++ SwiftTutorials/tukey/part07/p7.swift	2013-08-01 16:04:20 UTC (rev 6695)
@@ -0,0 +1,28 @@
+type file;
+
+# Application to be called by this script
+
+file simulation_script <"simulate.sh">;
+
+# app() functions for application programs to be called:
+
+app (file out) simulation (file script, int timesteps, int sim_range)
+{
+  sh @filename(script) timesteps sim_range stdout=@filename(out);
+}
+
+# Command line params to this script:
+
+int  nsim  = @toInt(@arg("nsim",  "10"));  # number of simulation programs to run
+int  range = @toInt(@arg("range", "100")); # range of the generated random numbers
+
+# Main script and data
+
+int steps=3;
+
+tracef("\n*** Script parameters: nsim=%i steps=%i range=%i \n\n", nsim, steps, range);
+
+foreach i in [0:nsim-1] {
+  file simout <single_file_mapper; file=@strcat("output/sim_",i,".out")>;
+  simout = simulation(simulation_script, steps, range);
+}

Added: SwiftTutorials/tukey/part07/simulate.sh
===================================================================
--- SwiftTutorials/tukey/part07/simulate.sh	                        (rev 0)
+++ SwiftTutorials/tukey/part07/simulate.sh	2013-08-01 16:04:20 UTC (rev 6695)
@@ -0,0 +1 @@
+link ../simulate.sh
\ No newline at end of file


Property changes on: SwiftTutorials/tukey/part07/simulate.sh
___________________________________________________________________
Added: svn:special
   + *

Added: SwiftTutorials/tukey/part07/sites.xml
===================================================================
--- SwiftTutorials/tukey/part07/sites.xml	                        (rev 0)
+++ SwiftTutorials/tukey/part07/sites.xml	2013-08-01 16:04:20 UTC (rev 6695)
@@ -0,0 +1,24 @@
+<config>
+  <pool handle="uc3">
+    <execution provider="coaster" jobmanager="local:condor"/>
+    <profile namespace="karajan" key="jobThrottle">10.00</profile>
+    <profile namespace="karajan" key="initialScore">10000</profile>
+    <profile namespace="globus"  key="jobsPerNode">1</profile>
+    <profile namespace="globus"  key="maxtime">300</profile>
+    <profile namespace="globus"  key="maxWalltime">00:01:00</profile>
+    <profile namespace="globus"  key="highOverAllocation">100</profile>
+    <profile namespace="globus"  key="lowOverAllocation">100</profile>
+    <profile namespace="globus"  key="slots">20</profile>
+    <profile namespace="globus"  key="maxNodes">1</profile>
+    <profile namespace="globus"  key="nodeGranularity">1</profile>
+    <profile namespace="globus"  key="condor.+AccountingGroup">"group_friends.{env.USER}"</profile>
+    <profile namespace="globus"  key="jobType">nonshared</profile>
+
+    <!-- Requirements = regexp("uc3-c*", Machine) -->
+    <!--     <profile namespace="globus" key="condor.Requirements">regexp("uc3-c*", Machine)</profile> -->
+    <!-- <profile namespace="globus" key="condor.Requirements">UidDomain == "osg-gk.mwt2.org"</profile> -->
+
+    <workdirectory>.</workdirectory>
+  </pool>
+</config>
+

Added: SwiftTutorials/tukey/part07/stats.sh
===================================================================
--- SwiftTutorials/tukey/part07/stats.sh	                        (rev 0)
+++ SwiftTutorials/tukey/part07/stats.sh	2013-08-01 16:04:20 UTC (rev 6695)
@@ -0,0 +1 @@
+link ../stats.sh
\ No newline at end of file


Property changes on: SwiftTutorials/tukey/part07/stats.sh
___________________________________________________________________
Added: svn:special
   + *

Added: SwiftTutorials/tukey/part08/apps
===================================================================
--- SwiftTutorials/tukey/part08/apps	                        (rev 0)
+++ SwiftTutorials/tukey/part08/apps	2013-08-01 16:04:20 UTC (rev 6695)
@@ -0,0 +1 @@
+uc3 sh /bin/bash

Added: SwiftTutorials/tukey/part08/bias.dat
===================================================================
--- SwiftTutorials/tukey/part08/bias.dat	                        (rev 0)
+++ SwiftTutorials/tukey/part08/bias.dat	2013-08-01 16:04:20 UTC (rev 6695)
@@ -0,0 +1 @@
+123

Added: SwiftTutorials/tukey/part08/clean.sh
===================================================================
--- SwiftTutorials/tukey/part08/clean.sh	                        (rev 0)
+++ SwiftTutorials/tukey/part08/clean.sh	2013-08-01 16:04:20 UTC (rev 6695)
@@ -0,0 +1 @@
+rm -rf *.log *.rlog *.d *.kml *.swiftx output _concurrent


Property changes on: SwiftTutorials/tukey/part08/clean.sh
___________________________________________________________________
Added: svn:executable
   + *

Added: SwiftTutorials/tukey/part08/p8.swift
===================================================================
--- SwiftTutorials/tukey/part08/p8.swift	                        (rev 0)
+++ SwiftTutorials/tukey/part08/p8.swift	2013-08-01 16:04:20 UTC (rev 6695)
@@ -0,0 +1,41 @@
+type file;
+
+# Applications to be called by this script
+
+file simulation_script <"simulate.sh">;
+file analysis_script   <"stats.sh">;
+
+# app() functions for application programs to be called:
+
+app (file out) simulation (file script, int timesteps, int sim_range, file bias_file, int scale, int sim_count)
+{
+  sh @filename(script) timesteps sim_range @filename(bias_file) scale sim_count stdout=@filename(out);
+}
+
+app (file out) analyze (file script, file s[])
+{
+  sh @script @filenames(s) stdout=@filename(out);
+}
+
+# Command line params to this script:
+
+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
+
+# Main script and data
+
+tracef("\n*** Script parameters: nsim=%i steps=%i range=%i count=%i\n\n", nsim, steps, range, count);
+
+file sims[];                               # Array of files to hold each simulation output
+file bias<"bias.dat">;                     # Input data file to "bias" the numbers:
+                                           # 1 line: scale offset ( N = n*scale + offset)
+foreach i in [0:nsim-1] {
+  file simout <single_file_mapper; file=@strcat("output/sim_",i,".out")>;
+  simout = simulation(simulation_script, steps, range, bias, 100000, count);
+  sims[i] = simout;
+}
+
+file stats<"output/stats.out">;         # Final output file: average of all "simulations"
+stats = analyze(analysis_script,sims);

Added: SwiftTutorials/tukey/part08/simulate.sh
===================================================================
--- SwiftTutorials/tukey/part08/simulate.sh	                        (rev 0)
+++ SwiftTutorials/tukey/part08/simulate.sh	2013-08-01 16:04:20 UTC (rev 6695)
@@ -0,0 +1 @@
+link ../simulate.sh
\ No newline at end of file


Property changes on: SwiftTutorials/tukey/part08/simulate.sh
___________________________________________________________________
Added: svn:special
   + *

Added: SwiftTutorials/tukey/part08/sites.xml
===================================================================
--- SwiftTutorials/tukey/part08/sites.xml	                        (rev 0)
+++ SwiftTutorials/tukey/part08/sites.xml	2013-08-01 16:04:20 UTC (rev 6695)
@@ -0,0 +1,24 @@
+<config>
+  <pool handle="uc3">
+    <execution provider="coaster" jobmanager="local:condor"/>
+    <profile namespace="karajan" key="jobThrottle">10.00</profile>
+    <profile namespace="karajan" key="initialScore">10000</profile>
+    <profile namespace="globus"  key="jobsPerNode">1</profile>
+    <profile namespace="globus"  key="maxtime">300</profile>
+    <profile namespace="globus"  key="maxWalltime">00:01:00</profile>
+    <profile namespace="globus"  key="highOverAllocation">100</profile>
+    <profile namespace="globus"  key="lowOverAllocation">100</profile>
+    <profile namespace="globus"  key="slots">20</profile>
+    <profile namespace="globus"  key="maxNodes">1</profile>
+    <profile namespace="globus"  key="nodeGranularity">1</profile>
+    <profile namespace="globus"  key="condor.+AccountingGroup">"group_friends.{env.USER}"</profile>
+    <profile namespace="globus"  key="jobType">nonshared</profile>
+
+    <!-- Requirements = regexp("uc3-c*", Machine) -->
+    <!--     <profile namespace="globus" key="condor.Requirements">regexp("uc3-c*", Machine)</profile> -->
+    <!-- <profile namespace="globus" key="condor.Requirements">UidDomain == "osg-gk.mwt2.org"</profile> -->
+
+    <workdirectory>.</workdirectory>
+  </pool>
+</config>
+

Added: SwiftTutorials/tukey/part08/stats.sh
===================================================================
--- SwiftTutorials/tukey/part08/stats.sh	                        (rev 0)
+++ SwiftTutorials/tukey/part08/stats.sh	2013-08-01 16:04:20 UTC (rev 6695)
@@ -0,0 +1 @@
+link ../stats.sh
\ No newline at end of file


Property changes on: SwiftTutorials/tukey/part08/stats.sh
___________________________________________________________________
Added: svn:special
   + *

Added: SwiftTutorials/tukey/part09/apps
===================================================================
--- SwiftTutorials/tukey/part09/apps	                        (rev 0)
+++ SwiftTutorials/tukey/part09/apps	2013-08-01 16:04:20 UTC (rev 6695)
@@ -0,0 +1 @@
+uc3 sh /bin/bash

Added: SwiftTutorials/tukey/part09/clean.sh
===================================================================
--- SwiftTutorials/tukey/part09/clean.sh	                        (rev 0)
+++ SwiftTutorials/tukey/part09/clean.sh	2013-08-01 16:04:20 UTC (rev 6695)
@@ -0,0 +1 @@
+rm -rf *.log *.rlog *.d *.kml *.swiftx output _concurrent


Property changes on: SwiftTutorials/tukey/part09/clean.sh
___________________________________________________________________
Added: svn:executable
   + *

Added: SwiftTutorials/tukey/part09/dynamic_bias.dat
===================================================================
--- SwiftTutorials/tukey/part09/dynamic_bias.dat	                        (rev 0)
+++ SwiftTutorials/tukey/part09/dynamic_bias.dat	2013-08-01 16:04:20 UTC (rev 6695)
@@ -0,0 +1 @@
+362

Added: SwiftTutorials/tukey/part09/p9.swift
===================================================================
--- SwiftTutorials/tukey/part09/p9.swift	                        (rev 0)
+++ SwiftTutorials/tukey/part09/p9.swift	2013-08-01 16:04:20 UTC (rev 6695)
@@ -0,0 +1,52 @@
+type file;
+
+# Applications to be called by this script
+
+file simulation_script <"simulate.sh">;
+file analysis_script   <"stats.sh">;
+
+# app() functions for application programs to be called:
+
+app (file out) genrand (file script, int timesteps, int sim_range)
+{
+  sh @filename(script) timesteps sim_range stdout=@filename(out);
+}
+
+app (file out) simulation (file script, int timesteps, int sim_range, file bias_file, int scale, int sim_count)
+{
+  sh @filename(script) timesteps sim_range @filename(bias_file) scale sim_count stdout=@filename(out);
+}
+
+app (file out) analyze (file script, file s[])
+{
+  sh @script @filenames(s) stdout=@filename(out);
+}
+
+# Command line params to this script:
+
+int  nsim  = @toInt(@arg("nsim",  "10"));  # number of simulation programs to run
+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
+
+# Main script and data
+
+tracef("\n*** Script parameters: nsim=%i range=%i count=%i\n\n", nsim, range, count);
+
+file bias<"dynamic_bias.dat">;        # Dynamically generated bias for simulation ensemble
+
+bias = genrand(simulation_script, 1, 1000);
+
+file sims[];                               # Array of files to hold each simulation output
+
+foreach i in [0:nsim-1] {
+
+  int steps = readData(genrand(simulation_script, 1, 5));
+  tracef("  for simulation[%i] steps=%i\n", i, steps+1);
+
+  file simout <single_file_mapper; file=@strcat("output/sim_",i,".out")>;
+  simout = simulation(simulation_script, steps+1, range, bias, 100000, count);
+  sims[i] = simout;
+}
+
+file stats<"output/stats.out">;            # Final output file: average of all "simulations"
+stats = analyze(analysis_script,sims);

Added: SwiftTutorials/tukey/part09/simulate.sh
===================================================================
--- SwiftTutorials/tukey/part09/simulate.sh	                        (rev 0)
+++ SwiftTutorials/tukey/part09/simulate.sh	2013-08-01 16:04:20 UTC (rev 6695)
@@ -0,0 +1 @@
+link ../simulate.sh
\ No newline at end of file


Property changes on: SwiftTutorials/tukey/part09/simulate.sh
___________________________________________________________________
Added: svn:special
   + *

Added: SwiftTutorials/tukey/part09/sites.xml
===================================================================
--- SwiftTutorials/tukey/part09/sites.xml	                        (rev 0)
+++ SwiftTutorials/tukey/part09/sites.xml	2013-08-01 16:04:20 UTC (rev 6695)
@@ -0,0 +1,24 @@
+<config>
+  <pool handle="uc3">
+    <execution provider="coaster" jobmanager="local:condor"/>
+    <profile namespace="karajan" key="jobThrottle">10.00</profile>
+    <profile namespace="karajan" key="initialScore">10000</profile>
+    <profile namespace="globus"  key="jobsPerNode">1</profile>
+    <profile namespace="globus"  key="maxtime">300</profile>
+    <profile namespace="globus"  key="maxWalltime">00:01:00</profile>
+    <profile namespace="globus"  key="highOverAllocation">100</profile>
+    <profile namespace="globus"  key="lowOverAllocation">100</profile>
+    <profile namespace="globus"  key="slots">20</profile>
+    <profile namespace="globus"  key="maxNodes">1</profile>
+    <profile namespace="globus"  key="nodeGranularity">1</profile>
+    <profile namespace="globus"  key="condor.+AccountingGroup">"group_friends.{env.USER}"</profile>
+    <profile namespace="globus"  key="jobType">nonshared</profile>
+
+    <!-- Requirements = regexp("uc3-c*", Machine) -->
+    <!--     <profile namespace="globus" key="condor.Requirements">regexp("uc3-c*", Machine)</profile> -->
+    <!-- <profile namespace="globus" key="condor.Requirements">UidDomain == "osg-gk.mwt2.org"</profile> -->
+
+    <workdirectory>.</workdirectory>
+  </pool>
+</config>
+

Added: SwiftTutorials/tukey/part09/stats.sh
===================================================================
--- SwiftTutorials/tukey/part09/stats.sh	                        (rev 0)
+++ SwiftTutorials/tukey/part09/stats.sh	2013-08-01 16:04:20 UTC (rev 6695)
@@ -0,0 +1 @@
+link ../stats.sh
\ No newline at end of file


Property changes on: SwiftTutorials/tukey/part09/stats.sh
___________________________________________________________________
Added: svn:special
   + *

Added: SwiftTutorials/tukey/part10/apps
===================================================================
--- SwiftTutorials/tukey/part10/apps	                        (rev 0)
+++ SwiftTutorials/tukey/part10/apps	2013-08-01 16:04:20 UTC (rev 6695)
@@ -0,0 +1 @@
+uc3 sh /bin/bash

Added: SwiftTutorials/tukey/part10/clean.sh
===================================================================
--- SwiftTutorials/tukey/part10/clean.sh	                        (rev 0)
+++ SwiftTutorials/tukey/part10/clean.sh	2013-08-01 16:04:20 UTC (rev 6695)
@@ -0,0 +1 @@
+rm -rf *.log *.rlog *.d *.kml *.swiftx output _concurrent


Property changes on: SwiftTutorials/tukey/part10/clean.sh
___________________________________________________________________
Added: svn:executable
   + *

Added: SwiftTutorials/tukey/part10/dynamic_bias.dat
===================================================================
--- SwiftTutorials/tukey/part10/dynamic_bias.dat	                        (rev 0)
+++ SwiftTutorials/tukey/part10/dynamic_bias.dat	2013-08-01 16:04:20 UTC (rev 6695)
@@ -0,0 +1 @@
+208

Added: SwiftTutorials/tukey/part10/find_host.sh
===================================================================
--- SwiftTutorials/tukey/part10/find_host.sh	                        (rev 0)
+++ SwiftTutorials/tukey/part10/find_host.sh	2013-08-01 16:04:20 UTC (rev 6695)
@@ -0,0 +1,19 @@
+#!/bin/bash
+
+
+LAST_LOG=`ls -t | grep p10.*log  | head -1`
+if [ ! -f "$LAST_LOG" ]
+then
+    echo "No recent logs found"
+    exit 0
+fi
+hosts=`grep "host=" $LAST_LOG | grep "Cpu worker started" | grep -oh "host=.*\ " | sort | uniq`
+
+for host in $hosts
+do
+  echo $host | grep "uc3-c.*" >/dev/null     && echo "Cycle seeder : $host"
+  echo $host | grep "uct2-c.*" >/dev/null    && echo "Cycle seeder : $host"
+  echo $host | grep "iut2-c.*" >/dev/null    && echo "Cycle seeder : $host"
+  echo $host | grep "uct3-c.*" >/dev/null    && echo "Cycle seeder : $host"
+  echo $host | grep "appcloud.*" >/dev/null  && echo "Cycle seeder : $host"
+done
\ No newline at end of file


Property changes on: SwiftTutorials/tukey/part10/find_host.sh
___________________________________________________________________
Added: svn:executable
   + *

Added: SwiftTutorials/tukey/part10/p10.swift
===================================================================
--- SwiftTutorials/tukey/part10/p10.swift	                        (rev 0)
+++ SwiftTutorials/tukey/part10/p10.swift	2013-08-01 16:04:20 UTC (rev 6695)
@@ -0,0 +1,52 @@
+type file;
+
+# Applications to be called by this script
+
+file simulation_script <"simulate.sh">;
+file analysis_script   <"stats.sh">;
+
+# app() functions for application programs to be called:
+
+app (file out) genrand (file script, int timesteps, int sim_range)
+{
+  sh @filename(script) timesteps sim_range stdout=@filename(out);
+}
+
+app (file out) simulation (file script, int timesteps, int sim_range, file bias_file, int scale, int sim_count)
+{
+  sh @filename(script) timesteps sim_range @filename(bias_file) scale sim_count stdout=@filename(out);
+}
+
+app (file out) analyze (file script, file s[])
+{
+  sh @script @filenames(s) stdout=@filename(out);
+}
+
+# Command line params to this script:
+
+int  nsim  = @toInt(@arg("nsim",  "10"));  # number of simulation programs to run
+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
+
+# Main script and data
+
+tracef("\n*** Script parameters: nsim=%i range=%i count=%i\n\n", nsim, range, count);
+
+file bias<"dynamic_bias.dat">;        # Dynamically generated bias for simulation ensemble
+
+bias = genrand(simulation_script, 1, 1000);
+
+file sims[];                               # Array of files to hold each simulation output
+
+foreach i in [0:nsim-1] {
+
+  int steps = readData(genrand(simulation_script, 1, 5));
+  tracef("  for simulation[%i] steps=%i\n", i, steps+1);
+
+  file simout <single_file_mapper; file=@strcat("output/sim_",i,".out")>;
+  simout = simulation(simulation_script, steps+1, range, bias, 100000, count);
+  sims[i] = simout;
+}
+
+file stats<"output/stats.out">;            # Final output file: average of all "simulations"
+stats = analyze(analysis_script,sims);

Added: SwiftTutorials/tukey/part10/simulate.sh
===================================================================
--- SwiftTutorials/tukey/part10/simulate.sh	                        (rev 0)
+++ SwiftTutorials/tukey/part10/simulate.sh	2013-08-01 16:04:20 UTC (rev 6695)
@@ -0,0 +1 @@
+link ../simulate.sh
\ No newline at end of file


Property changes on: SwiftTutorials/tukey/part10/simulate.sh
___________________________________________________________________
Added: svn:special
   + *

Added: SwiftTutorials/tukey/part10/sites.xml
===================================================================
--- SwiftTutorials/tukey/part10/sites.xml	                        (rev 0)
+++ SwiftTutorials/tukey/part10/sites.xml	2013-08-01 16:04:20 UTC (rev 6695)
@@ -0,0 +1,38 @@
+<config>
+  <pool handle="uc3">
+    <execution provider="coaster" jobmanager="local:condor"/>
+    <profile namespace="karajan" key="jobThrottle">10.00</profile>
+    <profile namespace="karajan" key="initialScore">10000</profile>
+    <profile namespace="globus"  key="jobsPerNode">1</profile>
+    <profile namespace="globus"  key="maxtime">300</profile>
+    <profile namespace="globus"  key="maxWalltime">00:01:00</profile>
+    <profile namespace="globus"  key="highOverAllocation">100</profile>
+    <profile namespace="globus"  key="lowOverAllocation">100</profile>
+    <profile namespace="globus"  key="slots">100</profile>
+    <profile namespace="globus"  key="maxNodes">1</profile>
+    <profile namespace="globus"  key="nodeGranularity">1</profile>
+    <profile namespace="globus"  key="condor.+AccountingGroup">"group_friends.{env.USER}"</profile>
+    <profile namespace="globus"  key="jobType">nonshared</profile>
+
+    <!-- Requirements for Cycle seeder cluster = regexp("uc3-c*", Machine) -->
+    <profile namespace="globus" key="condor.Requirements">regexp("uc3-c*", Machine)</profile>
+
+    <!-- Requirements for ITS virtualization lab machines = regexp("appcloud[0-1][0-9].*", Machine) -->
+    <!-- <profile namespace="globus" key="condor.Requirements">regexp("appcloud[0-1][0-9].*", Machine)</profile> -->
+
+    <!-- Requirements for OSG machines = isUndefined(GLIDECLIENT_Name) == FALSE -->
+    <!-- <profile namespace="globus" key="condor.Requirements">isUndefined(GLIDECLIENT_Name) == FALSE</profile>-->
+
+    <!-- Requirements for Atlas Midwest Tier 2 @ UC = regexp("uct2-c*", Machine) -->
+    <!-- <profile namespace="globus" key="condor.Requirements">regexp("uct2-c*", Machine)</profile> -->
+
+    <!-- Requirements for Atlas Midwest Tier 2 @ IU = regexp("iut2-c*", Machine) -->
+    <!-- <profile namespace="globus" key="condor.Requirements">regexp("iut2-c*", Machine)</profile> -->
+
+    <!-- Requirements for Atlas Midwest Tier 2 @ UIUC = regexp("taub*", Machine) -->
+    <!-- <profile namespace="globus" key="condor.Requirements">regexp("taub*", Machine)</profile>  -->
+
+    <workdirectory>.</workdirectory>
+  </pool>
+</config>
+

Added: SwiftTutorials/tukey/part10/stats.sh
===================================================================
--- SwiftTutorials/tukey/part10/stats.sh	                        (rev 0)
+++ SwiftTutorials/tukey/part10/stats.sh	2013-08-01 16:04:20 UTC (rev 6695)
@@ -0,0 +1 @@
+link ../stats.sh
\ No newline at end of file


Property changes on: SwiftTutorials/tukey/part10/stats.sh
___________________________________________________________________
Added: svn:special
   + *

Added: SwiftTutorials/tukey/setup.sh
===================================================================
--- SwiftTutorials/tukey/setup.sh	                        (rev 0)
+++ SwiftTutorials/tukey/setup.sh	2013-08-01 16:04:20 UTC (rev 6695)
@@ -0,0 +1,50 @@
+export SWIFT_HEAP_MAX=4G
+
+# Add Swift and java to PATH
+export PATH=~wilde/jdk1.7.0_25/bin:~wilde/swift/rev/swift-0.94.1/bin:$PATH
+
+echo -e "\\nUsing swift release from: \\c"
+which swift
+swift -version
+
+# Cleanup swift.log
+if [ -f "swift.log" ]; then
+   rm swift.log > /dev/null 2>&1
+fi
+
+echo -e "Using java from: \\c"
+which java
+java -version
+
+DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
+echo -e "\\nAdding $DIR to PATH: "
+PATH=$DIR:$PATH
+
+if [ -e $HOME/.swift ]; then
+  savedotswift=$(mktemp -d $HOME/.swift.save.XXXX)
+  echo -e "Saving $HOME/.swift in $savedotswift \\n"
+  mv $HOME/.swift/* $savedotswift
+else
+  mkdir -p $HOME/.swift
+fi
+
+cat >>$HOME/.swift/swift.properties <<END
+
+# Properties for Swift Tutorial 
+
+sites.file=sites.xml
+tc.file=apps
+
+wrapperlog.always.transfer=true
+sitedir.keep=true
+file.gc.enabled=false
+status.mode=provider
+
+execution.retries=0
+lazy.errors=false
+
+use.wrapper.staging=false
+use.provider.staging=true
+provider.staging.pin.swiftfiles=true
+
+END


Property changes on: SwiftTutorials/tukey/setup.sh
___________________________________________________________________
Added: svn:executable
   + *




More information about the Swift-commit mailing list