comlib: Use CmiMsgHeaderExt instead of CmiMsgHeaderBasic to get the strategy ID
authorRamprasad Venkataraman <ramv@illinois.edu>
Mon, 17 Oct 2011 16:41:59 +0000 (11:41 -0500)
committerRamprasad Venkataraman <ramv@illinois.edu>
Tue, 18 Oct 2011 15:40:29 +0000 (10:40 -0500)
src/ck-com/ChunkMulticastStrategy.C
src/ck-com/MulticastStrategy.C
src/ck-com/OneTimeMulticastStrategy.C
src/ck-com/RectMulticastStrategy.C
src/conv-com/convcomlibmanager.C
src/conv-com/convcomlibmanager.h

index fb9797e3ec0b31b0ac37ebaa86619e0733e71986..023fdcf470b2ef88dfe784af350818c73082e264 100644 (file)
@@ -225,7 +225,7 @@ void ChunkMulticastStrategy::remoteMulticast(ComlibMulticastMsg * multMsg, bool
   
 
   CmiSetHandler(env, CkpvAccess(comlib_handler));
-  ((CmiMsgHeaderBasic *) env)->stratid = getInstance();  
+  ((CmiMsgHeaderExt *) env)->stratid = getInstance();  
   CkPackMessage(&env);
   double middle = CmiWallTimer();
 
index 6ec70a0a9808dbc048fe58a8f37c0ed2aac4cf3f..2826fb02db0f6516c53d45b0854373d83456c165 100644 (file)
@@ -245,7 +245,7 @@ void MulticastStrategy::localMulticast(envelope *env,
       CkMcastBaseMsg *errorMsg = sinfo.getNewDeliveryErrorMsg(base);
       envelope *errorEnv = UsrToEnv(errorMsg);
       CmiSetHandler(errorEnv, CkpvAccess(comlib_handler));
-      ((CmiMsgHeaderBasic *) errorEnv)->stratid = getInstance();
+      ((CmiMsgHeaderExt *) errorEnv)->stratid = getInstance();
       CmiSyncSendAndFree(env->getSrcPe(), errorEnv->getTotalsize(), (char*)errorEnv);
     }
   }
@@ -274,7 +274,7 @@ void MulticastStrategy::remoteMulticast(envelope *env,
   //CmiSetHandler(env, handlerId);
   CmiSetHandler(env, CkpvAccess(comlib_handler));
 
-  ((CmiMsgHeaderBasic *) env)->stratid = getInstance();
+  ((CmiMsgHeaderExt *) env)->stratid = getInstance();
 
   //Collect Multicast Statistics
   RECORD_SENDM_STATS(getInstance(), env->getTotalsize(), pelist, npes);
index 6e65c7b86c9bfaeb2be3527f8ca54762acca3391..d7a0882e5948f357f37c707c38d5296de1dca59e 100644 (file)
@@ -152,7 +152,7 @@ void OneTimeMulticastStrategy::remoteMulticast(ComlibMulticastMsg * multMsg, boo
   
 
   CmiSetHandler(env, CkpvAccess(comlib_handler));
-  ((CmiMsgHeaderBasic *) env)->stratid = getInstance();  
+  ((CmiMsgHeaderExt *) env)->stratid = getInstance();  
   CkPackMessage(&env);
 
   double middle = CmiWallTimer();
index 33656ef6c70da69607ccd4fab1aecf96119a2bc2..4dc91af3a0f4a94d3720cbe396ebb36bedba4220 100644 (file)
@@ -93,7 +93,7 @@ extern "C" void isSane( void *, unsigned);
 CkpvExtern(CkGroupID, cmgrID);
 
 void *sourceOffRectstrategyHandler(void *msg) {
-    CmiMsgHeaderBasic *conv_header = (CmiMsgHeaderBasic *) msg;
+    CmiMsgHeaderExt *conv_header = (CmiMsgHeaderExt *) msg;
     int instid = conv_header->stratid;
     ComlibPrintf("sourceOff handler called on %d\n",CkMyPe(), instid);
 
@@ -373,7 +373,7 @@ void RectMulticastStrategy::sendRectDest(ComlibRectSectionHashObject *obj, int s
   //CmiSetHandler(env, handlerId);
   CmiSetHandler(env, CkpvAccess(strategy_handlerid));
 
-  ((CmiMsgHeaderBasic *) env)->stratid = getInstance();
+  ((CmiMsgHeaderExt *) env)->stratid = getInstance();
 
   //Collect Multicast Statistics
   RECORD_SENDM_STATS(getInstance(), env->getTotalsize(), pelist, destpe);
@@ -608,7 +608,7 @@ void RectMulticastStrategy::remoteMulticast(envelope *env,
     //CmiSetHandler(env, handlerId);
     CmiSetHandler(env, CkpvAccess(strategy_handlerid));
 
-    ((CmiMsgHeaderBasic *) env)->stratid = getInstance();
+    ((CmiMsgHeaderExt *) env)->stratid = getInstance();
 
     //Collect Multicast Statistics
     RECORD_SENDM_STATS(getInstance(), env->getTotalsize(), pelist, npes);
@@ -649,7 +649,7 @@ void RectMulticastStrategy::forwardMulticast(envelope *env,
     // handler is changed to special root handler
     CmiSetHandler(env, handlerId);
 
-    ((CmiMsgHeaderBasic *) env)->stratid = getInstance();
+    ((CmiMsgHeaderExt *) env)->stratid = getInstance();
 
     //Collect Multicast Statistics
     RECORD_SENDM_STATS(getInstance(), env->getTotalsize(), pelist, npes);
index 86465b782b436d7158a0a0cd0334ac2a2b4bac4d..39e778b49084258bc86c6be24f940f0a75e07ba9 100644 (file)
@@ -38,7 +38,7 @@ CkpvDeclare(ConvComlibManager, conv_com_object);
 CkpvDeclare(int, comlib_handler);
 /// Method invoked upon receipt a message routed through comlib.
 void *strategyHandler(void *msg) {
-    CmiMsgHeaderBasic *conv_header = (CmiMsgHeaderBasic *) msg;
+    CmiMsgHeaderExt *conv_header = (CmiMsgHeaderExt *) msg;
     int instid = conv_header->stratid;
 
 #ifndef CMK_OPTIMIZE
index 000e1dd58ff0b4f55a9b378dbc880de36efcb886..a7be41bb629ad7f7c3205599d046de8aa61d2285 100644 (file)
@@ -170,7 +170,7 @@ CkpvExtern(int, comlib_handler);
 // received the handleMessage method will be invoked.
 inline void ConvComlibSendMessage(int instance, int dest_pe, int size, char *msg) {
   CmiSetHandler(msg, CkpvAccess(strategy_handlerid));
-  ((CmiMsgHeaderBasic *) msg)->stratid = instance;
+  ((CmiMsgHeaderExt *) msg)->stratid = instance;
     
   CmiSyncSendAndFree(dest_pe, size, msg);
 }*/