Fault Tolerance Interface
|
Differential checkpointing routines. More...
#include "interface.h"
Macros | |
#define | _DEFAULT_SOURCE |
#define | _BSD_SOURCE |
Functions | |
int | FTI_FinalizeDcp (FTIT_configuration *FTI_Conf, FTIT_execution *FTI_Exec) |
Finalizes dCP. More... | |
int | FTI_InitDcp (FTIT_configuration *FTI_Conf, FTIT_execution *FTI_Exec, FTIT_dataset *FTI_Data) |
Initializes dCP. More... | |
dcpBLK_t | FTI_GetDiffBlockSize () |
Returns the dCP block size. More... | |
int | FTI_GetDcpMode () |
Returns the dCP mode. More... | |
int | FTI_InitBlockHashArray (FTIFF_dbvar *dbvar) |
Initializes a new hash meta data structure for data chunk. More... | |
int | FTI_CollapseBlockHashArray (FTIFF_dbvar *dbvar) |
Shrinks an existing hash meta data structure for data chunk. More... | |
int | FTI_ExpandBlockHashArray (FTIFF_dbvar *dbvar) |
Expands an existing hash meta data structure for data chunk. More... | |
long | FTI_CalcNumHashes (long chunkSize) |
Computes number of hashblocks for chunk size. More... | |
int | FTI_HashCmp (long hashIdx, FTIFF_dbvar *dbvar) |
Checks if data block is dirty, clean or invalid. More... | |
int | FTI_UpdateDcpChanges (FTIT_dataset *FTI_Data, FTIT_execution *FTI_Exec) |
Updates data chunk hash meta data. More... | |
int | FTI_ReceiveDataChunk (FTI_ADDRVAL *buffer_addr, FTI_ADDRVAL *buffer_size, FTIFF_dbvar *dbvar, FTIT_dataset *FTI_Data) |
Returns pointer and size of buffer to write during checkpoint. More... | |
Differential checkpointing routines.
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.
#define _BSD_SOURCE |
#define _DEFAULT_SOURCE |
long FTI_CalcNumHashes | ( | long | chunkSize | ) |
Computes number of hashblocks for chunk size.
chunkSize | chunk size of data chunk |
This function computes the number of hash blocks according to the set dCP block size corresponding to chunkSize.
int FTI_CollapseBlockHashArray | ( | FTIFF_dbvar * | dbvar | ) |
Shrinks an existing hash meta data structure for data chunk.
dbvar | Datchunk metadata. |
This function re-allocates memory for the 'dataDiffHash' member of the 'FTIFF_dbvar' structure and if dCP mode is MD5 also for the MD5 digest array placed in the member 'md5hash' of the 'dataDiffHash' structure.
It also updates the other members of the 'dataDiffHash' structure.
int FTI_ExpandBlockHashArray | ( | FTIFF_dbvar * | dbvar | ) |
Expands an existing hash meta data structure for data chunk.
dbvar | Datchunk metadata. |
This function re-allocates memory for the 'dataDiffHash' member of the 'FTIFF_dbvar' structure and if dCP mode is MD5 also for the MD5 digest array placed in the member 'md5hash' of the 'dataDiffHash' structure.
It also updates the other members of the 'dataDiffHash' structure.
int FTI_FinalizeDcp | ( | FTIT_configuration * | FTI_Conf, |
FTIT_execution * | FTI_Exec | ||
) |
Finalizes dCP.
Function Definitions
FTI_Conf | Configuration metadata. |
FTI_Exec | Execution metadata. |
This function deallocates structures used for dCP and exposes the status dcp disabled to FTI. It is also called for failures during dCP creation.
int FTI_GetDcpMode | ( | ) |
Returns the dCP mode.
dcpBLK_t FTI_GetDiffBlockSize | ( | ) |
Returns the dCP block size.
int FTI_HashCmp | ( | long | hashIdx, |
FTIFF_dbvar * | dbvar | ||
) |
Checks if data block is dirty, clean or invalid.
hashIdx | index for hash meta data in data chunk meta data. |
dbvar | Data chunk meta data. |
This function checks if data block corresponding to the hash meta data element is clean, dirty or invalid.
It returns -1 if hashIdx is out of range.
int FTI_InitBlockHashArray | ( | FTIFF_dbvar * | dbvar | ) |
Initializes a new hash meta data structure for data chunk.
dbvar | Datchunk metadata. |
This function allocates memory for the 'dataDiffHash' member of the 'FTIFF_dbvar' structure and if dCP mode is MD5 also for the MD5 digest array placed in the member 'md5hash' of the 'dataDiffHash' structure.
It also initializes the other members of the 'dataDiffHash' structure.
int FTI_InitDcp | ( | FTIT_configuration * | FTI_Conf, |
FTIT_execution * | FTI_Exec, | ||
FTIT_dataset * | FTI_Data | ||
) |
Initializes dCP.
FTI_Conf | Configuration metadata. |
FTI_Exec | Execution metadata. |
FTI_Data | Dataset metadata. |
This function looks for environment variables set for the dCP mode and dCP block size and overwrites, if found, the values from the configuration file.
It also initializes the file local variables 'dcpEnabled', 'DCP_MODE' and 'DCP_BLOCK_SIZE'.
int FTI_ReceiveDataChunk | ( | FTI_ADDRVAL * | buffer_addr, |
FTI_ADDRVAL * | buffer_size, | ||
FTIFF_dbvar * | dbvar, | ||
FTIT_dataset * | FTI_Data | ||
) |
Returns pointer and size of buffer to write during checkpoint.
buffer_addr | Pointer to buffer. |
buffer_size | Size of buffer. |
dbvar | Data chunk meta data. |
FTI_Data | Dataset metadata. |
This function is called repeatedly for each data chunk. If it returns 1, 'buffer_addr' holds the pointer to a memory region inside the data chunk and 'buffer_size' holds the size of the region. For dCP disabled, this region is the whole data chunk. For dCP enabled, the function returns a pointer to contiguous dirty regions until no further dirty regions are found in which case 0 is returned.
int FTI_UpdateDcpChanges | ( | FTIT_dataset * | FTI_Data, |
FTIT_execution * | FTI_Exec | ||
) |
Updates data chunk hash meta data.
FTI_Exec | Execution metadata. |
FTI_Data | Dataset metadata. |
This function updates the hashes of data blocks that were identified as dirty and initializes the hashes for data blocks that are invalid.