[Swift-commit] r5626 - SwiftApps/SciColSim
wilde at ci.uchicago.edu
wilde at ci.uchicago.edu
Wed Feb 15 22:34:50 CST 2012
Author: wilde
Date: 2012-02-15 22:34:50 -0600 (Wed, 15 Feb 2012)
New Revision: 5626
Added:
SwiftApps/SciColSim/paramtraceall.sh
SwiftApps/SciColSim/showbest.sh
Modified:
SwiftApps/SciColSim/TimingEstimation.txt
SwiftApps/SciColSim/annealing.swift
SwiftApps/SciColSim/optimizer.cpp
SwiftApps/SciColSim/testopt.py
Log:
Add a few shell tools; add cleaner output format for bestdebug.txt; change testopt.sh to use it and to save out and best files from each annealing run; update timing estimates.
Modified: SwiftApps/SciColSim/TimingEstimation.txt
===================================================================
--- SwiftApps/SciColSim/TimingEstimation.txt 2012-02-15 20:13:25 UTC (rev 5625)
+++ SwiftApps/SciColSim/TimingEstimation.txt 2012-02-16 04:34:50 UTC (rev 5626)
@@ -25,6 +25,16 @@
= 10,800,000
+ = 20 x 15 x 3 x 100 x 1000 x 10 = total core-seconds
+
+ = 900M core seconds
+
+ = 900M / 1000 = 900,000 seconds on 1000 cores
+
+ = 250 hours = 10 days
+
+
+
Estimated Runtime on a small scale (2 laptops or 24 cores)
=10,800,000/24 x (1 to 50 sec)
Modified: SwiftApps/SciColSim/annealing.swift
===================================================================
--- SwiftApps/SciColSim/annealing.swift 2012-02-15 20:13:25 UTC (rev 5625)
+++ SwiftApps/SciColSim/annealing.swift 2012-02-16 04:34:50 UTC (rev 5626)
@@ -89,7 +89,7 @@
iterate iter_i // number of annealing cycles
{
- int i = iter_i + 1;
+ int i = iter_i + 1; // i ranges [1:n] in the swift script so that [0] can be the initial condition
// 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 ) );
@@ -174,10 +174,10 @@
if ( mlres[i][j].loss < ALOT )
{
- fprintf( some_out_filename, "N %i %i %f %f | %i, %f, %f, %f, %f, %f, %f, %f\n",
- i, j, dx[i][j], rejection[i][j], @toint(target_innov), mlres[i][j].loss, try_x[0], try_x[1], try_x[2], try_x[3], try_x[4], mlres[i][j].sdev );
+ fprintf( some_out_filename, "N, %i, %i, %f, %f, |, %i, %f, [, %f, %f, %f, %f, %f, ], %f\n",
+ i-1, j, dx[i][j], rejection[i][j], @toint(target_innov), mlres[i][j].loss, try_x[0], try_x[1], try_x[2], try_x[3], try_x[4], mlres[i][j].sdev ); // Note i-1 field: print that way to match with C++ output
- fprintf( "max_dist_swift.txt", color( Red,"multi_annealing: AF: max_dist.txt - tbd\n" ) ); // FIXME: max_dist is global set in evolve()
+ // fprintf( "max_dist_swift.txt", color( Red,"multi_annealing: AF: max_dist.txt - tbd\n" ) ); // FIXME: max_dist is global set in evolve()
}
else // does this ever occur? if so did we want to still do the ratio computation above???
{
Modified: SwiftApps/SciColSim/optimizer.cpp
===================================================================
--- SwiftApps/SciColSim/optimizer.cpp 2012-02-15 20:13:25 UTC (rev 5625)
+++ SwiftApps/SciColSim/optimizer.cpp 2012-02-16 04:34:50 UTC (rev 5626)
@@ -1484,13 +1484,17 @@
filestr.open ("best_opt_some.txt", ofstream::app);
// >> i/o operations here <<
- filestr << un[0]->get_target() << ","
+ filestr
+
+ << "N, " << i << ", " << j << ", " << dx[j] << ", " << rejection[j] << ", |, " // FIXME: MW-DEBUGGING
+
+ << un[0]->get_target() << ", "
<< Res.first
- << "," << un[0]->get_parameter(0)
- << "," << un[0]->get_parameter(1)
- << "," << un[0]->get_parameter(2)
- << "," << un[0]->get_parameter(3)
- << "," << un[0]->get_parameter(4) << "," << Res.second << ",\n";
+ << ", " << un[0]->get_parameter(0)
+ << ", " << un[0]->get_parameter(1)
+ << ", " << un[0]->get_parameter(2)
+ << ", " << un[0]->get_parameter(3)
+ << ", " << un[0]->get_parameter(4) << ", " << Res.second << ",\n";
filestr.close();
@@ -1501,7 +1505,19 @@
filestr << max_dist << ",\n";
filestr.close();
-
+
+ FILE *bf;
+ bf = fopen("bestdb.txt","a");
+ fprintf(bf, "N %2d %2d %10.5f %5.2f | %5.2f %10.5f [ %5.2f %5.2f %10.5f %10.5f %10.5f ] %10.5f\n", i, j, dx[j], rejection[j],
+ un[0]->get_target(),
+ Res.first,
+ un[0]->get_parameter(0),
+ un[0]->get_parameter(1),
+ un[0]->get_parameter(2),
+ un[0]->get_parameter(3),
+ un[0]->get_parameter(4),
+ Res.second);
+ fclose(bf);
}
Added: SwiftApps/SciColSim/paramtraceall.sh
===================================================================
--- SwiftApps/SciColSim/paramtraceall.sh (rev 0)
+++ SwiftApps/SciColSim/paramtraceall.sh 2012-02-16 04:34:50 UTC (rev 5626)
@@ -0,0 +1,7 @@
+for ti in $(seq 58 70); do
+ echo
+ echo "=======" $ti ; /home/wilde/AndreysOptimizer/src/getparamtrace.sh $ti
+ echo
+done
+
+
Property changes on: SwiftApps/SciColSim/paramtraceall.sh
___________________________________________________________________
Added: svn:executable
+ *
Added: SwiftApps/SciColSim/showbest.sh
===================================================================
--- SwiftApps/SciColSim/showbest.sh (rev 0)
+++ SwiftApps/SciColSim/showbest.sh 2012-02-16 04:34:50 UTC (rev 5626)
@@ -0,0 +1,8 @@
+#! /bin/sh
+
+awk '{
+ printf( "N %2d %2d %10.5f %5.2f | %5.2f %10.5f [ %5.2f %5.2f %10.5f %10.5f %10.5f ] %10.5f\n",
+ $2, $3, $4, $5, $7, $8, $10, $11, $12, $13, $14, $16);
+}'
+
+
Property changes on: SwiftApps/SciColSim/showbest.sh
___________________________________________________________________
Added: svn:executable
+ *
Modified: SwiftApps/SciColSim/testopt.py
===================================================================
--- SwiftApps/SciColSim/testopt.py 2012-02-15 20:13:25 UTC (rev 5625)
+++ SwiftApps/SciColSim/testopt.py 2012-02-16 04:34:50 UTC (rev 5626)
@@ -20,10 +20,10 @@
startTarget = 58
endTarget = 59
incrTarget = 50
- optimizerRepeats = 1
- evolveReruns = 100
+ optimizerRepeats = 100
+ evolveReruns = 32
annealingSteps = 100
- NWorkers = "2"
+ NWorkers = "8"
seed = ""
openmp = "OMP_NUM_THREADS=" + NWorkers
operation = "n"
@@ -140,8 +140,10 @@
for target in range(startTarget,endTarget,incrTarget):
for i in range(optimizerRepeats):
- args = openmp + " " + app + " 0 0 4 50 -1 " + str(target) + " 40000 20 " + str(evolveReruns) + \
- " 2 1 2. 0.01 " + str(annealingSteps) + " 0.3 2.3 1 1 0 0 0 " + operation + " " + NWorkers + " " + seed;
+ args = "rm -f bestdb.txt; " + \
+ openmp + " " + app + " 0 0 4 50 -1 " + str(target) + " 40000 20 " + str(evolveReruns) + \
+ " 2 1 2. 0.01 " + str(annealingSteps) + " 0.3 2.3 1 1 0 0 0 " + operation + " " + NWorkers + " " + seed + \
+ " >& out.T"+str(target)+".i"+str(i) + "; mv bestdb.txt best.T" + str(target) + ".i" + str(i)
print("\n**** Calling optimizer: "+args+"\n")
os.system(args);
More information about the Swift-commit
mailing list