void check_and_compute() {
	    float timeToCompute = CmiWallTimer();
       if (messages_due == 0 && hasSent) {
          messages_due = 4;
          hasSent=false;
          compute();
          int currPe = CkMyPe();
          //ckout << "iter=" << itercnt << ": (" << thisIndex.x << "," << thisIndex.y << ") reporting pe " << CkMyPe() << endl;
          mainProxy.report(thisIndex.x, thisIndex.y, CkMyPe(), CmiWallTimer()-timeToCompute);
          if (itercnt == LDB_ITER) {
            //ckout << "iter=" << itercnt << ": AtSync reported from " << CkMyPe() << endl;
            AtSync();
          }
        }
    }