[Swift-commit] r6120 - SwiftApps/SciColSim

wilde at ci.uchicago.edu wilde at ci.uchicago.edu
Thu Jan 3 18:20:09 CST 2013


Author: wilde
Date: 2013-01-03 18:20:09 -0600 (Thu, 03 Jan 2013)
New Revision: 6120

Modified:
   SwiftApps/SciColSim/annealing.swift
   SwiftApps/SciColSim/evolve.sh
Log:
Added compatibility for swift 0.93-0.94 iterate until() changes; stubbed out extra file log file handling for faster execution (need to add it back later as an option).

Modified: SwiftApps/SciColSim/annealing.swift
===================================================================
--- SwiftApps/SciColSim/annealing.swift	2013-01-02 21:47:09 UTC (rev 6119)
+++ SwiftApps/SciColSim/annealing.swift	2013-01-04 00:20:09 UTC (rev 6120)
@@ -15,6 +15,8 @@
     float tsdev;
 }
 
+global int iterate_adjust = @toint(@arg("iterate_adjust","1")); // FIXME!!! : 1 for 0.93, 0 for 0.94
+
 global boolean FIX_VARIABLES = true;
 global int var_fixed[] = [0,0,0,0,0];
 global int Nworkers = @toint(@arg("nworkers","4"));
@@ -35,9 +37,9 @@
     // tracef("newx(%f,%f)=%f\n",x,dx,nx);
 }
 
-app  (file outfile, file loss ) evolve ( string args[], file graph )
+app  (/*file outfile,*/  file loss ) evolve ( string args[], file graph )
 {
-    evolve @loss args stdout=@outfile;  // graph is passed implicitly
+    evolve @loss  args /*stdout=@outfile*/;  // FIXME: graph is passed implicitly
 }
 
 app ( file x ) sumloss( file loss[] )
@@ -220,8 +222,8 @@
           curr_sdev[curr] = curr_sdev[prev];
           // dx[i][j] not set for fixed vars
         }
-      } until( j == NEVOPARAMS );
-    } until( iter_i == annealing_cycles );
+      } until( j == (NEVOPARAMS-iterate_adjust) );
+    } until( iter_i == (annealing_cycles-iterate_adjust) );
 }
 
 (Res r) multi_loss(float t_start, float t_end, int annealing_steps, float t_rejection, float starting_jump,
@@ -238,7 +240,7 @@
   tracef("multi_loss appCalls=%i\n", appCalls);
 
   foreach i in [1:appCalls] { // repeats of the evolove() - same as n_reruns
-    file outfile; // FIXME: map and save in future
+    //file outfile; // FIXME: map and save in future
     string args[] = [ // FIXME: move this to a setargs() function
             //    alpha_i           alpha_m        beta           gamma          delta          target_innov
                  @strcat(x[0]),  @strcat(x[1]), @strcat(x[2]), @strcat(x[3]), @strcat(x[4]), @strcat(target_innov),
@@ -256,7 +258,7 @@
 
     file graph <"movie_graph.txt">;
 
-    (outfile, rfile[i]) = evolve(args, graph);
+    (/*outfile,*/ rfile[i]) = evolve(args, graph);
     tracef("multi_loss: i=%i calling evolve, args=%q\n", i, args);
     // tracef("multi_loss: after evolve: i=%i %k %k\n", i, outfile, rfile[i]);
   }
@@ -350,7 +352,7 @@
 
 main()
 {
-  optimizer_serial_sweep();
+  optimizer_sweep();
 }
 
 main();

Modified: SwiftApps/SciColSim/evolve.sh
===================================================================
--- SwiftApps/SciColSim/evolve.sh	2013-01-02 21:47:09 UTC (rev 6119)
+++ SwiftApps/SciColSim/evolve.sh	2013-01-04 00:20:09 UTC (rev 6120)
@@ -4,7 +4,7 @@
 shift 1
 NWORKERS=${23}
 START=$(date +%s)
-OMP_NUM_THREADS=$NWORKERS $(dirname $0)/openmp-optimizer $* 2>&1
+OMP_NUM_THREADS=$NWORKERS $(dirname $0)/openmp-optimizer $* >/dev/null 2>&1
 RC=$?
 END=$(date +%s)
 if [ $RC == 127 ];




More information about the Swift-commit mailing list