[Swift-commit] r5584 - SwiftApps/SciColSim

wilde at ci.uchicago.edu wilde at ci.uchicago.edu
Fri Feb 10 19:41:52 CST 2012


Author: wilde
Date: 2012-02-10 19:41:52 -0600 (Fri, 10 Feb 2012)
New Revision: 5584

Modified:
   SwiftApps/SciColSim/swiftopt.sh
Log:
Added export to user-specified params before sourcing them, so thay are visible to gensites. Removed comentary lines in param file before sourcing it.

Modified: SwiftApps/SciColSim/swiftopt.sh
===================================================================
--- SwiftApps/SciColSim/swiftopt.sh	2012-02-10 22:10:57 UTC (rev 5583)
+++ SwiftApps/SciColSim/swiftopt.sh	2012-02-11 01:41:52 UTC (rev 5584)
@@ -12,17 +12,8 @@
 paramfile=Fast01
 ram=2000M
 dryrun=
+escapecode=$(printf '\033')
 
-# check to see if the following check is even necessary on a linux distro
-system=`uname | grep Darwin`
-
-if [ $system == "Darwin" ];
-then
-    escapecode=$(echo '\033')
-else
-    escapecode=$(echo -n -e '\033')
-fi
-
 # Process command line arguments
 
 while [ $# -gt 0 ]; do
@@ -57,7 +48,10 @@
 # Get optimization parameters
 
 cp params/$paramfile $rundir/paramfile
-sed -e '/^  */d' -e 's/#.*//' -e 's/  */=/' <params/$paramfile >$rundir/params.annealing
+
+
+
+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
@@ -81,7 +75,7 @@
 
 # Echo runtime estimates
 
-echo Total jobs = $((20*$annealing_repeats*$annealing_cycles*3*$evolve_reruns)) # FIXME: Example: replace with real formulas
+# echo Total jobs = $((20*$annealing_repeats*$annealing_cycles*3*$evolve_reruns)) # FIXME: Example: replace with real formulas
 
 if [ _$dryrun != _ ]; then
   exit 0




More information about the Swift-commit mailing list