ECP-VELOC Components
User documentation for all components
Functions
er.h File Reference

encoding and redundancy library More...

Go to the source code of this file.

Functions

int ER_Init (const char *conf_file)
 
int ER_Finalize (void)
 
int ER_Create_Scheme (MPI_Comm comm, const char *failure_domain, int data_blocks, int erasure_blocks)
 
kvtree * ER_Config (const kvtree *config)
 
int ER_Free_Scheme (int scheme_id)
 
int ER_Create (MPI_Comm comm_world, MPI_Comm comm_store, const char *name, int direction, int scheme_id)
 
int ER_Add (int set_id, const char *file)
 
int ER_Dispatch (int set_id)
 
int ER_Test (int set_id)
 
int ER_Wait (int set_id)
 
int ER_Free (int set_id)
 

Function Documentation

◆ ER_Add()

int ER_Add ( int  set_id,
const char *  file 
)

adds file to specified set id

Parameters
[in]set_id[IN] - set id to add file to
[in]file[IN] - path to file

◆ ER_Config()

kvtree* ER_Config ( const kvtree *  config)

Get/set ER configuration values.

The following configuration options can be set (type in parenthesis):

  • "DEBUG" (int) - if non-zero, output debug information from inside ER.
  • "SETSIZE" (int) - set size for ER to use.
  • "MPI_BUF_SIZE" (byte count [IN], int [OUT]) - MPI buffer size to chunk file transfer. Must not exceed INT_MAX.

Symbolic names ER_KEY_CONFIG_FOO are defined in er.h and should be used instead of the strings whenever possible to guard against typos in strings.

Returns
If config != NULL, then return config on success. If config == NULL (you're querying the config) then return a new kvtree on success, which must be kvtree_delete()ed by the caller. NULL on any failures.
Parameters
configThe new configuration. If config == NULL, then return a new kvtree with all the configuration values.
Parameters
[in]config[IN] - kvtree of options

◆ ER_Create()

int ER_Create ( MPI_Comm  comm_world,
MPI_Comm  comm_store,
const char *  name,
int  direction,
int  scheme_id 
)

create a named set, and specify whether it should be encoded, recovered, or unencoded

Parameters
[in]comm_world[IN] - communicator of processes participating in operation
[in]comm_store[IN] - communicator of processes that share access to storage holding files
[in]name[IN] - name of operation
[in]direction[IN] - operation to execute: one of ER_DIRECTION constants
[in]scheme_id[IN] - redundancy scheme to be applied to this set

◆ ER_Create_Scheme()

int ER_Create_Scheme ( MPI_Comm  comm,
const char *  failure_domain,
int  data_blocks,
int  erasure_blocks 
)

defines a redundancy scheme, returns scheme id as integer

Parameters
[in]comm[IN] - communicator of processes participating in scheme
[in]failure_domain[IN] - processes with same value of failure_domain are assumed to fail at the same time
[in]data_blocks[IN] - number of original data blocks
[in]erasure_blocks[IN] - number of erasure blocks to be generated

◆ ER_Dispatch()

int ER_Dispatch ( int  set_id)

initiate encode/rebuild operation on specified set id

Parameters
[in]set_id[IN] - set id to dispatch

◆ ER_Finalize()

int ER_Finalize ( void  )

◆ ER_Free()

int ER_Free ( int  set_id)

free internal resources associated with set id

◆ ER_Free_Scheme()

int ER_Free_Scheme ( int  scheme_id)
Parameters
[in]scheme_id[IN] - release resources associated with specified scheme id

◆ ER_Init()

int ER_Init ( const char *  conf_file)
Parameters
[in]conf_file[IN] - path to configuration file (can be NULL for default)

◆ ER_Test()

int ER_Test ( int  set_id)

tests whether ongoing dispatch operation to finish, returns 1 if done, 0 otherwise

◆ ER_Wait()

int ER_Wait ( int  set_id)

wait for ongoing dispatch operation to finish