changes to kNEighbor
authorHarshitha <gplkrsh2@illinois.edu>
Fri, 9 Mar 2012 03:02:08 +0000 (21:02 -0600)
committerHarshitha <gplkrsh2@illinois.edu>
Fri, 9 Mar 2012 03:02:08 +0000 (21:02 -0600)
examples/charm++/load_balancing/kNeighbor/kNeighbor.C

index 63c72526f01282f8dbaf7a71ad05ec0418cb8400..0a120080927949af4d22888cdce05c27c0e68988 100644 (file)
@@ -284,19 +284,19 @@ class Block: public CBase_Block {
       //int N = (thisIndex * thisIndex / num_chares) * 100;
       int N = 2;
       if (currentStep < numSteps/4) {
       //int N = (thisIndex * thisIndex / num_chares) * 100;
       int N = 2;
       if (currentStep < numSteps/4) {
-        if (thisIndex >= num_chares/8 && thisIndex < num_chares/4) {
+        if (thisIndex >= num_chares/4 && thisIndex < num_chares/2) {
           N = 500;
         }
       } else if(currentStep < numSteps/2) {
           N = 500;
         }
       } else if(currentStep < numSteps/2) {
-        if (thisIndex >= num_chares/num_chares && thisIndex < num_chares/8) {
+        if (thisIndex >= num_chares/num_chares && thisIndex < num_chares/4) {
           N = 500;
         }
       } else if (currentStep < 3*numSteps/2) {
           N = 500;
         }
       } else if (currentStep < 3*numSteps/2) {
-        if (thisIndex >= num_chares/4 && thisIndex < 24) {
+        if (thisIndex >= num_chares/2 && thisIndex < 3*(num_chares/4)) {
           N = 500;
         }
       } else {
           N = 500;
         }
       } else {
-        if (thisIndex >= 3*(num_chares/8) && thisIndex < num_chares/2) {
+        if (thisIndex >= 3*(num_chares/4) && thisIndex < num_chares) {
           N = 500;
         }
       }
           N = 500;
         }
       }