[Swift-commit] r7176 - in SwiftTutorials/OSDC-2013-10-17: .scs part03 part04 part05 part06
davidk at ci.uchicago.edu
davidk at ci.uchicago.edu
Thu Oct 17 19:34:08 CDT 2013
Author: davidk
Date: 2013-10-17 19:34:08 -0500 (Thu, 17 Oct 2013)
New Revision: 7176
Modified:
SwiftTutorials/OSDC-2013-10-17/.scs/coaster-service.conf
SwiftTutorials/OSDC-2013-10-17/.scs/get_ip_list.sh
SwiftTutorials/OSDC-2013-10-17/part03/sites.xml
SwiftTutorials/OSDC-2013-10-17/part04/apps
SwiftTutorials/OSDC-2013-10-17/part04/p4.swift
SwiftTutorials/OSDC-2013-10-17/part05/apps
SwiftTutorials/OSDC-2013-10-17/part05/p5.swift
SwiftTutorials/OSDC-2013-10-17/part06/apps
SwiftTutorials/OSDC-2013-10-17/part06/p6.swift
Log:
Updates to stage apps with provider staging
Modified: SwiftTutorials/OSDC-2013-10-17/.scs/coaster-service.conf
===================================================================
--- SwiftTutorials/OSDC-2013-10-17/.scs/coaster-service.conf 2013-10-17 23:00:01 UTC (rev 7175)
+++ SwiftTutorials/OSDC-2013-10-17/.scs/coaster-service.conf 2013-10-18 00:34:08 UTC (rev 7176)
@@ -1,8 +1,8 @@
export WORKER_LOCATION=/home/ubuntu
export WORKER_MODE=ssh
export WORKER_USERNAME=ubuntu
-export WORKER_HOSTS="172.16.1.136"
-export IPADDR="128.135.107.145"
+export WORKER_HOSTS=$( ./get_ip_list.sh )
+export IPADDR=128.135.107.145
export WORKER_LOG_DIR=/home/ubuntu
export WORK=/home/ubuntu/work
export JOBSPERNODE=1
Modified: SwiftTutorials/OSDC-2013-10-17/.scs/get_ip_list.sh
===================================================================
--- SwiftTutorials/OSDC-2013-10-17/.scs/get_ip_list.sh 2013-10-17 23:00:01 UTC (rev 7175)
+++ SwiftTutorials/OSDC-2013-10-17/.scs/get_ip_list.sh 2013-10-18 00:34:08 UTC (rev 7176)
@@ -1,4 +1,4 @@
#!/bin/bash
-nova list |grep ACTIVE|awk '{print ( $(NF-1) )}'|cut -d'=' -f2
+nova list |grep ACTIVE|awk '{print ( $(NF-1) )}'|cut -d'=' -f2 | sed ':a;N;$!ba;s/\n/ /g'
Modified: SwiftTutorials/OSDC-2013-10-17/part03/sites.xml
===================================================================
--- SwiftTutorials/OSDC-2013-10-17/part03/sites.xml 2013-10-17 23:00:01 UTC (rev 7175)
+++ SwiftTutorials/OSDC-2013-10-17/part03/sites.xml 2013-10-18 00:34:08 UTC (rev 7176)
@@ -1,13 +1,11 @@
-<config>
- <pool handle="persistent-coasters">
- <execution provider="coaster-persistent"
- url="http://10.102.14.1:33516"
- jobmanager="local:local"/>
- <profile namespace="globus" key="workerManager">passive</profile>
- <profile namespace="globus" key="jobsPerNode">1</profile>
- <profile key="jobThrottle" namespace="karajan">10</profile>
- <profile namespace="karajan" key="initialScore">10000</profile>
- <filesystem provider="local" url="none" />
- <workdirectory>/home/ubuntu/work</workdirectory>
- </pool>
+<?xml version="1.0" encoding="UTF-8"?>
+<config xmlns="http://www.ci.uchicago.edu/swift/SwiftSites">
+ <pool handle="localhost">
+ <execution provider="local" />
+ <profile namespace="karajan" key="jobThrottle">0</profile>
+ <profile namespace="karajan" key="initialScore">10000</profile>
+ <filesystem provider="local"/>
+ <workdirectory>.swift/tmp</workdirectory>
+ <profile namespace="swift" key="stagingMethod">local</profile>
+ </pool>
</config>
Modified: SwiftTutorials/OSDC-2013-10-17/part04/apps
===================================================================
--- SwiftTutorials/OSDC-2013-10-17/part04/apps 2013-10-17 23:00:01 UTC (rev 7175)
+++ SwiftTutorials/OSDC-2013-10-17/part04/apps 2013-10-18 00:34:08 UTC (rev 7176)
@@ -1,2 +1 @@
-persistent-coasters simulate /home/ubuntu/bin/simulate.sh
-persistent-coasters stats /home/ubuntu/bin/stats.sh
+persistent-coasters sh /bin/bash
Modified: SwiftTutorials/OSDC-2013-10-17/part04/p4.swift
===================================================================
--- SwiftTutorials/OSDC-2013-10-17/part04/p4.swift 2013-10-17 23:00:01 UTC (rev 7175)
+++ SwiftTutorials/OSDC-2013-10-17/part04/p4.swift 2013-10-18 00:34:08 UTC (rev 7176)
@@ -1,13 +1,13 @@
type file;
-app (file out, file log) simulation (int sim_steps, int sim_range, int sim_values)
+app (file out, file log) simulation (int sim_steps, int sim_range, int sim_values, file sim_script)
{
- simulate "--timesteps" sim_steps "--range" sim_range "--nvalues" sim_values stdout=@out stderr=@log;
+ sh "simulate.sh" "--timesteps" sim_steps "--range" sim_range "--nvalues" sim_values stdout=@out stderr=@log;
}
-app (file out, file log) analyze (file s[])
+app (file out, file log) analyze (file s[], file stat_script)
{
- stats @filenames(s) stdout=@out stderr=@log;
+ sh "stats.sh" @filenames(s) stdout=@out stderr=@log;
}
int nsim = @toInt(@arg("nsim", "10"));
@@ -15,15 +15,18 @@
int range = @toInt(@arg("range", "100"));
int values = @toInt(@arg("values", "5"));
+file simulate_script <"simulate.sh">;
+file stats_script <"stats.sh">;
+
file sims[];
foreach i in [0:nsim-1] {
file simout <single_file_mapper; file=@strcat("output/sim_",i,".out")>;
file simlog <single_file_mapper; file=@strcat("output/sim_",i,".log")>;
- (simout,simlog) = simulation(steps,range,values);
+ (simout,simlog) = simulation(steps,range,values,simulate_script);
sims[i] = simout;
}
file stats_out<"output/average.out">;
file stats_log<"output/average.log">;
-(stats_out, stats_log) = analyze(sims);
+(stats_out, stats_log) = analyze(sims, stats_script);
Modified: SwiftTutorials/OSDC-2013-10-17/part05/apps
===================================================================
--- SwiftTutorials/OSDC-2013-10-17/part05/apps 2013-10-17 23:00:01 UTC (rev 7175)
+++ SwiftTutorials/OSDC-2013-10-17/part05/apps 2013-10-18 00:34:08 UTC (rev 7176)
@@ -1,2 +1 @@
-persistent-coasters simulate /home/ubuntu/bin/simulate.sh
-persistent-coasters stats /home/ubuntu/bin/stats.sh
+persistent-coasters sh /bin/bash
Modified: SwiftTutorials/OSDC-2013-10-17/part05/p5.swift
===================================================================
--- SwiftTutorials/OSDC-2013-10-17/part05/p5.swift 2013-10-17 23:00:01 UTC (rev 7175)
+++ SwiftTutorials/OSDC-2013-10-17/part05/p5.swift 2013-10-18 00:34:08 UTC (rev 7176)
@@ -1,13 +1,13 @@
type file;
-app (file out, file log) simulation (int sim_steps, int sim_range, int sim_values)
+app (file out, file log) simulation (int sim_steps, int sim_range, int sim_values, file sim_script)
{
- simulate "--timesteps" sim_steps "--range" sim_range "--nvalues" sim_values stdout=@out stderr=@log;
+ sh "simulate.sh" "--timesteps" sim_steps "--range" sim_range "--nvalues" sim_values stdout=@out stderr=@log;
}
-app (file out, file log) analyze (file s[])
+app (file out, file log) analyze (file s[], file stat_script)
{
- stats @filenames(s) stdout=@out stderr=@log;
+ sh "stats.sh" @filenames(s) stdout=@out stderr=@log;
}
int nsim = @toInt(@arg("nsim", "10"));
@@ -16,14 +16,16 @@
int values = @toInt(@arg("values", "5"));
file sims[];
+file simulate_script <"simulate.sh">;
+file stats_script <"stats.sh">;
foreach i in [0:nsim-1] {
file simout <single_file_mapper; file=@strcat("output/sim_",i,".out")>;
file simlog <single_file_mapper; file=@strcat("output/sim_",i,".log")>;
- (simout,simlog) = simulation(steps,range,values);
+ (simout,simlog) = simulation(steps,range,values,simulate_script);
sims[i] = simout;
}
file stats_out<"output/average.out">;
file stats_log<"output/average.log">;
-(stats_out, stats_log) = analyze(sims);
+(stats_out, stats_log) = analyze(sims,stats_script);
Modified: SwiftTutorials/OSDC-2013-10-17/part06/apps
===================================================================
--- SwiftTutorials/OSDC-2013-10-17/part06/apps 2013-10-17 23:00:01 UTC (rev 7175)
+++ SwiftTutorials/OSDC-2013-10-17/part06/apps 2013-10-18 00:34:08 UTC (rev 7176)
@@ -1,4 +1 @@
-persistent-coasters simulate /home/ubuntu/bin/simulate.sh
-persistent-coasters stats /home/ubuntu/bin/stats.sh
-persistent-coasters genseed /home/ubuntu/bin/simulate.sh
-persistent-coasters genbias /home/ubuntu/bin/simulate.sh
+persistent-coasters sh /bin/bash
Modified: SwiftTutorials/OSDC-2013-10-17/part06/p6.swift
===================================================================
--- SwiftTutorials/OSDC-2013-10-17/part06/p6.swift 2013-10-17 23:00:01 UTC (rev 7175)
+++ SwiftTutorials/OSDC-2013-10-17/part06/p6.swift 2013-10-18 00:34:08 UTC (rev 7176)
@@ -2,26 +2,26 @@
# app() functions for application programs to be called:
-app (file out) genseed (int nseeds)
+app (file out) genseed (int nseeds, file seed_script)
{
- genseed "-r" 2000000 "-n" nseeds stdout=@out;
+ sh "simulate.sh" "-r" 2000000 "-n" nseeds stdout=@out;
}
-app (file out) genbias (int bias_range, int nvalues)
+app (file out) genbias (int bias_range, int nvalues, file bias_script)
{
- genbias "-r" bias_range "-n" nvalues stdout=@out;
+ sh "simulate.sh" "-r" bias_range "-n" nvalues stdout=@out;
}
app (file out, file log) simulation (int timesteps, int sim_range,
- file bias_file, int scale, int sim_count)
+ file bias_file, int scale, int sim_count, file sim_script)
{
- simulate "-t" timesteps "-r" sim_range "-B" @bias_file "-x" scale
+ sh "simulate.sh" "-t" timesteps "-r" sim_range "-B" @bias_file "-x" scale
"-n" sim_count stdout=@out stderr=@log;
}
-app (file out, file log) analyze (file s[])
+app (file out, file log) analyze (file s[], file stat_script)
{
- stats @filenames(s) stdout=@out stderr=@log;
+ sh "stats.sh" @filenames(s) stdout=@out stderr=@log;
}
# Command line arguments
@@ -33,10 +33,13 @@
# Main script and data
+file simulate_script <"simulate.sh">;
+file stats_script <"stats.sh">;
+
tracef("\n*** Script parameters: nsim=%i range=%i num values=%i\n\n", nsim, range, values);
file seedfile<"output/seed.dat">; # Dynamically generated bias for simulation ensemble
-seedfile = genseed(1);
+seedfile = genseed(1,simulate_script);
int seedval = readData(seedfile);
tracef("Generated seed=%i\n", seedval);
@@ -47,11 +50,11 @@
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(1000, 20);
- (simout,simlog) = simulation(steps, range, biasfile, 1000000, values);
+ biasfile = genbias(1000, 20, simulate_script);
+ (simout,simlog) = simulation(steps, range, biasfile, 1000000, values, simulate_script);
sims[i] = simout;
}
file stats_out<"output/average.out">;
file stats_log<"output/average.log">;
-(stats_out,stats_log) = analyze(sims);
+(stats_out,stats_log) = analyze(sims, stats_script);
More information about the Swift-commit
mailing list