bug fix in cray XTTorus
authorNikhil Jain <nikhil@illinois.edu>
Mon, 23 Apr 2012 06:51:55 +0000 (01:51 -0500)
committerNikhil Jain <nikhil@illinois.edu>
Mon, 23 Apr 2012 06:51:55 +0000 (01:51 -0500)
src/util/XTTorus.h

index 9a8e5049bf8096f0445d849ba47ffe45f6827571..8f495d209f4a199a72dfe128e170dce906082214 100644 (file)
@@ -225,8 +225,8 @@ class XTTorusManager {
     }
 
     inline int coordinatesToRank(int x, int y, int z, int t) {
-      if(coords2pid[x+origin.x][y+origin.y][z+origin.z][t+origin.t] == -1 && ((t+origin.t)>=CmiNumCores())) {
-                               return coords2pid[x+origin.x][y+origin.y][z+origin.z][t+origin.t-CmiNumCores()]; 
+      if(coords2pid[x+origin.x][y+origin.y][z+origin.z][t+origin.t] == -1 && ((t+origin.t)>=(dimNT/2))) {
+                               return coords2pid[x+origin.x][y+origin.y][z+origin.z][t+origin.t-dimNT/2]; 
                        } else {
                                return coords2pid[x+origin.x][y+origin.y][z+origin.z][t+origin.t];
                        }