[Swift-commit] r6936 - in SwiftTutorials/CIC_2013-08-09: . part06

wilde at ci.uchicago.edu wilde at ci.uchicago.edu
Wed Aug 21 22:58:26 CDT 2013


Author: wilde
Date: 2013-08-21 22:58:26 -0500 (Wed, 21 Aug 2013)
New Revision: 6936

Added:
   SwiftTutorials/CIC_2013-08-09/part06/
   SwiftTutorials/CIC_2013-08-09/part06/apps
   SwiftTutorials/CIC_2013-08-09/part06/dynamic_bias.dat
   SwiftTutorials/CIC_2013-08-09/part06/p6.swift
   SwiftTutorials/CIC_2013-08-09/part06/simulate.sh
   SwiftTutorials/CIC_2013-08-09/part06/sites.xml
   SwiftTutorials/CIC_2013-08-09/part06/stats.sh
Log:
moves

Added: SwiftTutorials/CIC_2013-08-09/part06/apps
===================================================================
--- SwiftTutorials/CIC_2013-08-09/part06/apps	                        (rev 0)
+++ SwiftTutorials/CIC_2013-08-09/part06/apps	2013-08-22 03:58:26 UTC (rev 6936)
@@ -0,0 +1 @@
+uc3 sh /bin/bash

Added: SwiftTutorials/CIC_2013-08-09/part06/dynamic_bias.dat
===================================================================
--- SwiftTutorials/CIC_2013-08-09/part06/dynamic_bias.dat	                        (rev 0)
+++ SwiftTutorials/CIC_2013-08-09/part06/dynamic_bias.dat	2013-08-22 03:58:26 UTC (rev 6936)
@@ -0,0 +1 @@
+734

Added: SwiftTutorials/CIC_2013-08-09/part06/p6.swift
===================================================================
--- SwiftTutorials/CIC_2013-08-09/part06/p6.swift	                        (rev 0)
+++ SwiftTutorials/CIC_2013-08-09/part06/p6.swift	2013-08-22 03:58:26 UTC (rev 6936)
@@ -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/CIC_2013-08-09/part06/simulate.sh
===================================================================
--- SwiftTutorials/CIC_2013-08-09/part06/simulate.sh	                        (rev 0)
+++ SwiftTutorials/CIC_2013-08-09/part06/simulate.sh	2013-08-22 03:58:26 UTC (rev 6936)
@@ -0,0 +1 @@
+link ../simulate.sh
\ No newline at end of file


Property changes on: SwiftTutorials/CIC_2013-08-09/part06/simulate.sh
___________________________________________________________________
Added: svn:special
   + *

Added: SwiftTutorials/CIC_2013-08-09/part06/sites.xml
===================================================================
--- SwiftTutorials/CIC_2013-08-09/part06/sites.xml	                        (rev 0)
+++ SwiftTutorials/CIC_2013-08-09/part06/sites.xml	2013-08-22 03:58:26 UTC (rev 6936)
@@ -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/CIC_2013-08-09/part06/stats.sh
===================================================================
--- SwiftTutorials/CIC_2013-08-09/part06/stats.sh	                        (rev 0)
+++ SwiftTutorials/CIC_2013-08-09/part06/stats.sh	2013-08-22 03:58:26 UTC (rev 6936)
@@ -0,0 +1 @@
+link ../stats.sh
\ No newline at end of file


Property changes on: SwiftTutorials/CIC_2013-08-09/part06/stats.sh
___________________________________________________________________
Added: svn:special
   + *




More information about the Swift-commit mailing list