[Swift-commit] r6940 - SwiftTutorials/CIC_2013-08-09/part06

wilde at ci.uchicago.edu wilde at ci.uchicago.edu
Thu Aug 22 10:30:57 CDT 2013


Author: wilde
Date: 2013-08-22 10:30:56 -0500 (Thu, 22 Aug 2013)
New Revision: 6940

Added:
   SwiftTutorials/CIC_2013-08-09/part06/app
Modified:
   SwiftTutorials/CIC_2013-08-09/part06/apps
   SwiftTutorials/CIC_2013-08-09/part06/p6.swift
   SwiftTutorials/CIC_2013-08-09/part06/sites.xml
Log:
for CIC

Added: SwiftTutorials/CIC_2013-08-09/part06/app
===================================================================
--- SwiftTutorials/CIC_2013-08-09/part06/app	                        (rev 0)
+++ SwiftTutorials/CIC_2013-08-09/part06/app	2013-08-22 15:30:56 UTC (rev 6940)
@@ -0,0 +1 @@
+link ../app
\ No newline at end of file


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

Modified: SwiftTutorials/CIC_2013-08-09/part06/apps
===================================================================
--- SwiftTutorials/CIC_2013-08-09/part06/apps	2013-08-22 14:27:15 UTC (rev 6939)
+++ SwiftTutorials/CIC_2013-08-09/part06/apps	2013-08-22 15:30:56 UTC (rev 6940)
@@ -1 +1 @@
-uc3 sh /bin/bash
+osg sh /bin/bash

Modified: SwiftTutorials/CIC_2013-08-09/part06/p6.swift
===================================================================
--- SwiftTutorials/CIC_2013-08-09/part06/p6.swift	2013-08-22 14:27:15 UTC (rev 6939)
+++ SwiftTutorials/CIC_2013-08-09/part06/p6.swift	2013-08-22 15:30:56 UTC (rev 6940)
@@ -1,52 +1,63 @@
 type file;
 
-# Applications to be called by this script
+# Define external application programs to be invoked
 
-file simulation_script <"simulate.sh">;
-file analysis_script   <"stats.sh">;
+file simulation_prog <"app/simulate.sh">;
+file analysis_prog   <"app/stats.sh">;
+file genbias_prog = simulation_prog;
+file genseed_prog = simulation_prog;
 
 # app() functions for application programs to be called:
 
-app (file out) genrand (file script, int timesteps, int sim_range)
+app (file out) genseed (file prog, int nseeds)
 {
-  sh @filename(script) timesteps sim_range stdout=@filename(out);
+  sh @prog "-r" 2000000 "-n" nseeds stdout=@out;
 }
 
-app (file out) simulation (file script, int timesteps, int sim_range, file bias_file, int scale, int sim_count)
+app (file out) genbias (file prog, int bias_range, int nvalues)
 {
-  sh @filename(script) timesteps sim_range @filename(bias_file) scale sim_count stdout=@filename(out);
+  sh @prog "-r" bias_range "-n" nvalues stdout=@out;
 }
 
-app (file out) analyze (file script, file s[])
+app (file out, file log) simulation (file prog, int timesteps, int sim_range,
+                                     file bias_file, int scale, int sim_count)
 {
-  sh @script @filenames(s) stdout=@filename(out);
+  sh @prog "-t" timesteps "-r" sim_range "-B" @bias_file "-x" scale
+           "-n" sim_count stdout=@out stderr=@log;
 }
 
-# Command line params to this script:
+app (file out) analyze (file prog, file s[])
+{
+  sh @prog @filenames(s) stdout=@out;
+}
 
+# Command line arguments
+
 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
+int  count = @toInt(@arg("count", "10"));  # number of values generated per simulation
+int  steps = @toInt(@arg("steps", "1"));   # number of timesteps (seconds) 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
+file seedfile<"output/seed.dat">;        # Dynamically generated bias for simulation ensemble
+seedfile = genseed(genseed_prog, 1);
 
-bias = genrand(simulation_script, 1, 1000);
+int seedval = readData(seedfile);
+tracef("Generated seed=%i\n", seedval);
 
-file sims[];                               # Array of files to hold each simulation output
+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);
+  file biasfile <single_file_mapper; file=@strcat("output/bias_",i,".dat")>;
+  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);
   sims[i] = simout;
 }
 
 file stats<"output/stats.out">;            # Final output file: average of all "simulations"
-stats = analyze(analysis_script,sims);
+stats = analyze(analysis_prog,sims);

Modified: SwiftTutorials/CIC_2013-08-09/part06/sites.xml
===================================================================
--- SwiftTutorials/CIC_2013-08-09/part06/sites.xml	2013-08-22 14:27:15 UTC (rev 6939)
+++ SwiftTutorials/CIC_2013-08-09/part06/sites.xml	2013-08-22 15:30:56 UTC (rev 6940)
@@ -1,24 +1,45 @@
 <config>
-  <pool handle="uc3">
+  <pool handle="osg">
     <execution provider="coaster" jobmanager="local:condor"/>
-    <profile namespace="karajan" key="jobThrottle">10.00</profile>
+    <profile namespace="karajan" key="jobThrottle">5.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="maxtime">3600</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="highOverAllocation">10000</profile>
+    <profile namespace="globus"  key="lowOverAllocation">10000</profile>
+    <profile namespace="globus"  key="internalHostname">128.135.158.243</profile>  <!-- FIXME Make Dynamic from setup -->
+    <profile namespace="globus"  key="slots">20</profile> 
     <profile namespace="globus"  key="maxNodes">1</profile>
     <profile namespace="globus"  key="nodeGranularity">1</profile>
+    <!-- For UC3: -->
     <profile namespace="globus"  key="condor.+AccountingGroup">"group_friends.{env.USER}"</profile>
+    <!-- For OSGConnect -->
+    <!-- <profile namespace="globus"  key="condor.+ProjectName">"swift"</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> -->
+    <!-- UC3  --> <!-- <profile namespace="globus" key="condor.Requirements">regexp("uc3-c*", Machine)</profile> -->
+    <!-- UCIT --> <!-- <profile namespace="globus" key="condor.Requirements">regexp("appcloud[0-1][0-9].*", Machine)</profile> -->
+    <!-- MWUC --> <!-- <profile namespace="globus" key="condor.Requirements">regexp("uct2-c*", Machine)</profile> -->
+    <!-- MWIU --> <!-- <profile namespace="globus" key="condor.Requirements">regexp("iut2-c*", Machine)</profile> -->
+    <!-- MWUI --> <!-- <profile namespace="globus" key="condor.Requirements">regexp("taub*", Machine)</profile> -->
+    <!-- MWT2 --> <!-- <profile namespace="globus" key="condor.Requirements">UidDomain == "osg-gk.mwt2.org"</profile> -->
+    <!-- OSG  --> <!-- <profile namespace="globus" key="condor.Requirements">isUndefined(GLIDECLIENT_Name) == FALSE</profile> -->
+    <!-- MULT --> <!-- <profile namespace="globus" key="condor.Requirements">UidDomain == "osg-gk.mwt2.org" && (regexp("iut2-c*", Machine) || regexp("uct2-c*", Machine)) </profile> -->
 
     <workdirectory>.</workdirectory>
   </pool>
 </config>
 
+<!--
+
+MWT2 @UC Requirements = regexp("uct2-c*", Machine)
+MWT2 @IU Requirements = regexp("iut2-c*", Machine)
+MWT2 @UIUC Requirements = regexp("taub*", Machine)
+UC ATLAS Tier 3	Requirements = regexp("uct3*", Machine)
+ITS Virtualization Lab Requirements = regexp("appcloud[0-1][0-9].*", Machine)
+Open Science Grid
+Requirements = isUndefined(GLIDECLIENT_Name) == FALSE
+
+ -->
+




More information about the Swift-commit mailing list