fixed a VC++ compiler error (random stack variable declaration can only be placed...
authorGengbin Zheng <gzheng@illinois.edu>
Mon, 2 Aug 2010 21:38:52 +0000 (16:38 -0500)
committerGengbin Zheng <gzheng@illinois.edu>
Mon, 2 Aug 2010 21:38:52 +0000 (16:38 -0500)
src/conv-ldb/cldb.neighbor.c

index 4a6326965c836d71a452b5b59a3d7283e613b4a8..492ff6f4a9028445c46f6a0bbafcb267b364e3d6 100644 (file)
@@ -250,6 +250,11 @@ void CldBalance(void *dummy, double curT)
   int myload = CldLoad();
   int minload;
   int numberoflessthanme = 0;
+
+  int already_sort = 0;
+  int thisload;
+  int sum = 0;
+
   cldData->lastBalanceTime = CmiWallTimer();
 #if CMK_TRACE_ENABLED && TRACE_USEREVENTS
   double startT = curT;
@@ -261,10 +266,6 @@ void CldBalance(void *dummy, double curT)
   if (overload > CldCountTokens())
     overload = CldCountTokens();
 
-  int already_sort = 0;
-  int thisload;
-  int sum = 0;
-
   for (i=0; i<nNeighbors; i++) {
       thisload = CpvAccess(neighbors)[i].load;
       if(thisload < myload)