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

davidk at ci.uchicago.edu davidk at ci.uchicago.edu
Thu Feb 16 00:19:03 CST 2012


Author: davidk
Date: 2012-02-16 00:19:02 -0600 (Thu, 16 Feb 2012)
New Revision: 5628

Added:
   SwiftApps/SciColSim/conf/beagle.cf
   SwiftApps/SciColSim/conf/fusion.cf
   SwiftApps/SciColSim/conf/fusion.xml
   SwiftApps/SciColSim/conf/local.cf
   SwiftApps/SciColSim/conf/mcs.cf
   SwiftApps/SciColSim/conf/mcs.conf
   SwiftApps/SciColSim/conf/pads-ssh.cf
   SwiftApps/SciColSim/conf/pads-ssh.xml
   SwiftApps/SciColSim/conf/pads.cf
   SwiftApps/SciColSim/conf/pads.xml
Removed:
   SwiftApps/SciColSim/conf/fusion-local-coasters.xml
   SwiftApps/SciColSim/conf/gen.beagle
   SwiftApps/SciColSim/conf/gen.cf
   SwiftApps/SciColSim/conf/gen.local
   SwiftApps/SciColSim/conf/gen.pads
   SwiftApps/SciColSim/conf/gen.tc
   SwiftApps/SciColSim/conf/pads-local-coasters.xml
   SwiftApps/SciColSim/conf/pads-ssh-coasters.xml
Modified:
   SwiftApps/SciColSim/swiftopt.sh
Log:
A few updates here:
Make swiftopt.sh use gensites for everything now - sites.xml, tc.data, and cf
Ability to use start-coaster-service configurations
New templates for MCS


Added: SwiftApps/SciColSim/conf/beagle.cf
===================================================================
--- SwiftApps/SciColSim/conf/beagle.cf	                        (rev 0)
+++ SwiftApps/SciColSim/conf/beagle.cf	2012-02-16 06:19:02 UTC (rev 5628)
@@ -0,0 +1,10 @@
+wrapperlog.always.transfer=true
+sitedir.keep=true
+execution.retries=3
+lazy.errors=true
+status.mode=provider
+use.provider.staging=false
+provider.staging.pin.swiftfiles=false
+
+#app sumloss=$PWD/../sumloss.sh
+#app evolve=$PWD/../evolve.sh

Deleted: SwiftApps/SciColSim/conf/fusion-local-coasters.xml
===================================================================
--- SwiftApps/SciColSim/conf/fusion-local-coasters.xml	2012-02-16 05:02:44 UTC (rev 5627)
+++ SwiftApps/SciColSim/conf/fusion-local-coasters.xml	2012-02-16 06:19:02 UTC (rev 5628)
@@ -1,15 +0,0 @@
-<config>
-<pool handle="fusion-local-coasters">
-  <execution jobmanager="local:pbs" provider="coaster" url="none"/>
-  <filesystem provider="local" url="none" />
-  <profile namespace="globus" key="maxtime">3600</profile>
-  <profile namespace="globus" key="jobsPerNode">1</profile>
-  <profile namespace="globus" key="slots">192</profile>
-  <profile namespace="globus" key="nodeGranularity">1</profile>
-  <profile namespace="globus" key="maxNodes">192</profile>
-  <profile namespace="karajan" key="jobThrottle">0.5</profile>
-  <profile namespace="karajan" key="initialScore">10000</profile>
-  <workdirectory>_WORK_</workdirectory>
-</pool>
-</config>
-

Added: SwiftApps/SciColSim/conf/fusion.cf
===================================================================
--- SwiftApps/SciColSim/conf/fusion.cf	                        (rev 0)
+++ SwiftApps/SciColSim/conf/fusion.cf	2012-02-16 06:19:02 UTC (rev 5628)
@@ -0,0 +1,10 @@
+wrapperlog.always.transfer=true
+sitedir.keep=true
+execution.retries=3
+lazy.errors=true
+status.mode=provider
+use.provider.staging=false
+provider.staging.pin.swiftfiles=false
+
+#app sumloss=$PWD/../sumloss.sh
+#app evolve=$PWD/../evolve.sh

Copied: SwiftApps/SciColSim/conf/fusion.xml (from rev 5625, SwiftApps/SciColSim/conf/fusion-local-coasters.xml)
===================================================================
--- SwiftApps/SciColSim/conf/fusion.xml	                        (rev 0)
+++ SwiftApps/SciColSim/conf/fusion.xml	2012-02-16 06:19:02 UTC (rev 5628)
@@ -0,0 +1,15 @@
+<config>
+<pool handle="fusion">
+  <execution jobmanager="local:pbs" provider="coaster" url="none"/>
+  <filesystem provider="local" url="none" />
+  <profile namespace="globus" key="maxtime">3600</profile>
+  <profile namespace="globus" key="jobsPerNode">1</profile>
+  <profile namespace="globus" key="slots">192</profile>
+  <profile namespace="globus" key="nodeGranularity">1</profile>
+  <profile namespace="globus" key="maxNodes">192</profile>
+  <profile namespace="karajan" key="jobThrottle">0.5</profile>
+  <profile namespace="karajan" key="initialScore">10000</profile>
+  <workdirectory>_WORK_</workdirectory>
+</pool>
+</config>
+

Deleted: SwiftApps/SciColSim/conf/gen.beagle
===================================================================
--- SwiftApps/SciColSim/conf/gen.beagle	2012-02-16 05:02:44 UTC (rev 5627)
+++ SwiftApps/SciColSim/conf/gen.beagle	2012-02-16 06:19:02 UTC (rev 5628)
@@ -1,63 +0,0 @@
-#! /bin/sh
-
-# FIXME: Substitute using gensites: PROJECT MAXTIME SLOTS CLUSTER_THROTTLE  etc
-
-cat <<END
-
-<config>
-
-<!-- 
-  <pool handle="local" >
-    <execution provider="local" url="none" />
-    <profile namespace="karajan" key="jobThrottle">0.01</profile>
-    <profile namespace="karajan" key="initialScore">10000</profile>
-
-    <filesystem provider="local"/>
-    <workdirectory>$(pwd)/swiftwork/local</workdirectory>
-  </pool>
-
-  <pool handle="beagle">
-    <execution provider="coaster" jobmanager="ssh:pbs" url="login.beagle.ci.uchicago.edu" />
-    <profile namespace="globus" key="project">CI-MCB000119</profile>
-    <profile namespace="env" key="SWIFT_GEN_SCRIPTS">KEEP</profile>
-    <profile namespace="env" key="OMP_NUM_THREADS">20</profile>
-    <profile namespace="globus" key="jobsPerNode">1</profile>
-    <profile namespace="globus" key="lowOverAllocation">100</profile>
-    <profile namespace="globus" key="highOverAllocation">100</profile>
-    <profile namespace="globus" key="maxTime">10000</profile>
-    <profile namespace="globus" key="maxWallTime">01:30:00</profile>
-    <profile namespace="globus" key="slots">50</profile>
-    <profile namespace="globus" key="nodeGranularity">2</profile>
-    <profile namespace="globus" key="maxNodes">2</profile>
-    <profile namespace="globus" key="queue">route</profile>
-    <profile namespace="karajan" key="jobThrottle">9.99</profile>
-    <profile namespace="karajan" key="initialScore">10000</profile>
-
-    <filesystem provider="local"/>
-    <workdirectory>/lustre/beagle/${USER}/swift.workdir</workdirectory>
-  </pool>
--->
-
-  <pool handle="beagle">
-    <execution provider="coaster" jobmanager="pbs:local" />
-    <profile namespace="globus" key="project">CI-MCB000119</profile>
-    <profile namespace="env" key="SWIFT_GEN_SCRIPTS">KEEP</profile>
-    <profile namespace="env" key="OMP_NUM_THREADS">20</profile>
-    <profile namespace="globus" key="jobsPerNode">1</profile>
-    <profile namespace="globus" key="lowOverAllocation">100</profile>
-    <profile namespace="globus" key="highOverAllocation">100</profile>
-    <profile namespace="globus" key="maxTime">10000</profile>
-    <profile namespace="globus" key="maxWallTime">01:30:00</profile>
-    <profile namespace="globus" key="slots">50</profile>
-    <profile namespace="globus" key="nodeGranularity">2</profile>
-    <profile namespace="globus" key="maxNodes">2</profile>
-    <profile namespace="globus" key="queue">route</profile>
-    <profile namespace="karajan" key="jobThrottle">9.99</profile>
-    <profile namespace="karajan" key="initialScore">10000</profile>
-
-    <filesystem provider="local"/>
-    <workdirectory>/lustre/beagle/${USER}/swift.workdir</workdirectory>
-  </pool>
-</config>
-
-END

Deleted: SwiftApps/SciColSim/conf/gen.cf
===================================================================
--- SwiftApps/SciColSim/conf/gen.cf	2012-02-16 05:02:44 UTC (rev 5627)
+++ SwiftApps/SciColSim/conf/gen.cf	2012-02-16 06:19:02 UTC (rev 5628)
@@ -1,9 +0,0 @@
-cat <<END
-wrapperlog.always.transfer=true
-sitedir.keep=true
-execution.retries=3
-lazy.errors=true
-status.mode=provider
-use.provider.staging=false
-provider.staging.pin.swiftfiles=false
-END

Deleted: SwiftApps/SciColSim/conf/gen.local
===================================================================
--- SwiftApps/SciColSim/conf/gen.local	2012-02-16 05:02:44 UTC (rev 5627)
+++ SwiftApps/SciColSim/conf/gen.local	2012-02-16 06:19:02 UTC (rev 5628)
@@ -1,15 +0,0 @@
-#! /bin/sh
-
-# FIXME: Set throttle etc with gensites param (ideally based on # local cpus?)
-
-cat <<END
-<config>
-  <pool handle="local" >
-    <execution provider="local" url="none" />
-    <profile namespace="karajan" key="jobThrottle">0.05</profile>
-    <profile namespace="karajan" key="initialScore">10000</profile>
-    <filesystem provider="local"/>
-    <workdirectory>$(pwd)/swiftwork/local</workdirectory>
-  </pool>
-</config>
-END
\ No newline at end of file

Deleted: SwiftApps/SciColSim/conf/gen.pads
===================================================================
--- SwiftApps/SciColSim/conf/gen.pads	2012-02-16 05:02:44 UTC (rev 5627)
+++ SwiftApps/SciColSim/conf/gen.pads	2012-02-16 06:19:02 UTC (rev 5628)
@@ -1,45 +0,0 @@
-#! /bin/sh
-
-# FIXME: Substitute using gensites: PROJECT MAXTIME SLOTS CLUSTER_THROTTLE  etc
-
-cat <<END
-
-<config>
-
-  <pool handle="local" >
-
-    <execution provider="local" url="none" />
-    <profile namespace="karajan" key="jobThrottle">0.01</profile>
-    <profile namespace="karajan" key="initialScore">10000</profile>
-
-    <filesystem provider="local"/>
-    <workdirectory>$(pwd)/swiftwork/local</workdirectory>
-
-  </pool>
-
-  <pool handle="pads">
-
-    <execution provider="coaster" jobmanager="ssh:pbs" url="login.pads.ci.uchicago.edu" />
-    <profile namespace="globus" key="project">CI-CCR000013</profile>
-    <profile namespace="env" key="SWIFT_GEN_SCRIPTS">KEEP</profile>
-    <profile namespace="globus" key="ppn">8</profile>
-    <profile namespace="globus" key="jobsPerNode">1</profile>
-    <profile namespace="globus" key="lowOverAllocation">100</profile>
-    <profile namespace="globus" key="highOverAllocation">100</profile>
-    <profile namespace="globus" key="maxTime">3600</profile>
-    <profile namespace="globus" key="maxWallTime">00:02:00</profile>
-    <profile namespace="globus" key="slots">10</profile>
-    <profile namespace="globus" key="nodeGranularity">1</profile>
-    <profile namespace="globus" key="maxNodes">1</profile>
-    <profile namespace="globus" key="queue">fast</profile>
-    <profile namespace="karajan" key="jobThrottle">9.59</profile>
-    <profile namespace="karajan" key="initialScore">10000</profile>
-
-    <filesystem provider="local"/>
-    <workdirectory>$(pwd)/swiftwork/pads</workdirectory>
-
-  </pool>
-
-</config>
-
-END

Deleted: SwiftApps/SciColSim/conf/gen.tc
===================================================================
--- SwiftApps/SciColSim/conf/gen.tc	2012-02-16 05:02:44 UTC (rev 5627)
+++ SwiftApps/SciColSim/conf/gen.tc	2012-02-16 06:19:02 UTC (rev 5628)
@@ -1,8 +0,0 @@
-#! /bin/sh
-
-site=$1
-
-cat <<END
-$site evolve $(pwd)/evolve.sh null null GLOBUS::maxwalltime="00:10:00"
-$site sumloss $(pwd)/sumloss.sh null null null
-END

Added: SwiftApps/SciColSim/conf/local.cf
===================================================================
--- SwiftApps/SciColSim/conf/local.cf	                        (rev 0)
+++ SwiftApps/SciColSim/conf/local.cf	2012-02-16 06:19:02 UTC (rev 5628)
@@ -0,0 +1,10 @@
+wrapperlog.always.transfer=true
+sitedir.keep=true
+execution.retries=3
+lazy.errors=true
+status.mode=provider
+use.provider.staging=false
+provider.staging.pin.swiftfiles=false
+
+#app sumloss=$PWD/../sumloss.sh
+#app evolve=$PWD/../evolve.sh

Added: SwiftApps/SciColSim/conf/mcs.cf
===================================================================
--- SwiftApps/SciColSim/conf/mcs.cf	                        (rev 0)
+++ SwiftApps/SciColSim/conf/mcs.cf	2012-02-16 06:19:02 UTC (rev 5628)
@@ -0,0 +1,7 @@
+wrapperlog.always.transfer=true
+sitedir.keep=true
+execution.retries=3
+lazy.errors=true
+status.mode=provider
+use.provider.staging=false
+provider.staging.pin.swiftfiles=false

Added: SwiftApps/SciColSim/conf/mcs.conf
===================================================================
--- SwiftApps/SciColSim/conf/mcs.conf	                        (rev 0)
+++ SwiftApps/SciColSim/conf/mcs.conf	2012-02-16 06:19:02 UTC (rev 5628)
@@ -0,0 +1,45 @@
+# Keep all interesting settings in one place
+# User should modify this to fit environment
+
+# Location of SWIFT. If empty, PATH is referenced
+export SWIFT=
+
+# Where to place/launch worker.pl on the remote machine for sites.xml
+export WORKER_LOCATION=_RUNDIR_
+
+# How to launch workers: local, ssh, or cobalt
+export WORKER_MODE=ssh
+
+# Worker logging setting passed to worker.pl for sites.xml
+export WORKER_LOGGING_LEVEL=INFO
+
+# User name to use for all systems
+export WORKER_USERNAME=$USER
+
+# Worker host names for ssh
+export WORKER_HOSTS="crush thwomp stomp crank steamroller grind churn trounce thrash vanquish"
+
+# Directory to keep log files, relative to working directory when launching start-coaster-service
+export LOG_DIR=logs
+export WORKER_LOG_DIR=_RUNDIR_
+
+# Manually define ports. If not specified, ports will be automatically generated
+export LOCAL_PORT=
+export SERVICE_PORT=
+
+# Set shared filesystem to no since work will be done in local /sandbox directory
+export SHARED_FILESYSTEM=yes
+
+# start-coaster-service tries to automatically detect IP address. 
+# Specify here if auto detection is not working correctly
+export IPADDR=
+
+# Below are various settings to give information about how to create sites.xml
+#export WORK=_RUNDIR_
+export JOBS_PER_NODE=1
+# export JOB_THROTTLE=$( echo "scale=5; $( echo $WORKER_HOSTS | wc -w )/100 - 0.00001"|bc )
+
+# Swift applications
+#app sumloss=$PWD/../sumloss.sh
+#app evolve=$PWD/../evolve.sh
+

Deleted: SwiftApps/SciColSim/conf/pads-local-coasters.xml
===================================================================
--- SwiftApps/SciColSim/conf/pads-local-coasters.xml	2012-02-16 05:02:44 UTC (rev 5627)
+++ SwiftApps/SciColSim/conf/pads-local-coasters.xml	2012-02-16 06:19:02 UTC (rev 5628)
@@ -1,31 +0,0 @@
-<config>
-  <pool handle="local" >
-    <execution provider="local" url="none" />
-    <profile namespace="karajan" key="jobThrottle">0.09</profile>
-    <profile namespace="karajan" key="initialScore">10000</profile>
-    <filesystem provider="local"/>
-    <workdirectory>_WORK_</workdirectory>
-  </pool>
-  <pool handle="pads-local-coasters">
-    <execution provider="coaster" jobmanager="local:pbs" />
-    <filesystem provider="local"/>
-    <workdirectory>_WORK_</workdirectory>
-
-    <profile namespace="globus" key="project">CI-CCR000013</profile>
-    <profile namespace="globus" key="ppn">8</profile>
-    <profile namespace="globus" key="jobsPerNode">1</profile>
-    <profile namespace="globus" key="lowOverAllocation">100</profile>
-    <profile namespace="globus" key="highOverAllocation">100</profile>
-    <profile namespace="globus" key="maxTime">3600</profile>
-    <profile namespace="globus" key="maxWallTime">00:02:00</profile>
-    <profile namespace="globus" key="slots">192</profile>
-    <profile namespace="globus" key="nodeGranularity">1</profile>
-    <profile namespace="globus" key="maxNodes">1</profile>
-    <profile namespace="globus" key="queue">fast</profile>
-
-    <profile namespace="karajan" key="jobThrottle">0.5</profile>
-    <profile namespace="karajan" key="initialScore">10000</profile>
-
-    <profile namespace="env" key="SWIFT_GEN_SCRIPTS">KEEP</profile>
-  </pool>
-</config>

Deleted: SwiftApps/SciColSim/conf/pads-ssh-coasters.xml
===================================================================
--- SwiftApps/SciColSim/conf/pads-ssh-coasters.xml	2012-02-16 05:02:44 UTC (rev 5627)
+++ SwiftApps/SciColSim/conf/pads-ssh-coasters.xml	2012-02-16 06:19:02 UTC (rev 5628)
@@ -1,31 +0,0 @@
-<config>
-  <pool handle="local" >
-    <execution provider="local" url="none" />
-    <profile namespace="karajan" key="jobThrottle">0.09</profile>
-    <profile namespace="karajan" key="initialScore">10000</profile>
-    <filesystem provider="local"/>
-    <workdirectory>_WORK_</workdirectory>
-  </pool>
-  <pool handle="pads-ssh-coasters">
-    <execution provider="pads-ssh-coasters" jobmanager="ssh:pbs" url="login.pads.ci.uchicago.edu" />
-    <filesystem provider="local"/>
-    <workdirectory>_WORK_</workdirectory>
-
-    <profile namespace="globus" key="project">CI-CCR000013</profile>
-    <profile namespace="globus" key="ppn">8</profile>
-    <profile namespace="globus" key="jobsPerNode">1</profile>
-    <profile namespace="globus" key="lowOverAllocation">100</profile>
-    <profile namespace="globus" key="highOverAllocation">100</profile>
-    <profile namespace="globus" key="maxTime">3600</profile>
-    <profile namespace="globus" key="maxWallTime">00:02:00</profile>
-    <profile namespace="globus" key="slots">192</profile>
-    <profile namespace="globus" key="nodeGranularity">1</profile>
-    <profile namespace="globus" key="maxNodes">1</profile>
-    <profile namespace="globus" key="queue">fast</profile>
-
-    <profile namespace="karajan" key="jobThrottle">0.5</profile>
-    <profile namespace="karajan" key="initialScore">10000</profile>
-
-    <profile namespace="env" key="SWIFT_GEN_SCRIPTS">KEEP</profile>
-  </pool>
-</config>

Added: SwiftApps/SciColSim/conf/pads-ssh.cf
===================================================================
--- SwiftApps/SciColSim/conf/pads-ssh.cf	                        (rev 0)
+++ SwiftApps/SciColSim/conf/pads-ssh.cf	2012-02-16 06:19:02 UTC (rev 5628)
@@ -0,0 +1,10 @@
+wrapperlog.always.transfer=true
+sitedir.keep=true
+execution.retries=3
+lazy.errors=true
+status.mode=provider
+use.provider.staging=false
+provider.staging.pin.swiftfiles=false
+
+#app sumloss=$PWD/../sumloss.sh
+#app evolve=$PWD/../evolve.sh

Copied: SwiftApps/SciColSim/conf/pads-ssh.xml (from rev 5625, SwiftApps/SciColSim/conf/pads-ssh-coasters.xml)
===================================================================
--- SwiftApps/SciColSim/conf/pads-ssh.xml	                        (rev 0)
+++ SwiftApps/SciColSim/conf/pads-ssh.xml	2012-02-16 06:19:02 UTC (rev 5628)
@@ -0,0 +1,31 @@
+<config>
+  <pool handle="local" >
+    <execution provider="local" url="none" />
+    <profile namespace="karajan" key="jobThrottle">0.09</profile>
+    <profile namespace="karajan" key="initialScore">10000</profile>
+    <filesystem provider="local"/>
+    <workdirectory>_WORK_</workdirectory>
+  </pool>
+  <pool handle="pads-ssh-coasters">
+    <execution provider="pads-ssh-coasters" jobmanager="ssh:pbs" url="login.pads.ci.uchicago.edu" />
+    <filesystem provider="local"/>
+    <workdirectory>_WORK_</workdirectory>
+
+    <profile namespace="globus" key="project">CI-CCR000013</profile>
+    <profile namespace="globus" key="ppn">8</profile>
+    <profile namespace="globus" key="jobsPerNode">1</profile>
+    <profile namespace="globus" key="lowOverAllocation">100</profile>
+    <profile namespace="globus" key="highOverAllocation">100</profile>
+    <profile namespace="globus" key="maxTime">3600</profile>
+    <profile namespace="globus" key="maxWallTime">00:02:00</profile>
+    <profile namespace="globus" key="slots">192</profile>
+    <profile namespace="globus" key="nodeGranularity">1</profile>
+    <profile namespace="globus" key="maxNodes">1</profile>
+    <profile namespace="globus" key="queue">fast</profile>
+
+    <profile namespace="karajan" key="jobThrottle">0.5</profile>
+    <profile namespace="karajan" key="initialScore">10000</profile>
+
+    <profile namespace="env" key="SWIFT_GEN_SCRIPTS">KEEP</profile>
+  </pool>
+</config>

Added: SwiftApps/SciColSim/conf/pads.cf
===================================================================
--- SwiftApps/SciColSim/conf/pads.cf	                        (rev 0)
+++ SwiftApps/SciColSim/conf/pads.cf	2012-02-16 06:19:02 UTC (rev 5628)
@@ -0,0 +1,10 @@
+wrapperlog.always.transfer=true
+sitedir.keep=true
+execution.retries=3
+lazy.errors=true
+status.mode=provider
+use.provider.staging=false
+provider.staging.pin.swiftfiles=false
+
+#app sumloss=$PWD/../sumloss.sh
+#app evolve=$PWD/../evolve.sh

Copied: SwiftApps/SciColSim/conf/pads.xml (from rev 5625, SwiftApps/SciColSim/conf/pads-local-coasters.xml)
===================================================================
--- SwiftApps/SciColSim/conf/pads.xml	                        (rev 0)
+++ SwiftApps/SciColSim/conf/pads.xml	2012-02-16 06:19:02 UTC (rev 5628)
@@ -0,0 +1,31 @@
+<config>
+  <pool handle="local" >
+    <execution provider="local" url="none" />
+    <profile namespace="karajan" key="jobThrottle">0.09</profile>
+    <profile namespace="karajan" key="initialScore">10000</profile>
+    <filesystem provider="local"/>
+    <workdirectory>_WORK_</workdirectory>
+  </pool>
+  <pool handle="pads">
+    <execution provider="coaster" jobmanager="local:pbs" />
+    <filesystem provider="local"/>
+    <workdirectory>_WORK_</workdirectory>
+
+    <profile namespace="globus" key="project">CI-CCR000013</profile>
+    <profile namespace="globus" key="ppn">8</profile>
+    <profile namespace="globus" key="jobsPerNode">1</profile>
+    <profile namespace="globus" key="lowOverAllocation">100</profile>
+    <profile namespace="globus" key="highOverAllocation">100</profile>
+    <profile namespace="globus" key="maxTime">3600</profile>
+    <profile namespace="globus" key="maxWallTime">00:02:00</profile>
+    <profile namespace="globus" key="slots">192</profile>
+    <profile namespace="globus" key="nodeGranularity">1</profile>
+    <profile namespace="globus" key="maxNodes">1</profile>
+    <profile namespace="globus" key="queue">fast</profile>
+
+    <profile namespace="karajan" key="jobThrottle">0.5</profile>
+    <profile namespace="karajan" key="initialScore">10000</profile>
+
+    <profile namespace="env" key="SWIFT_GEN_SCRIPTS">KEEP</profile>
+  </pool>
+</config>

Modified: SwiftApps/SciColSim/swiftopt.sh
===================================================================
--- SwiftApps/SciColSim/swiftopt.sh	2012-02-16 05:02:44 UTC (rev 5627)
+++ SwiftApps/SciColSim/swiftopt.sh	2012-02-16 06:19:02 UTC (rev 5628)
@@ -1,4 +1,4 @@
-#! /bin/sh
+#!/bin/bash
 
 #TODO: Fix espcape code nonense, seems to be passing in -n -e to swift
 
@@ -11,18 +11,37 @@
 
 usage="$0 [-s sitename] [-p paramfile] [-n] # -n for dryrun: just print params and time estimates"
 
-# Default settings:
+# Function to run Swift
+runswift() { 
+   SWIFT_HEAP_MAX=$ram SWIFT_LIB=.. $swift >> swift.out 2>&1 -tc.file tc.data -sites.file $1 -config cf ../annealing.swift -e33="$escapecode" \
+                                            \
+   -minrange=$min_target_innovation         \
+   -maxrange=$max_target_innovation         \
+   -rangeinc=$target_innovation_increment   \
+                                            \
+   -nreps=$annealing_repeats                \
+   -annealingcycles=$annealing_cycles       \
+   -evoreruns=$evolve_reruns                \
+                                            \
+   -alphai=$alpha_i                         \
+   -alpham=$alpha_m                         \
+   -beta=$beta                              \
+   -gamma=$gamma                            \
+   -delta=$delta                            \
+                                            \
+   -nworkers=$nworkers                      \
+   -rerunsperapp=$reruns_per_opt_invocation 
+}
 
+# Default settings
 execsite=local
 paramfile=Fast01
 ram=2000M
 dryrun=
 escapecode=$(printf '\033')
-
 fixed_params=2     # Currently CONSTANT, will want to have this vary
 
 # Process command line arguments
-
 while [ $# -gt 0 ]; do
   case $1 in
     -s) execsite=$2; shift 2;;
@@ -34,7 +53,6 @@
 done
 
 # Create next unique run id and run directory
-
 if [ ! -f nextrun ]; then
   echo 000 >nextrun
 else
@@ -53,66 +71,69 @@
 fi
 
 # Get optimization parameters
-
 cp params/$paramfile $rundir/paramfile
-
 sed -e '/^[[:space:]]*\(#.*\)*$/d' -e 's/#.*//' -e 's/  */=/' -e 's/^/export /' <params/$paramfile >$rundir/params.annealing
 source $rundir/params.annealing
-
 swift=../swift/bin/swift # relative to runNNN/ dirs
-#gensites=`which gensites`
-#swift=`which swift`
-
 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
+# Report an error if configuration files are missing
+if [ ! -f "conf/$execsite.xml" ] && [ ! -f "conf/$execsite.conf" ]; then
+   echo Unable to find requested configuration file for site $execsite
+   exit 1
+fi
 
+# Use start-coaster-service if site is a .conf file      
+if [ -f "conf/$execsite.conf" ]; then
+   USE_SCS=1
+fi
+
+# Check for missing .cf files
+if [ -f "conf/$execsite.xml" ] && [ ! -f "conf/$execsite.cf" ]; then
+   echo Missing configuration file $execsite.cf
+fi
+
 cp movie_graph.txt $rundir
 
 # Echo parameters
-
 echo Annealing parameters:
 echo
 cat $rundir/params.annealing
 echo
 
 # Echo runtime estimates
-
 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 * $fixed_params * $annealing_cycles * ($evolve_reruns/$reruns_per_opt_invocation) * $nworkers)"`
 echo Total jobs = $total_jobs
 
 cd $rundir
 
 # Do the run
-
 export WORK=$PWD/swiftwork
 
-SWIFT_HOME=../swift/bin ../swift/bin/gensites ../conf/$execsite.xml > $execsite.xml
+# Use start-coaster-service if the site uses a .conf file
+if [ "$USE_SCS" == "1" ]; then
+   cp ../conf/$execsite.conf coaster-service.conf
+   cp ../conf/$execsite.cf cf
+   sed -i -e "s at _RUNDIR_@$rundir@" coaster-service.conf
+   start-coaster-service
+fi
 
+# Run gensites
+if [ ! "$USE_SCS" == 1 ]; then
+   cp ../conf/$execsite.cf cf
+   SWIFT_HOME=../swift/bin ../swift/bin/gensites -p ../conf/$execsite.cf ../conf/$execsite.xml > $execsite.xml
+fi
+
 if [ _$dryrun != _ ]; then
   exit 0
 fi
 
-SWIFT_HEAP_MAX=$ram SWIFT_LIB=.. $swift >> swift.out 2>&1 -tc.file tc -sites.file $execsite.xml -config cf ../annealing.swift -e33="$escapecode" \
-                                         \
--minrange=$min_target_innovation         \
--maxrange=$max_target_innovation         \
--rangeinc=$target_innovation_increment   \
-                                         \
--nreps=$annealing_repeats                \
--annealingcycles=$annealing_cycles       \
--evoreruns=$evolve_reruns                \
-                                         \
--alphai=$alpha_i                         \
--alpham=$alpha_m                         \
--beta=$beta                              \
--gamma=$gamma                            \
--delta=$delta                            \
-                                         \
--nworkers=$nworkers                      \
--rerunsperapp=$reruns_per_opt_invocation
+if [ "$USE_SCS" == "1" ]; then
+   runswift "sites.xml"
+   stop-coaster-service
+else
+   runswift "$execsite.xml"
+fi
 
 exit $?
 




More information about the Swift-commit mailing list