Fault Tolerance Interface
conf.c File Reference

Configuration loading functions for the FTI library. More...

#include "interface.h"
Include dependency graph for conf.c:

Functions

int FTI_UpdateConf (FTIT_configuration *FTI_Conf, FTIT_execution *FTI_Exec, int restart)
 Sets the exec. ID and failure parameters in the conf. file. More...
 
int FTI_ReadConf (FTIT_configuration *FTI_Conf, FTIT_execution *FTI_Exec, FTIT_topology *FTI_Topo, FTIT_checkpoint *FTI_Ckpt, FTIT_injection *FTI_Inje)
 It reads the configuration given in the configuration file. More...
 
int FTI_TestConfig (FTIT_configuration *FTI_Conf, FTIT_topology *FTI_Topo, FTIT_checkpoint *FTI_Ckpt, FTIT_execution *FTI_Exec)
 It tests that the configuration given is correct. More...
 
int FTI_TestDirectories (FTIT_configuration *FTI_Conf, FTIT_topology *FTI_Topo)
 It tests that the directories given is correct. More...
 
int FTI_CreateDirs (FTIT_configuration *FTI_Conf, FTIT_execution *FTI_Exec, FTIT_topology *FTI_Topo, FTIT_checkpoint *FTI_Ckpt)
 It creates the directories required for current execution. More...
 
int FTI_LoadConf (FTIT_configuration *FTI_Conf, FTIT_execution *FTI_Exec, FTIT_topology *FTI_Topo, FTIT_checkpoint *FTI_Ckpt, FTIT_injection *FTI_Inje)
 It reads and tests the configuration given. More...
 

Detailed Description

Configuration loading functions for the FTI library.

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.

Date
October, 2017

Function Documentation

int FTI_CreateDirs ( FTIT_configuration FTI_Conf,
FTIT_execution FTI_Exec,
FTIT_topology FTI_Topo,
FTIT_checkpoint FTI_Ckpt 
)

It creates the directories required for current execution.

Parameters
FTI_ConfConfiguration metadata.
FTI_ExecExecution metadata.
FTI_TopoTopology metadata.
FTI_CkptCheckpoint metadata.
Returns
integer FTI_SCES if successful.

This function creates the temporary metadata, local and global directories required for the current execution.

Here is the call graph for this function:

int FTI_LoadConf ( FTIT_configuration FTI_Conf,
FTIT_execution FTI_Exec,
FTIT_topology FTI_Topo,
FTIT_checkpoint FTI_Ckpt,
FTIT_injection FTI_Inje 
)

It reads and tests the configuration given.

Parameters
FTI_ConfConfiguration metadata.
FTI_ExecExecution metadata.
FTI_TopoTopology metadata.
FTI_CkptCheckpoint metadata.
FTI_InjeType to describe failure injections in FTI.
Returns
integer FTI_SCES if successful.

This function reads the configuration file. Then test that the configuration parameters are correct (including directories).

Here is the call graph for this function:

int FTI_ReadConf ( FTIT_configuration FTI_Conf,
FTIT_execution FTI_Exec,
FTIT_topology FTI_Topo,
FTIT_checkpoint FTI_Ckpt,
FTIT_injection FTI_Inje 
)

It reads the configuration given in the configuration file.

Parameters
FTI_ConfConfiguration metadata.
FTI_ExecExecution metadata.
FTI_TopoTopology metadata.
FTI_CkptCheckpoint metadata.
FTI_InjeType to describe failure injections in FTI.
Returns
integer FTI_SCES if successful.

This function reads the configuration given in the FTI configuration file and sets other required parameters.

Here is the call graph for this function:

int FTI_TestConfig ( FTIT_configuration FTI_Conf,
FTIT_topology FTI_Topo,
FTIT_checkpoint FTI_Ckpt,
FTIT_execution FTI_Exec 
)

It tests that the configuration given is correct.

Parameters
FTI_ConfConfiguration metadata.
FTI_TopoTopology metadata.
FTI_CkptCheckpoint metadata.
FTI_ExecExecution metadata.
Returns
integer FTI_SCES if successful.

This function tests the FTI configuration to make sure that all parameter's values are correct.

Here is the call graph for this function:

int FTI_TestDirectories ( FTIT_configuration FTI_Conf,
FTIT_topology FTI_Topo 
)

It tests that the directories given is correct.

Parameters
FTI_ConfConfiguration metadata.
FTI_TopoTopology metadata.
Returns
integer FTI_SCES if successful.

This function tests that the directories given in the FTI configuration are correct.

Here is the call graph for this function:

int FTI_UpdateConf ( FTIT_configuration FTI_Conf,
FTIT_execution FTI_Exec,
int  restart 
)

Sets the exec. ID and failure parameters in the conf. file.

Parameters
FTI_ConfConfiguration metadata.
FTI_ExecExecution metadata.
restartValue to set in the conf. file (0 or 1).
Returns
integer FTI_SCES if successful.

This function sets the execution ID and failure parameters in the configuration file. This is to avoid forcing the user to change these values manually in case of recovery needed. In this way, relaunching the execution in the same way as the initial time will make FTI detect that it is a restart. It also allows to set the failure parameter back to 0 at the end of a successful execution.

Here is the call graph for this function: