[Swift-commit] r6476 - in demo/cray: bin swift-1.0/part08-cray-loop
wilde at ci.uchicago.edu
wilde at ci.uchicago.edu
Thu Apr 18 12:18:08 CDT 2013
Author: wilde
Date: 2013-04-18 12:18:07 -0500 (Thu, 18 Apr 2013)
New Revision: 6476
Modified:
demo/cray/bin/cleanup
demo/cray/swift-1.0/part08-cray-loop/apps
demo/cray/swift-1.0/part08-cray-loop/p8.swift
Log:
Adjusting part08.
Modified: demo/cray/bin/cleanup
===================================================================
--- demo/cray/bin/cleanup 2013-04-18 17:14:58 UTC (rev 6475)
+++ demo/cray/bin/cleanup 2013-04-18 17:18:07 UTC (rev 6476)
@@ -1,6 +1,6 @@
#! /bin/sh
-if [ _$(ls -ltd *log *.d swiftwork _concurrent output *.kml *.swiftx 2>/dev/null) = _ ]; then
+if [ _$(ls -ltd *log *.d swiftwork _concurrent data/output *.kml *.swiftx 2>/dev/null) = _ ]; then
echo Nothing to clean up.
exit
else
Modified: demo/cray/swift-1.0/part08-cray-loop/apps
===================================================================
--- demo/cray/swift-1.0/part08-cray-loop/apps 2013-04-18 17:14:58 UTC (rev 6475)
+++ demo/cray/swift-1.0/part08-cray-loop/apps 2013-04-18 17:18:07 UTC (rev 6476)
@@ -1,8 +1,3 @@
-#cray random5 /lustre/beagle/wilde/swift/demo/cray/svn/bin/random5.sh
-#cray average /lustre/beagle/wilde/swift/demo/cray/svn/bin/avg.sh
-#cray random5 /home/users/p01532/swift/demo/svn/bin/random5.sh
-#cray average /home/users/p01532/swift/demo/svn/bin/avg.sh
-
cray random5 random5.sh
cray average avg.sh
Modified: demo/cray/swift-1.0/part08-cray-loop/p8.swift
===================================================================
--- demo/cray/swift-1.0/part08-cray-loop/p8.swift 2013-04-18 17:14:58 UTC (rev 6475)
+++ demo/cray/swift-1.0/part08-cray-loop/p8.swift 2013-04-18 17:18:07 UTC (rev 6476)
@@ -10,20 +10,24 @@
average @filenames(s) stdout=@filename(o);
}
-file sims[];
-int nsim = @toInt(@arg("nsim", "10"));
+file sims[]; # Array of files to hold each simulation output
-int steps = @toInt(@arg("steps", "1"));
-int range = @toInt(@arg("range", "100"));
-int count = @toInt(@arg("count", "10"));
+int nsim = @toInt(@arg("nsim", "10")); # number of simulation programs to run
-file bias<"data/bias.dat">;
+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
+
+file bias<"data/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("data/sim_",i,".out")>;
+ file simout <single_file_mapper; file=@strcat("data/output/sim_",i,".out")>;
simout = mysim5(steps,range,bias,count);
sims[i] = simout;
}
-file stats<"output/average.out">;
+file stats<"output/average.out">; # Final output file: average of all "simulations"
stats = analyze(sims);
More information about the Swift-commit
mailing list