[Swift-commit] r5597 - SwiftApps/SciColSim

jonmon at ci.uchicago.edu jonmon at ci.uchicago.edu
Mon Feb 13 11:19:07 CST 2012


Author: jonmon
Date: 2012-02-13 11:19:07 -0600 (Mon, 13 Feb 2012)
New Revision: 5597

Modified:
   SwiftApps/SciColSim/swiftopt.sh
Log:
o set SWIFT_HOME only for the gensites command
o math to estimate number of jobs based on the parameter set added



Modified: SwiftApps/SciColSim/swiftopt.sh
===================================================================
--- SwiftApps/SciColSim/swiftopt.sh	2012-02-13 15:44:20 UTC (rev 5596)
+++ SwiftApps/SciColSim/swiftopt.sh	2012-02-13 17:19:07 UTC (rev 5597)
@@ -3,7 +3,7 @@
 #TODO: Fix espcape code nonense, seems to be passing in -n -e to swift
 
 # Usage: swiftopt.sh [-s sitename] [-p paramfile] [-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
@@ -59,17 +59,16 @@
 sed -e '/^[[:space:]]*\(#.*\)*$/d' -e 's/#.*//' -e 's/  */=/' -e 's/^/export /' <params/$paramfile >$rundir/params.annealing
 source $rundir/params.annealing
 
-export SWIFT_HOME=swift/bin
-gensites=$SWIFT_HOME/gensites
 swift=../swift/bin/swift # relative to runNNN/ dirs
 
 echo Optimization run $runid: site=$execsite paramfile=$paramfile
 
 # generate swift config files       # FIXME: replace this logic using gensites
-conf/gen.tc $execsite > $rundir/tc
-conf/gen.cf $execsite > $rundir/cf
-$gensites conf/$execsite.xml    > $rundir/$execsite.xml
+conf/gen.tc $execsite           > $rundir/tc
+conf/gen.cf $execsite           > $rundir/cf
 
+SWIFT_HOME=swift/bin swift/bin/gensites conf/$execsite.xml > $rundir/$execsite.xml
+
 cp movie_graph.txt $rundir
 
 # Echo parameters
@@ -81,7 +80,8 @@
 
 # Echo runtime estimates
 
-# echo Total jobs = $((20*$annealing_repeats*$annealing_cycles*3*$evolve_reruns)) # FIXME: Example: replace with real formulas
+total_jobs=`python -c "from math import ceil; print int(ceil(($max_target_innovation.00 - $min_target_innovation.00)/$target_innovation_increment.00) * $annealing_repeats * 2 * $annealing_cycles * ($evolve_reruns/$reruns_per_opt_invocation) * $nworkers)"`
+echo Total jobs = $total_jobs
 
 if [ _$dryrun != _ ]; then
   exit 0
@@ -112,22 +112,22 @@
 
 exit $?
 
- at Arg("nworkers","4")
- at arg("rerunsperapp", "100")
- at arg("seed", "0" )          FIXME
- at arg("minrange", "58")
- at arg("maxrange", "59")
- at arg("rangeinc", "50")
- at arg("nreps", "1")
- at arg("tstart", "2.0")       FIXME
- at arg("tend", "0.01")        FIXME
- at arg("trejection", "0.3")   FIXME
- at arg("evoreruns", "100")
- at arg("startingjump", "2.3") FIXME
- at arg("alphai", "0.0")
- at arg("alpham", "0.0")
- at arg("beta", "4.0")
- at arg("gamma", "50.0")
- at arg("delta", "-1.0")
- at arg("annealingcycles", "50")
+# @arg("nworkers","4")
+# @arg("rerunsperapp", "100")
+# @arg("seed", "0" )          FIXME
+# @arg("minrange", "58")
+# @arg("maxrange", "59")
+# @arg("rangeinc", "50")
+# @arg("nreps", "1")
+# @arg("tstart", "2.0")       FIXME
+# @arg("tend", "0.01")        FIXME
+# @arg("trejection", "0.3")   FIXME
+# @arg("evoreruns", "100")
+# @arg("startingjump", "2.3") FIXME
+# @arg("alphai", "0.0")
+# @arg("alpham", "0.0")
+# @arg("beta", "4.0")
+# @arg("gamma", "50.0")
+# @arg("delta", "-1.0")
+# @arg("annealingcycles", "50")
 




More information about the Swift-commit mailing list