Fix a bug in the init
[charm.git] / examples / charm++ / load_balancing / kNeighbor / kNeighbor.C
index 98a3267612c44bec6981e5635080cdb06df0a4b1..6d3ad974ca6cf9dfd839d375f6af554f2c417848 100644 (file)
@@ -72,10 +72,10 @@ class Main: public CBase_Main {
       }
 
       num_chares = atoi(m->argv[1]);
-//      if(num_chares < CkNumPes()) {
-//     printf("Warning: #elements is forced to be equal to #pes\n");
-//     num_chares = CkNumPes();
-//      }
+      if(num_chares < CkNumPes()) {
+       printf("Warning: #elements is forced to be equal to #pes\n");
+       num_chares = CkNumPes();
+      }
 
       numSteps = atoi(m->argv[2]);
       currentMsgSize = atoi(m->argv[3]);