| 3 | |
| 4 | '''API''' |
| 5 | |
| 6 | {{{ |
| 7 | /* initialize the SCR library. If not using SIONlib _Buddy_Checkpointing_ use (NULL,NULL) as params, otherwise the check_readable() function and args from SIONlib (refer to SIONlib Doku) */ |
| 8 | int SCR_Init(int (* check_readable)(char *, void *), void *args); |
| 9 | |
| 10 | /* shut down the SCR library */ |
| 11 | int SCR_Finalize(); |
| 12 | |
| 13 | /* determine whether a checkpoint should be taken at the current time */ |
| 14 | int SCR_Need_checkpoint(int* flag); |
| 15 | |
| 16 | /* inform library that a new checkpoint is starting */ |
| 17 | int SCR_Start_checkpoint(); |
| 18 | |
| 19 | /* determine the path and filename to be used to open a file. Before calling SCR_Start_checkpoint -> delivers path to restore your data. After calling it -> path to a new checkpoint to be created */ |
| 20 | int SCR_Route_file(const char* name, char* file); |
| 21 | |
| 22 | /* inform library that the current checkpoint is complete. valid needs to be provided by user codes. SCR is unable to check if your CP was written correctly for obvious reasons */ |
| 23 | int SCR_Complete_checkpoint(int valid); |
| 24 | |
| 25 | /* register files created without knowledge of SCR, e.g. SIONlib Buddy checkpoints with multiple files. can be retrieved from SIOBlib by |
| 26 | * sion_io_stat_t *file_stat; file_stat = sion_get_io_info(sid); before closing the SIONlib file. Then usage is: |
| 27 | * scr_register_files((const char**) file_stat->names, file_stat->nfiles); |
| 28 | * When only using SIONlib to create node-local files _without_ Buddy Checkpointing, this is _NOT_ necessary! |
| 29 | */ |
| 30 | int scr_register_files(const char **filenames, int n); |
| 31 | }}} |
| 32 | |
| 33 | |
| 34 | |
| 35 | |