ECP-VELOC Components
User documentation for all components
axl.h
Go to the documentation of this file.
1 #ifndef AXL_H
2 #define AXL_H
3 
4 /* enable C++ codes to include this header directly */
5 #ifdef __cplusplus
6 extern "C" {
7 #endif
8 
9 #define AXL_SUCCESS (0)
10 
11 #define AXL_VERSION "0.5.0"
12 
28 #define AXL_KEY_CONFIG_FILE_BUF_SIZE "FILE_BUF_SIZE"
29 #define AXL_KEY_CONFIG_DEBUG "DEBUG"
30 #define AXL_KEY_CONFIG_MKDIR "MKDIR"
31 #define AXL_KEY_CONFIG_COPY_METADATA "COPY_METADATA"
32 #define AXL_KEY_CONFIG_RANK "RANK"
33 
36 typedef enum {
37  AXL_XFER_NULL = 0, /* placeholder to represent invalid value */
38  AXL_XFER_DEFAULT, /* Autodetect and use the fastest API for this node
39  * type that supports all AXL transfers.
40  */
41  AXL_XFER_SYNC, /* synchronous copy */
42  AXL_XFER_ASYNC_DAEMON, /* async daemon process (not used, but kept to maintain enum values) */
43  AXL_XFER_ASYNC_DW, /* Cray Datawarp */
44  AXL_XFER_ASYNC_BBAPI, /* IBM Burst Buffer API */
45  AXL_XFER_NATIVE, /* Autodetect and use the native API (BBAPI, DW,
46  * etc) for this node type. It may or may not
47  * be compatible with all AXL transfers (like
48  * shmem). If there is no native API, fall back
49  * to AXL_XFER_DEFAULT.
50  */
51  AXL_XFER_PTHREAD, /* parallel copy using pthreads */
52  AXL_XFER_STATE_FILE, /* Use the xfer type specified in the state_file. */
53 } axl_xfer_t;
54 
55 /*
56  * int AXL_Init(void) - Initialize the library.
57  */
58 int AXL_Init (void);
59 
61 int AXL_Finalize (void);
62 
63 /*
64  * int AXL_Create(type, name, state_file) - Create a transfer handle to copy files
65  *
66  * type: Transfer type to use
67  * name: A unique tag to give to this transfer handle
68  * state_file: (optional) Path to store our transfer state. This is needed to
69  * resume transfers after a crash.
70  *
71  * Returns an AXL ID, or negative number on error.
72  */
73 int AXL_Create (axl_xfer_t xtype, const char* name, const char* state_file);
74 
75 /* needs to be above doxygen comment to get association right */
76 typedef struct kvtree_struct kvtree;
77 
95 kvtree* AXL_Config(
96  const kvtree* config
97 );
98 
100 int AXL_Add (int id, const char* source, const char* destination);
101 
103 int AXL_Dispatch (int id);
104 
114 int AXL_Resume (int id);
115 
120 int AXL_Test (int id);
121 
125 int AXL_Wait (int id);
126 
129 int AXL_Cancel (int id);
130 
132 int AXL_Free (int id);
133 
136 int AXL_Stop (void);
137 
138 /* enable C++ codes to include this header directly */
139 #ifdef __cplusplus
140 } /* extern "C" */
141 #endif
142 
143 #endif
AXL_Init
int AXL_Init(void)
AXL_Test
int AXL_Test(int id)
AXL_Stop
int AXL_Stop(void)
AXL_XFER_STATE_FILE
@ AXL_XFER_STATE_FILE
Definition: axl.h:52
AXL_XFER_ASYNC_DAEMON
@ AXL_XFER_ASYNC_DAEMON
Definition: axl.h:42
AXL_XFER_NULL
@ AXL_XFER_NULL
Definition: axl.h:37
AXL_Add
int AXL_Add(int id, const char *source, const char *destination)
AXL_XFER_DEFAULT
@ AXL_XFER_DEFAULT
Definition: axl.h:38
AXL_Config
kvtree * AXL_Config(const kvtree *config)
AXL_XFER_ASYNC_DW
@ AXL_XFER_ASYNC_DW
Definition: axl.h:43
AXL_XFER_NATIVE
@ AXL_XFER_NATIVE
Definition: axl.h:45
AXL_XFER_PTHREAD
@ AXL_XFER_PTHREAD
Definition: axl.h:51
AXL_Create
int AXL_Create(axl_xfer_t xtype, const char *name, const char *state_file)
AXL_Wait
int AXL_Wait(int id)
AXL_Free
int AXL_Free(int id)
AXL_Dispatch
int AXL_Dispatch(int id)
AXL_XFER_SYNC
@ AXL_XFER_SYNC
Definition: axl.h:41
AXL_Finalize
int AXL_Finalize(void)
AXL_XFER_ASYNC_BBAPI
@ AXL_XFER_ASYNC_BBAPI
Definition: axl.h:44
kvtree_struct
Definition: kvtree.h:87
AXL_Resume
int AXL_Resume(int id)
axl_xfer_t
axl_xfer_t
Definition: axl.h:36
AXL_Cancel
int AXL_Cancel(int id)