[Swift-commit] r6932 - in SwiftTutorials/CIC_2013-08-09: . part04
wilde at ci.uchicago.edu
wilde at ci.uchicago.edu
Wed Aug 21 22:54:13 CDT 2013
Author: wilde
Date: 2013-08-21 22:54:13 -0500 (Wed, 21 Aug 2013)
New Revision: 6932
Added:
SwiftTutorials/CIC_2013-08-09/part04/
SwiftTutorials/CIC_2013-08-09/part04/p4.swift
SwiftTutorials/CIC_2013-08-09/part04/simulate.sh
SwiftTutorials/CIC_2013-08-09/part04/stats.sh
Log:
moves
Added: SwiftTutorials/CIC_2013-08-09/part04/p4.swift
===================================================================
--- SwiftTutorials/CIC_2013-08-09/part04/p4.swift (rev 0)
+++ SwiftTutorials/CIC_2013-08-09/part04/p4.swift 2013-08-22 03:54:13 UTC (rev 6932)
@@ -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/CIC_2013-08-09/part04/simulate.sh
===================================================================
--- SwiftTutorials/CIC_2013-08-09/part04/simulate.sh (rev 0)
+++ SwiftTutorials/CIC_2013-08-09/part04/simulate.sh 2013-08-22 03:54:13 UTC (rev 6932)
@@ -0,0 +1 @@
+link ../simulate.sh
\ No newline at end of file
Property changes on: SwiftTutorials/CIC_2013-08-09/part04/simulate.sh
___________________________________________________________________
Added: svn:special
+ *
Added: SwiftTutorials/CIC_2013-08-09/part04/stats.sh
===================================================================
--- SwiftTutorials/CIC_2013-08-09/part04/stats.sh (rev 0)
+++ SwiftTutorials/CIC_2013-08-09/part04/stats.sh 2013-08-22 03:54:13 UTC (rev 6932)
@@ -0,0 +1 @@
+link ../stats.sh
\ No newline at end of file
Property changes on: SwiftTutorials/CIC_2013-08-09/part04/stats.sh
___________________________________________________________________
Added: svn:special
+ *
More information about the Swift-commit
mailing list