trace a bug in traceBegin when tracing comm thread, it mistakenly assumes there is...
authorGengbin Zheng <gzheng@illinois.edu>
Fri, 24 Feb 2012 22:16:04 +0000 (16:16 -0600)
committerGengbin Zheng <gzheng@illinois.edu>
Fri, 24 Feb 2012 22:16:04 +0000 (16:16 -0600)
src/ck-perf/trace-common.C

index 9f65ed298142402845223d025c751a0d419cc990..b5d5c9b48e54293ba36d59a9315b98dcd481e881 100644 (file)
@@ -248,6 +248,9 @@ void TraceArray::traceEndOnCommThread() {
 #endif
 }
 
+#if CMK_MULTICORE
+extern int Cmi_commthread;
+#endif
 
 /*Install the beginIdle/endIdle condition handlers.*/
 extern "C" void traceBegin(void) {
@@ -256,6 +259,9 @@ extern "C" void traceBegin(void) {
   
 #if CMK_SMP_TRACE_COMMTHREAD
   //the first core of this node controls the condition of comm thread
+#if CMK_MULTICORE
+  if (Cmi_commthread)
+#endif
   if(CmiMyRank()==0){
        if(CpvAccessOther(traceOn, CmiMyNodeSize())!=1){
                CkpvAccessOther(_traces, CmiMyNodeSize())->traceBeginOnCommThread();