Adding support for reduction messages in the collective-based message logging protocol.
authorEsteban Meneses <emenese2@illinois.edu>
Tue, 9 Oct 2012 14:23:51 +0000 (09:23 -0500)
committerEsteban Meneses <emenese2@illinois.edu>
Tue, 9 Oct 2012 14:23:51 +0000 (09:23 -0500)
src/ck-core/ckcausalmlog.C
src/ck-core/envelope.h
src/libs/ck-libs/multicast/ckmulticast.C

index 29bfe5bfef7083c6628e9cc50cd9f2745f61999f..5e9a04703053a416d552325679020af9fcb7d9c7 100644 (file)
@@ -160,6 +160,7 @@ int storedDetsSize;
 float MLOGFT_totalLogSize = 0.0;
 float MLOGFT_totalMessages = 0.0;
 float MLOGFT_totalMcastLogSize = 0.0;
+float MLOGFT_totalReductionLogSize = 0.0;
 #endif
 
 static double adjustChkptPeriod=0.0; //in ms
@@ -740,6 +741,10 @@ void sendMsg(CkObjID &sender,CkObjID &recver,int destPE,MlogEntry *entry,MCount
                        if(entry->env->flags & CK_MULTICAST_MSG_MLOG){
                                MLOGFT_totalMcastLogSize += entry->env->getTotalsize(); 
                        }
+                       if(entry->env->flags & CK_REDUCTION_MSG_MLOG){
+                               MLOGFT_totalReductionLogSize += entry->env->getTotalsize();     
+                       }
+
 #endif
                }else{
                        // the message has to be deleted after it has been sent
@@ -3623,6 +3628,7 @@ void _messageLoggingExit(){
        printf("[%d] LOGGED MESSAGES: %.0f\n",CkMyPe(),MLOGFT_totalMessages);
        printf("[%d] MESSAGE LOG SIZE: %.2f MB\n",CkMyPe(),MLOGFT_totalLogSize/(float)MEGABYTE);
        printf("[%d] MULTICAST MESSAGE LOG SIZE: %.2f MB\n",CkMyPe(),MLOGFT_totalMcastLogSize/(float)MEGABYTE);
+       printf("[%d] REDUCTION MESSAGE LOG SIZE: %.2f MB\n",CkMyPe(),MLOGFT_totalReductionLogSize/(float)MEGABYTE);
 #endif
 
 #if COLLECT_STATS_MSGS
index 37c66721d05feacb4ece5a0c5e9a5528165d92bf..4df839115c3409bcecab4022a6d4677f432db1f3 100644 (file)
@@ -30,6 +30,7 @@
 #define CK_FREE_MSG_MLOG       0x1
 #define CK_BYPASS_DET_MLOG     0x2
 #define CK_MULTICAST_MSG_MLOG  0x4
+#define CK_REDUCTION_MSG_MLOG  0x8
 #endif
 
 //#define USE_CRITICAL_PATH_HEADER_ARRAY
index 70c01c206b1fbaeb47a0fb63fa4fc116bb40732b..0377d3d33c4abc05cdac3431d08881d6babd103e 100644 (file)
@@ -1063,6 +1063,11 @@ void CkMulticastMgr::contribute(int dataSize,void *data,CkReduction::reducerType
     msg->callback           = cb;
     msg->userFlag           = userFlag;
 
+#if CMK_MESSAGE_LOGGING
+       envelope *env = UsrToEnv(msg);
+       env->flags = env->flags | CK_REDUCTION_MSG_MLOG;
+#endif
+
     mCastGrp[mpe].recvRedMsg(msg);
 
     data = (void*)(((char*)data) + fSize);