Zcpy Bcast Send API: Fix condition for marking BCAST messages 74/5074/2
authorNitin Bhat <nbhat4@illinois.edu>
Thu, 11 Apr 2019 16:33:53 +0000 (11:33 -0500)
committerNitin Bhat <nbhat4@illinois.edu>
Thu, 11 Apr 2019 19:47:15 +0000 (14:47 -0500)
Change-Id: I2c4be8705dc7aa02459f7ad51484a2f847bfbd27

src/ck-core/ck.C

index 79999ae5c00ade9f09ea2de2214612dd07d2cc4b..6a1a6888a900f2394677d720894e96250e49732f 100644 (file)
@@ -1199,11 +1199,8 @@ void _processHandler(void *converseMsg,CkCoreState *ck)
   if(CMI_ZC_MSGTYPE(env) == CMK_ZC_P2P_SEND_MSG || CMI_ZC_MSGTYPE(env) == CMK_ZC_BCAST_SEND_MSG){
     envelope *prevEnv = env;
 
-    ncpyEmApiMode mode = ncpyEmApiMode::P2P; // Ncpy p2p API
-
-    if(env->getMsgtype() == ForBocMsg || env->getMsgtype() == ForNodeBocMsg) {
-      mode = ncpyEmApiMode::BCAST; // Ncpy Bcast API
-    }
+    // Determine mode depending on the message
+    ncpyEmApiMode mode = (CMI_ZC_MSGTYPE(env) == CMK_ZC_BCAST_SEND_MSG) ? ncpyEmApiMode::BCAST : ncpyEmApiMode::P2P;
 
     env = CkRdmaIssueRgets(env, mode, prevEnv);