fixed a race condtion in comlib initialization when registering pupables.
authorGengbin Zheng <gzheng@illinois.edu>
Wed, 6 Sep 2006 18:41:21 +0000 (18:41 +0000)
committerGengbin Zheng <gzheng@illinois.edu>
Wed, 6 Sep 2006 18:41:21 +0000 (18:41 +0000)
src/ck-com/ComlibManager.C
src/conv-com/convcomlibmanager.C

index b1a68f494acbdbc278750818a46580e955f5a4b5..6964c4a27a8937a3cedbc84fe7c7bce520af1231 100644 (file)
@@ -71,8 +71,10 @@ void ComlibManager::init(){
     
     initComlibManager();
 
+    if (CkMyRank() == 0) {
     PUPable_reg(CharmStrategy);
     PUPable_reg(CharmMessageHolder);
+    }
     
     //comm_debug = 1;
     
index 442244416e036ed0d837e97003f92fa04f19cc71..b9c8d9a6d8ff43e3140f29f05dd60107ebb15b22 100644 (file)
@@ -112,9 +112,11 @@ void initComlibManager(){
 
     CkpvAccess(strategy_handlerid) = CkRegisterHandler((CmiHandler) strategyHandler);
 
+    if (CkMyRank() == 0) {
     PUPable_reg(Strategy);
     PUPable_reg(RouterStrategy);
     PUPable_reg(MessageHolder);
+    }
     CkpvAccess(conv_com_object).setInitialized();
 }