1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
|
/*@@
@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 */
char *IOUtil_AssembleFilename (const cGH *GH,
const char *basefilename,
const char *postfix,
const char *extension,
int called_from,
int file_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 */
int 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 *basefilename,
int called_from),
const char *fileExtension,
const char *fileType);
/* return the parameter database as one single string */
char *IOUtil_GetAllParameters (const cGH *GH, int all);
/* set all parameters contained in the given string */
void IOUtil_SetAllParameters (const char *parameters);
/* print the checkpoint/recovery timings to stdout */
void IOUtil_PrintTimings (const char *description,
int ntimers,
const int *timers,
const char *const *const timer_descriptions);
#ifdef __cplusplus
}
#endif
#endif /* _IOUTIL_CHECKPOINTRECOVERY_H_ */
|