Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow mixed compilers if compatible #410

Closed
wants to merge 13 commits into from
Closed
8 changes: 4 additions & 4 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ Contributors:

Acknowledgements:

This work has been supported by EU H2020 ICT project LEGaTO, contract #780681,
the EU Horizon 2020 (H2020) funding framework under grant/award #824158;
Energy oriented Centre of Excellence II (EoCoE-II) and the EU H2020
This work has been supported by EU H2020 ICT project LEGaTO contract #780681;
the EU Horizon 2020 (H2020) funding framework under grant/award #824158
Energy oriented Centre of Excellence II (EoCoE-II); and the EU H2020
Mont-Blanc 2020 project under Grant Agreement #779877.
This scientific/academic work is financed from financial resources for science
This scientific/academic work is also financed from financial resources for science
in the years 2016 - 2018 granted for the realization of the international
project co-financed by Polish Ministry of Science and Higher Education.

Expand Down
80 changes: 80 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,83 @@
Version 1.6:
- Merge pull request #392 from leobago/develop
- Merge pull request #391 from leobago/O3
- only gcc again
- Merge pull request #390 from leobago/hotfix_warnings
- Merge pull request #389 from leobago/h5_async_buffer
- activate all compilers (reverse after pipeline run)
- compiles everything with build type release (adds O3 flag)
- removed O1
- removes compiler warnings
- free memory
- cleaned
- fixed vpr test
- itf checks vpr pass
- seems to work
- Merge pull request #388 from leobago/spack
- Merge remote-tracking branch 'origin/develop' into spack
- Merge pull request #387 from leobago/mpich_install
- pipeline only triggers PR-# branch checks and only triggers GCC for PR to develop. For PRs to master, the full pipeline is executed
- test pipeline
- test pipeline
- test pipeline
- test pipeline
- test pipeline
- test pipeline
- removed hdf5 check intel
- PGI without Fortran (GCC commented)
- PGI without Fortran
- escaped dollars
- added quotes to the cmd grep
- adjusted run wrapper
- tests intel mpich pgi and llvm
- prepared intel
- installed llvm compilers
- removes some artefacts and add a gitignore to include
- changes the install structure
- uncomment pgi stages
- installed pgi compilers
- fixes wrong type for blockMetaInfo_t
- added mpich
- quickfix
- source build script with a dot in shell env
- source build script with a dot in shell env
- source build script with a dot
- source build script
- uses another docker image
- added sionlib mpich
- installed hdf5 with mpich mpi
- export ld_library_path
- added mpich checks
- Merge pull request #386 from leobago/develop
- uncommented other checks
- corrected mount path
- update of PGI compilers to NVIDIA HPC SDK
- fixes Jenkinsfile for Clang and PGI CI
- Merge branch 'develop' of https://github.com/leobago/fti into develop
- Fix recover lL4 Warning, fast_forward bug and catch FTI_Init in heatDist
- Merge pull request #383 from leobago/bugfix/fix_osx_compile_error
- Update recover.c
- Renamed macros FREAD/FWRITE to FTI_EH_FREAD/FTI_EH_FWRITE/
- Merge pull request #382 from leobago/refactor-ci
- fixed linking issue for cpp app
- edited APIs for c++ string operability
- added test suite for c++ string operability
- Merge pull request #381 from leobago/refactor-ci
- fixed erroneous pointer assignment
- enhanced check for implicit var declaration in loop+fixed files formatting
- Merge pull request #378 from leobago/refactor-ci
- split standard/diffsizes into two suites each
- updated test stats in documentation
- updated docu + set fast_forward for tests
- Merge pull request #377 from leobago/refactor-ci
- fixed faulty step
- fixing compilerName missing variable
- moved compilation inside steps
- fixing nested steps
- moved compilation step inside stages
- restructured steps/stages of Jenkins
- Added fast_forward to convenient itf tests

Version 1.5.1:
- Merge branch 'master' of github.com:leobago/fti
- Merge pull request #375 from leobago/develop
Expand Down
10 changes: 9 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ if(ENABLE_GPU)
list(APPEND LANGUAGES "CUDA" "CXX")
endif()

project("FTI" VERSION 1.5.1 LANGUAGES ${LANGUAGES})
project("FTI" VERSION 1.6 LANGUAGES ${LANGUAGES})

# ----------------------- Global Properties and Set-up ------------------------

Expand Down Expand Up @@ -212,6 +212,14 @@ if(ENABLE_FORTRAN)
set(F_CC_ID "${CMAKE_Fortran_COMPILER_ID}_${F_CC_MAJOR}")
string(COMPARE NOTEQUAL ${C_CC_ID} ${F_CC_ID} COMPILER_VER_DIFFER)
if(${COMPILER_VER_DIFFER})
message(WARNING
"Different compiler idetifications for Fortran and C!")
endif()

# 2.2.f) Check if c/c++ and fortran compilers are compatible
FortranCInterface_VERIFY()
FortranCInterface_VERIFY(CXX)
if((NOT ${FortranCInterface_VERIFIED_C}) AND (NOT ${FortranCInterface_VERIFIED_CXX}))
message(FATAL_ERROR
"Different compiler idetifications for Fortran and C!")
endif()
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.5.1
1.6
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = ['breathe', 'sphinx.ext.autosectionlabel']
extensions = ['breathe', 'sphinx.ext.autosectionlabel', 'sphinx.ext.autodoc']

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
Expand Down
2 changes: 1 addition & 1 deletion examples/heatd2.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ double doWork(int numprocs, int rank, int M, int nbLines, double *g,


int main(int argc, char *argv[]) {
int rank, nbProcs, nbLines, i, j, N, M, res;
int rank, nbProcs, nbLines, i, N, M, res;
double wtime, *h, *g, *grid, globalerror = 1;
char fn[32];

Expand Down
1 change: 0 additions & 1 deletion examples/heatdis.c
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@ int main(int argc, char *argv[]) {

wtime = MPI_Wtime();
for (i = 0; i < ITER_TIMES; i++) {
int checkpointed = FTI_Snapshot();
localerror = doWork(nbProcs, rank, M, nbLines, g, h);
if (((i%ITER_OUT) == 0) && (rank == 0)) {
printf("Step : %d, error = %f\n", i, globalerror);
Expand Down
76 changes: 38 additions & 38 deletions include/fti-intern.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#endif

/** Malloc macro. */
#define talloc(type, num) (type *)malloc(sizeof(type) * (num))
#define talloc(type, num) (type *)malloc(sizeof(type) * ((size_t)num))

#define LOCAL 0
#define GLOBAL 1
Expand Down Expand Up @@ -127,26 +127,26 @@ extern "C" {
#ifdef ENABLE_HDF5 // --> If HDF5 is installed
typedef hsize_t FTIT_hsize_t;
#else
typedef uint64_t FTIT_hsize_t;
typedef int64_t FTIT_hsize_t;
#endif

typedef struct FTIT_dimension {
int ndims;
uint64_t count[32];
int64_t count[32];
} FTIT_dimension;

typedef uintptr_t FTI_ADDRVAL; /**< for ptr manipulation */
typedef void* FTI_ADDRPTR; /**< void ptr type */

typedef struct FTIT_datasetInfo {
int varID;
uint32_t varSize;
int64_t varSize;
} FTIT_datasetInfo;

typedef struct FTIT_dcpConfigurationPosix {
unsigned int digestWidth;
unsigned char* (*hashFunc)(const unsigned char *data,
uint64_t nBytes, unsigned char *hash);
unsigned long nBytes, unsigned char *hash);
unsigned int StackSize;
uint32_t BlockSize;
unsigned int cachedCkpt;
Expand All @@ -156,23 +156,23 @@ extern "C" {
int nbLayerReco;
int nbVarReco;
unsigned int Counter;
uint32_t FileSize;
uint32_t dataSize;
uint32_t dcpSize;
uint32_t LayerSize[MAX_STACK_SIZE];
int64_t FileSize;
int64_t dataSize;
int64_t dcpSize;
int64_t LayerSize[MAX_STACK_SIZE];
FTIT_datasetInfo datasetInfo[MAX_STACK_SIZE][FTI_BUFS];
char LayerHash[MAX_STACK_SIZE*MD5_DIGEST_STRING_LENGTH];
} FTIT_dcpExecutionPosix;

typedef struct FTIT_dcpDatasetPosix {
uint32_t hashDataSize;
int64_t hashDataSize;
unsigned char* currentHashArray;
unsigned char* oldHashArray;
} FTIT_dcpDatasetPosix;

typedef struct blockMetaInfo_t {
uint64_t varId : 18;
uint64_t blockId : 30;
int64_t varId : 18;
int64_t blockId : 30;
} blockMetaInfo_t;

/*-----------------------------------------------------------------------
Expand Down Expand Up @@ -229,15 +229,15 @@ extern "C" {
char checksum[MD5_DIGEST_STRING_LENGTH]; /**< file hash without meta */
unsigned char myHash[MD5_DIGEST_LENGTH]; /**< hash of this struct */
int ckptId; /**< Checkpoint ID */
size_t metaSize; /**< size of ckpt data */
size_t ckptSize; /**< also file size TODO remove */
size_t dataSize; /**< size of protected data without meta data */
size_t pureDataSize; /**< total data size (for printouts) */
size_t fs; /**< file size */
size_t maxFs; /**< maximum file size in group */
size_t ptFs; /**< partner copy file size */
uint64_t timestamp; /**< time (ns) cp was created (CLOCK_REALTIME) */
size_t dcpSize; /**< how much actually written by rank */
int64_t metaSize; /**< size of ckpt data */
int64_t ckptSize; /**< also file size TODO remove */
int64_t dataSize; /**< size of protected data without meta data */
int64_t pureDataSize; /**< total data size (for printouts) */
int64_t fs; /**< file size */
int64_t maxFs; /**< maximum file size in group */
int64_t ptFs; /**< partner copy file size */
uint32_t timestamp; /**< time (ns) cp was created (CLOCK_REALTIME) */
int64_t dcpSize; /**< how much actually written by rank */
} FTIFF_metaInfo;

/** @typedef FTIT_DataDiffHash
Expand All @@ -253,7 +253,7 @@ extern "C" {
uint32_t* bit32hash[2]; /**< CRC32 digest */
uint16_t* blockSize; /**< data block size */
bool* isValid; /**< indicates if data block is valid */
int32_t nbHashes; /**< number of hashes for the data chunk */
int64_t nbHashes; /**< number of hashes for the data chunk */
int currentId;
int creationType;
int lifetime;
Expand All @@ -275,8 +275,8 @@ extern "C" {
bool hasCkpt; /**< indicates if container is stored in ckpt */
uintptr_t dptr; /**< data pointer offset */
uintptr_t fptr; /**< file pointer offset */
int32_t chunksize; /**< chunk size of variable in this block */
int32_t containersize;/**< cont size stored of variable in this block */
uint64_t chunksize; /**< chunk size of variable in this block */
uint64_t containersize;/**< cont size stored of variable in this block */
unsigned char hash[MD5_DIGEST_LENGTH]; /**< hash of variable chunk */
unsigned char myhash[MD5_DIGEST_LENGTH];/**< hash of this structure */
bool update; /**< TRUE if struct needs to be updated in ckpt file */
Expand All @@ -293,7 +293,7 @@ extern "C" {
*/
typedef struct FTIFF_db {
int numvars; /**< number of protected variables in datablock */
int32_t dbsize; /**< size of metadata + data for block in bytes */
int64_t dbsize; /**< size of metadata + data for block in bytes */
unsigned char myhash[MD5_DIGEST_LENGTH]; /**< hash of variable chunk */
bool update; /**< TRUE if struct needs to be updated in ckpt file */
bool finalized; /**< TRUE if block is stored in cp file */
Expand Down Expand Up @@ -366,7 +366,7 @@ extern "C" {
*/
typedef struct FTIT_Datatype {
int id; /**< ID of the data type. */
size_t size; /**< Size of the data type. */
int64_t size; /**< Size of the data type. */
FTIT_complexType* structure; /**< Logical structure for HDF5. */
FTIT_H5Group* h5group; /**< Group of this datatype. */
#ifdef ENABLE_HDF5
Expand Down Expand Up @@ -409,7 +409,7 @@ extern "C" {
typedef struct FTIT_typeField {
FTIT_Datatype *type; /**< FTI type ID of the field. */
int id; /**< Order of the field in the structure */
size_t offset; /**< Offset of the field in structure. */
int64_t offset; /**< Offset of the field in structure. */
int rank; /**< Field rank (max. 32) */
int dimLength[32]; /**< Lenght of each dimention */
char name[FTI_BUFS]; /**< Name of the field */
Expand Down Expand Up @@ -444,15 +444,15 @@ extern "C" {
*/
typedef struct FTIT_dataset {
int id; /**< ID to search/update dataset */
int eleSize; /**< Element size for the dataset */
size_t eleSize; /**< Element size for the dataset */
int rank; /**< Rank of dataset (for HDF5) */
int dimLength[32]; /**< Lenght of each dimention */
bool recovered; /**< True if metadata restored */
bool isDevicePtr; /**< True if on device memory */
int32_t count; /**< nb of elements in dataset */
int32_t size; /**< size of the data */
int32_t sizeStored; /**< size of the data in last CP */
size_t filePos; /**< offset of buffer in CP file */
int64_t count; /**< nb of elements in dataset */
int64_t size; /**< size of the data */
int64_t sizeStored; /**< size of the data in last CP */
int64_t filePos; /**< offset of buffer in CP file */
FTIT_attribute attribute;
FTIT_sharedData sharedData; /**< Info if dataset is subset */
FTIT_dcpDatasetPosix dcpInfoPosix; /**< dCP info for posix I/O */
Expand All @@ -473,9 +473,9 @@ extern "C" {
int level; /**< checkpoint level */
int ckptId; /**< Current Ckpt ID */
int ckptIdL4; /**< Current L4 Ckpt ID */
int32_t maxFs; /**< Maximum file size. */
int32_t fs; /**< File size. */
int32_t pfs; /**< Partner file size. */
int64_t maxFs; /**< Maximum file size. */
int64_t fs; /**< File size. */
int64_t pfs; /**< Partner file size. */
char ckptFile[FTI_BUFS]; /**< Ckpt file name. [FTI_BUFS] */
} FTIT_metadata;

Expand Down Expand Up @@ -522,7 +522,7 @@ extern "C" {
char lTmpDir[FTI_BUFS]; /**< Local temporary directory. */
char gTmpDir[FTI_BUFS]; /**< Global temporary directory. */
char mTmpDir[FTI_BUFS]; /**< Metadata temporary directory. */
size_t cHostBufSize; /**< Host buffer size for GPU data.*/
int64_t cHostBufSize; /**< Host buffer size for GPU data.*/
char suffix[4]; /** Suffix of the checkpoint files */
FTIT_dcpConfigurationPosix dcpInfoPosix; /**< dCP info for posix I/O */
// int fastForward; /**< Fast forward rate for ckpt intervals */
Expand Down Expand Up @@ -618,7 +618,7 @@ extern "C" {
int(*WriteData) (FTIT_dataset * ,
void *write_info);
int(*finCKPT) (void *fileDesc);
size_t(*getPos) (void *fileDesc);
int64_t(*getPos) (void *fileDesc);
void(*finIntegrity) (unsigned char *, void*);
}FTIT_IO;

Expand Down Expand Up @@ -678,7 +678,7 @@ extern "C" {
unsigned int ckptId; /**< Checkpoint ID. */
unsigned int ckptNext; /**< Iteration for next CP. */
unsigned int ckptLast; /**< Iteration for last CP. */
int32_t ckptSize; /**< Checkpoint size. */
int64_t ckptSize; /**< Checkpoint size. */
unsigned int nbVar; /**< nb of protected variables */
unsigned int nbVarStored; /**< nb prot. var. stored in CP */
int nbGroup; /**< Number of protected groups. */
Expand Down
8 changes: 4 additions & 4 deletions include/fti.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ extern "C" {
int FTI_InitGroup(FTIT_H5Group* h5group, const char* name,
FTIT_H5Group* parent);
int FTI_RenameGroup(FTIT_H5Group* h5group, const char* name);
int FTI_Protect(int id, void* ptr, int32_t count, fti_id_t tid);
int FTI_Protect(int id, void* ptr, int64_t count, fti_id_t tid);
int FTI_SetAttribute(int id, FTIT_attribute attribute,
FTIT_attributeFlag flag);
int FTI_DefineDataset(int id, int rank, int* dimLength, const char* name,
Expand All @@ -102,7 +102,7 @@ extern "C" {
int FTI_UpdateGlobalDataset(int id, int rank, FTIT_hsize_t* dimLength);
int FTI_UpdateSubset(int id, int rank, FTIT_hsize_t* offset,
FTIT_hsize_t* count, int did);
int32_t FTI_GetStoredSize(int id);
int64_t FTI_GetStoredSize(int id);
void* FTI_Realloc(int id, void* ptr);
int FTI_BitFlip(int datasetID);
int FTI_Checkpoint(int id, int level);
Expand Down Expand Up @@ -130,9 +130,9 @@ extern "C" {
fti_id_t FTI_InitCompositeType(const char* name, size_t size,
FTIT_H5Group* h5g);
int FTI_AddScalarField(fti_id_t id, const char* name, fti_id_t fid,
size_t offset);
int64_t offset);
int FTI_AddVectorField(fti_id_t id, const char* name, fti_id_t tid,
size_t offset, int ndims, int* dim_sizes);
int64_t offset, int ndims, int* dim_sizes);

#ifdef __cplusplus
}
Expand Down
Loading