Fault Tolerance Interface
|
Utility functions for the FTI library. More...
Functions | |
int | FTI_InitExecVars (FTIT_configuration *FTI_Conf, FTIT_execution *FTI_Exec, FTIT_topology *FTI_Topo, FTIT_checkpoint *FTI_Ckpt, FTIT_injection *FTI_Inje) |
Init of the static variables. More... | |
int | FTI_Checksum (FTIT_execution *FTI_Exec, FTIT_dataset *FTI_Data, FTIT_configuration *FTI_Conf, char *checksum) |
It calculates checksum of the checkpoint file. More... | |
int | FTI_VerifyChecksum (char *fileName, char *checksumToCmp) |
It compares checksum of the checkpoint file. More... | |
int | FTI_Try (int result, char *message) |
It receives the return code of a function and prints a message. More... | |
void | FTI_MallocMeta (FTIT_execution *FTI_Exec, FTIT_topology *FTI_Topo) |
It mallocs memory for the metadata. More... | |
void | FTI_FreeMeta (FTIT_execution *FTI_Exec) |
It frees memory for the metadata. More... | |
int | FTI_InitGroupsAndTypes (FTIT_execution *FTI_Exec) |
It mallocs memory for the metadata. More... | |
void | FTI_FreeTypesAndGroups (FTIT_execution *FTI_Exec) |
It frees memory for the types. More... | |
int | FTI_InitBasicTypes (FTIT_dataset *FTI_Data) |
It creates the basic datatypes and the dataset array. More... | |
int | FTI_RmDir (char path[FTI_BUFS], int flag) |
It erases a directory and all its files. More... | |
int | FTI_Clean (FTIT_configuration *FTI_Conf, FTIT_topology *FTI_Topo, FTIT_checkpoint *FTI_Ckpt, int level) |
It erases the previous checkpoints and their metadata. More... | |
Variables | |
int | FTI_filemetastructsize |
int | FTI_dbstructsize |
int | FTI_dbvarstructsize |
Utility functions for the FTI library.
Copyright (c) 2017 Leonardo A. Bautista-Gomez All rights reserved
FTI - A multi-level checkpointing library for C/C++/Fortran applications
Revision 1.0 : Fault Tolerance Interface (FTI)
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
int FTI_Checksum | ( | FTIT_execution * | FTI_Exec, |
FTIT_dataset * | FTI_Data, | ||
FTIT_configuration * | FTI_Conf, | ||
char * | checksum | ||
) |
It calculates checksum of the checkpoint file.
FTI_Exec | Execution metadata. |
FTI_Data | Dataset metadata. |
checksum | Checksum that is calculated. |
This function calculates checksum of the checkpoint file based on MD5 algorithm and saves it in checksum.
int FTI_Clean | ( | FTIT_configuration * | FTI_Conf, |
FTIT_topology * | FTI_Topo, | ||
FTIT_checkpoint * | FTI_Ckpt, | ||
int | level | ||
) |
It erases the previous checkpoints and their metadata.
FTI_Conf | Configuration metadata. |
FTI_Topo | Topology metadata. |
FTI_Ckpt | Checkpoint metadata. |
level | Level of cleaning. |
This function erases previous checkpoint depending on the level of the current checkpoint. Level 5 means complete clean up. Level 6 means clean up local nodes but keep last checkpoint data and metadata in the PFS.
void FTI_FreeMeta | ( | FTIT_execution * | FTI_Exec | ) |
It frees memory for the metadata.
FTI_Exec | Execution metadata. |
This function frees the memory used for the metadata storage.
void FTI_FreeTypesAndGroups | ( | FTIT_execution * | FTI_Exec | ) |
It frees memory for the types.
FTI_Exec | Execution metadata. |
This function frees the memory used for the type storage.
int FTI_InitBasicTypes | ( | FTIT_dataset * | FTI_Data | ) |
It creates the basic datatypes and the dataset array.
FTI_Data | Dataset metadata. |
This function creates the basic data types using FTIT_Type.
int FTI_InitExecVars | ( | FTIT_configuration * | FTI_Conf, |
FTIT_execution * | FTI_Exec, | ||
FTIT_topology * | FTI_Topo, | ||
FTIT_checkpoint * | FTI_Ckpt, | ||
FTIT_injection * | FTI_Inje | ||
) |
Init of the static variables.
This function initializes all static variables to zero.
int FTI_InitGroupsAndTypes | ( | FTIT_execution * | FTI_Exec | ) |
It mallocs memory for the metadata.
FTI_Exec | Execution metadata. |
FTI_Topo | Topology metadata. |
This function mallocs the memory used for the metadata storage.
void FTI_MallocMeta | ( | FTIT_execution * | FTI_Exec, |
FTIT_topology * | FTI_Topo | ||
) |
It mallocs memory for the metadata.
FTI_Exec | Execution metadata. |
FTI_Topo | Topology metadata. |
This function mallocs the memory used for the metadata storage.
int FTI_RmDir | ( | char | path[FTI_BUFS], |
int | flag | ||
) |
It erases a directory and all its files.
path | Path to the directory we want to erase. |
flag | Set to 1 to activate. |
This function erases a directory and all its files. It focusses on the checkpoint directories created by FTI so it does NOT handle recursive erasing if the given directory includes other directories.
int FTI_Try | ( | int | result, |
char * | message | ||
) |
It receives the return code of a function and prints a message.
result | Result to check. |
message | Message to print. |
This function checks the result from a function and then decides to print the message either as a debug message or as a warning.
int FTI_VerifyChecksum | ( | char * | fileName, |
char * | checksumToCmp | ||
) |
It compares checksum of the checkpoint file.
fileName | Filename of the checkpoint. |
checksumToCmp | Checksum to compare. |
This function calculates checksum of the checkpoint file based on MD5 algorithm. It compares calculated hash value with the one saved in the file.
int FTI_dbstructsize |
size of FTIFF_db struct in file
int FTI_dbvarstructsize |
size of FTIFF_db struct in file
int FTI_filemetastructsize |
size of FTIFF_db struct in file