Bug fix. The _currentObj global variable was not being updated during reduction and...
authorEsteban Meneses <emenese2@illinois.edu>
Wed, 4 Apr 2012 20:58:23 +0000 (15:58 -0500)
committerEsteban Meneses <emenese2@illinois.edu>
Wed, 4 Apr 2012 20:58:23 +0000 (15:58 -0500)
src/ck-core/ckreduction.C

index 004c1df1d45ab7c804c028b7bca6faa041e96b4d..2a58dab69480200897631cce948ceaa9742b4074 100644 (file)
@@ -386,6 +386,11 @@ void CkReductionMgr::contributorArriving(contributorInfo *ci)
 // Each contributor must contribute exactly once to the each reduction.
 void CkReductionMgr::contribute(contributorInfo *ci,CkReductionMsg *m)
 {
+#if (defined(_FAULT_MLOG_) || defined(_FAULT_CAUSAL_))
+    Chare *oldObj =CpvAccess(_currentObj);
+    CpvAccess(_currentObj) = this;
+#endif
+
 #if CMK_BIGSIM_CHARM
   _TRACE_BG_TLINE_END(&(m->log));
 #endif
@@ -409,6 +414,10 @@ void CkReductionMgr::contribute(contributorInfo *ci,CkReductionMsg *m)
 #else
   addContribution(m);
 #endif
+
+#if (defined(_FAULT_MLOG_) || defined(_FAULT_CAUSAL_))
+    CpvAccess(_currentObj) = oldObj;
+#endif
 }
 
 #if (defined(_FAULT_MLOG_) && _MLOG_REDUCE_P2P_)