register WSLB.
authorGengbin Zheng <gzheng@illinois.edu>
Wed, 29 Oct 2003 18:57:32 +0000 (18:57 +0000)
committerGengbin Zheng <gzheng@illinois.edu>
Wed, 29 Oct 2003 18:57:32 +0000 (18:57 +0000)
src/ck-ldb/WSLB.C
src/ck-ldb/WSLB.ci

index 9b3b1bb601c8294a7077d1338005b51665f7a5e3..efff3576b183f889a8420616aac15eb73f78aaec 100644 (file)
 
 CreateLBFunc_Def(WSLB);
 
+static void lbinit(void) {
+  LBRegisterBalancer("WSLB", 
+                     CreateWSLB, 
+                    AllocateWSLB, 
+                     "Workstation load balancer");
+}
+
 
 void WSLB::staticMigrated(void* data, LDObjHandle h)
 {
@@ -203,11 +210,13 @@ WSLBStatsMsg* WSLB::AssembleStats()
   msg->vacate_me = vacate;
   msg->usage = usage;
 
-  //  CkPrintf(
-  //    "Proc %d speed=%d Total(wall,cpu)=%f %f Idle=%f Bg=%f %f Obj=%f %f\n",
-  //    CkMyPe(),msg->proc_speed,msg->total_walltime,msg->total_cputime,
-  //    msg->idletime,msg->bg_walltime,msg->bg_cputime,
-  //    msg->obj_walltime,msg->obj_cputime);
+  if (_lb_debug) {
+    CkPrintf(
+      "Proc %d speed=%d Total(wall,cpu)=%f %f Idle=%f Bg=%f %f Obj=%f %f\n",
+      CkMyPe(),msg->proc_speed,msg->total_walltime,msg->total_cputime,
+      msg->idletime,msg->bg_walltime,msg->bg_cputime,
+      msg->obj_walltime,msg->obj_cputime);
+  }
 
   //  CkPrintf("PE %d sending %d to ReceiveStats %d objs, %d comm\n",
   //      CkMyPe(),msg->serial,msg->n_objs,msg->n_comm);
index 0f40621317ded196f424a552cbb25ea8cf02c343..635cd75b1fd9b9596f032be2be6f522fbed5fff4 100644 (file)
@@ -5,6 +5,8 @@ extern module BaseLB;
 
 message WSLBStatsMsg;
 
+initnode void lbinit();
+
 group [migratable] WSLB: BaseLB {
   entry void WSLB(const CkLBOptions&);  
   entry void ReceiveStats(WSLBStatsMsg*);