fixed Position.init() and fixed CommitPrints
authorGengbin Zheng <gzheng@illinois.edu>
Tue, 2 Nov 2004 03:17:18 +0000 (03:17 +0000)
committerGengbin Zheng <gzheng@illinois.edu>
Tue, 2 Nov 2004 03:17:18 +0000 (03:17 +0000)
examples/pose/HiSim/Main/BgSim.h
examples/pose/HiSim/Main/Channel.C
examples/pose/HiSim/Main/Nic.C
examples/pose/HiSim/Main/TCsim.C

index 863a621e766664a7c9bf1e1e417e53ebe59b6974..c1acb4f3492bb9a0e067145a9900a35da19c99a9 100644 (file)
@@ -57,10 +57,17 @@ class Position {
        Position(int a,int b,int c): x(a),y(b),z(c){};
 
        void init(int id) {
+#if 0
                z = id / (netLength * netHeight);
                id = id - z*(netLength * netHeight);
                y = id / (netLength);
                x = id - y*netLength;
+#else
+               x = id / (netHeight*netWidth);
+               id = id - x*(netHeight*netWidth);
+               y = id/netWidth;
+               z = id - y*netWidth;
+#endif
        }
 
        void initnew(int a,int b,int c) { x = a; y = b; z = c; }
index e9da0aa50531e8249d2bea8c5e4a8e24725e7bc9..d417040076d06ec0783935a8c158cf72d24b0701 100644 (file)
@@ -26,7 +26,7 @@ void Channel::recvPacket(Packet *copyP) {
         curInterval = ovt/config.collection_interval;
         if(curInterval > prevIntervalStart) {
         prevIntervalStart = curInterval;
-        parent->CommitPrintf("%d->%d %lld %f\n",nodeid,portid,prevIntervalStart,(float)counter/config.collection_interval);
+        parent->CommitPrintf("%d->%d %lld %f\n",nodeid,portid,(CmiInt8)prevIntervalStart,(float)counter/config.collection_interval);
         counter=0;
         }
         }
index d877db3f85775b181083e3bad392748d41441c84..b4e91a025b7343044ec1565850ca7f11e757b954 100644 (file)
@@ -124,7 +124,7 @@ void NetInterface::recvPacket(Packet *p) {
         curInterval = ovt/config.collection_interval;
         if((curInterval > prevIntervalStart) && (numRecvd)) {
         prevIntervalStart = curInterval;
-        parent->CommitPrintf("%d*%d %d %lld %.2f\n",nicConsts->id-config.nicStart,numRecvd, hops,prevIntervalStart,(float)counter/numRecvd);
+        parent->CommitPrintf("%d*%d %d %lld %.2f\n",nicConsts->id-config.nicStart,numRecvd, hops,(CmiInt8)prevIntervalStart,(float)counter/numRecvd);
        counter=0; numRecvd = 0;
         }
         }
index 5ea150abc9573c4dcc5952141da736a642985f6a..042b7da947001837e0b06c875e592a7eb47a8d7d 100644 (file)
@@ -243,7 +243,7 @@ BGproc::BGproc(BGprocMsg *m)
     CkPrintf("Info> timing factor %e ...\n", (double)factor);
     CkPrintf("Info> invoking startup task from proc 0 ...\n");
     if (config.skip_on)
-      CkPrintf("Info> Skipping startup to %d/%d\n", startEvt, tline.length());
+      CkPrintf("Info> Skipping startup to %d/%d at time %lld\n", startEvt, tline.length(), (CmiInt8)taskList[startEvt].startTime);
   }
 #if 1
     for (int i=startEvt; i<numTasks; i++) {