Forgot to initialize variables needed for CkCallback::resumeThread
authorFilippo Gioachin <gioachin@uiuc.edu>
Wed, 20 Jan 2010 02:46:53 +0000 (20:46 -0600)
committerFilippo Gioachin <gioachin@uiuc.edu>
Wed, 20 Jan 2010 02:46:53 +0000 (20:46 -0600)
src/ck-core/ckcallback.C
src/ck-core/ckcallback.h
src/ck-core/init.C

index 2ecef9b5d29c7c833836c4a5ec17ca92e4da765d..25693a7f9e1276bf3c3ef1304034137faca286d5 100644 (file)
@@ -290,5 +290,11 @@ void CkDataMsg::check(void)
                CkAbort("CkDataMsg corrupted-- bad tag.");
 }
 
+void CkCallbackInit() {
+  CpvInitialize(threadCB_t, threadCBs);
+  CpvInitialize(unsigned int, nextThreadCB);
+  CpvAccess(nextThreadCB)=1;
+}
+
 #include "CkCallback.def.h"
 
index 6b63c071b895e90bd66c3b998fd5bdb5e14ca9a0..a1b549c71f4520948ea4840bd2e97c203b76d671 100644 (file)
@@ -219,6 +219,8 @@ class CkCallbackResumeThread : public CkCallback {
 
 void _registerCkCallback(void); //used by init
 
+void CkCallbackInit();
+
 #endif
 
 
index fae81be2351531c111f226dd7594e57203689101..518f9a10d38a29465fb5aaba9cc6ed049b214f9c 100644 (file)
@@ -812,6 +812,8 @@ void _initCharm(int unused_argc, char **argv)
                CksvAccess(_nodeBocInitVec) = new PtrVec();
        }
 
+       CkCallbackInit();
+       
        CmiNodeAllBarrier();
 
 #if ! CMK_BLUEGENE_CHARM