replace CkPrintf by CmiPrintf and remove charm.h header
authorGengbin Zheng <gzheng@illinois.edu>
Fri, 22 Jul 2011 21:01:02 +0000 (16:01 -0500)
committerGengbin Zheng <gzheng@illinois.edu>
Fri, 22 Jul 2011 21:01:02 +0000 (16:01 -0500)
src/conv-ldb/topology.C

index db3faa78cd432a8e4b2b9ba9cc39c43b1f0abcd3..ad84a6d9a37be24f66b54510206acc6ee856a58f 100644 (file)
@@ -14,7 +14,6 @@
 #include <math.h>
 
 //#include "LBDatabase.h"
-#include "charm.h"
 #include "cklists.h"
 #include "topology.h"
 
@@ -153,16 +152,16 @@ public:
        
        int get_hop_count(int src,int dest){
                
-               //CkPrintf("in smp get_hop_count\n");
+               //CmiPrintf("in smp get_hop_count\n");
                int a = src/ppn;
                int b = dest/ppn;
                
                if(a!=b){
-                       //CkPrintf("2 returned\n");
+                       //CmiPrintf("2 returned\n");
                        return 2;
                }
                else{
-                       //CkPrintf("1 returned\n");
+                       //CmiPrintf("1 returned\n");
                        return 1;
                }
        }
@@ -481,7 +480,7 @@ int LBTopo_torus3d::get_hop_count(int src,int dest){
 
        int xdist=0,ydist=0,zdist=0;
        
-       //CkPrintf("just a chk........\n");
+       //CmiPrintf("just a chk........\n");
        xdist = x_dest-x_src;
        if(xdist<0) xdist=-xdist;
        if((width-xdist) < xdist)
@@ -661,13 +660,13 @@ public:
   }
   //Note: if abs(difference)*2 = cardinality, the difference is set to zero
   virtual bool coordinate_difference(const int* my_coordinates, const int* target_coordinates, int* difference) { 
-//    CkPrintf("[%d] coordiate_difference begin\n", CkMyPe());
+//    CmiPrintf("[%d] coordiate_difference begin\n", CkMyPe());
     CmiAssert( my_coordinates != NULL);
     CmiAssert( target_coordinates != NULL);
     CmiAssert( difference != NULL);
-//    CkPrintf("[%d] after assert\n", CkMyPe());
+//    CmiPrintf("[%d] after assert\n", CkMyPe());
     for(int i=0;i<dimension;i++) {
-//      CkPrintf("[%d] coordiate_difference iteration %d\n", i);
+//      CmiPrintf("[%d] coordiate_difference iteration %d\n", i);
       difference[i] = target_coordinates[i] - my_coordinates[i];
       if (abs(difference[i])*2 > Cardinality[i]) {
         difference[i] += (difference[i]>0) ? -Cardinality[i] : Cardinality[i];
@@ -675,7 +674,7 @@ public:
         difference[i] = 0;
       }
     }
-//    CkPrintf("[%d] coordiate_difference just before return\n");
+//    CmiPrintf("[%d] coordiate_difference just before return\n");
     return true;
   }
   //Note: if abs(difference)*2 = cardinality, the difference is set to zero
@@ -897,7 +896,7 @@ private:
        
 public:
        LBTopo_itorus_nd(int p): LBTopology(p) {
-       CkPrintf("Irregular torus created\n");
+       CmiPrintf("Irregular torus created\n");
        dim = new int[dimension];
                tempCoor = new int[dimension];
 
@@ -1005,7 +1004,7 @@ private:
        
 public:
        LBTopo_imesh_nd(int p): LBTopology(p) {
-       CkPrintf("Irregular mesh created\n");
+       CmiPrintf("Irregular mesh created\n");
        dim = new int[dimension];
        tempCoor = new int[dimension];
 
@@ -1046,10 +1045,10 @@ public:
       _n[nb] = GetNeighborID(mype, i);
       if (_n[nb]!=mype && (nb==0 || _n[nb-1]!=_n[nb]) ) nb++;
     }
-    /*CkPrintf("Nhs[%d]:",mype);
+    /*CmiPrintf("Nhs[%d]:",mype);
     for(int i=0;i<nb;i++)
-      CkPrintf("%d ",_n[i]);
-    CkPrintf("\n");*/
+      CmiPrintf("%d ",_n[i]);
+    CmiPrintf("\n");*/
   }
 
        int GetNeighborID(int ProcessorID, int number) {