-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #252 from leobago/release1.3
Release1.3
- Loading branch information
Showing
26 changed files
with
1,482 additions
and
792 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,43 @@ | ||
/** | ||
* 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: | ||
* | ||
* 1. Redistributions of source code must retain the above copyright notice, this | ||
* list of conditions and the following disclaimer. | ||
* | ||
* 2. Redistributions in binary form must reproduce the above copyright notice, | ||
* this list of conditions and the following disclaimer in the documentation | ||
* and/or other materials provided with the distribution. | ||
* | ||
* 3. Neither the name of the copyright holder nor the names of its contributors | ||
* may be used to endorse or promote products derived from this software without | ||
* specific prior written permission. | ||
* | ||
* 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. | ||
* | ||
* @author Konstantinos Parasyris ([email protected]) | ||
* @file diff-checkpoint.c | ||
* @date February, 2018 | ||
* @brief Routines to compute the MD5 checksum | ||
*/ | ||
|
||
|
||
#include <stdlib.h> | ||
#include <stdio.h> | ||
#include <string.h> | ||
|
@@ -20,14 +60,21 @@ long totalWork= 0; | |
long worker_exit = 0; | ||
int deviceId; | ||
unsigned char* (*cpuHash)( const unsigned char *data, unsigned long nBytes, unsigned char *hash ); | ||
|
||
|
||
|
||
|
||
|
||
long tempBufferSize; | ||
long md5ChunkSize; | ||
|
||
|
||
/*-------------------------------------------------------------------------*/ | ||
/** | ||
@brief This function initializes the MD5 checksum functions for DCP | ||
@param cSize Size of the chunk | ||
@param tempSize Size of intermediate buffers (Not used in this file) | ||
@param FTI_Conf Pointer to the configuration options | ||
@return integer FTI_SCES if successfu. | ||
This function initializes parameters for the computation of DCP MD5 checksums | ||
**/ | ||
/*-------------------------------------------------------------------------*/ | ||
int FTI_initMD5(long cSize, long tempSize, FTIT_configuration *FTI_Conf){ | ||
if ( FTI_Conf->dcpInfoPosix.cachedCkpt) | ||
usesAsync = 1; | ||
|
@@ -40,6 +87,15 @@ int FTI_initMD5(long cSize, long tempSize, FTIT_configuration *FTI_Conf){ | |
return FTI_SCES; | ||
} | ||
|
||
/*-------------------------------------------------------------------------*/ | ||
/** | ||
@brief This function computes the checksums of an Protected Variable | ||
@param FTI_DataVar Variable We need to compute the checksums | ||
@return integer FTI_SCES if successfu. | ||
This function computes the checksums of a specific variable | ||
**/ | ||
/*-------------------------------------------------------------------------*/ | ||
int MD5CPU(FTIT_dataset *FTI_DataVar){ | ||
unsigned long dataSize = FTI_DataVar->size; | ||
unsigned char block[md5ChunkSize]; | ||
|
@@ -60,28 +116,86 @@ int MD5CPU(FTIT_dataset *FTI_DataVar){ | |
return FTI_SCES; | ||
} | ||
|
||
/*-------------------------------------------------------------------------*/ | ||
/** | ||
@brief This function computes the checksums of a Protected Variable | ||
@param FTI_DataVar Variable We need to compute the checksums | ||
@return integer FTI_SCES if successfu. | ||
This function performs the computation of DCP MD5 checksums | ||
it is actually an interface between the FTI and the async methods | ||
**/ | ||
/*-------------------------------------------------------------------------*/ | ||
int FTI_MD5CPU(FTIT_dataset *FTI_DataVar){ | ||
MD5CPU(FTI_DataVar); | ||
return 1; | ||
return MD5CPU(FTI_DataVar); | ||
} | ||
|
||
|
||
/*-------------------------------------------------------------------------*/ | ||
/** | ||
@brief This function computes the checksums of a Protected Variable (GPU) | ||
@param FTI_DataVar Variable We need to compute the checksums | ||
@return integer FTI_SCES if successfu. | ||
This function initializes parameters for the computation of DCP MD5 checksums | ||
it is actually an interface between the FTI and the async methods | ||
**/ | ||
/*-------------------------------------------------------------------------*/ | ||
int FTI_MD5GPU(FTIT_dataset *FTI_DataVar){ | ||
return 1; | ||
} | ||
|
||
/*-------------------------------------------------------------------------*/ | ||
/** | ||
@brief This function synchronizes the file writes with the stable storages | ||
@param f pointer to the file to be synchronized | ||
@return integer FTI_SCES if successfull. | ||
This function is an interface, atm not implemented for NON-GPU optimized | ||
checkpoints. | ||
**/ | ||
/*-------------------------------------------------------------------------*/ | ||
int FTI_CLOSE_ASYNC(FILE *f){ | ||
return 1; | ||
} | ||
|
||
|
||
/*-------------------------------------------------------------------------*/ | ||
/** | ||
@brief This function synchronizes the computation of the checksum with | ||
the current thread | ||
@return integer FTI_SCES if successfu. | ||
This function should not be called when compiling without GPU optimizations | ||
**/ | ||
/*-------------------------------------------------------------------------*/ | ||
int FTI_SyncMD5(){ | ||
return FTI_SCES; | ||
} | ||
|
||
|
||
/*-------------------------------------------------------------------------*/ | ||
/** | ||
@brief This function fires the async thread to start computing work | ||
@return integer FTI_SCES if successfull. | ||
This function should not be called when compiling without GPU optimizations | ||
**/ | ||
/*-------------------------------------------------------------------------*/ | ||
int FTI_startMD5(){ | ||
return FTI_SCES; | ||
} | ||
|
||
|
||
/*-------------------------------------------------------------------------*/ | ||
/** | ||
@brief This function destroys the internal MD5 data structures | ||
@return integer FTI_SCES if successfull. | ||
This function should not be called when compiling without GPU optimizations | ||
**/ | ||
/*-------------------------------------------------------------------------*/ | ||
int FTI_destroyMD5(){ | ||
return FTI_SCES; | ||
} |
Oops, something went wrong.