ECP-VELOC Components
User documentation for all components
er.h
Go to the documentation of this file.
1 #ifndef ER_H
2 #define ER_H
3 
4 #include "mpi.h"
5 
19 /* enable C++ codes to include this header directly */
20 #ifdef __cplusplus
21 extern "C" {
22 #endif
23 
24 #define ER_SUCCESS (0)
25 #define ER_FAILURE (1)
26 
27 #define ER_VERSION "0.1.0"
28 
29 #define ER_DIRECTION_ENCODE (1)
30 #define ER_DIRECTION_REBUILD (2)
31 #define ER_DIRECTION_REMOVE (3)
32 
33 #define ER_KEY_CONFIG_DEBUG "DEBUG"
34 #define ER_KEY_CONFIG_SET_SIZE "SET_SIZE"
35 #define ER_KEY_CONFIG_MPI_BUF_SIZE "MPI_BUF_SIZE"
36 #define ER_KEY_CONFIG_CRC_ON_COPY "CRC_ON_COPY"
37 
38 int ER_Init(
39  const char* conf_file
40 );
41 
42 int ER_Finalize(void);
43 
46  MPI_Comm comm,
47  const char* failure_domain,
48  int data_blocks,
49  int erasure_blocks
50 );
51 
52 /* needs to be above doxygen comment to get association right */
53 typedef struct kvtree_struct kvtree;
54 
76 kvtree* ER_Config(
77  const kvtree* config
78 );
79 
80 int ER_Free_Scheme(
81  int scheme_id
82 );
83 
85 int ER_Create(
86  MPI_Comm comm_world,
87  MPI_Comm comm_store,
88  const char* name,
89  int direction,
90  int scheme_id
91 );
92 
94 int ER_Add(
95  int set_id,
96  const char* file
97 );
98 
100 int ER_Dispatch(
101  int set_id
102 );
103 
106 int ER_Test(
107  int set_id
108 );
109 
111 int ER_Wait(
112  int set_id
113 );
114 
116 int ER_Free(
117  int set_id
118 );
119 
120 /* enable C++ codes to include this header directly */
121 #ifdef __cplusplus
122 } /* extern "C" */
123 #endif
124 
125 #endif /* ER_H */
ER_Finalize
int ER_Finalize(void)
ER_Dispatch
int ER_Dispatch(int set_id)
ER_Add
int ER_Add(int set_id, const char *file)
ER_Test
int ER_Test(int set_id)
ER_Free
int ER_Free(int set_id)
ER_Config
kvtree * ER_Config(const kvtree *config)
ER_Create
int ER_Create(MPI_Comm comm_world, MPI_Comm comm_store, const char *name, int direction, int scheme_id)
kvtree_struct
Definition: kvtree.h:87
ER_Init
int ER_Init(const char *conf_file)
ER_Free_Scheme
int ER_Free_Scheme(int scheme_id)
ER_Create_Scheme
int ER_Create_Scheme(MPI_Comm comm, const char *failure_domain, int data_blocks, int erasure_blocks)
ER_Wait
int ER_Wait(int set_id)