[Swift-commit] r7186 - SwiftTutorials/OSG-Swift/part06

davidk at ci.uchicago.edu davidk at ci.uchicago.edu
Fri Oct 18 15:14:48 CDT 2013


Author: davidk
Date: 2013-10-18 15:14:48 -0500 (Fri, 18 Oct 2013)
New Revision: 7186

Modified:
   SwiftTutorials/OSG-Swift/part06/p6.swift
Log:
Use seed file


Modified: SwiftTutorials/OSG-Swift/part06/p6.swift
===================================================================
--- SwiftTutorials/OSG-Swift/part06/p6.swift	2013-10-18 20:02:59 UTC (rev 7185)
+++ SwiftTutorials/OSG-Swift/part06/p6.swift	2013-10-18 20:14:48 UTC (rev 7186)
@@ -20,10 +20,11 @@
 }
 
 app (file out, file log) simulation (file prog, int timesteps, int sim_range,
-                                     file bias_file, int scale, int sim_count)
+                                     file bias_file, int scale, int sim_count,
+                                     file seed_file)
 {
   sh @prog "-t" timesteps "-r" sim_range "-B" @bias_file "-x" scale
-           "-n" sim_count stdout=@out stderr=@log;
+           "-n" sim_count -"S" @seed_file stdout=@out stderr=@log;
 }
 
 app (file out) analyze (file prog, file s[])
@@ -45,9 +46,6 @@
 file seedfile<"output/seed.dat">;        # Dynamically generated bias for simulation ensemble
 seedfile = genseed(genseed_prog, 1);
 
-int seedval = readData(seedfile);
-tracef("Generated seed=%i\n", seedval);
-
 file sims[];                      # Array of files to hold each simulation output
 
 foreach i in [0:nsim-1] {
@@ -55,7 +53,7 @@
   file simout   <single_file_mapper; file=@strcat("output/sim_",i,".out")>;
   file simlog   <single_file_mapper; file=@strcat("output/sim_",i,".log")>;
   biasfile = genbias(genbias_prog, 1000, 20);
-  (simout,simlog) = simulation(simulation_prog, steps, range, biasfile, 100000, count);
+  (simout,simlog) = simulation(simulation_prog, steps, range, biasfile, 100000, count, seedfile);
   sims[i] = simout;
 }
 




More information about the Swift-commit mailing list