Beispiel #1
0
//Called at end of each load balancing cycle
void LBDB::batsyncer::resumeFromSync(void *bs)
{
  LBDB::batsyncer *s=(LBDB::batsyncer *)bs;
//  CmiPrintf("[%d] LBDB::batsyncer::resumeFromSync with %gs\n", CkMyPe(), s->period);

#if 0
  double curT = CmiWallTimer();
  if (s->nextT<curT)  s->period *= 2;
  s->nextT = curT + s->period;
#endif

  CcdCallFnAfterOnPE((CcdVoidFn)gotoSync, (void *)s, 1000*s->period, CkMyPe());
}
Beispiel #2
0
/**
 * Register a callback function that will be triggered after a minimum
 * delay of deltaT
 */
void CcdCallFnAfter(CcdVoidFn fnp, void *arg, double deltaT)
{
    CcdCallFnAfterOnPE(fnp, arg, deltaT, CcdIGNOREPE);
}
/**************************************************************************
** This method exists so periodic_flush_handler() can re-register itself to
** be invoked periodically to flush buffers.
*/
void MeshStreamingStrategy::RegisterPeriodicFlush (void)
{
  ComlibPrintf ("[%d] MeshStreamingStrategy::RegisterPeriodicFlush() invoked.\n", CkMyPe());

  CcdCallFnAfterOnPE(periodic_flush_handler, (void *) this, flush_period, CkMyPe());
}
void StreamingStrategy::registerFlush(void) {
    //CkPrintf("[%d] Will call function again every %d ms\n",CmiMyPe(),PERIOD);
    CcdCallFnAfterOnPE(call_delayFlush, (void *)this, PERIOD, CmiMyPe());
}