fixed a typo in getting processor count.
authorGengbin Zheng <gzheng@bp-login1.(none)>
Tue, 1 Mar 2011 06:16:07 +0000 (00:16 -0600)
committerGengbin Zheng <gzheng@bp-login1.(none)>
Tue, 1 Mar 2011 06:16:07 +0000 (00:16 -0600)
src/conv-ldb/cldb.workstealing.c

index c5a4b79ad0001f1f7c4d750b57e612da0d072300..27f35682498fc3f1f08e931346ac04d9f6af04fa 100644 (file)
@@ -59,6 +59,7 @@ static void StealLoad()
   do{
       victim = (((CrnRand()+mype)&0x7FFFFFFF)%numpes);
   }while(victim == mype);
+if (mype == 2) CmiPrintf("steal from %d\n", victim);
 
   CmiSetHandler(&msg, CpvAccess(CldAskLoadHandlerIndex));
 #if IDLE_IMMEDIATE
@@ -125,7 +126,7 @@ void  CldAckNoTaskHandler(requestmsg *msg)
 
   /* CcdRaiseCondition(CcdUSER); */
 
-  if (CmiMyPe()==2) victim = 2-mype;
+  if (CmiNumPes()==2) victim = 2-mype;
   else
   do{
       /*victim = (((CrnRand()+notaskpe)&0x7FFFFFFF)%CmiNumPes());*/