comm thread should not block when it is is bluegenep smp.
authorGengbin Zheng <gzheng@illinois.edu>
Sun, 10 Apr 2011 20:08:16 +0000 (15:08 -0500)
committerGengbin Zheng <gzheng@illinois.edu>
Sun, 10 Apr 2011 20:08:16 +0000 (15:08 -0500)
src/conv-core/cputopology.C

index 389d685ca6f324900f5fd0d2e24f0c9da3d53ccb..10da373d16a57d2a0126223081c9a6e89675ddb1 100644 (file)
@@ -451,15 +451,6 @@ extern "C" void CmiInitCPUTopology(char **argv)
   CmiBarrier();
 #endif
 
-  if (CmiMyPe() >= CmiNumPes()) {
-    CmiNodeAllBarrier();         // comm thread waiting
-#if CMK_MACHINE_PROGRESS_DEFINED
-#if ! CMK_CRAYXT
-    while (done < CmiMyNodeSize()) CmiNetworkProgress();
-#endif
-#endif
-    return;    /* comm thread return */
-  }
 
 #if 0
   if (gethostname(hostname, 999)!=0) {
@@ -513,7 +504,19 @@ extern "C" void CmiInitCPUTopology(char **argv)
     if (CmiMyPe()==0)  CmiPrintf("Charm++> Running on %d unique compute nodes (%d-way SMP).\n", cpuTopo.numNodes, CmiNumCores());
   }
   CmiNodeAllBarrier();
+
 #else
+
+  if (CmiMyPe() >= CmiNumPes()) {
+    CmiNodeAllBarrier();         // comm thread waiting
+#if CMK_MACHINE_PROGRESS_DEFINED
+#if ! CMK_CRAYXT
+    while (done < CmiMyNodeSize()) CmiNetworkProgress();
+#endif
+#endif
+    return;    /* comm thread return */
+  }
+
     /* get my ip address */
   if (CmiMyRank() == 0)
   {