/// In sequential mode, begin checkpoint after reaching quiescence void sim::SeqBeginCheckpoint() { // Ensure this only happens on sim 0 CkAssert(thisIndex == 0); // Ensure we're checkpointing CkAssert(seqCheckpointInProgress); CkPrintf("POSE: quiescence detected\n"); CkPrintf("POSE: beginning checkpoint on sim %d at GVT=%lld sim time=%.1f sec\n", thisIndex, seqLastCheckpointGVT, CmiWallTimer() + seqStartTime); CkCallback cb(CkIndex_sim::SeqResumeAfterCheckpoint(), CkArrayIndex1D(thisIndex), thisProxy); CkStartCheckpoint(POSE_CHECKPOINT_DIRECTORY, cb); }
/// ENTRY: begin checkpoint now that quiescence has been reached void PVT::beginCheckpoint(eventMsg *m) { #ifndef CMK_OPTIMIZE if(pose_config.stats) localStats->TimerStart(GVT_TIMER); #endif CkFreeMsg(m); if (parCheckpointInProgress) { // ensure this only happens once CkPrintf("POSE: quiescence detected\n"); CkPrintf("POSE: beginning checkpoint on processor %d at GVT=%lld sim time=%.1f sec\n", CkMyPe(), estGVT, CmiWallTimer() + parStartTime); eventMsg *dummyMsg = new eventMsg(); CkCallback cb(CkIndex_PVT::resumeAfterCheckpoint(dummyMsg), CkMyPe(), ThePVT); CkStartCheckpoint(POSE_CHECKPOINT_DIRECTORY, cb); } #ifndef CMK_OPTIMIZE if(pose_config.stats) localStats->TimerStop(); #endif }