Skip to content

Commit

Permalink
Merge pull request #252 from leobago/release1.3
Browse files Browse the repository at this point in the history
Release1.3
  • Loading branch information
leobago authored Jul 9, 2019
2 parents 62c7a38 + 6190c5b commit bae938b
Show file tree
Hide file tree
Showing 26 changed files with 1,482 additions and 792 deletions.
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ Creator:
Leonardo A. Bautista Gomez

Contributors:
Konstantinos Parasyris
Karol Sierociński
Kai Keller
Tomasz Paluszkiewicz
Expand Down
6 changes: 5 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -228,9 +228,13 @@ set_target_properties(fti.static fti.shared PROPERTIES POSITION_INDEPENDENT_CODE
append_property(SOURCE ${SRC_FTI}
PROPERTY COMPILE_FLAGS "${MPI_C_COMPILE_FLAGS}" "${SIONLIB_CFLAGS}" "${ADD_CFLAGS}")

if( NOT ZLIB_FOUND )
append_property(SOURCE ${SRC_CUDA_FTI}
PROPERTY COMPILE_FLAGS "-DFTI_NOZLIB")
else()
append_property(SOURCE ${SRC_CUDA_FTI}
PROPERTY COMPILE_FLAGS )

endif()

append_property(TARGET fti.static fti.shared
PROPERTY LINK_FLAGS "${MPI_C_LINK_FLAGS}")
Expand Down
4 changes: 2 additions & 2 deletions include/fti.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ extern "C" {
FTI public functions
---------------------------------------------------------------------------*/

int FTI_Init(char *configFile, MPI_Comm globalComm);
int FTI_Init(const char *configFile, MPI_Comm globalComm);
int FTI_Status();
int FTI_InitType(FTIT_type* type, int size);
int FTI_InitComplexType(FTIT_type* newType, FTIT_complexType* typeDefinition, int length,
Expand All @@ -87,7 +87,7 @@ extern "C" {
int FTI_RenameGroup(FTIT_H5Group* h5group, char* name);
int FTI_Protect(int id, void* ptr, long count, FTIT_type type);
int FTI_DefineDataset(int id, int rank, int* dimLength, char* name, FTIT_H5Group* h5group);
int FTI_DefineGlobalDataset(int id, int rank, hsize_t* dimLength, char* name, FTIT_H5Group* h5group, FTIT_type type);
int FTI_DefineGlobalDataset(int id, int rank, hsize_t* dimLength, const char* name, FTIT_H5Group* h5group, FTIT_type type);
int FTI_AddSubset( int id, int rank, hsize_t* offset, hsize_t* count, int did );
int FTI_RecoverDatasetDimension( int did );
hsize_t* FTI_GetDatasetSpan( int did, int rank );
Expand Down
128 changes: 121 additions & 7 deletions src/IO/cuda-md5/md5Opt.c
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>
Expand All @@ -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;
Expand All @@ -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];
Expand All @@ -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;
}
Loading

0 comments on commit bae938b

Please sign in to comment.