[Swift-commit] r5567 - SwiftApps/SciColSim
jonmon at ci.uchicago.edu
jonmon at ci.uchicago.edu
Thu Feb 9 11:34:02 CST 2012
Author: jonmon
Date: 2012-02-09 11:34:02 -0600 (Thu, 09 Feb 2012)
New Revision: 5567
Added:
SwiftApps/SciColSim/pads.similar.beagle.xml
Modified:
SwiftApps/SciColSim/README
SwiftApps/SciColSim/annealing.swift
SwiftApps/SciColSim/local.xml
Log:
updates of the annealing.swift file and the README. Added pads and updated local sites file
Modified: SwiftApps/SciColSim/README
===================================================================
--- SwiftApps/SciColSim/README 2012-02-09 15:04:51 UTC (rev 5566)
+++ SwiftApps/SciColSim/README 2012-02-09 17:34:02 UTC (rev 5567)
@@ -137,15 +137,31 @@
Sample output (w/ bugs remaining) is in sample.test-swift.output
-*** Parameter on the command line
+
+Optimizer output (both from C++ optimizer and Swift) generates text
+with escape sequences to display colored text. Some versions of more
+and less need special options set (eg in env var?) to display the
+colors correctly.
+
+
+*** C++ Command line args
+
+Usage: super_optimizer alpha_i alpha_m beta gamma delta target_innov [n_epochs n_steps n_reruns] [range] [verbose_level]
+ [T_start T_end Annealing_steps Target_rejection Starting_jump]
+ [FREEZE_alpha_i FREEZE_alpha_m FREEZE_beta FREEZE_gamma FREEZE_delta]
+
+*** Swift command line args and internal control vars
The command line options are:
-nworkers=<int>
-minrange=<int>
+ Starting number for the target innovation value(Inclusive)
-maxrange=<int>
+ Ending number for the target innovation value(exclusive)
-rangeinc=<int>
+ How much to increment the target innovation value by
-tstart=<float>
@@ -154,19 +170,25 @@
-trejection=<float>
-evoreruns=<int>
+ How many times to re-run the evolve.sh app
-startingjump=<float>
Controls the dx and/or rejection variable
-alphai=<float>
+ parameter to the annealing process
-alpham=<float>
+ parameter to the annealing process
-beta=<float>
+ parameter to the annealing process
-gamma=<float>
+ parameter to the annealing process
-delta=<float>
+ parameter to the annealing process
-annealingcycles=<int>
Number of times to run the annealing process for a given target innovation
@@ -174,22 +196,10 @@
-rerunsperapp=<int>
Number of evolve reruns to do per app call
- -nreps=<int>
+ -nreps=<int>
+ How many times to repeat the annealing process for a given target innovation
-Optimizer output (both from C++ optimizer and Swift) generates text
-with escape sequences to display colored text. Some versions of more
-and less need special options set (eg in env var?) to display the
-colors correctly.
-
-
-*** C++ Command line args
-
-
-*** Swift command line args and internal control vars
-
-
-
*** C++ app flow logic ===
for target in range(58, 1009 (used 209), 50): // 20 values Target Values
Modified: SwiftApps/SciColSim/annealing.swift
===================================================================
--- SwiftApps/SciColSim/annealing.swift 2012-02-09 15:04:51 UTC (rev 5566)
+++ SwiftApps/SciColSim/annealing.swift 2012-02-09 17:34:02 UTC (rev 5567)
@@ -1,5 +1,9 @@
import "math";
import "colortext";
+
+/*
+ *TODO:
+ */
type file;
@@ -16,15 +20,15 @@
( float nx ) newx( float x, float dx )
{
- float r = (random()); // / (pow(2.0,31.0)-1.0);
+ float r = (random());
if (r > 0.5)
{
- nx = x + (random())*dx; // /(pow(2.0,31.0)-1.0);
+ nx = x + (random())*dx; //Java already returns a float between [0-1]
}
else
{
- nx = x - (random())*dx; // /(pow(2.0,31.0)-1.0);
+ nx = x - (random())*dx;
}
// tracef("newx(%f,%f)=%f\n",x,dx,nx);
}
@@ -83,11 +87,10 @@
}
iterate iter_i // number of annealing cycles
- { // foreach i in [1:annealing_cycles]
+ {
int i = iter_i + 1;
// set new temperature, rejection threshold, and dx values for this cycle
-
float temperature = T_start*exp( @tofloat( i-1 ) * ( jlog( T_end ) - jlog( T_start ) ) / @tofloat( annealing_cycles ) );
tracef( @strcat( "multi_annealing: AR: i=%i ....T = ", color( 3, "%f" ),"\n" ), i, temperature );
@@ -115,21 +118,20 @@
}
tracef( color( Blue, "multi_annealing: AR: New cycle at %i: dx[0-4]=[%f %f %f %f %f]\n" ), i, dx[i][0], dx[i][1], dx[i][2], dx[i][3], dx[i][4] );
}
- else
- { // If not new cycle, set dx[i][*] from previous dx ([i-1]). rejection[i]j] is set later.
+ else // If not new cycle, set dx[i][*] from previous dx ([i-1]). rejection[i]j] is set later.
+ {
foreach k in [0:NEVOPARAMS-1]
{
dx[i][k] = dx[i-1][k];
}
}
- //foreach j in [0:NEVOPARAMS-1] { // Try a new value for each non-fixed param; then write results and accept or reject
- iterate j
- { // Try a new value for each non-fixed param; then write results and accept or reject
- // float try_x[];
+
+ iterate j // Try a new value for each non-fixed param; then write results and accept or reject
+ {
int curr = ( i * NEVOPARAMS ) + j;
int prev = curr-1;
- // tracef("in multi_annealing: i=%i j=%i curr=%i prev=%i\n", i, j, curr, prev);
- if ( /*(!FIX_VARIABLES) || */ ( var_fixed[j] == 0 ) ) { // Adjustable vars
+
+ if ( /* (!FIX_VARIABLES) || */ ( var_fixed[j] == 0 ) ) { // Adjustable vars
// fixed=1,1,0,0,0: FIXME: FIX_VARIABLES flag has faulty logic but OK when TRUE
float try_x[];
foreach k in [0:NEVOPARAMS-1]
@@ -172,7 +174,7 @@
}
float ratio = min( 1.0, exp( -( mlres[i][j].loss - curr_loss[prev] ) / temperature ) );
- float r = (random()) ; // / (pow(2.0,31.0)-1.0); // FIXME: AR: why all the 2^31's ???
+ float r = (random()); //Java already returns a random float between [0.0-1.0]
tracef("multi_annealing: AR: %f vs %f\n", r, ratio);
@@ -198,7 +200,7 @@
tracef( "multi_annealing: Accepting try_x[j], i=%i j=%i try_x[j]=%f\n", i, j, try_x[j] );
float rj[];
foreach k in [0:NEVOPARAMS-1]
- { // FIXME!!!
+ {
if (k <= j)
{
rj[k] = rejection[i][k]; // Was either set from previous j or just set for this j
@@ -216,8 +218,8 @@
i, try_x[0], try_x[1], try_x[2], try_x[3], try_x[4]);
}
}
- else
- { // Fixed Vars
+ else // Fixed Vars
+ {
x[i][j] = x[i-1][j];
rejection[i][j] = rejection[i-1][j];
curr_loss[curr] = curr_loss[prev];
@@ -258,7 +260,7 @@
@strcat(t_start), @strcat(t_end), @strcat(annealing_steps), @strcat(t_rejection), @strcat(starting_jump),
// FREEZE: alpha_i alpha_m beta gamma delta
- "1", "1", "0", "0", "0",
+ "1", "1", "0", "0", "0",
// operation-code:(m,a) Nworkers seed
"m", @strcat(Nworkers), @arg("seed", "0" ) ];
@@ -280,6 +282,8 @@
optimizer_sweep() // Implements logic of python driver script
{
+ rerunsPerApp = @toint(@arg("rerunsperapp", "100"));
+
int minrange = @toint(@arg("minrange", "58"));
int maxrange = @toint(@arg("maxrange", "59"));
int rangeinc = @toint(@arg("rangeinc", "50"));
@@ -305,14 +309,12 @@
@toint(@arg("evoreruns", "100")),
@tofloat(@arg("startingjump", "2.3")),
[@tofloat(@arg("alphai", "0.0")), @tofloat(@arg("alpham", "0.0")), @tofloat(@arg("beta", "4.0")), @tofloat(@arg("gamma", "50.0")), @tofloat(@arg("delta", "-1.0"))],
- @tofloat(target_innov),
+ @tofloat(target_innov),
@toint(@arg("annealingcycles", "50")) );
}
}
}
-rerunsPerApp = @toint(@arg("rerunsperapp", "100"));
-
main()
{
optimizer_sweep();
Modified: SwiftApps/SciColSim/local.xml
===================================================================
--- SwiftApps/SciColSim/local.xml 2012-02-09 15:04:51 UTC (rev 5566)
+++ SwiftApps/SciColSim/local.xml 2012-02-09 17:34:02 UTC (rev 5567)
@@ -4,6 +4,6 @@
<profile namespace="karajan" key="jobThrottle">0.05</profile>
<profile namespace="karajan" key="initialScore">10000</profile>
<filesystem provider="local"/>
- <workdirectory>/lustre/beagle/ketan/labs/SciColSim/swift.workdir</workdirectory>
+ <workdirectory>/gpfs/pads/swift/jonmon/Swift/work/pads</workdirectory>
</pool>
</config>
Added: SwiftApps/SciColSim/pads.similar.beagle.xml
===================================================================
--- SwiftApps/SciColSim/pads.similar.beagle.xml (rev 0)
+++ SwiftApps/SciColSim/pads.similar.beagle.xml 2012-02-09 17:34:02 UTC (rev 5567)
@@ -0,0 +1,23 @@
+<config>
+ <pool handle="pads">
+ <execution provider="coaster" jobmanager="ssh:pbs" url="login.pads.ci.uchicago.edu" />
+ <filesystem provider="local"/>
+
+ <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>
+ <workdirectory>/gpfs/pads/swift/jonmon/Swift/work/pads</workdirectory>
+ </pool>
+</config>
More information about the Swift-commit
mailing list