diff --git a/src/ck-core/ck.C b/src/ck-core/ck.C index ba0bbc0b0f..2e602e01c8 100644 --- a/src/ck-core/ck.C +++ b/src/ck-core/ck.C @@ -640,7 +640,7 @@ void CkCallstackPop(Chare *obj) { _ckStartTiming(); // resume timing of the previous obj } -#if CMK_LBDB_ON + CkLocRec *CkActiveLocRec(void) { auto *obj = CkActiveObj(); if (obj && obj->ckInitialized) { @@ -649,7 +649,6 @@ CkLocRec *CkActiveLocRec(void) { return nullptr; } } -#endif /******************** Basic support *****************/ void CkDeliverMessageFree(int epIdx,void *msg,void *obj) diff --git a/src/ck-core/ck.h b/src/ck-core/ck.h index cfb7937c2c..3af9015daa 100644 --- a/src/ck-core/ck.h +++ b/src/ck-core/ck.h @@ -332,9 +332,7 @@ class CkCoreState { CkpvExtern(CkCoreState *, _coreState); -#if CMK_LBDB_ON CkLocRec *CkActiveLocRec(void); -#endif // CMK_LBDB_ON void CpdHandleLBMessage(LBMigrateMsg **msg); void CkMessageWatcherInit(char **argv,CkCoreState *ck); diff --git a/src/ck-core/cklocrec.h b/src/ck-core/cklocrec.h index 8528aafcd2..09b9d03780 100644 --- a/src/ck-core/cklocrec.h +++ b/src/ck-core/cklocrec.h @@ -17,15 +17,15 @@ class CkLocRec { CmiUInt8 id; bool *deletedMarker; /// Set this if we're deleted during processing bool running; /// True when inside a startTiming/stopTiming pair + CkSyncBarrier* syncBarrier; + LDObjHandle ldHandle; #if CMK_LBDB_ON bool asyncMigrate; /// if readyMove is inited bool readyMigrate; /// status whether it is ready to migrate bool enable_measure; int nextPe; /// next migration dest processor - CkSyncBarrier* syncBarrier; LBManager *lbmgr; MetaBalancer *the_metalb; - LDObjHandle ldHandle; #endif public: @@ -63,7 +63,6 @@ class CkLocRec { public: inline LBManager *getLBMgr(void) const {return lbmgr;} inline MetaBalancer *getMetaBalancer(void) const {return the_metalb;} - inline const LDObjHandle& getLdHandle() const{ return ldHandle; } static void staticMigrate(LDObjHandle h, int dest); static void staticMetaLBResumeWaitingChares(LDObjHandle h, int lb_ideal_period); static void staticMetaLBCallLBOnChares(LDObjHandle h); @@ -80,6 +79,7 @@ class CkLocRec { #else void AsyncMigrate(bool use){}; #endif + inline const LDObjHandle& getLdHandle() const{ return ldHandle; } }; #endif // CK_LOC_REC_H diff --git a/src/ck-core/ckmigratable.h b/src/ck-core/ckmigratable.h index d0e9a96eeb..b21a040405 100644 --- a/src/ck-core/ckmigratable.h +++ b/src/ck-core/ckmigratable.h @@ -101,7 +101,7 @@ class CkMigratable : public Chare { void setMigratable(int migratable) { } void setPupSize(size_t obj_pup_size) { } public: - void ckFinishConstruction(int epoch) { } + void ckFinishConstruction(int epoch = -1) { } #endif #if CMK_OUT_OF_CORE diff --git a/src/ck-ldb/LBObj.C b/src/ck-ldb/LBObj.C index 36ca87d85f..1f13e93186 100644 --- a/src/ck-ldb/LBObj.C +++ b/src/ck-ldb/LBObj.C @@ -4,12 +4,11 @@ /*@{*/ #include - -#if CMK_LBDB_ON - #include "LBObj.h" #include "LBOM.h" +#if CMK_LBDB_ON + /************************************************************* * LBObj Object-data Code *************************************************************/ @@ -30,6 +29,8 @@ void LBObj::Clear(void) #endif } +#endif + void LBObj::IncrementTime(LBRealType walltime, LBRealType cputime) { data.wallTime += walltime; @@ -42,6 +43,4 @@ void LBObj::IncrementTime(LBRealType walltime, LBRealType cputime) #endif } -#endif - /*@}*/