[Swift-commit] r5743 - in SwiftApps/SciColSim: . conf

davidk at ci.uchicago.edu davidk at ci.uchicago.edu
Wed Apr 4 00:27:54 CDT 2012


Author: davidk
Date: 2012-04-04 00:27:53 -0500 (Wed, 04 Apr 2012)
New Revision: 5743

Added:
   SwiftApps/SciColSim/conf/grid.cf
   SwiftApps/SciColSim/start-osg.sh
   SwiftApps/SciColSim/stop-osg.sh
Modified:
   SwiftApps/SciColSim/annealing.swift
   SwiftApps/SciColSim/getswift.sh
   SwiftApps/SciColSim/swiftopt.sh
Log:
Change needed to run on OSG


Modified: SwiftApps/SciColSim/annealing.swift
===================================================================
--- SwiftApps/SciColSim/annealing.swift	2012-04-03 22:18:58 UTC (rev 5742)
+++ SwiftApps/SciColSim/annealing.swift	2012-04-04 05:27:53 UTC (rev 5743)
@@ -35,6 +35,18 @@
     // tracef("newx(%f,%f)=%f\n",x,dx,nx);
 }
 
+app (file outfile, file loss ) evolve_wget ( string args[], file graph )
+{
+   bash "-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
@@ -289,7 +301,11 @@
 
         file graph <"movie_graph.txt">;
 
-        ( outfile, rfile[i] ) = evolve( args, graph );
+        if(@arg("wget") == "true") {
+           ( outfile, rfile[i] ) = evolve_wget( args, graph );
+        } else {
+           ( outfile, rfile[i] ) = evolve( args, graph );
+        }
 
         tracef("multi_loss: i=%i calling evolve, args=%q\n", i, args);
         // tracef("multi_loss: after evolve: i=%i %k %k\n", i, outfile, rfile[i]);

Added: SwiftApps/SciColSim/conf/grid.cf
===================================================================
--- SwiftApps/SciColSim/conf/grid.cf	                        (rev 0)
+++ SwiftApps/SciColSim/conf/grid.cf	2012-04-04 05:27:53 UTC (rev 5743)
@@ -0,0 +1,11 @@
+wrapperlog.always.transfer=true
+sitedir.keep=true
+execution.retries=3
+lazy.errors=true
+status.mode=provider
+use.provider.staging=true
+provider.staging.pin.swiftfiles=false
+
+#app localhost sumloss=$PWD/../sumloss.sh
+#app grid bash=/bin/bash
+

Modified: SwiftApps/SciColSim/getswift.sh
===================================================================
--- SwiftApps/SciColSim/getswift.sh	2012-04-03 22:18:58 UTC (rev 5742)
+++ SwiftApps/SciColSim/getswift.sh	2012-04-04 05:27:53 UTC (rev 5743)
@@ -35,6 +35,12 @@
     echo "svn cat --revision 5636 https://svn.ci.uchicago.edu/svn/vdl2/trunk/bin/swift > swift-0.93/bin/swift"
 fi
 
+echo "Retrieving gridutils"
+cd swift-0.93/bin
+wget http://www.ci.uchicago.edu/~davidk/SciColSim/gridutils.tar.gz
+tar xvfz gridutils.tar.gz
+cd ../..
+
 echo
 echo Swift installed at $PWD/$release
 echo

Added: SwiftApps/SciColSim/start-osg.sh
===================================================================
--- SwiftApps/SciColSim/start-osg.sh	                        (rev 0)
+++ SwiftApps/SciColSim/start-osg.sh	2012-04-04 05:27:53 UTC (rev 5743)
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+#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
+#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
+rm service*


Property changes on: SwiftApps/SciColSim/start-osg.sh
___________________________________________________________________
Added: svn:executable
   + *

Added: SwiftApps/SciColSim/stop-osg.sh
===================================================================
--- SwiftApps/SciColSim/stop-osg.sh	                        (rev 0)
+++ SwiftApps/SciColSim/stop-osg.sh	2012-04-04 05:27:53 UTC (rev 5743)
@@ -0,0 +1,4 @@
+#!/bin/bash
+
+condor_rm $USER
+killall -u $USER java swift


Property changes on: SwiftApps/SciColSim/stop-osg.sh
___________________________________________________________________
Added: svn:executable
   + *

Modified: SwiftApps/SciColSim/swiftopt.sh
===================================================================
--- SwiftApps/SciColSim/swiftopt.sh	2012-04-03 22:18:58 UTC (rev 5742)
+++ SwiftApps/SciColSim/swiftopt.sh	2012-04-04 05:27:53 UTC (rev 5743)
@@ -1,13 +1,13 @@
 #!/bin/bash
 
-# Usage: swiftopt.sh [-s sitename] [-p paramfile] [-n # for dryrun ]
+# Usage: swiftopt.sh [-s sitename] [-p paramfile] [-w] [-n # for dryrun ]
 #
 # NOTE: this command expects symlink "swift" in the cur dir to point
 # to relese installed by setup.sh If you want to run with a different
 # swift release, replace symlink "swift" with a link to your swift
 # release dir.
 
-usage="$0 [-s sitename] [-p paramfile] [-n] # -n for dryrun: just print params and time estimates"
+usage="$0 [-s sitename] [-p paramfile] [-n] [-w] # -n for dryrun: just print params and time estimates"
 
 # Function to run Swift
 runswift() {
@@ -28,7 +28,8 @@
    -delta=$delta                            \
                                             \
    -nworkers=$nworkers                      \
-   -rerunsperapp=$reruns_per_opt_invocation
+   -rerunsperapp=$reruns_per_opt_invocation \
+   -wget=$wget
 }
 
 
@@ -39,6 +40,7 @@
 dryrun=
 escapecode=$(printf '\033')
 variable_params=5     # Currently CONSTANT, will want to have this vary
+wget=false
 
 # Process command line arguments
 while [ $# -gt 0 ]; do
@@ -46,6 +48,7 @@
     -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;;
   esac




More information about the Swift-commit mailing list