Making start ssn more flexible.
authorEsteban Meneses <emenese2@illinois.edu>
Tue, 18 Sep 2012 16:21:03 +0000 (11:21 -0500)
committerEsteban Meneses <emenese2@illinois.edu>
Tue, 18 Sep 2012 16:21:03 +0000 (11:21 -0500)
src/ck-core/ckmessagelogging.h

index ba560277ecd43c45af439e96904c37b20d710e74..9804616782a8c0d7476920c4f5ef3ec673e9a71c 100644 (file)
@@ -63,16 +63,20 @@ public:
                MCount *old;
 
                // checking if ssn can be inserted, most common case
-               if(start == end && ssn == (data[start] + 1)){
+               if((start == end && ssn == (data[start] + 1)) || data[start] == 0){
                        data[start] = ssn;
                        return 0;
                }
 
                // checking if ssn was already received
-               if(ssn <= data[start]) return 1;
+               if(ssn <= data[start]){
+                       CkPrintf("[%d] Repeated ssn=%d start=%d\n",CkMyPe(),ssn,data[start]);
+                       return 1;
+               }
 
                // checking if data needs to be extended
                if(ssn-data[start] >= currentSize){
+                       CkPrintf("[%d] Extending Data %d %d %d\n",CkMyPe(),ssn,data[start],currentSize);
                        old = data;
                        oldCS = currentSize;
                        currentSize *= 2;
@@ -86,6 +90,7 @@ public:
                        delete[] old;
                }
 
+               CkPrintf("[%d] Ahead ssn=%d start=%d\n",CkMyPe(),ssn,data[start]);
                // adding ssn into data
                num = end - start;
                if(num < 0) num += currentSize;