Merge branch 'charm' of charmgit:charm into charm
authorYanhua Sun <sun51@hopper07.(none)>
Thu, 8 Mar 2012 23:03:52 +0000 (15:03 -0800)
committerYanhua Sun <sun51@hopper07.(none)>
Thu, 8 Mar 2012 23:03:52 +0000 (15:03 -0800)
Conflicts:
src/arch/gemini_gni/machine.c

1  2 
src/arch/gemini_gni/machine.c

index cd334625f8c869dfaa1c05da0c7e6c342574b5d7,c143290541650da2658a6dbfda5122607a9f58ec..6a83c15fdc541a6e1a1c6f839a42210c78862e26
@@@ -1085,32 -1186,32 +1186,48 @@@ static gni_return_t send_smsg_message(S
  #else
      if(queue->smsg_msglist_index[destNode].sendSmsgBuf == 0 || inbuff==1)
      {
+ #endif
+         uint64_t *buf = NULL;
+         int bufsize = 0;
+ #if PIGGYBACK_ACK
+         if (tag == SMALL_DATA_TAG) {
+             int nack = 0;
+             buf = piggyback_ack(destNode, size, &nack);
+             if (buf) {
+                 tag = SMALL_DATA_ACK_TAG;
+                 bufsize = nack * sizeof(uint64_t);
+             }
+         }
  #endif
          CMI_GNI_LOCK
++<<<<<<< HEAD
 +#if CMK_SMP_TRACE_COMMTHREAD
 +        int oldpe = -1;
 +        int oldeventid = -1;
 +        if(tag == SMALL_DATA_TAG || tag == LMSG_INIT_TAG)
 +        { 
 +            START_EVENT();
 +            if ( tag == SMALL_DATA_TAG)
 +                real_data = (char*)msg; 
 +            else 
 +                real_data = (char*)(((CONTROL_MSG*)msg)->source_addr);
 +            TRACE_COMM_GET_MSGID(real_data, &oldpe, &oldeventid);
 +            TRACE_COMM_SET_COMM_MSGID(real_data);
 +        }
 +#endif
 +        status = GNI_SmsgSendWTag(ep_hndl_array[destNode], 0, 0, msg, size, 0, tag);
 +#if CMK_SMP_TRACE_COMMTHREAD
 +        if (oldpe != -1)  TRACE_COMM_SET_MSGID(real_data, oldpe, oldeventid);
 +#endif
++=======
+         status = GNI_SmsgSendWTag(ep_hndl_array[destNode], buf, bufsize, msg, size, 0, tag);
++>>>>>>> 6bc5ef7da3aa42d00053cc7680a14257efe4ee42
          CMI_GNI_UNLOCK
          if(status == GNI_RC_SUCCESS)
          {
  #if CMK_SMP_TRACE_COMMTHREAD
-             if(tag == SMALL_DATA_TAG || tag == LMSG_INIT_TAG)
+             if(tag == SMALL_DATA_TAG || tag == LMSG_INIT_TAG || tag == SMALL_DATA_ACK_TAG)
              { 
 -                START_EVENT();
 -                if ( tag == SMALL_DATA_TAG)
 -                    real_data = (char*)msg; 
 -                else 
 -                    real_data = (char*)(((CONTROL_MSG*)msg)->source_addr);
                  TRACE_COMM_CREATION(CpvAccess(projTraceStart), real_data);
              }
  #endif