More accurate node id on BGP.
authorSameer Kumar <skumar2@uiuc.edu>
Tue, 23 Dec 2008 16:44:29 +0000 (16:44 +0000)
committerSameer Kumar <skumar2@uiuc.edu>
Tue, 23 Dec 2008 16:44:29 +0000 (16:44 +0000)
src/conv-core/cputopology.C

index 04bbc538f4facddb2a8ca55da418c6e796be4e8f..f313b27468abb0c2f767b3f2562a5c85f27a7a11 100644 (file)
@@ -269,7 +269,11 @@ extern "C" void CmiInitCPUTopology(char **argv)
   {
 #if CMK_BLUEGENEP
     //CmiAbort("Can not get unique name for the compute nodes. \n");
-    ret = DCMF_Messager_rank();
+    unsigned rank = DCMF_Messager_rank();    
+    unsigned x,y,z,t;
+    DCMF_Messager_rank2torus (rank, &x, &y, &z, &t);
+    DCMF_Messager_torus2rank (x,y,z,0, (unsigned *)&ret);
+
     memcpy(&myip, &ret, sizeof(int));
 #elif CMK_CRAYXT
     ret = getXTNodeID(CmiMyPe(), CmiNumPes());