/*@@ @header ioutil_CheckpointRecovery.h @date Tue 19 Sep 2000 @author Thomas Radke @desc Typedefs and function prototypes for checkpointing and recovery. @history @endhistory @version $Header$ @@*/ #ifndef _IOUTIL_CHECKPOINTRECOVERY_H_ #define _IOUTIL_CHECKPOINTRECOVERY_H_ #ifdef __cplusplus extern "C" { #endif /* enums for checkpointing/recovery and filereader functions */ enum {CP_INITIAL_DATA, CP_EVOLUTION_DATA, CP_RECOVER_PARAMETERS, CP_RECOVER_DATA, FILEREADER_DATA}; /************************************************************************ * * Function prototypes * ************************************************************************/ /* create a checkpoint filename */ void IOUtil_PrepareFilename (cGH *GH, const char *basename, char *fname, int called_from, int ioproc, int file_unchunked); /* register a new recovery method */ int IOUtil_RegisterRecover (const char *name, int (*func) (cGH *, const char *, int)); /* recover variables from a list of data files */ void IOUtil_RecoverVarsFromDatafiles (cGH *GH, const char *in_files, const char *in_vars); /* generic recovery routine called by other IO thorns */ int IOUtil_RecoverParameters (int (*recoverFn) (cGH *GH, const char *basename, int called_from), const char *fileExtension, const char *fileType); /* return the parameter database as one single string */ char *IOUtil_GetAllParameters (cGH *GH); /* set all parameters contained in the given string */ void IOUtil_SetAllParameters (char *parameters); /* return true if this run was restarted from recovery, otherwise false */ int IOUtil_RestartFromRecovery (cGH *GH); /* print the checkpoint/recovery timings to stdout */ void IOUtil_PrintTimings (const char *description, int ntimers, int timers[/* ntimers */], const char *timer_descriptions[/* ntimers */]); #ifdef __cplusplus } #endif #endif /* _IOUTIL_CHECKPOINTRECOVERY_H_ */