cleanup
[charm.git] / src / ck-ldb / RefineLB.C
index c7e232090626ed7e120475150221bac173dd6211..f0bc990484b13b17c3f6461784271f1b539930b6 100644 (file)
@@ -51,11 +51,15 @@ void RefineLB::work(LDStats* stats)
       }
   }
 
-  stats->is_prev_lb_refine = 1;
-  stats->after_lb_avg = refiner.computeAverageLoad();
-  stats->after_lb_max = refiner.computeMax();
-
-  CkPrintf("RefineLB> Max load %lf Avg load %lf\n", stats->after_lb_max, stats->after_lb_avg);
+  if (_lb_args.metaLbOn()) {
+    stats->is_prev_lb_refine = 1;
+    stats->after_lb_avg = refiner.computeAverageLoad();
+    stats->after_lb_max = refiner.computeMax();
+
+    if (_lb_args.debug() > 0)
+      CkPrintf("RefineLB> Max load %lf Avg load %lf\n", stats->after_lb_max,
+          stats->after_lb_avg);
+  }
 
   // Free the refine buffers
   Refiner::FreeProcs(from_procs);