Skip to content

Commit

Permalink
Merge pull request #373 from leobago/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
leobago authored Oct 10, 2020
2 parents 5571430 + adef829 commit e268b76
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 0 deletions.
3 changes: 3 additions & 0 deletions include/fti-defs.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#ifndef __FTI_DEFS__
#define __FTI_DEFS__
#endif // __FTI_DEFS__
2 changes: 2 additions & 0 deletions include/fti-intern.h
Original file line number Diff line number Diff line change
Expand Up @@ -525,6 +525,7 @@ extern "C" {
size_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 */
} FTIT_configuration;

/** @typedef FTIT_topology
Expand Down Expand Up @@ -699,6 +700,7 @@ extern "C" {
MPI_Comm groupComm; /**< Group communicator. */
MPI_Comm nodeComm;
FTIT_dcpExecutionPosix dcpInfoPosix; /**< dCP info for posix I/O */
int fastForward; /**< Fast forward rate for ckpt intervals */
/** A function pointer pointing to the function which actually the
* checkpoint file. Noticeably We need 2 function pointers, One for the
* Level 4 checkpoint And one for the remaining cases */
Expand Down
1 change: 1 addition & 0 deletions src/checkpoint.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ int FTI_UpdateIterTime(FTIT_execution* FTI_Exec) {
FTI_Exec->ckptIntv = 1;
} else {
FTI_Exec->ckptIntv = rint(60.0 / FTI_Exec->globMeanIter);
FTI_Exec->ckptIntv = ceil((double)FTI_Exec->ckptIntv/FTI_Exec->fastForward);
}
res = FTI_Exec->ckptLast + FTI_Exec->ckptIntv;
if (FTI_Exec->ckptLast == 0) {
Expand Down
14 changes: 14 additions & 0 deletions src/conf.c
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,9 @@ int FTI_ReadConf(FTIT_configuration* FTI_Conf, FTIT_execution* FTI_Exec,
// 0 -> disabled
FTI_Ckpt[4].ckptDcpIntv = (int)iniparser_getint(ini, "Basic:dcp_l4", 0);
FTI_Ckpt[4].ckptIntv = (int)iniparser_getint(ini, "Basic:ckpt_l4", -1);
// Fast Forward flag
// FTI_Conf->fastForward = (int)iniparser_getint(ini, "Basic:fast_forward", 1);
FTI_Exec->fastForward = (int)iniparser_getint(ini, "Advanced:fast_forward", 1);
FTI_Ckpt[1].isInline = (int)1;
FTI_Ckpt[2].isInline = (int)iniparser_getint(ini, "Basic:inline_l2", 1);
FTI_Ckpt[3].isInline = (int)iniparser_getint(ini, "Basic:inline_l3", 1);
Expand Down Expand Up @@ -387,6 +390,17 @@ int FTI_TestConfig(FTIT_configuration* FTI_Conf, FTIT_topology* FTI_Topo,
return FTI_NSCS;
}

//fast forward
if (FTI_Exec->fastForward < 1 || FTI_Exec->fastForward > 10) {
FTI_Print("Fast Forward should be between 1 and 10, inclusive", FTI_WARN);
return FTI_NSCS;
}

if ( FTI_Exec->fastForward < 10 && FTI_Exec->fastForward > 1) {
FTI_Print("Fast Forward flag is set.", FTI_WARN);
return FTI_NSCS;
}

// check dCP settings only if dCP is enabled
if (FTI_Conf->dcpPosix) {
if (FTI_Conf->dcpInfoPosix.StackSize > MAX_STACK_SIZE) {
Expand Down

0 comments on commit e268b76

Please sign in to comment.