[Swift-commit] r5753 - in SwiftApps/SciColSim: . conf
davidk at ci.uchicago.edu
davidk at ci.uchicago.edu
Mon Apr 23 08:42:00 CDT 2012
Author: davidk
Date: 2012-04-23 08:41:59 -0500 (Mon, 23 Apr 2012)
New Revision: 5753
Modified:
SwiftApps/SciColSim/README
SwiftApps/SciColSim/annealing.swift
SwiftApps/SciColSim/conf/grid.cf
SwiftApps/SciColSim/start-osg.sh
SwiftApps/SciColSim/swiftopt.sh
Log:
Changes for running on different sites based on the value of target_innovation
Some updated documentation for running on OSG
Modified: SwiftApps/SciColSim/README
===================================================================
--- SwiftApps/SciColSim/README 2012-04-21 21:43:53 UTC (rev 5752)
+++ SwiftApps/SciColSim/README 2012-04-23 13:41:59 UTC (rev 5753)
@@ -80,7 +80,20 @@
./test-swift.sh >& test-swift.out
+*** OSG
+To run on OSG, run the following commands;
+voms-proxy-init -voms Engage -valid 72:00
+./start-osg <number of nodes to request>
+./swiftopt.sh -s grid -p Fast01 -w &
+
+This has only been tested with the Fast01 parameter set as of now. The "-w"
+option sets file transfers to be handled by using wget. If you are using OSG
+with another site, you can use the -l option of swiftopt to separate short and
+long runs based on the value of target_innovation. For example, you can use
+Ranger for short runs, and OSG for long runs. Adjust conf/grid.cf app
+definitions for bash_short and bash_long according to your needs.
+
*** Overview
The code simulates the exploration of a chemical network by a research
Modified: SwiftApps/SciColSim/annealing.swift
===================================================================
--- SwiftApps/SciColSim/annealing.swift 2012-04-21 21:43:53 UTC (rev 5752)
+++ SwiftApps/SciColSim/annealing.swift 2012-04-23 13:41:59 UTC (rev 5753)
@@ -47,6 +47,30 @@
stdout=@outfile;
}
+app (file outfile, file loss ) evolve_wget_short ( string args[], file graph )
+{
+ bash_short "-c" @strcat("wget http://www.ci.uchicago.edu/~davidk/SciColSim/evolve-wrapper.sh; ",
+ "chmod +x ./evolve-wrapper.sh; ./evolve-wrapper.sh ", @loss, " ",
+ args[0], " ", args[1], " ", args[2], " ", args[3], " ", args[4], " ",
+ args[5], " ", args[6], " ", args[7], " ", args[8], " ", args[9], " ",
+ args[10], " ", args[11], " ", args[12], " ", args[13], " ", args[14],
+ " ", args[15], " ", args[16], " ", args[17], " ", args[18], " ",
+ args[19], " ", args[20], " ", args[21], " ", args[22], " ", args[23])
+ stdout=@outfile;
+}
+
+app (file outfile, file loss ) evolve_wget_long ( string args[], file graph )
+{
+ bash_long "-c" @strcat("wget http://www.ci.uchicago.edu/~davidk/SciColSim/evolve-wrapper.sh; ",
+ "chmod +x ./evolve-wrapper.sh; ./evolve-wrapper.sh ", @loss, " ",
+ args[0], " ", args[1], " ", args[2], " ", args[3], " ", args[4], " ",
+ args[5], " ", args[6], " ", args[7], " ", args[8], " ", args[9], " ",
+ args[10], " ", args[11], " ", args[12], " ", args[13], " ", args[14],
+ " ", args[15], " ", args[16], " ", args[17], " ", args[18], " ",
+ args[19], " ", args[20], " ", args[21], " ", args[22], " ", args[23])
+ stdout=@outfile;
+}
+
app (file outfile, file loss ) evolve ( string args[], file graph )
{
evolve @loss args stdout=@outfile; // graph is passed implicitly
@@ -302,8 +326,22 @@
file graph <"movie_graph.txt">;
if(@arg("wget") == "true") {
- ( outfile, rfile[i] ) = evolve_wget( args, graph );
- } else {
+
+ // Separate long runs from short runs when longruns option is set
+ if(@arg("longruns") == "true") {
+ float mean = @tofloat(@arg("minrange")) + @tofloat(@arg("maxrange")) / 2.0;
+ if(target_innov <= mean) {
+ ( outfile, rfile[i] ) = evolve_wget_short( args, graph );
+ }
+ else {
+ ( outfile, rfile[i] ) = evolve_wget_long( args, graph );
+ }
+ }
+
+ ( outfile, rfile[i] ) = evolve_wget( args, graph );
+ }
+
+ else {
( outfile, rfile[i] ) = evolve( args, graph );
}
Modified: SwiftApps/SciColSim/conf/grid.cf
===================================================================
--- SwiftApps/SciColSim/conf/grid.cf 2012-04-21 21:43:53 UTC (rev 5752)
+++ SwiftApps/SciColSim/conf/grid.cf 2012-04-23 13:41:59 UTC (rev 5753)
@@ -8,4 +8,5 @@
#app localhost sumloss=$PWD/../sumloss.sh
#app grid bash=/bin/bash
-
+#app grid bash_short=/bin/bash
+#app grid bash_long=/bin/bash
Modified: SwiftApps/SciColSim/start-osg.sh
===================================================================
--- SwiftApps/SciColSim/start-osg.sh 2012-04-21 21:43:53 UTC (rev 5752)
+++ SwiftApps/SciColSim/start-osg.sh 2012-04-23 13:41:59 UTC (rev 5753)
@@ -3,6 +3,7 @@
#voms-proxy-init
mkdir -p condor
swift-0.93/bin/start-grid-service --loglevel DEBUG --throttle 9.99 --jobspernode 1 > start-grid-service.log 2>&1
+sleep 15
#run-gwms-workers http://communicado.ci.uchicago.edu:$1 $2 > gwms-workers.log 2>&1 &
swift-0.93/bin/run-gwms-workers http://$( hostname -f ):$( cat service-0.wport ) $1 > gwms-workers.log 2>&1 &
mv sites.grid-ps.xml conf/grid.xml
Modified: SwiftApps/SciColSim/swiftopt.sh
===================================================================
--- SwiftApps/SciColSim/swiftopt.sh 2012-04-21 21:43:53 UTC (rev 5752)
+++ SwiftApps/SciColSim/swiftopt.sh 2012-04-23 13:41:59 UTC (rev 5753)
@@ -7,7 +7,7 @@
# swift release, replace symlink "swift" with a link to your swift
# release dir.
-usage="$0 [-s sitename] [-p paramfile] [-n] [-w] # -n for dryrun: just print params and time estimates"
+usage="$0 [-s sitename] [-p paramfile] [-n] [-w] [-l] # -n for dryrun: just print params and time estimates"
# Function to run Swift
runswift() {
@@ -29,7 +29,8 @@
\
-nworkers=$nworkers \
-rerunsperapp=$reruns_per_opt_invocation \
- -wget=$wget
+ -wget=$wget \
+ -longruns=$longruns
}
@@ -41,13 +42,15 @@
escapecode=$(printf '\033')
variable_params=5 # Currently CONSTANT, will want to have this vary
wget=false
+longruns=false
# Process command line arguments
while [ $# -gt 0 ]; do
case $1 in
+ -l) longruns=true; shift 1;;
+ -n) dryrun=true; shift 1;;
+ -p) paramfile=$2; shift 2;;
-s) execsite=$2; shift 2;;
- -p) paramfile=$2; shift 2;;
- -n) dryrun=true; shift 1;;
-w) wget=true; shift 1;;
*) echo $usage 1>&2
exit 1;;
More information about the Swift-commit
mailing list