C API Documentation

abt-io.h

Defines

ABT_IO_DEPRECATED(msg)
ABT_IO_INSTANCE_NULL

Typedefs

typedef struct abt_io_instance *abt_io_instance_id
typedef struct abt_io_op abt_io_op_t

Functions

abt_io_instance_id abt_io_init(int backing_thread_count)

Initializes abt_io library, using the specified number of backing threads. A count of zero currently indicates that concurrent I/O progress is not made unless control is passed to blocking abt-io calls (or other blocking calls w.r.t. argobots).

Parameters

progress_pool[in] Argobots pool to drive I/O

Returns

abt_io instance id on success, NULL upon error

abt_io_instance_id abt_io_init_ext(const struct abt_io_init_info *args)

Initializes an abt-io instance using an abt_io_init_info struct to provide arguments.

Parameters

args – Arguments

Returns

an abt_io_instance_id or ABT_IO_INSTANCE_NULL in case of failure.

abt_io_instance_id abt_io_init_pool (ABT_pool progress_pool) ABT_IO_DEPRECATED("use abt_io_init_ext instead")

Initializes abt_io library using the specified Argobots pool for operation dispatch.

Parameters

progress_pool[in] Argobots pool to drive I/O

Returns

abt_io instance id on success, NULL upon error

void abt_io_finalize(abt_io_instance_id aid)

Shuts down abt_io library and its underlying resources. Waits for underlying operations to complete in the case abt_io_init was called, otherwise returns immediately.

Parameters

aid[in] abt-io instance

int abt_io_open(abt_io_instance_id aid, const char *pathname, int flags, mode_t mode)

wrapper for open()

abt_io_op_t *abt_io_open_nb(abt_io_instance_id aid, const char *pathname, int flags, mode_t mode, int *ret)

non-blocking wrapper for open()

ssize_t abt_io_pwrite(abt_io_instance_id aid, int fd, const void *buf, size_t count, off_t offset)

wrapper for pwrite()

abt_io_op_t *abt_io_pwrite_nb(abt_io_instance_id aid, int fd, const void *buf, size_t count, off_t offset, ssize_t *ret)

non-blocking wrapper for pwrite()

ssize_t abt_io_write(abt_io_instance_id aid, int fd, const void *buf, size_t count)

wrapper for write()

abt_io_op_t *abt_io_write_nb(abt_io_instance_id aid, int fd, const void *buf, size_t count, ssize_t *ret)

non-blocking wrapper for write()

ssize_t abt_io_pread(abt_io_instance_id aid, int fd, void *buf, size_t count, off_t offset)

wrapper for pread()

abt_io_op_t *abt_io_pread_nb(abt_io_instance_id aid, int fd, void *buf, size_t count, off_t offset, ssize_t *ret)

non-blocking wrapper for pread()

ssize_t abt_io_read(abt_io_instance_id aid, int fd, void *buf, size_t count)

wrapper for read()

abt_io_op_t *abt_io_read_nb(abt_io_instance_id aid, int fd, void *buf, size_t count, ssize_t *ret)

non-blocking wrapper for read()

int abt_io_ftruncate(abt_io_instance_id aid, int fd, off_t length)

wrapper for ftruncate()

abt_io_op_t *abt_io_ftruncate_nb(abt_io_instance_id aid, int fd, off_t length, int *ret)

non-blocking wrapper for ftruncate()

off_t abt_io_lseek(abt_io_instance_id aid, int fd, off_t offset, int whence)

wrapper for lseek()

abt_io_op_t *abt_io_lseek_nb(abt_io_instance_id aid, int fd, off_t offset, int whence, off_t *ret)

non-blocking wrapper for lseek()

int abt_io_mkostemp(abt_io_instance_id aid, char *tpl, int flags)

wrapper for mkostemp()

abt_io_op_t *abt_io_mkostemp_nb(abt_io_instance_id aid, char *tpl, int flags, int *ret)

non-blocking wrapper for mkostemp()

int abt_io_unlink(abt_io_instance_id aid, const char *pathname)

wrapper for unlink()

non-blocking wrapper for unlink()

int abt_io_fdatasync(abt_io_instance_id aid, int fd)

wrapper for fdatasync()

abt_io_op_t *abt_io_fdatasync_nb(abt_io_instance_id aid, int fd, int *ret)

non-blocking wrapper for fdatasync()

int abt_io_close(abt_io_instance_id aid, int fd)

wrapper for close()

abt_io_op_t *abt_io_close_nb(abt_io_instance_id aid, int fd, int *ret)

non-blocking wrapper for close()

int abt_io_fallocate(abt_io_instance_id aid, int fd, int mode, off_t offset, off_t len)

wrapper for fallocate() (if available on this platform)

abt_io_op_t *abt_io_fallocate_nb(abt_io_instance_id aid, int fd, int mode, off_t offset, off_t len, int *ret)

non-blocking wrapper for fallocate() (if available on this platform)

int abt_io_stat(abt_io_instance_id aid, char *pathname, struct stat *statbuf)

wrapper for stat(2)

int abt_io_statfs(abt_io_instance_id aid, char *path, struct statfs *statfsbuf)

wrapper for statfs(2)

int abt_io_truncate(abt_io_instance_id aid, char *path, off_t length)

wrapper for truncate(2)

int abt_io_op_wait(abt_io_op_t *op)

wait on an abt-io operation return: 0 if success, non-zero on failure

void abt_io_op_free(abt_io_op_t *op)

release resources comprising the op. DO NOT call until the op has been successfully waited on

size_t abt_io_get_pending_op_count(abt_io_instance_id aid)

enquire about status of underlying Argobots pool

char *abt_io_get_config(abt_io_instance_id aid)

Retrieves complete configuration of abt-io instance, incoded as json

Parameters

aid[in] abt-io instance

Returns

null terminated string that must be free’d by caller

struct abt_io_init_info
#include <abt-io.h>

The abt_io_init_info structure should be passed to abt_io_init_ext to finely configure abt-io. The structure can be memset to 0 to have abt-io use default values. For any field that is not NULL, abt_io_init_ext will first look for a configuration in the json_config string. If no configuration is found or of json_config is NULL, abt-io will fall back to default.

Public Members

const char *json_config
ABT_pool progress_pool