diff --git a/src/CheckPoint.C b/src/CheckPoint.C index aeb78e64..faf0b016 100644 --- a/src/CheckPoint.C +++ b/src/CheckPoint.C @@ -650,6 +650,45 @@ float_sw4 CheckPoint::getDt() { } MPI_Bcast(&dt, 1, mEW->m_mpifloat, 0, mEW->m_cartesian_communicator); return dt; + +#if 0 + int have_restart = 0; + char checkpoint_dir[SCR_MAX_FILENAME]; + SCR_Have_restart(&have_restart, checkpoint_dir); + if (! have_restart) { + std::cerr<<"Error :: SCR found no checkpoints ! \n"<getRank()<<".bin"; + char scr_file[SCR_MAX_FILENAME]; + SCR_Route_file(s.str().c_str(), scr_file); + int valid=1; + if (std::FILE *file=std::fopen(scr_file,"rb")){ + float_sw4 dt; + if ( std::fread(&dt,sizeof dt,1,file)==1) { + scr_file_handle=file; + return dt; + } else { + std::cerr<<"ERROR:: Read of SCR checkpoint file failed in getDt \n"<