Putting a check in the reduction type that it is happening for hte same iteration
authorHarshitha <gplkrsh2@illinois.edu>
Fri, 9 Mar 2012 10:07:02 +0000 (04:07 -0600)
committerHarshitha <gplkrsh2@illinois.edu>
Fri, 9 Mar 2012 10:07:02 +0000 (04:07 -0600)
src/ck-ldb/CentralLB.C

index 86bf2d0dae0851ad2f5afe5102ed60b9ec09a53b..6d83dcb54b2853b170dc8a45072b3e20ba241ccb 100644 (file)
@@ -98,6 +98,10 @@ CkReductionMsg* lbDataCollection(int nMsg, CkReductionMsg** msgs) {
     if (i == 0) {
       lb_data[3] = m[3];
     }
+    if (m[3] != lb_data[3]) {
+      CkPrintf("Error!!! Reduction is intermingled between iteration %lf and\
+      %lf\n", lb_data[3], m[3]);
+    }
   }
   return CkReductionMsg::buildNew(4*sizeof(double), lb_data);
 }