Fault Tolerance Interface
|
helper functions for the FTI staging feature. More...
#include "interface.h"
Functions | |
int | FTI_InitStage (FTIT_execution *FTI_Exec, FTIT_configuration *FTI_Conf, FTIT_topology *FTI_Topo) |
Initializes the FTI staging feature. More... | |
void | FTI_FinalizeStage (FTIT_execution *FTI_Exec, FTIT_topology *FTI_Topo, FTIT_configuration *FTI_Conf) |
Finalizes staging feature. More... | |
int | FTI_InitStageRequestApp (FTIT_execution *FTI_Exec, FTIT_topology *FTI_Topo, uint32_t ID) |
Initializes new stage meta info element (application rank) More... | |
int | FTI_InitStageRequestHead (char *lpath, char *rpath, FTIT_execution *FTI_Exec, FTIT_topology *FTI_Topo, int source, uint32_t ID) |
Initializes new stage meta info element (head rank) More... | |
int | FTI_FreeStageRequest (FTIT_execution *FTI_Exec, FTIT_topology *FTI_Topo, int ID, int source) |
frees stage meta info element (head/application rank) More... | |
int | FTI_GetRequestIdx (int ID) |
returns the index of desired stage meta info element. More... | |
int | FTI_SyncStage (char *lpath, char *rpath, FTIT_execution *FTI_Exec, FTIT_topology *FTI_Topo, FTIT_configuration *FTI_Conf, uint32_t ID) |
This function synchronously stages the local file to the PFS. More... | |
int | FTI_AsyncStage (char *lpath, char *rpath, FTIT_configuration *FTI_Conf, FTIT_execution *FTI_Exec, FTIT_topology *FTI_Topo, int ID) |
This function triggers the asynchronous stage. More... | |
int | FTI_HandleStageRequest (FTIT_configuration *FTI_Conf, FTIT_execution *FTI_Exec, FTIT_topology *FTI_Topo, FTIT_checkpoint *FTI_Ckpt, int source) |
This function asynchronously stages the local file to the PFS. More... | |
int | FTI_GetRequestField (int ID, FTIT_RequestField val) |
Returns value from the 'idxRequest' field array at 'ID'. More... | |
int | FTI_SetRequestField (int ID, uint32_t entry, FTIT_RequestField val) |
Sets value of the 'idxRequest' field array at 'ID'. More... | |
int | FTI_GetStatusField (FTIT_execution *FTI_Exec, FTIT_topology *FTI_Topo, int ID, FTIT_StatusField val, int source) |
Returns value from the 'status' field array at 'ID'. More... | |
int | FTI_SetStatusField (FTIT_execution *FTI_Exec, FTIT_topology *FTI_Topo, int ID, uint8_t entry, FTIT_StatusField val, int source) |
Sets value from the 'status' field array at 'ID'. More... | |
int | FTI_GetRequestID (FTIT_execution *FTI_Exec, FTIT_topology *FTI_Topo) |
Returns unique 'ID' for staging request. More... | |
void | FTI_PrintStageStatus (FTIT_execution *FTI_Exec, FTIT_topology *FTI_Topo, int ID, int source) |
helper functions for the FTI staging feature.
header for stage.c
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:
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.
int FTI_AsyncStage | ( | char * | lpath, |
char * | rpath, | ||
FTIT_configuration * | FTI_Conf, | ||
FTIT_execution * | FTI_Exec, | ||
FTIT_topology * | FTI_Topo, | ||
int | ID | ||
) |
This function triggers the asynchronous stage.
string | 'lpath', absolute path of local file |
string | 'rpath', absolute path of remote file |
FTI_Exec | Execution metadata. |
FTI_Topo | Topology metadata. |
FTI_Conf | Configuration metadata. |
integer | 'ID' of staging request |
This function uses a non-blocking send (MPI_Isend) in order to pass the information that is needed by the head process to perform an asynchronous staging of the local file to the PFS.
void FTI_FinalizeStage | ( | FTIT_execution * | FTI_Exec, |
FTIT_topology * | FTI_Topo, | ||
FTIT_configuration * | FTI_Conf | ||
) |
Finalizes staging feature.
FTI_Exec | Execution metadata. |
FTI_Topo | Topology metadata. |
FTI_Conf | Configuration metadata. |
This function frees allocated ressources, removes local staging files and the staging directory and destroys the node communicator
int FTI_FreeStageRequest | ( | FTIT_execution * | FTI_Exec, |
FTIT_topology * | FTI_Topo, | ||
int | ID, | ||
int | source | ||
) |
frees stage meta info element (head/application rank)
FTI_Exec | Execution metadata. |
FTI_Topo | Topology metadata. |
integer | 'ID' of staging request |
integer | 'source', application rank of stage request |
This function eliminates the 'ID' corresponding element from the stage meta info array and frees the corresponding memory. In the application ranks it also reorders the index information in the 'idxRequestÄ array corresponding to 'ID'.
int FTI_GetRequestField | ( | int | ID, |
FTIT_RequestField | val | ||
) |
Returns value from the 'idxRequest' field array at 'ID'.
integer | 'ID' of staging request |
FTIT_StatusField | requested field |
int FTI_GetRequestID | ( | FTIT_execution * | FTI_Exec, |
FTIT_topology * | FTI_Topo | ||
) |
Returns unique 'ID' for staging request.
FTI_Exec | Execution metadata. |
FTI_Topo | Topology metadata. |
int FTI_GetRequestIdx | ( | int | ID | ) |
returns the index of desired stage meta info element.
integer | 'ID' of staging request |
int FTI_GetStatusField | ( | FTIT_execution * | FTI_Exec, |
FTIT_topology * | FTI_Topo, | ||
int | ID, | ||
FTIT_StatusField | val, | ||
int | source | ||
) |
Returns value from the 'status' field array at 'ID'.
FTI_Exec | Execution metadata. |
FTI_Topo | Topology metadata. |
integer | 'ID' of staging request |
FTIT_StatusField | requested field |
integer | 'source', application rank of stage request. |
int FTI_HandleStageRequest | ( | FTIT_configuration * | FTI_Conf, |
FTIT_execution * | FTI_Exec, | ||
FTIT_topology * | FTI_Topo, | ||
FTIT_checkpoint * | FTI_Ckpt, | ||
int | source | ||
) |
This function asynchronously stages the local file to the PFS.
string | 'lpath', absolute path of local file. |
string | 'rpath', absolute path of remote file. |
FTI_Exec | Execution metadata. |
FTI_Topo | Topology metadata. |
FTI_Conf | Configuration metadata. |
integer | 'source', application rank of stage request. |
int FTI_InitStage | ( | FTIT_execution * | FTI_Exec, |
FTIT_configuration * | FTI_Conf, | ||
FTIT_topology * | FTI_Topo | ||
) |
Initializes the FTI staging feature.
FTI_Exec | Execution metadata. |
FTI_Conf | Configuration metadata. |
FTI_Topo | Topology metadata. |
This function allocates memory for the 'idxRequest' and 'status' fields, creates a node communicator and an MPI shared memory window.
int FTI_InitStageRequestApp | ( | FTIT_execution * | FTI_Exec, |
FTIT_topology * | FTI_Topo, | ||
uint32_t | ID | ||
) |
Initializes new stage meta info element (application rank)
FTI_Exec | Execution metadata. |
FTI_Topo | Topology metadata. |
integer | 'ID' of staging request |
This function appends a new staging meta info element for the application ranks to 'FTI_Exec->stageInfo->request'. Beside that it also initializes the status field (status -> pending) corresponding to 'ID' and assigns the proper index of the meta info element to the 'ID' corresponding 'idxRequest' field.
int FTI_InitStageRequestHead | ( | char * | lpath, |
char * | rpath, | ||
FTIT_execution * | FTI_Exec, | ||
FTIT_topology * | FTI_Topo, | ||
int | source, | ||
uint32_t | ID | ||
) |
Initializes new stage meta info element (head rank)
string | 'lpath', absolute path of local file |
string | 'rpath', absolute path of remote file |
FTI_Exec | Execution metadata. |
FTI_Topo | Topology metadata. |
integer | 'source', application rank of stage request |
integer | 'ID' of staging request |
This function appends a new staging meta info element for the head ranks to 'FTI_Exec->stageInfo->request'. Beside that it also changes the status field corresponding to 'ID' (status -> active).
void FTI_PrintStageStatus | ( | FTIT_execution * | FTI_Exec, |
FTIT_topology * | FTI_Topo, | ||
int | ID, | ||
int | source | ||
) |
int FTI_SetRequestField | ( | int | ID, |
uint32_t | entry, | ||
FTIT_RequestField | val | ||
) |
Sets value of the 'idxRequest' field array at 'ID'.
integer | 'ID' of staging request |
integer | 'entry', new value of field |
FTIT_StatusField | requested field |
int FTI_SetStatusField | ( | FTIT_execution * | FTI_Exec, |
FTIT_topology * | FTI_Topo, | ||
int | ID, | ||
uint8_t | entry, | ||
FTIT_StatusField | val, | ||
int | source | ||
) |
Sets value from the 'status' field array at 'ID'.
FTI_Exec | Execution metadata. |
FTI_Topo | Topology metadata. |
integer | 'ID' of staging request |
integer | 'entry', new value of field |
FTIT_StatusField | requested field |
integer | 'source', application rank of stage request. |
int FTI_SyncStage | ( | char * | lpath, |
char * | rpath, | ||
FTIT_execution * | FTI_Exec, | ||
FTIT_topology * | FTI_Topo, | ||
FTIT_configuration * | FTI_Conf, | ||
uint32_t | ID | ||
) |
This function synchronously stages the local file to the PFS.
string | 'lpath', absolute path of local file |
string | 'rpath', absolute path of remote file |
FTI_Exec | Execution metadata. |
FTI_Topo | Topology metadata. |
FTI_Conf | Configuration metadata. |
integer | 'ID' of staging request |
This function should be called only if the staging feature is enabled without the head process being enabled.