Adding an always use defaults option to tuning framework.
authorIsaac Dooley <idooley2@illinois.edu>
Fri, 26 Mar 2010 19:02:41 +0000 (14:02 -0500)
committerIsaac Dooley <idooley2@illinois.edu>
Fri, 26 Mar 2010 19:02:41 +0000 (14:02 -0500)
src/ck-cp/controlPoints.C

index 0a9bf2df12dd6eb53ae4e4e1e1c8991c1bbe8895..fdbca86cb641d6b81a8988b9ef7b6de464eeb7b8 100644 (file)
@@ -46,7 +46,7 @@ std::map<std::string, int> defaultControlPointValues;
 
 
 
-typedef enum tuningSchemeEnum {RandomSelection, SimulatedAnnealing, ExhaustiveSearch, CriticalPathAutoPrioritization, UseBestKnownTiming, UseSteering, MemoryAware, Simplex, DivideAndConquer}  tuningScheme;
+typedef enum tuningSchemeEnum {RandomSelection, SimulatedAnnealing, ExhaustiveSearch, CriticalPathAutoPrioritization, UseBestKnownTiming, UseSteering, MemoryAware, Simplex, DivideAndConquer, AlwaysDefaults}  tuningScheme;
 
 
 
@@ -55,6 +55,9 @@ void printTuningScheme(){
   case RandomSelection:
     CkPrintf("Tuning Scheme: RandomSelection\n");
     break;
+  case AlwaysDefaults:
+    CkPrintf("Tuning Scheme: AlwaysDefaults\n");
+    break;
   case SimulatedAnnealing:
     CkPrintf("Tuning Scheme: SimulatedAnnealing\n");
     break;
@@ -998,6 +1001,8 @@ public:
       whichTuningScheme = RandomSelection;
     } else if ( CmiGetArgFlagDesc(args->argv,"+CPExhaustiveSearch","Exhaustive Search of Control Point Values") ){
       whichTuningScheme = ExhaustiveSearch;
+    } else if ( CmiGetArgFlagDesc(args->argv,"+CPAlwaysUseDefaults","Always Use The Provided Default Control Point Values") ){
+      whichTuningScheme = AlwaysDefaults;
     } else if ( CmiGetArgFlagDesc(args->argv,"+CPSimulAnneal","Simulated Annealing Search of Control Point Values") ){
       whichTuningScheme = SimulatedAnnealing;
     } else if ( CmiGetArgFlagDesc(args->argv,"+CPCriticalPathPrio","Use Critical Path to adapt Control Point Values") ){
@@ -1725,12 +1730,11 @@ int controlPoint(const char *name, int lb, int ub){
   }
   
 
-  if( phase_id < 4 ){
+  if( phase_id < 4 || whichTuningScheme == AlwaysDefaults){
     // For the first few phases, just use the lower bound, or the default if one was provided 
     // This ensures that the ranges for all the control points are known before we do anything fancy
     result = lb;
 
-
     if(defaultControlPointValues.count(std::string(name)) > 0){
       int v = defaultControlPointValues[std::string(name)];
       CkPrintf("Startup phase using default value of %d for  \"%s\"\n", v, name);