stencil3d: fix the calculation of time per step
authorAbhinav S Bhatele <bhatele@illinois.edu>
Tue, 22 Feb 2011 23:31:33 +0000 (17:31 -0600)
committerAbhinav S Bhatele <bhatele@illinois.edu>
Tue, 22 Feb 2011 23:31:33 +0000 (17:31 -0600)
examples/charm++/load_balancing/stencil3d/stencil3d.C

index b72858724754e9f6c74bcb322233c61f93d0bb2b..161fa22d96cb4e4adc34a1dbd8b1d6e7ef5a944b 100644 (file)
@@ -311,7 +311,8 @@ class Stencil: public CBase_Stencil {
       if(iterations == MAX_ITER)
        contribute(0, 0, CkReduction::concat, CkCallback(CkIndex_Main::report(), mainProxy));
       else {
-       startTime = CmiWallTimer();
+       if(thisIndex.x == 0 && thisIndex.y == 0 && thisIndex.z == 0)
+         startTime = CmiWallTimer();
        if(iterations % LBPERIOD == 0)
          AtSync();
        else