Fixing linear model for load balancing period control point.
[charm.git] / src / ck-cp / controlPoints.C
index 3a0403c75b830bbbb6c0f14ba45bbee0758d35c1..a02dea698af6c2f964300cf2d9da5fa8730b3434 100644 (file)
@@ -1487,7 +1487,7 @@ void controlPointManager::generatePlan() {
       const double a2 = s2 / (double)(oldNumTimings-b1);
       const double aold = (a1+a2)/2.0;
 
-      const double expectedTotalTime = numNewTimings*(aold+(numOldTimings+numNewTimings)*(a2-a1)/numOldTimings);
+      const double expectedTotalTime = newNumTimings*(aold+(oldNumTimings+newNumTimings)*(a2-a1)/oldNumTimings);
         
     
       // Measure actual time