Added a macro to turn off user event when tracing MPI_Isend/MPI_Recv in order to...
authorChao Mei <chaomei2@illinois.edu>
Fri, 18 Feb 2011 19:14:08 +0000 (13:14 -0600)
committerChao Mei <chaomei2@illinois.edu>
Fri, 18 Feb 2011 19:14:08 +0000 (13:14 -0600)
src/arch/mpi/machine.c

index f31f8e752c209fb8ed6477423007ded596f83475..716813a28babe581ff704694f0f3fd0230c565e5 100644 (file)
@@ -57,6 +57,7 @@ static void sleep(int secs) {Sleep(1000*secs);}
 
 
 #if CMK_SMP_TRACE_COMMTHREAD
+#define CMI_MPI_TRACE_MOREDETAILED 0
 #undef CMI_MPI_TRACE_USEREVENTS
 #define CMI_MPI_TRACE_USEREVENTS 1
 #endif
@@ -763,9 +764,11 @@ int PumpMsgs(void)
         traceBeginCommOp(msg);
        traceChangeLastTimestamp(CpvAccess(projTraceStart));
        traceEndCommOp(msg);
+       #if CMI_MPI_TRACE_MOREDETAILED
        char tmp[32];
        sprintf(tmp, "MPI_Recv: to proc %d", CmiNodeFirst(CmiMyNode())+CMI_DEST_RANK(msg));
        traceUserSuppliedBracketedNote(tmp, 30, CpvAccess(projTraceStart), CmiWallTimer());
+       #endif
 #endif 
        
     MACHSTATE2(3,"PumpMsgs recv one from node:%d to rank:%d", sts.MPI_SOURCE, CMI_DEST_RANK(msg));
@@ -850,9 +853,11 @@ CmiAbort("Unsupported use of PumpMsgsBlocking. This call should be extended to c
         traceBeginCommOp(msg);
        traceChangeLastTimestamp(CpvAccess(projTraceStart));
        traceEndCommOp(msg);
+       #if CMI_MPI_TRACE_MOREDETAILED
        char tmp[32];
        sprintf(tmp, "To proc %d", CmiNodeFirst(CmiMyNode())+CMI_DEST_RANK(msg));
        traceUserSuppliedBracketedNote(tmp, 30, CpvAccess(projTraceStart), CmiWallTimer());
+       #endif
 #endif
   
 #if CMK_NODE_QUEUE_AVAILABLE
@@ -1217,9 +1222,11 @@ static int SendMsgBuf()
        traceSendMsgComm(msg);
        traceChangeLastTimestamp(CpvAccess(projTraceStart));
        traceEndCommOp(msg);
+       #if CMI_MPI_TRACE_MOREDETAILED
        char tmp[64];
        sprintf(tmp, "MPI_Isend: from proc %d to proc %d", msg_tmp->srcpe, CmiNodeFirst(node)+CMI_DEST_RANK(msg));
        traceUserSuppliedBracketedNote(tmp, 40, CpvAccess(projTraceStart), CmiWallTimer());
+       #endif
 #endif