changed so that SMP version also works with neighborhood load balancer.
authorGengbin Zheng <gzheng@illinois.edu>
Tue, 25 Nov 2003 07:47:33 +0000 (07:47 +0000)
committerGengbin Zheng <gzheng@illinois.edu>
Tue, 25 Nov 2003 07:47:33 +0000 (07:47 +0000)
src/conv-ldb/cldb.c
src/conv-ldb/cldb.neighbor.c

index 850b3165f15995a3c1cb62d84c1a5f886b97cf59..a90a569dd98b00d70f54589ce22cec87fad9c3ef 100644 (file)
@@ -211,11 +211,12 @@ void CldModuleGeneralInit(char **argv)
 
   CpvInitialize(CldProcInfo, CldProc);
   CpvInitialize(int, CldLoadOffset);
+  CpvInitialize(int, CldLoadNotify);
+  CpvAccess(CldLoadOffset) = 0;
   CpvInitialize(BitVector, CldPEBitVector);
   CpvAccess(CldPEBitVector) = (char *)malloc(CmiNumPes()*sizeof(char));
   for (i=0; i<CmiNumPes(); i++)
     CpvAccess(CldPEBitVector)[i] = 1;
-  CpvAccess(CldLoadOffset) = 0;
   CpvAccess(CldProc) = (CldProcInfo)CmiAlloc(sizeof(struct CldProcInfo_s));
   proc = CpvAccess(CldProc);
   proc->load = 0;
index 5330caa07fe36df905140115eff90533158dbcb5..032110f84b218414540da86e6e723096a46931da 100644 (file)
@@ -430,6 +430,9 @@ void CldGraphModuleInit(char **argv)
   CpvAccess(CldAskLoadHandlerIndex) = 
     CmiRegisterHandler((CmiHandler)CldAskLoadHandler);
 
+  /* communication thread */
+  if (CmiMyRank() == CmiMyNodeSize())  return;
+
   CmiGetArgStringDesc(argv, "+LBTopo", &_lbtopo, "define load balancing topology");
   if (CmiMyPe() == 0) CmiPrintf("Seed LB> Topology %s\n", _lbtopo);