ECP-VELOC Components
User documentation for all components
Enumerations | Functions
axl.h File Reference

asynchronous transfer library More...

Go to the source code of this file.

Enumerations

enum  axl_xfer_t {
  AXL_XFER_NULL = 0, AXL_XFER_DEFAULT, AXL_XFER_SYNC, AXL_XFER_ASYNC_DAEMON,
  AXL_XFER_ASYNC_DW, AXL_XFER_ASYNC_BBAPI, AXL_XFER_NATIVE, AXL_XFER_PTHREAD,
  AXL_XFER_STATE_FILE
}
 

Functions

int AXL_Init (void)
 
int AXL_Finalize (void)
 
int AXL_Create (axl_xfer_t xtype, const char *name, const char *state_file)
 
kvtree * AXL_Config (const kvtree *config)
 
int AXL_Add (int id, const char *source, const char *destination)
 
int AXL_Dispatch (int id)
 
int AXL_Resume (int id)
 
int AXL_Test (int id)
 
int AXL_Wait (int id)
 
int AXL_Cancel (int id)
 
int AXL_Free (int id)
 
int AXL_Stop (void)
 

Enumeration Type Documentation

◆ axl_xfer_t

enum axl_xfer_t

Supported AXL transfer methods Note that DW, and BBAPI must be found at compile time

Enumerator
AXL_XFER_NULL 
AXL_XFER_DEFAULT 
AXL_XFER_SYNC 
AXL_XFER_ASYNC_DAEMON 
AXL_XFER_ASYNC_DW 
AXL_XFER_ASYNC_BBAPI 
AXL_XFER_NATIVE 
AXL_XFER_PTHREAD 
AXL_XFER_STATE_FILE 

Definition at line 36 of file axl.h.

36  {
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;

Function Documentation

◆ AXL_Add()

int AXL_Add ( int  id,
const char *  source,
const char *  destination 
)

Add a file to an existing transfer handle

◆ AXL_Cancel()

int AXL_Cancel ( int  id)

Cancel an existing transfer, must call Wait on cancelled transfers, if cancelled wait returns an error

◆ AXL_Config()

kvtree* AXL_Config ( const kvtree *  config)

Get/set AXL configuration values.

config: The new configuration. Global variables are in top level of the tree, and per-ID values are subtrees. If config=NULL, then return a kvtree with all the configuration values (globals and all per-ID trees).

Thread safety: setting the DEBUG or any per-transfer configuration value after the transfer has been dispatched entails a race contion between the main thread and the worker threads. Changing configuration options after a transfer has been dispatched is not supported.

Return value: If config != NULL, then return config on success. If config=NULL (you're querying the config) then return a new kvtree on success. Return NULL on any failures.

Parameters
[in]config[IN] - kvtree of options

◆ AXL_Create()

int AXL_Create ( axl_xfer_t  xtype,
const char *  name,
const char *  state_file 
)

◆ AXL_Dispatch()

int AXL_Dispatch ( int  id)

Initiate a transfer for all files in handle ID

◆ AXL_Finalize()

int AXL_Finalize ( void  )

Shutdown any vendor services

◆ AXL_Free()

int AXL_Free ( int  id)

Perform cleanup of internal data associated with ID

◆ AXL_Init()

int AXL_Init ( void  )

◆ AXL_Resume()

int AXL_Resume ( int  id)

AXL_Resume works the same as AXL_Dispatch(), but resumes any transfers where they left off. In the case of a BB API transfer, it will leave ongoing transfers running. If there are no ongoing or canceled transfers, AXL_Resume() behaves the same as an AXL_Dispatch().

AXL_Resume() is typically used in conjunction with passing an existing state_file is passed to AXL_Create().

◆ AXL_Stop()

int AXL_Stop ( void  )

Stop (cancel and free) all transfers, useful to clean the plate when restarting

◆ AXL_Test()

int AXL_Test ( int  id)

Non-blocking call to test if a transfer has completed, returns AXL_SUCCESS if the transfer has completed, does not indicate whether transfer was successful, only whether it's done

◆ AXL_Wait()

int AXL_Wait ( int  id)

BLOCKING Wait for a transfer to complete, and finalize the transfer

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_XFER_DEFAULT
@ AXL_XFER_DEFAULT
Definition: axl.h:38
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_XFER_SYNC
@ AXL_XFER_SYNC
Definition: axl.h:41
AXL_XFER_ASYNC_BBAPI
@ AXL_XFER_ASYNC_BBAPI
Definition: axl.h:44
axl_xfer_t
axl_xfer_t
Definition: axl.h:36