Skip to content

Commit

Permalink
Add "default" and "native" transfer types
Browse files Browse the repository at this point in the history
This adds in AXL_XFER_DEFAULT and AXL_XFER_NATIVE, and removes
AXL_XFER_BEST:

AXL_XFER_DEFAULT:
Let AXL choose the fastest transfer type that is compatible with all VeloC
transfers.  This may or may not be the node's native transfer library.

AXL_XFER_NATIVE:
Use the node's native transfer library (like IBM Burst Buffer or Cray DataWarp)
for transfers.  These native libraries may or may not support all VeloC
transfers.

Signed-off-by: Tony Hutter <[email protected]>
  • Loading branch information
tonyhutter authored and gonsie committed May 21, 2019
1 parent 6d3fec6 commit 736cd1b
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 17 deletions.
5 changes: 4 additions & 1 deletion doc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ If a transfer fails, partially transferred files are not removed
from the destination.

## Transfer types
Currently, there are four transfer types:

* AXL\_XFER\_SYNC - this is a synchronous transfer, which does not return until the files have been fully copied. It uses POSIX I/O to directly read/write files.

Expand All @@ -66,3 +65,7 @@ Currently, there are four transfer types:
* AXL\_XFER\_ASYNC\_BBAPI - this method uses [IBM's Burst Buffer API](https://github.com/IBM/CAST) to transfer files. IBM's system software then takes over to move data in the background. It's actually using NVMeoF, reading data from the local SSD from a remote node, so that the compute node is not really bothered once started.

* AXL\_XFER\_ASYNC\_DW - this method uses [Cray's Datawarp API](https://www.cray.com/products/storage/datawarp).

* AXL\_XFER\_DEFAULT - Let AXL choose the fastest transfer type that is compatible with all VeloC transfers. This may or may not be the node's native transfer library.

* AXL\_XFER\_NATIVE - Use the node's native transfer library (like IBM Burst Buffer or Cray DataWarp) for transfers. These native libraries may or may not support all VeloC transfers.
34 changes: 25 additions & 9 deletions src/axl.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,12 @@ static int axl_get_info(int id, kvtree** list, axl_xfer_t* type, axl_xfer_state_
}

/*
* Return the best underlying transfer API for this particular node. If you're
* Return the native underlying transfer API for this particular node. If you're
* running on an IBM node, use the BB API. If you're running on a Cray, use
* DataWarp. Otherwise use sync.
*/
static
axl_xfer_t axl_detect_best_xfer(void)
axl_xfer_t axl_detect_native_xfer(void)
{
axl_xfer_t xtype = AXL_XFER_NULL;

Expand All @@ -116,6 +116,24 @@ axl_xfer_t axl_detect_best_xfer(void)
return xtype;
}

/*
* Return the fastest API that's also compatible with all AXL transfers. We
* need this since there may be some edge case transfers the native APIs don't
* support.
*/
static
axl_xfer_t axl_detect_default_xfer(void)
{
axl_xfer_t xtype = axl_detect_native_xfer();

/* BBAPI doesn't support shmem, so we can't use it by default. */
if (xtype == AXL_XFER_ASYNC_BBAPI) {
xtype = AXL_XFER_SYNC;
}

return xtype;
}

/*
=========================================
API Functions
Expand Down Expand Up @@ -216,9 +234,10 @@ int AXL_Create (axl_xfer_t xtype, const char* name)
/* Generate next unique ID */
int id = ++axl_next_handle_UID;

if (xtype == AXL_XFER_BEST) {
/* Autodetect the best transfer API to use */
xtype = axl_detect_best_xfer();
if (xtype == AXL_XFER_DEFAULT) {
xtype = axl_detect_default_xfer();
} else if (xtype == AXL_XFER_NATIVE) {
xtype = axl_detect_native_xfer();
}

/* Create an entry for this transfer handle
Expand All @@ -243,16 +262,13 @@ int AXL_Create (axl_xfer_t xtype, const char* name)
int rc = AXL_SUCCESS;
switch (xtype) {
case AXL_XFER_SYNC:
break;
case AXL_XFER_ASYNC_DAEMON:
break;
case AXL_XFER_ASYNC_DW:
case AXL_XFER_ASYNC_CPPR:
break;
case AXL_XFER_ASYNC_BBAPI:
rc = axl_async_create_bbapi(id);
break;
case AXL_XFER_ASYNC_CPPR:
break;
default:
AXL_ERR("Unknown transfer type (%d)", (int) xtype);
rc = AXL_FAILURE;
Expand Down
22 changes: 15 additions & 7 deletions src/axl.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,21 @@ extern "C" {
/* Supported AXL transfer methods
* Note that DW, BBAPI, and CPPR must be found at compile time */
typedef enum {
AXL_XFER_NULL = 0, /* placeholder to represent invalid value */
AXL_XFER_SYNC, /* synchronous copy */
AXL_XFER_ASYNC_DAEMON, /* async daemon process */
AXL_XFER_ASYNC_DW, /* Cray Datawarp */
AXL_XFER_ASYNC_BBAPI, /* IBM Burst Buffer API */
AXL_XFER_ASYNC_CPPR, /* Intel CPPR */
AXL_XFER_BEST, /* Autodetect the best API from the node type */
AXL_XFER_NULL = 0, /* placeholder to represent invalid value */
AXL_XFER_DEFAULT, /* Autodetect and use the fastest API for this node
* type that supports all AXL transfers.
*/
AXL_XFER_SYNC, /* synchronous copy */
AXL_XFER_ASYNC_DAEMON, /* async daemon process */
AXL_XFER_ASYNC_DW, /* Cray Datawarp */
AXL_XFER_ASYNC_BBAPI, /* IBM Burst Buffer API */
AXL_XFER_ASYNC_CPPR, /* Intel CPPR */
AXL_XFER_NATIVE, /* Autodetect and use the native API (BBAPI, DW,
* etc) for this node type. It may or may not
* be compatible with all AXL transfers (like
* shmem). If there is no native API, fall back
* to AXL_XFER_DEFAULT.
*/
} axl_xfer_t;

/* Read configuration from non-AXL-specific file
Expand Down

0 comments on commit 736cd1b

Please sign in to comment.