8 #define CK_LDB_GRIDCOMMLB_MODE 0
9 #define CK_LDB_GRIDCOMMLB_BACKGROUND_LOAD 1
10 #define CK_LDB_GRIDCOMMLB_LOAD_TOLERANCE 0.10
13 #define MAXINT 2147483647
17 #define MAXDOUBLE 1e10
20 void CreateGridCommLB ();
32 double relative_speed
;
48 class GridCommLB
: public CBase_GridCommLB
51 GridCommLB (const CkLBOptions
&);
52 GridCommLB (CkMigrateMessage
*msg
);
54 bool QueryBalanceNow (int step
);
55 void work (LDStats
*stats
);
56 void pup (PUP::er
&p
) { }
59 int Get_Cluster (int pe
);
60 void Initialize_PE_Data (CentralLB::LDStats
*stats
);
61 int Available_PE_Count ();
62 int Compute_Number_Of_Clusters ();
63 void Initialize_Object_Data (CentralLB::LDStats
*stats
);
64 void Examine_InterObject_Messages (CentralLB::LDStats
*stats
);
65 void Map_NonMigratable_Objects_To_PEs ();
66 void Map_Migratable_Objects_To_PEs (int cluster
);
67 int Find_Maximum_Object (int cluster
);
68 int Find_Minimum_PE (int cluster
);
69 void Assign_Object_To_PE (int target_object
, int target_pe
);
71 int CK_LDB_GridCommLB_Mode
;
72 int CK_LDB_GridCommLB_Background_Load
;
73 double CK_LDB_GridCommLB_Load_Tolerance
;
79 Object_Data_T
*Object_Data
;