SHMEM DEF

Enumerations

enum shmem_error_code_t

Error code for the SHMEM library.

Values:

enumerator SHMEM_SUCCESS

Task execution was successful.

enumerator SHMEM_INVALID_PARAM

There is a problem with the parameters.

enumerator SHMEM_INVALID_VALUE

There is a problem with the range of the value of the parameter.

enumerator SHMEM_SMEM_ERROR

There is a problem with SMEM.

enumerator SHMEM_INNER_ERROR

This is a problem caused by an internal error.

enumerator SHMEM_NOT_INITED

This is a problem caused by an uninitialization.

enum shmem_init_status_t

The state of the SHMEM library initialization.

Values:

enumerator SHMEM_STATUS_NOT_INITIALIZED

Uninitialized.

enumerator SHMEM_STATUS_SHM_CREATED

Shared memory heap creation is complete.

enumerator SHMEM_STATUS_IS_INITIALIZED

Initialization is complete.

enumerator SHMEM_STATUS_INVALID

Invalid status code.

enum shmem_transport_t

Different transports supported by SHMEM library.

Values:

enumerator SHMEM_TRANSPORT_MTE

MTE Transport.

enumerator SHMEM_TRANSPORT_ROCE

RDMA Transport (RoCE).

enum shmemi_op_t

The state of the SHMEM host OP type.

Values:

enumerator SHMEMI_OP_PUT
enumerator SHMEMI_OP_P
enumerator SHMEMI_OP_PUT_SIGNAL
enumerator SHMEMI_OP_GET
enumerator SHMEMI_OP_G
enum shmem_team_index_t

Team’s index.

Values:

enumerator SHMEM_TEAM_INVALID
enumerator SHMEM_TEAM_WORLD
enum data_op_engine_type_t

Data op engine type.

Values:

enumerator SHMEM_DATA_OP_MTE
enumerator SHMEM_DATA_OP_SDMA
enumerator SHMEM_DATA_OP_ROCE
enum [anonymous]

signal ops, used by signaler in p2p synchronization

Values:

enumerator SHMEM_SIGNAL_SET
enumerator SHMEM_SIGNAL_ADD
enum [anonymous]

signal compare ops, used by signalee in p2p synchronization

Values:

enumerator SHMEM_CMP_EQ
enumerator SHMEM_CMP_NE
enumerator SHMEM_CMP_GT
enumerator SHMEM_CMP_GE
enumerator SHMEM_CMP_LT
enumerator SHMEM_CMP_LE

Typedefs

typedef int shmem_team_t

A typedef of int.

Macros

Defines

SHMEM_TYPE_FUNC(FUNC)

Standard RMA Types and Names valid on Host.

NAME

TYPE

float

float

double

double

int8

int8

int16

int16

int32

int32

int64

int64

uint8

uint8

uint16

uint16

uint32

uint32

uint64

uint64

char

char

SHMEM_HOST_API

A macro that identifies a function on the host side.

SHMEM_XXX_VERSION

macros that define current version info

SHMEM_MAX_NAME_LEN
SHMEM_VENDOR_MAJOR_VER
SHMEM_VENDOR_MINOR_VER
SHMEM_VENDOR_PATCH_VER
SHMEM_MAX_IP_PORT_LEN

Structs

Defines

SHMEM_UNIQUEID_INITIALIZER

Typedefs

typedef int (*shmem_decrypt_handler)(const char *cipherText, size_t cipherTextLen, char *plainText, size_t &plainTextLen)

Callback function of private key password decryptor, see shmem_set_config_store_tls_key.

Param cipherText:

[in] the encrypted text(private password)

Param cipherTextLen:

[in] the length of encrypted text

Param plainText:

[out] the decrypted text(private password)

Param plainTextLen:

[out] the length of plainText

Variables

constexpr uint16_t SHMEM_UNIQUE_ID_INNER_LEN = 60
constexpr int32_t SHMEM_UNIQUEID_VERSION = (1 << 16) + sizeof(shmem_uniqueid_t)
struct shmem_init_optional_attr_t

Optional parameter for the attributes used for initialization.

  • int version: version

  • data_op_engine_type_t data_op_engine_type: data_op_engine_type

  • uint32_t shm_init_timeout: shm_init_timeout

  • uint32_t shm_create_timeout: shm_create_timeout

  • uint32_t control_operation_timeout: control_operation_timeout

struct shmem_init_attr_t

Mandatory parameter for attributes used for initialization.

  • int my_rank: The rank of the current process.

  • int n_ranks: The total rank number of all processes.

  • char ip_port[SHMEM_MAX_IP_PORT_LEN]: The ip and port of the communication server. The port must not conflict with other modules and processes.

  • uint64_t local_mem_size: The size of shared memory currently occupied by current rank.

  • shmem_init_optional_attr_t option_attr: Optional Parameters.

struct shmem_uniqueid_t
struct non_contiguous_copy_param

Non-Contiguous Datacopy Param.

  • uint32_t repeat: Data move times

  • uint32_t length: Data move unit length

  • uint32_t src_ld: Src data leading dimension. Interval between the head of the repeat and the head of the following repeat.

  • uint32_t dst_ld: Dst data leading dimension.

struct shmem_handle_t

Handle info used for non-blocking API synchronization.

  • shmem_team_t team_id: Team ID used for synchronization.

struct shmem_team_config_t

Reserved for future use.