GPI2.jl API

GPI2.gaspi_loggerMethod
gaspi_logger()

Run the gaspi_logger tool of the GPI-2 library.

Experimental implementation

This is an experimental feature and may change in future releases.

GPI2.gaspi_runMethod
gaspi_run()

Run the gaspi_run tool of the GPI-2 library.

Experimental implementation

This is an experimental feature and may change in future releases.

GPI2.use_jll_bindingsMethod
use_jll_bindings()

Configure GPI2.jl to use the C bindings file provided by the JLL package.

GPI2.use_jll_libraryMethod
use_jll_library()

Configure GPI2.jl to use libGPI2.so binary provided by the JLL package.

GPI2.use_system_bindingsMethod
use_system_bindings(path)

Configure GPI2.jl to use the C bindings file provided on the local system at path.

Experimental implementation

This is an experimental feature and may change in future releases.

GPI2.use_system_libraryMethod
use_system_library(path)

Configure GPI2.jl to use libGPI2.so binary provided on the local system at path.

Experimental implementation

This is an experimental feature and may change in future releases.

GPI2.LibGPI2.gaspi_operation_tType
gaspi_operation_t

Operations for Collective communication.

EnumeratorNote
GASPI_OP_MINMinimum
GASPI_OP_MAXMaximum
GASPI_OP_SUMSum
GPI2.LibGPI2.gaspi_allreduceMethod
gaspi_allreduce(buffer_send, buffer_receive, num, operation, datatype, group, timeout_ms)

All Reduce collective operation.

Parameters

  • buffer_send: The buffer with data for the operation.
  • buffer_receive: The buffer to receive the result of the operation.
  • num: The number of data elements in the buffer (beware of maximum - use gaspi_allreduce_elem_max).
  • operation: The type of operations (see gaspi_operation_t).
  • datatyp: Type of data (see gaspi_datatype_t).
  • group: The group involved in the operation.
  • timeout_ms: Timeout in milliseconds (or GASPI_BLOCK/GASPI_TEST).

Returns

GASPI_SUCCESS in case of success, GASPI_ERROR in case of error, GASPI_TIMEOUT in case of timeout.

Prototype

gaspi_return_t gaspi_allreduce (const gaspi_pointer_t buffer_send, gaspi_pointer_t const buffer_receive, const gaspi_number_t num, const gaspi_operation_t operation, const gaspi_datatype_t datatype, const gaspi_group_t group, const gaspi_timeout_t timeout_ms);
GPI2.LibGPI2.gaspi_allreduce_buf_sizeMethod
gaspi_allreduce_buf_size(buf_size)

Get the internal buffer size for gaspi_allreduce_user.

Parameters

  • buf_size: Output parameter with the buffer size.

Returns

GASPI_SUCCESS in case of success, GASPI_ERROR in case of error.

Prototype

gaspi_return_t gaspi_allreduce_buf_size (gaspi_size_t * const buf_size);
GPI2.LibGPI2.gaspi_allreduce_elem_maxMethod
gaspi_allreduce_elem_max(elem_max)

Get the maximum number of elements allowed in gaspi_allreduce.

Parameters

  • elem_max: Output parameter with the maximum number of elements.

Returns

GASPI_SUCCESS in case of success, GASPI_ERROR in case of error.

Prototype

gaspi_return_t gaspi_allreduce_elem_max (gaspi_number_t * const elem_max);
GPI2.LibGPI2.gaspi_allreduce_userMethod
gaspi_allreduce_user(buffer_send, buffer_receive, num, element_size, reduce_operation, reduce_state, group, timeout_ms)

Prototype

gaspi_return_t gaspi_allreduce_user (const gaspi_pointer_t buffer_send, gaspi_pointer_t const buffer_receive, const gaspi_number_t num, const gaspi_size_t element_size, gaspi_reduce_operation_t const reduce_operation, gaspi_reduce_state_t const reduce_state, const gaspi_group_t group, const gaspi_timeout_t timeout_ms);
GPI2.LibGPI2.gaspi_atomic_compare_swapMethod
gaspi_atomic_compare_swap(segment_id, offset, rank, comparator, val_new, val_old, timeout_ms)

Atomic compare-and-swap.

Parameters

  • segment_id: Segment identifier of data.
  • offset: Offset of data.
  • rank: The rank where to perform the operation.
  • comparator: The comparison value for the operation.
  • val_new: The new value to swap if comparison is successful.
  • val_old: Output parameter with the old value (before the operation).
  • timeout_ms: Timeout in milliseconds (or GASPI_BLOCK/GASPI_TEST).

Returns

GASPI_SUCCESS in case of success, GASPI_ERROR in case of error, GASPI_TIMEOUT in case of timeout.

Prototype

gaspi_return_t gaspi_atomic_compare_swap (const gaspi_segment_id_t segment_id, const gaspi_offset_t offset, const gaspi_rank_t rank, const gaspi_atomic_value_t comparator, const gaspi_atomic_value_t val_new, gaspi_atomic_value_t * const val_old, const gaspi_timeout_t timeout_ms);
GPI2.LibGPI2.gaspi_atomic_fetch_addMethod
gaspi_atomic_fetch_add(segment_id, offset, rank, val_add, val_old, timeout_ms)

Atomic fetch-and-add

Warning

The offset must be 8 bytes aligned.

Parameters

  • segment_id: Segment identifier where data is located.
  • offset: Offset where data is located.
  • rank: The rank where to perform the operation.
  • val_add: The value to add.
  • val_old: Output parameter with the old value (before the add operation).
  • timeout_ms: Timeout in milliseconds (or GASPI_BLOCK/GASPI_TEST).

Returns

GASPI_SUCCESS in case of success, GASPI_ERROR in case of error, GASPI_TIMEOUT in case of timeout.

Prototype

gaspi_return_t gaspi_atomic_fetch_add (const gaspi_segment_id_t segment_id, const gaspi_offset_t offset, const gaspi_rank_t rank, const gaspi_atomic_value_t val_add, gaspi_atomic_value_t * const val_old, const gaspi_timeout_t timeout_ms);
GPI2.LibGPI2.gaspi_atomic_maxMethod
gaspi_atomic_max(max_value)

Maximum value an gaspi_atomic_value_t can hold.

Parameters

  • max_value: Output parameter with the maximum value allowed for atomic operations.

Returns

GASPI_SUCCESS in case of success, GASPI_ERROR in case of error.

Prototype

gaspi_return_t gaspi_atomic_max(gaspi_atomic_value_t *max_value);
GPI2.LibGPI2.gaspi_barrierMethod
gaspi_barrier(group, timeout_ms)

Barrier.

Parameters

  • group: The group involved in the barrier.
  • timeout_ms: Timeout in milliseconds (or GASPI_BLOCK/GASPI_TEST).

Returns

GASPI_SUCCESS in case of success, GASPI_ERROR in case of error, GASPI_TIMEOUT in case of timeout.

Prototype

gaspi_return_t gaspi_barrier (const gaspi_group_t group, const gaspi_timeout_t timeout_ms);
GPI2.LibGPI2.gaspi_build_infrastructureMethod
gaspi_build_infrastructure(build)

Get current value of config build_infrastructure.

Parameters

  • build: Output parameter with the value.

Returns

GASPI_SUCCESS in case of success, GASPI_ERROR in case of error.

Prototype

gaspi_return_t gaspi_build_infrastructure (gaspi_number_t * const build);
GPI2.LibGPI2.gaspi_config_getMethod
gaspi_config_get(config)

Get configuration structure.

Parameters

  • config: Output configuration structure.

Returns

GASPI_SUCCESS in case of success, GASPI_ERROR in case of error.

Prototype

gaspi_return_t gaspi_config_get (gaspi_config_t * const config);
GPI2.LibGPI2.gaspi_config_setMethod
gaspi_config_set(new_config)

Set configuration values.

Parameters

  • new_config: The new configuration to be set.

Returns

GASPI_SUCCESS in case of success, GASPI_ERROR in case of error.

Prototype

gaspi_return_t gaspi_config_set (const gaspi_config_t new_config);
GPI2.LibGPI2.gaspi_connectMethod
gaspi_connect(rank, timeout_ms)

Connect to a determined rank to be able to communicate. It builds the required infrastructure for communication.

Parameters

  • rank: Rank to connect to.
  • timeout_ms: Timeout in milliseconds (or GASPI_BLOCK/GASPI_TEST).

Returns

GASPI_SUCCESS in case of success, GASPI_ERROR in case of error, GASPI_TIMEOUT in case of timeout.

Prototype

gaspi_return_t gaspi_connect (const gaspi_rank_t rank, const gaspi_timeout_t timeout_ms);
GPI2.LibGPI2.gaspi_cpu_frequencyMethod
gaspi_cpu_frequency(cpu_mhz)

Get the CPU frequency.

Parameters

  • cpu_mhz: Output parameter with the frequency.

Returns

GASPI_SUCCESS in case of success, GASPI_ERROR in case of error.

Prototype

gaspi_return_t gaspi_cpu_frequency (gaspi_float * const cpu_mhz);
GPI2.LibGPI2.gaspi_disconnectMethod
gaspi_disconnect(rank, timeout_ms)

Disconnect from a particular rank.

Parameters

  • rank: Rank to disconnect from.
  • timeout_ms: Timeout in milliseconds (or GASPI_BLOCK/GASPI_TEST).

Returns

GASPI_SUCCESS in case of success, GASPI_ERROR in case of error, GASPI_TIMEOUT in case of timeout.

Prototype

gaspi_return_t gaspi_disconnect (const gaspi_rank_t rank, const gaspi_timeout_t timeout_ms);
GPI2.LibGPI2.gaspi_error_strMethod
gaspi_error_str(error_code)

Get string describing return value. This is slightly more practical than gaspi_print_error.

Parameters

  • error_code: The return value to be described.

Returns

A string that describes the return value.

Prototype

gaspi_string_t gaspi_error_str(gaspi_return_t error_code);
GPI2.LibGPI2.gaspi_group_addMethod
gaspi_group_add(group, rank)

Add a given rank to a group.

Parameters

  • group: Group to add.
  • rank: Rank to add to the group.

Returns

GASPI_SUCCESS in case of success, GASPI_ERROR in case of error.

Prototype

gaspi_return_t gaspi_group_add (const gaspi_group_t group, const gaspi_rank_t rank);
GPI2.LibGPI2.gaspi_group_commitMethod
gaspi_group_commit(group, timeout_ms)

Establish a group by committing it. A group needs to be committed in order to use collective operations on such group.

Parameters

  • group: Group to commit.
  • timeout_ms: Timeout in milliseconds (or GASPI_BLOCK/GASPI_TEST).

Returns

GASPI_SUCCESS in case of success, GASPI_ERROR in case of error, GASPI_TIMEOUT in case of timeout.

Prototype

gaspi_return_t gaspi_group_commit (const gaspi_group_t group, const gaspi_timeout_t timeout_ms);
GPI2.LibGPI2.gaspi_group_createMethod
gaspi_group_create(group)

Create a group. In case of success, a empty group is created (without members).

Parameters

  • group: The created group.

Returns

GASPI_SUCCESS in case of success, GASPI_ERROR in case of error.

Prototype

gaspi_return_t gaspi_group_create (gaspi_group_t * const group);
GPI2.LibGPI2.gaspi_group_deleteMethod
gaspi_group_delete(group)

Delete a given group.

Parameters

  • group: Group to delete.

Returns

GASPI_SUCCESS in case of success, GASPI_ERROR in case of error.

Prototype

gaspi_return_t gaspi_group_delete (const gaspi_group_t group);
GPI2.LibGPI2.gaspi_group_maxMethod
gaspi_group_max(group_max)

Get the maximum number of groups allowed to be created.

Parameters

  • group_max: Output parameter with the maximum number of groups.

Returns

GASPI_SUCCESS in case of success, GASPI_ERROR in case of error.

Prototype

gaspi_return_t gaspi_group_max (gaspi_number_t * const group_max);
GPI2.LibGPI2.gaspi_group_numMethod
gaspi_group_num(group_num)

Get the current number of created groups.

Parameters

  • group_num: Output paramter with the number of groups.

Returns

GASPI_SUCCESS in case of success, GASPI_ERROR in case of error.

Prototype

gaspi_return_t gaspi_group_num (gaspi_number_t * const group_num);
GPI2.LibGPI2.gaspi_group_ranksMethod
gaspi_group_ranks(group, group_ranks)

Get the list of ranks forming a given group.

Parameters

  • group: The group we are interested in.
  • group_ranks: Output parameter: an array with the ranks belonging to the given group.

Returns

GASPI_SUCCESS in case of success, GASPI_ERROR in case of error.

Prototype

gaspi_return_t gaspi_group_ranks (const gaspi_group_t group, gaspi_rank_t * const group_ranks);
GPI2.LibGPI2.gaspi_group_sizeMethod
gaspi_group_size(group, group_size)

Get the size of a given group. It returns the number of processes (ranks) in the group.

Parameters

  • group: The group from which we want to know the size.
  • group_size: Output parameter with the group size.

Returns

GASPI_SUCCESS in case of success, GASPI_ERROR in case of error.

Prototype

gaspi_return_t gaspi_group_size (const gaspi_group_t group, gaspi_number_t * const group_size);
GPI2.LibGPI2.gaspi_initializedMethod
gaspi_initialized(initialized)

Check if GPI-2 is initialized

Parameters

  • initialized: Output parameter with flag value.

Returns

GASPI_SUCCESS in case of success, GASPI_ERROR in case of error.

Prototype

gaspi_return_t gaspi_initialized (gaspi_number_t * initialized);
GPI2.LibGPI2.gaspi_network_typeMethod
gaspi_network_type(network_type)

Get the network type.

Parameters

  • network_type: Output parameter with the network type.

Returns

GASPI_SUCCESS in case of success, GASPI_ERROR in case of error.

Prototype

gaspi_return_t gaspi_network_type (gaspi_network_t * const network_type);
GPI2.LibGPI2.gaspi_notification_numMethod
gaspi_notification_num(notification_num)

Get the number of available notification ids. Important to note is that the allowed ids are in [ 0, notification_num ) .

Parameters

  • notification_num: Output parameter with the number of available notifications ids.

Returns

GASPI_SUCCESS in case of success, GASPI_ERROR in case of error.

Prototype

gaspi_return_t gaspi_notification_num (gaspi_number_t * const notification_num);
GPI2.LibGPI2.gaspi_notifyMethod
gaspi_notify(segment_id_remote, rank, notification_id, notification_value, queue, timeout_ms)

Post a notification with a particular value to a given rank.

Parameters

  • segment_id_remote: The remote segment id.
  • rank: The rank to notify.
  • notification_id: The notification id.
  • notification_value: The notification value.
  • queue: The queue to post the notification request.
  • timeout_ms: Timeout in milliseconds (or GASPI_BLOCK/GASPI_TEST).

Returns

GASPI_SUCCESS in case of success, GASPI_ERROR in case of error, GASPI_TIMEOUT in case of timeout.

Prototype

gaspi_return_t gaspi_notify (const gaspi_segment_id_t segment_id_remote, const gaspi_rank_t rank, const gaspi_notification_id_t notification_id, const gaspi_notification_t notification_value, const gaspi_queue_id_t queue, const gaspi_timeout_t timeout_ms);
GPI2.LibGPI2.gaspi_notify_resetMethod
gaspi_notify_reset(segment_id_local, notification_id, old_notification_val)

Reset a given notification (and retrieve its value).

Parameters

  • segment_id_local: The segment identifier.
  • notification_id: The notification identifier to reset.
  • old_notification_val: Output parameter with the value of the notification (before the reset).

Returns

GASPI_SUCCESS in case of success, GASPI_ERROR in case of error.

Prototype

gaspi_return_t gaspi_notify_reset (const gaspi_segment_id_t segment_id_local, const gaspi_notification_id_t notification_id, gaspi_notification_t * const old_notification_val);
GPI2.LibGPI2.gaspi_notify_waitsomeMethod
gaspi_notify_waitsome(segment_id_local, notification_begin, num, first_id, timeout_ms)

Wait for some notification.

Parameters

  • segment_id_local: The segment identifier.
  • notification_begin: The notification id where to start to wait.
  • num: The number of notifications to wait for.
  • first_id: Output parameter with the identifier of a received notification.
  • timeout_ms: Timeout in milliseconds (or GASPI_BLOCK/GASPI_TEST).

Returns

GASPI_SUCCESS in case of success, GASPI_ERROR in case of error, GASPI_TIMEOUT in case of timeout.

Prototype

gaspi_return_t gaspi_notify_waitsome (const gaspi_segment_id_t segment_id_local, const gaspi_notification_id_t notification_begin, const gaspi_number_t num, gaspi_notification_id_t * const first_id, const gaspi_timeout_t timeout_ms);
GPI2.LibGPI2.gaspi_numa_socketMethod
gaspi_numa_socket(socket)

Get NUMA socket

Parameters

  • socket: Output parameter with the socket

Returns

GASPI_SUCCESS in case of success, GASPI_ERROR in case GPI2 was not started with NUMA enabled.

Prototype

gaspi_return_t gaspi_numa_socket(gaspi_uchar * const socket);
GPI2.LibGPI2.gaspi_passive_receiveMethod
gaspi_passive_receive(segment_id_local, offset_local, rem_rank, size, timeout_ms)

Receive data of a given size from any rank.

Parameters

  • segment_id_local: The segment where to place the received data.
  • offset_local: The local offset where to place the received data.
  • rem_rank: Output parameter with the sender (rank).
  • size: The size to receive.
  • timeout_ms: Timeout in milliseconds (or GASPI_BLOCK/GASPI_TEST).

Returns

GASPI_SUCCESS in case of success, GASPI_ERROR in case of error, GASPI_TIMEOUT in case of timeout.

Prototype

gaspi_return_t gaspi_passive_receive (const gaspi_segment_id_t segment_id_local, const gaspi_offset_t offset_local, gaspi_rank_t * const rem_rank, const gaspi_size_t size, const gaspi_timeout_t timeout_ms);
GPI2.LibGPI2.gaspi_passive_sendMethod
gaspi_passive_send(segment_id_local, offset_local, rank, size, timeout_ms)

Send data of a given size to a given rank.

Parameters

  • segment_id_local: The local segment identifier.
  • offset_local: The offset where the data to send is located.
  • rank: The rank to send to.
  • size: The size of the data to send.
  • timeout_ms: Timeout in milliseconds (or GASPI_BLOCK/GASPI_TEST).

Returns

GASPI_SUCCESS in case of success, GASPI_ERROR in case of error, GASPI_TIMEOUT in case of timeout.

Prototype

gaspi_return_t gaspi_passive_send (const gaspi_segment_id_t segment_id_local, const gaspi_offset_t offset_local, const gaspi_rank_t rank, const gaspi_size_t size, const gaspi_timeout_t timeout_ms);
GPI2.LibGPI2.gaspi_passive_transfer_size_maxMethod
gaspi_passive_transfer_size_max(passive_transfer_size_max)

Get the maximum allowed size (in bytes) allowed in passive communication.

Parameters

  • passive_transfer_size_max: Output parameter with the maximum allowed size (in bytes) for passive communication.

Returns

GASPI_SUCCESS in case of success, GASPI_ERROR in case of error.

Prototype

gaspi_return_t gaspi_passive_transfer_size_max (gaspi_size_t * const passive_transfer_size_max);
GPI2.LibGPI2.gaspi_passive_transfer_size_minMethod
gaspi_passive_transfer_size_min(passive_transfer_size_min)

Get the minimum allowed size (in bytes) allowed in passive communication.

Parameters

  • passive_transfer_size_min: Output parameter with the minimum allowed size (in bytes) for passive communication.

Returns

GASPI_SUCCESS in case of success, GASPI_ERROR in case of error.

Prototype

gaspi_return_t gaspi_passive_transfer_size_min (gaspi_size_t * const passive_transfer_size_min);
GPI2.LibGPI2.gaspi_print_errorMethod
gaspi_print_error(error_code, error_message)

Translate a error code to a text message. NOTE: the parameter error_message will allocate memory which the application must de-allocate (using free())

Parameters

  • error_code: The error code to translate.
  • error_message: Output parameter with the text message.

Returns

GASPI_SUCCESS in case of SUCCESS, GASPI_ERR_MEMALLOC in case of error there was an error allocating the error_message buffer.

Prototype

gaspi_return_t gaspi_print_error( gaspi_return_t error_code, gaspi_string_t *error_message);
GPI2.LibGPI2.gaspi_proc_initMethod
gaspi_proc_init(timeout_ms)

Initialization procedure to start GPI-2. It is a non-local synchronous time-based blocking procedure.

Parameters

  • timeout_ms: Timeout in milliseconds (or GASPI_BLOCK/GASPI_TEST).

Returns

GASPI_SUCCESS in case of success, GASPI_ERROR in case of error, GASPI_TIMEOUT in case of timeout.

Prototype

gaspi_return_t gaspi_proc_init (const gaspi_timeout_t timeout_ms);
GPI2.LibGPI2.gaspi_proc_killMethod
gaspi_proc_kill(rank, timeout_ms)

Kill a given process (rank).

Parameters

  • rank: Rank to kill.
  • timeout_ms: Timeout in milliseconds (or GASPI_BLOCK/GASPI_TEST).

Returns

GASPI_SUCCESS in case of success, GASPI_ERROR in case of error, GASPI_TIMEOUT in case of timeout.

Prototype

gaspi_return_t gaspi_proc_kill (const gaspi_rank_t rank, const gaspi_timeout_t timeout_ms);
GPI2.LibGPI2.gaspi_proc_local_numMethod
gaspi_proc_local_num(local_num)

Get the number of processes (ranks) started by the application.

Parameters

  • local_num: The number of processes (ranks) in the same node

Returns

GASPI_SUCCESS in case of success, GASPI_ERROR in case of error.

Prototype

gaspi_return_t gaspi_proc_local_num (gaspi_rank_t * const local_num);
GPI2.LibGPI2.gaspi_proc_local_rankMethod
gaspi_proc_local_rank(local_rank)

Get the process local rank.

Parameters

  • local_rank: Rank within a node of calling process.

Returns

GASPI_SUCCESS in case of success, GASPI_ERROR in case of error.

Prototype

gaspi_return_t gaspi_proc_local_rank (gaspi_rank_t * const local_rank);
GPI2.LibGPI2.gaspi_proc_numMethod
gaspi_proc_num(proc_num)

Get the number of processes (ranks) started by the application.

Parameters

  • proc_num: The number of processes (ranks) started by the application.

Returns

GASPI_SUCCESS in case of success, GASPI_ERROR in case of error.

Prototype

gaspi_return_t gaspi_proc_num (gaspi_rank_t * const proc_num);
GPI2.LibGPI2.gaspi_proc_pingMethod
gaspi_proc_ping(rank, tout)

Ping a particular proc (rank). This is useful in FT applications to determine if a rank is alive.

Parameters

  • rank: The rank to ping.
  • tout: A timeout value in milliseconds.

Returns

GASPI_SUCCESS in case of success, GASPI_ERROR in case of error.

Prototype

gaspi_return_t gaspi_proc_ping (const gaspi_rank_t rank, gaspi_timeout_t tout);
GPI2.LibGPI2.gaspi_proc_rankMethod
gaspi_proc_rank(rank)

Get the process rank.

Parameters

  • rank: Rank of calling process.

Returns

GASPI_SUCCESS in case of success, GASPI_ERROR in case of error.

Prototype

gaspi_return_t gaspi_proc_rank (gaspi_rank_t * const rank);
GPI2.LibGPI2.gaspi_proc_termMethod
gaspi_proc_term(timeout_ms)

Shutdown procedure. It is a synchronous local time-based blocking operation that releases resources and performs the required clean-up.

Parameters

  • timeout_ms: Timeout in milliseconds (or GASPI_BLOCK/GASPI_TEST).

Returns

GASPI_SUCCESS in case of success, GASPI_ERROR in case of error, GASPI_TIMEOUT in case of timeout.

Prototype

gaspi_return_t gaspi_proc_term (const gaspi_timeout_t timeout_ms);
GPI2.LibGPI2.gaspi_queue_createMethod
gaspi_queue_create(queue, timeout_ms)

Create a new communication queue.

Parameters

  • queue: Output parameter with id of created queue.
  • timeout_ms: A timeout value in milliseconds.

Returns

GASPI_SUCCESS in case of success, GASPI_ERROR in case of error.

Prototype

gaspi_return_t gaspi_queue_create(gaspi_queue_id_t * const queue, const gaspi_timeout_t timeout_ms);
GPI2.LibGPI2.gaspi_queue_deleteMethod
gaspi_queue_delete(queue)

Delete a new communication queue.

Parameters

  • queue: The queue ID to delete.

Returns

GASPI_SUCCESS in case of success, GASPI_ERROR in case of error.

Prototype

gaspi_return_t gaspi_queue_delete(const gaspi_queue_id_t queue);
GPI2.LibGPI2.gaspi_queue_maxMethod
gaspi_queue_max(queue_max)

Get the maximum number of queues that may be used. It is the maximum of initialized queues plus dynamically created queues.

Parameters

  • queue_max: Output parameter with maximum number of queues.

Returns

GASPI_SUCCESS in case of success, GASPI_ERROR in case of error.

Prototype

gaspi_return_t gaspi_queue_max(gaspi_number_t * const queue_max);
GPI2.LibGPI2.gaspi_queue_numMethod
gaspi_queue_num(queue_num)

Get the number of queue available for communication.

Parameters

  • queue_num: Output parameter with the number of queues.

Returns

GASPI_SUCCESS in case of success, GASPI_ERROR in case of error.

Prototype

gaspi_return_t gaspi_queue_num (gaspi_number_t * const queue_num);
GPI2.LibGPI2.gaspi_queue_sizeMethod
gaspi_queue_size(queue, queue_size)

Get the current number of elements on a given queue.

Parameters

  • queue: The queue to get the size.
  • queue_size: Output parameter with the size/elements in the queue.

Returns

GASPI_SUCCESS in case of success, GASPI_ERROR in case of error.

Prototype

gaspi_return_t gaspi_queue_size (const gaspi_queue_id_t queue, gaspi_number_t * const queue_size);
GPI2.LibGPI2.gaspi_queue_size_maxMethod
gaspi_queue_size_max(queue_size_max)

Get the maximum number of elements that can be posted to a queue (outstanding requests).

Parameters

  • queue_size_max: Output parameter with the maximum number of requests that can be posted to a queue.

Returns

GASPI_SUCCESS in case of success, GASPI_ERROR in case of error.

Prototype

gaspi_return_t gaspi_queue_size_max (gaspi_number_t * const queue_size_max);
GPI2.LibGPI2.gaspi_readMethod
gaspi_read(segment_id_local, offset_local, rank, segment_id_remote, offset_remote, size, queue, timeout_ms)

One-sided read.

Parameters

  • segment_id_local: The local segment id where data will be placed.
  • offset_local: The local offset where the data will be placed.
  • rank: The rank from which we want to read.
  • segment_id_remote: The remote segment id to read from.
  • offset_remote: The remote offset where to read from.
  • size: The size of data to read.
  • queue: The queue where to post the read request.
  • timeout_ms: Timeout in milliseconds (or GASPI_BLOCK/GASPI_TEST).

Returns

GASPI_SUCCESS in case of success, GASPI_QUEUE_FULL if the requested could not be posted because the provided queue is full, GASPI_ERROR in case of error, GASPI_TIMEOUT in case of timeout.

Prototype

gaspi_return_t gaspi_read (const gaspi_segment_id_t segment_id_local, const gaspi_offset_t offset_local, const gaspi_rank_t rank, const gaspi_segment_id_t segment_id_remote, const gaspi_offset_t offset_remote, const gaspi_size_t size, const gaspi_queue_id_t queue, const gaspi_timeout_t timeout_ms);
GPI2.LibGPI2.gaspi_read_listMethod
gaspi_read_list(num, segment_id_local, offset_local, rank, segment_id_remote, offset_remote, size, queue, timeout_ms)

List of reads.

Parameters

  • num: The number of list elements.
  • segment_id_local: List of local segments where data will be placed.
  • offset_local: List of local offsets where data will be placed.
  • rank: Rank from which will be read.
  • segment_id_remote: List of remote segments to read from.
  • offset_remote: List of remote offsets to read from.
  • size: List of sizes to read.
  • queue: The queue where to post the list.
  • timeout_ms: Timeout in milliseconds (or GASPI_BLOCK/GASPI_TEST).

Returns

GASPI_SUCCESS in case of success, GASPI_QUEUE_FULL if the requested could not be posted because the provided queue is full, GASPI_ERROR in case of error, GASPI_TIMEOUT in case of timeout.

Prototype

gaspi_return_t gaspi_read_list (const gaspi_number_t num, gaspi_segment_id_t * const segment_id_local, gaspi_offset_t * const offset_local, const gaspi_rank_t rank, gaspi_segment_id_t * const segment_id_remote, gaspi_offset_t * const offset_remote, gaspi_size_t * const size, const gaspi_queue_id_t queue, const gaspi_timeout_t timeout_ms);
GPI2.LibGPI2.gaspi_read_list_notifyMethod
gaspi_read_list_notify(num, segment_id_local, offset_local, rank, segment_id_remote, offset_remote, size, segment_id_notification, notification_id, queue, timeout_ms)

Read from different locations on a given rank and notify on local side.

Parameters

  • num: The number of elements in the list.
  • segment_id_local: The list of local segments where data is located.
  • offset_local: The list of local offsets where data to write is located.
  • rank: The rank where to write the list and notification.
  • segment_id_remote: The list of remote segments where to write.
  • offset_remote: The list of remote offsets where to write.
  • size: The list of sizes to write.
  • segment_id_notification: The segment id used for notification.
  • notification_id: The notification identifier to use.
  • queue: The queue where to post the request.
  • timeout_ms: Timeout in milliseconds (or GASPI_BLOCK/GASPI_TEST).

Returns

GASPI_SUCCESS in case of success, GASPI_QUEUE_FULL if the requested could not be posted because the provided queue is full, GASPI_ERROR in case of error, GASPI_TIMEOUT in case of timeout.

Prototype

gaspi_return_t gaspi_read_list_notify (const gaspi_number_t num, gaspi_segment_id_t * const segment_id_local, gaspi_offset_t * const offset_local, const gaspi_rank_t rank, gaspi_segment_id_t * const segment_id_remote, gaspi_offset_t * const offset_remote, gaspi_size_t * const size, const gaspi_segment_id_t segment_id_notification, const gaspi_notification_id_t notification_id, const gaspi_queue_id_t queue, const gaspi_timeout_t timeout_ms);
GPI2.LibGPI2.gaspi_read_notifyMethod
gaspi_read_notify(segment_id_local, offset_local, rank, segment_id_remote, offset_remote, size, notification_id, queue, timeout_ms)

Read data from a given rank with a notification on the local side.

Parameters

  • segment_id_local: The segment identifier where data to be written is located.
  • offset_local: The offset where the data to be written is located.
  • rank: The rank where to write and notify.
  • segment_id_remote: The remote segment identifier where to write the data to.
  • offset_remote: The remote offset where to write to.
  • size: The size of the data to write.
  • notification_id: The notification identifier to use.
  • queue: The queue where to post the request.
  • timeout_ms: Timeout in milliseconds (or GASPI_BLOCK/GASPI_TEST).

Returns

GASPI_SUCCESS in case of success, GASPI_QUEUE_FULL if the requested could not be posted because the provided queue is full, GASPI_ERROR in case of error, GASPI_TIMEOUT in case of timeout.

Prototype

gaspi_return_t gaspi_read_notify (const gaspi_segment_id_t segment_id_local, const gaspi_offset_t offset_local, const gaspi_rank_t rank, const gaspi_segment_id_t segment_id_remote, const gaspi_offset_t offset_remote, const gaspi_size_t size, const gaspi_notification_id_t notification_id, const gaspi_queue_id_t queue, const gaspi_timeout_t timeout_ms);
GPI2.LibGPI2.gaspi_rw_list_elem_maxMethod
gaspi_rw_list_elem_max(elem_max)

Get the maximum number of elements allowed in list (read, write) operations.

Parameters

  • elem_max: Output parameter with the maximum number of elements.

Returns

GASPI_SUCCESS in case of success, GASPI_ERROR in case of error.

Prototype

gaspi_return_t gaspi_rw_list_elem_max (gaspi_number_t * const elem_max);
GPI2.LibGPI2.gaspi_segment_allocMethod
gaspi_segment_alloc(segment_id, size, alloc_policy)

Allocate a segment.

Parameters

  • segment_id: The segment identifier to be created.
  • size: The size of the segment to be created.
  • alloc_policy: The allocation policy.

Returns

GASPI_SUCCESS in case of success, GASPI_ERROR in case of error.

Prototype

gaspi_return_t gaspi_segment_alloc (const gaspi_segment_id_t segment_id, const gaspi_size_t size, const gaspi_alloc_t alloc_policy);
GPI2.LibGPI2.gaspi_segment_avail_localMethod
gaspi_segment_avail_local(avail_seg_id)

Get an available segment id (only locally).

To create/alloc a segment, the application must provide a segment id. This provides a helper function to find the next available id locally i.e. for the calling rank.

Parameters

  • avail_seg_id: The available segment id.

Returns

GASPI_SUCCESS in case of success, GASPI_ERROR in case of error.

Prototype

gaspi_return_t gaspi_segment_avail_local (gaspi_segment_id_t* const avail_seg_id);
GPI2.LibGPI2.gaspi_segment_bindMethod
gaspi_segment_bind(segment_id, pointer, size, memory_description)

Use a user-provided buffer as a segment.

Parameters

  • segment_id: The segment identifier to be used.
  • pointer: The buffer address to use.
  • size: The size of segment.
  • memory_description: A description of the memory to be used.

Returns

GASPI_SUCCESS in case of success, GASPI_ERROR in case of error.

Prototype

gaspi_return_t gaspi_segment_bind (gaspi_segment_id_t const segment_id, gaspi_pointer_t const pointer, gaspi_size_t const size, gaspi_memory_description_t const memory_description);
GPI2.LibGPI2.gaspi_segment_createMethod
gaspi_segment_create(segment_id, size, group, timeout_ms, alloc_policy)

Create a segment. It is semantically equivalent to a collective aggregation of gaspi_segment_ alloc, gaspi_segment_register and gaspi_barrier involving all of the mem- bers of a given group.

Parameters

  • segment_id: The segment id to identify the segment.
  • size: The size of the segment (in bytes).
  • group: The group of ranks with which the segment should be registered.
  • timeout_ms: Timeout in milliseconds (or GASPI_BLOCK/GASPI_TEST).
  • alloc_policy: Memory allocation policy.

Returns

GASPI_SUCCESS in case of success, GASPI_ERROR in case of error, GASPI_TIMEOUT in case of timeout.

Prototype

gaspi_return_t gaspi_segment_create (const gaspi_segment_id_t segment_id, const gaspi_size_t size, const gaspi_group_t group, const gaspi_timeout_t timeout_ms, const gaspi_alloc_t alloc_policy);
GPI2.LibGPI2.gaspi_segment_deleteMethod
gaspi_segment_delete(segment_id)

Delete a given segment.

Parameters

  • segment_id: The segment identifier to be deleted.

Returns

GASPI_SUCCESS in case of success, GASPI_ERROR in case of error.

Prototype

gaspi_return_t gaspi_segment_delete (const gaspi_segment_id_t segment_id);
GPI2.LibGPI2.gaspi_segment_listMethod
gaspi_segment_list(num, segment_id_list)

Get a list of locally allocated segments ID's.

Parameters

  • num: The number of segments.
  • segment_id_list: Output parameter with an array wit the id's of the allocated segments.

Returns

GASPI_SUCCESS in case of success, GASPI_ERROR in case of error.

Prototype

gaspi_return_t gaspi_segment_list (const gaspi_number_t num, gaspi_segment_id_t * const segment_id_list);
GPI2.LibGPI2.gaspi_segment_maxMethod
gaspi_segment_max(segment_max)

Get the maximum number of segments allowed to be allocated/created.

Parameters

  • segment_max: Output paramter with the maximum number of segments.

Returns

GASPI_SUCCESS in case of success, GASPI_ERROR in case of error.

Prototype

gaspi_return_t gaspi_segment_max (gaspi_number_t * const segment_max);
GPI2.LibGPI2.gaspi_segment_numMethod
gaspi_segment_num(segment_num)

Get the number of allocated segments.

Parameters

  • segment_num: Output parameter with the number of allocated segments.

Returns

GASPI_SUCCESS in case of success, GASPI_ERROR in case of error.

Prototype

gaspi_return_t gaspi_segment_num (gaspi_number_t * const segment_num);
GPI2.LibGPI2.gaspi_segment_ptrMethod
gaspi_segment_ptr(segment_id, ptr)

Get the pointer to the location of a given segment.

Parameters

  • segment_id: The segment identifier.
  • ptr: Output parameter with the pointer to the memory segment.

Returns

GASPI_SUCCESS in case of success, GASPI_ERROR in case of error.

Prototype

gaspi_return_t gaspi_segment_ptr (const gaspi_segment_id_t segment_id, gaspi_pointer_t * ptr);
GPI2.LibGPI2.gaspi_segment_registerMethod
gaspi_segment_register(segment_id, rank, timeout_ms)

Register a segment for communication. In case of success, the segment can be used for communication between the involved ranks.

Parameters

  • segment_id: Segment identified to be registered.
  • rank: The rank to register this segment with.
  • timeout_ms: Timeout in milliseconds (or GASPI_BLOCK/GASPI_TEST).

Returns

GASPI_SUCCESS in case of success, GASPI_ERROR in case of error, GASPI_TIMEOUT in case of timeout.

Prototype

gaspi_return_t gaspi_segment_register (const gaspi_segment_id_t segment_id, const gaspi_rank_t rank, const gaspi_timeout_t timeout_ms);
GPI2.LibGPI2.gaspi_segment_sizeMethod
gaspi_segment_size(segment_id, rank, size)

Get the size of a given segment on a particular rank.

Parameters

  • segment_id: The segment id we are interested in.
  • rank: The rank.
  • size: Output parameter with the size of the segment.

Returns

GASPI_SUCCESS in case of success, GASPI_ERROR in case of error.

Prototype

gaspi_return_t gaspi_segment_size (const gaspi_segment_id_t segment_id, const gaspi_rank_t rank, gaspi_size_t * const size);
GPI2.LibGPI2.gaspi_segment_useMethod
gaspi_segment_use(segment_id, pointer, size, group, timeout, memory_description)

Use a user-provided buffer as a segment.

Parameters

  • segment_id: The segment identifier to be used.
  • pointer: The buffer address to use.
  • size: The size of segment.
  • group: The group participating in the operation.
  • timeout: The operation timeout (in milliseconds).
  • memory_description: A description of the memory to be used.

Returns

GASPI_SUCCESS in case of success, GASPI_ERROR in case of error, GASPI_TIMEOUT in case of timeout.

Prototype

gaspi_return_t gaspi_segment_use (gaspi_segment_id_t const segment_id, gaspi_pointer_t const pointer, gaspi_size_t const size, gaspi_group_t const group, gaspi_timeout_t const timeout, gaspi_memory_description_t const memory_description);
GPI2.LibGPI2.gaspi_state_vec_getMethod
gaspi_state_vec_get(state_vector)

Get the state vector.

Parameters

  • state_vector: Vector with state of each rank. The vector must be allocated with enough place to hold the state of all ranks.

Returns

GASPI_SUCCESS in case of success, GASPI_ERROR in case of error.

Prototype

gaspi_return_t gaspi_state_vec_get (gaspi_state_vector_t state_vector);
GPI2.LibGPI2.gaspi_statistic_counter_getMethod
gaspi_statistic_counter_get(counter, argument, value)

Get statistical counter.

Parameters

  • counter: the counter to be retrieved.
  • argument: the argument for the counter.
  • value: Output paramter with the current value of the counter.

Returns

GASPI_SUCCESS in case of SUCCESS, GASPI_ERROR in case of error.

Prototype

gaspi_return_t gaspi_statistic_counter_get ( gaspi_statistic_counter_t counter, gaspi_number_t argument, unsigned long *value);
GPI2.LibGPI2.gaspi_statistic_counter_infoMethod
gaspi_statistic_counter_info(counter, counter_argument, counter_name, counter_description, verbosity_level)

Get information about a counter.

Parameters

  • counter: the counter.
  • counter_argument: Output parameter with meaning of the counter.
  • counter_name: Output parameter with the name of the counter.
  • counter_description: Output parameter with a more detailed description of the counter.
  • verbosity_level: Output parameter with the minumum verbosity level to activate the counter.

Returns

GASPI_SUCCESS in case of SUCCESS, GASPI_ERROR in case of error.

Prototype

gaspi_return_t gaspi_statistic_counter_info( gaspi_statistic_counter_t counter, gaspi_statistic_argument_t* counter_argument, gaspi_string_t* counter_name, gaspi_string_t* counter_description, gaspi_number_t* verbosity_level);
GPI2.LibGPI2.gaspi_statistic_counter_maxMethod
gaspi_statistic_counter_max(counter_max)

Get the maximum number of statistics counters.

Parameters

  • counter_max: Output parameter with the maximum number of counters.

Returns

GASPI_SUCCESS in case of SUCCESS, GASPI_ERROR in case of error.

Prototype

gaspi_return_t gaspi_statistic_counter_max(gaspi_number_t* counter_max);
GPI2.LibGPI2.gaspi_statistic_counter_resetMethod
gaspi_statistic_counter_reset(counter)

Reset a counter (set to 0).

Parameters

  • counter: The counter to reset.

Returns

GASPI_SUCCESS in case of SUCCESS, GASPI_ERROR in case of error.

Prototype

gaspi_return_t gaspi_statistic_counter_reset (gaspi_statistic_counter_t counter);
GPI2.LibGPI2.gaspi_statistic_verbosity_levelMethod
gaspi_statistic_verbosity_level(_verbosity_level)

Set the verbosity level.

Parameters

  • _verbosity_level: the level of desired verbosity

Returns

GASPI_SUCCESS in case of SUCCESS, GASPI_ERROR in case of error.

Prototype

gaspi_return_t gaspi_statistic_verbosity_level(gaspi_number_t _verbosity_level);
GPI2.LibGPI2.gaspi_threads_get_num_coresMethod
gaspi_threads_get_num_cores(cores)

Get total number of available cpu cores

Parameters

  • cores: Output paramter with the number of cores.

Returns

GASPI_SUCCESS in case of success, GASPI_ERROR in case of error.

Prototype

gaspi_return_t gaspi_threads_get_num_cores(gaspi_int * const cores) __attribute__ ((deprecated));
GPI2.LibGPI2.gaspi_threads_get_tidMethod
gaspi_threads_get_tid(tid)

Get thread identifier

Parameters

  • Output: parameter with thread identifier

Returns

GASPI_SUCCESS in case of success, GASPI_ERROR in case of error.

Prototype

gaspi_return_t gaspi_threads_get_tid(gaspi_int * const tid) __attribute__ ((deprecated));
GPI2.LibGPI2.gaspi_threads_get_totalMethod
gaspi_threads_get_total(num)

Get total number of threads

Parameters

  • Output: parameter with total number of threads

Returns

GASPI_SUCCESS in case of success, GASPI_ERROR in case of error.

Prototype

gaspi_return_t gaspi_threads_get_total(gaspi_int *const num) __attribute__ ((deprecated));
GPI2.LibGPI2.gaspi_threads_initMethod
gaspi_threads_init(num)

Initialize threads (in all available cores)

Returns

GASPI_SUCCESS in case of success, GASPI_ERROR in case of error.

Prototype

gaspi_return_t gaspi_threads_init(gaspi_int * const num) __attribute__ ((deprecated));
GPI2.LibGPI2.gaspi_threads_init_userMethod
gaspi_threads_init_user(use_nr_of_threads)

Initialize threads (a particular number of threads)

Parameters

  • use_nr_of_threads: Number of threads to start.

Returns

GASPI_SUCCESS in case of success, GASPI_ERROR in case of error.

Prototype

gaspi_return_t gaspi_threads_init_user(const unsigned int use_nr_of_threads) __attribute__ ((deprecated));
GPI2.LibGPI2.gaspi_threads_registerMethod
gaspi_threads_register(tid)

Register a thread with the pool.

Parameters

  • tid: Output parameter with the thread identifier.

Returns

GASPI_SUCCESS in case of success, GASPI_ERROR in case of error.

Prototype

gaspi_return_t gaspi_threads_register(gaspi_int * tid);
GPI2.LibGPI2.gaspi_threads_runMethod
gaspi_threads_run(_function, arg)

Run a particular task (function)

Parameters

  • function: The function to run.
  • arg: The arguments of the function to run.

Returns

GASPI_SUCCESS in case of success, GASPI_ERROR in case of error.

Prototype

gaspi_return_t gaspi_threads_run(void* (*function)(void*), void *arg) __attribute__ ((deprecated));
GPI2.LibGPI2.gaspi_threads_sync_allMethod
gaspi_threads_sync_all(g, timeout_ms)

Synchronize all threads in a group (global barrier). Implies a gaspi_barrier within the group.

Parameters

  • group: The group involved in the barrier.
  • timeout: The timeout to be applied in the global barrier(gaspi_barrier).

Returns

GASPI_SUCCESS in case of success, GASPI_ERROR in case of error.

Prototype

gaspi_return_t gaspi_threads_sync_all(const gaspi_group_t g, const gaspi_timeout_t timeout_ms) __attribute__ ((deprecated));
GPI2.LibGPI2.gaspi_threads_termMethod
gaspi_threads_term()

Finalize threads

Returns

GASPI_SUCCESS in case of success, GASPI_ERROR in case of error.

Prototype

gaspi_return_t gaspi_threads_term(void) __attribute__ ((deprecated));
GPI2.LibGPI2.gaspi_time_getMethod
gaspi_time_get(wtime)

Get elapsed time (in milliseconds).

Parameters

  • wtime: Output parameter with the time in milliseconds.

Returns

GASPI_SUCCESS in case of success, GASPI_ERROR in case of error.

Prototype

gaspi_return_t gaspi_time_get (gaspi_time_t * const wtime);
GPI2.LibGPI2.gaspi_time_ticksMethod
gaspi_time_ticks(ticks)

Get the number of cycles (ticks).

Parameters

  • ticks: Output parameter with the ticks.

Returns

GASPI_SUCCESS in case of success, GASPI_ERROR in case of error.

Prototype

gaspi_return_t gaspi_time_ticks (gaspi_cycles_t * const ticks);
GPI2.LibGPI2.gaspi_transfer_size_maxMethod
gaspi_transfer_size_max(transfer_size_max)

Get the maximum size (in bytes) that can be communicated in a single request (read, write, etc.).

Parameters

  • transfer_size_max: Output parameter with the maximum transfer size.

Returns

GASPI_SUCCESS in case of success, GASPI_ERROR in case of error.

Prototype

gaspi_return_t gaspi_transfer_size_max (gaspi_size_t * const transfer_size_max);
GPI2.LibGPI2.gaspi_transfer_size_minMethod
gaspi_transfer_size_min(transfer_size_min)

Get the minimum size (in bytes) that can be communicated in a single request (write, read, etc.)

Parameters

  • transfer_size_min: Output parameter with the minimum size that be transfered.

Returns

GASPI_SUCCESS in case of success, GASPI_ERROR in case of error.

Prototype

gaspi_return_t gaspi_transfer_size_min (gaspi_size_t * const transfer_size_min);
GPI2.LibGPI2.gaspi_versionMethod
gaspi_version(version)

Get version number.

Parameters

  • version: Output parameter with version number.

Returns

GASPI_SUCCESS in case of success, GASPI_ERROR in case of error.

Prototype

gaspi_return_t gaspi_version (float *version);
GPI2.LibGPI2.gaspi_waitMethod
gaspi_wait(queue, timeout_ms)

Wait for requests posted to a given queue.

Parameters

  • queue: Queue to wait for.
  • timeout_ms: Timeout in milliseconds (or GASPI_BLOCK/GASPI_TEST).

Returns

GASPI_SUCCESS in case of success, GASPI_ERROR in case of error, GASPI_TIMEOUT in case of timeout.

Prototype

gaspi_return_t gaspi_wait (const gaspi_queue_id_t queue, const gaspi_timeout_t timeout_ms);
GPI2.LibGPI2.gaspi_writeMethod
gaspi_write(segment_id_local, offset_local, rank, segment_id_remote, offset_remote, size, queue, timeout_ms)

One-sided write.

Parameters

  • segment_id_local: The local segment id with the data to write.
  • offset_local: The local offset with the data to write.
  • rank: The rank to which we want to write.
  • segment_id_remote: The remote segment id to write to.
  • offset_remote: The remote offset where to write to.
  • size: The size of data to write.
  • queue: The queue where to post the write request.
  • timeout_ms: Timeout in milliseconds (or GASPI_BLOCK/GASPI_TEST).

Returns

GASPI_SUCCESS in case of success, GASPI_QUEUE_FULL if the requested could not be posted because the provided queue is full, GASPI_ERROR in case of error, GASPI_TIMEOUT in case of timeout.

Prototype

gaspi_return_t gaspi_write (const gaspi_segment_id_t segment_id_local, const gaspi_offset_t offset_local, const gaspi_rank_t rank, const gaspi_segment_id_t segment_id_remote, const gaspi_offset_t offset_remote, const gaspi_size_t size, const gaspi_queue_id_t queue, const gaspi_timeout_t timeout_ms);
GPI2.LibGPI2.gaspi_write_listMethod
gaspi_write_list(num, segment_id_local, offset_local, rank, segment_id_remote, offset_remote, size, queue, timeout_ms)

List of writes.

Parameters

  • num: The number of list elements (see also gaspi_rw_list_elem_max)
  • segment_id_local: List of local segments with data to be written.
  • offset_local: List of local offsets with data to be written.
  • rank: Rank to which will be written.
  • segment_id_remote: List of remote segments to write to.
  • offset_remote: List of remote offsets to write to.
  • size: List of sizes to write.
  • queue: The queue where to post the list.
  • timeout_ms: Timeout in milliseconds (or GASPI_BLOCK/GASPI_TEST).

Returns

GASPI_SUCCESS in case of success, GASPI_QUEUE_FULL if the requested could not be posted because the provided queue is full, GASPI_ERROR in case of error, GASPI_TIMEOUT in case of timeout.

Prototype

gaspi_return_t gaspi_write_list (const gaspi_number_t num, gaspi_segment_id_t * const segment_id_local, gaspi_offset_t * const offset_local, const gaspi_rank_t rank, gaspi_segment_id_t * const segment_id_remote, gaspi_offset_t * const offset_remote, gaspi_size_t * const size, const gaspi_queue_id_t queue, const gaspi_timeout_t timeout_ms);
GPI2.LibGPI2.gaspi_write_list_notifyMethod
gaspi_write_list_notify(num, segment_id_local, offset_local, rank, segment_id_remote, offset_remote, size, segment_id_notification, notification_id, notification_value, queue, timeout_ms)

Write to different locations and notify that particular rank.

Parameters

  • num: The number of elements in the list.
  • segment_id_local: The list of local segments where data is located.
  • offset_local: The list of local offsets where data to write is located.
  • rank: The rank where to write the list and notification.
  • segment_id_remote: The list of remote segments where to write.
  • offset_remote: The list of remote offsets where to write.
  • size: The list of sizes to write.
  • segment_id_notification: The segment id used for notification.
  • notification_id: The notification identifier to use.
  • notification_value: The notification value to send.
  • queue: The queue where to post the request.
  • timeout_ms: Timeout in milliseconds (or GASPI_BLOCK/GASPI_TEST).

Returns

GASPI_SUCCESS in case of success, GASPI_QUEUE_FULL if the requested could not be posted because the provided queue is full, GASPI_ERROR in case of error, GASPI_TIMEOUT in case of timeout.

Prototype

gaspi_return_t gaspi_write_list_notify (const gaspi_number_t num, gaspi_segment_id_t * const segment_id_local, gaspi_offset_t * const offset_local, const gaspi_rank_t rank, gaspi_segment_id_t * const segment_id_remote, gaspi_offset_t * const offset_remote, gaspi_size_t * const size, const gaspi_segment_id_t segment_id_notification, const gaspi_notification_id_t notification_id, const gaspi_notification_t notification_value, const gaspi_queue_id_t queue, const gaspi_timeout_t timeout_ms);
GPI2.LibGPI2.gaspi_write_notifyMethod
gaspi_write_notify(segment_id_local, offset_local, rank, segment_id_remote, offset_remote, size, notification_id, notification_value, queue, timeout_ms)

Write data to a given node and notify it.

Parameters

  • segment_id_local: The segment identifier where data to be written is located.
  • offset_local: The offset where the data to be written is located.
  • rank: The rank where to write and notify.
  • segment_id_remote: The remote segment identifier where to write the data to.
  • offset_remote: The remote offset where to write to.
  • size: The size of the data to write.
  • notification_id: The notification identifier to use.
  • notification_value: The notification value used.
  • queue: The queue where to post the request.
  • timeout_ms: Timeout in milliseconds (or GASPI_BLOCK/GASPI_TEST).

Returns

GASPI_SUCCESS in case of success, GASPI_QUEUE_FULL if the requested could not be posted because the provided queue is full, GASPI_ERROR in case of error, GASPI_TIMEOUT in case of timeout.

Prototype

gaspi_return_t gaspi_write_notify (const gaspi_segment_id_t segment_id_local, const gaspi_offset_t offset_local, const gaspi_rank_t rank, const gaspi_segment_id_t segment_id_remote, const gaspi_offset_t offset_remote, const gaspi_size_t size, const gaspi_notification_id_t notification_id, const gaspi_notification_t notification_value, const gaspi_queue_id_t queue, const gaspi_timeout_t timeout_ms);
GPI2.LibGPI2.pgaspi_allreduceMethod
pgaspi_allreduce(buffer_send, buffer_receive, num, operation, datatyp, group, timeout_ms)

Prototype

gaspi_return_t pgaspi_allreduce (const gaspi_pointer_t buffer_send, gaspi_pointer_t const buffer_receive, const gaspi_number_t num, const gaspi_operation_t operation, const gaspi_datatype_t datatyp, const gaspi_group_t group, const gaspi_timeout_t timeout_ms);
GPI2.LibGPI2.pgaspi_allreduce_userMethod
pgaspi_allreduce_user(buffer_send, buffer_receive, num, element_size, reduce_operation, reduce_state, group, timeout_ms)

Prototype

gaspi_return_t pgaspi_allreduce_user (const gaspi_pointer_t buffer_send, gaspi_pointer_t const buffer_receive, const gaspi_number_t num, const gaspi_size_t element_size, gaspi_reduce_operation_t const reduce_operation, gaspi_reduce_state_t const reduce_state, const gaspi_group_t group, const gaspi_timeout_t timeout_ms);
GPI2.LibGPI2.pgaspi_atomic_compare_swapMethod
pgaspi_atomic_compare_swap(segment_id, offset, rank, comparator, val_new, val_old, timeout_ms)

Prototype

gaspi_return_t pgaspi_atomic_compare_swap (const gaspi_segment_id_t segment_id, const gaspi_offset_t offset, const gaspi_rank_t rank, const gaspi_atomic_value_t comparator, const gaspi_atomic_value_t val_new, gaspi_atomic_value_t * const val_old, const gaspi_timeout_t timeout_ms);
GPI2.LibGPI2.pgaspi_atomic_fetch_addMethod
pgaspi_atomic_fetch_add(segment_id, offset, rank, val_add, val_old, timeout_ms)

Prototype

gaspi_return_t pgaspi_atomic_fetch_add (const gaspi_segment_id_t segment_id, const gaspi_offset_t offset, const gaspi_rank_t rank, const gaspi_atomic_value_t val_add, gaspi_atomic_value_t * const val_old, const gaspi_timeout_t timeout_ms);
GPI2.LibGPI2.pgaspi_barrierMethod
pgaspi_barrier(group, timeout_ms)

Prototype

gaspi_return_t pgaspi_barrier (const gaspi_group_t group, const gaspi_timeout_t timeout_ms);
GPI2.LibGPI2.pgaspi_connectMethod
pgaspi_connect(rank, timeout_ms)

Prototype

gaspi_return_t pgaspi_connect (const gaspi_rank_t rank, const gaspi_timeout_t timeout_ms);
GPI2.LibGPI2.pgaspi_disconnectMethod
pgaspi_disconnect(rank, timeout_ms)

Prototype

gaspi_return_t pgaspi_disconnect (const gaspi_rank_t rank, const gaspi_timeout_t timeout_ms);
GPI2.LibGPI2.pgaspi_group_addMethod
pgaspi_group_add(group, rank)

Prototype

gaspi_return_t pgaspi_group_add (const gaspi_group_t group, const gaspi_rank_t rank);
GPI2.LibGPI2.pgaspi_group_commitMethod
pgaspi_group_commit(group, timeout_ms)

Prototype

gaspi_return_t pgaspi_group_commit (const gaspi_group_t group, const gaspi_timeout_t timeout_ms);
GPI2.LibGPI2.pgaspi_group_ranksMethod
pgaspi_group_ranks(group, group_ranks)

Prototype

gaspi_return_t pgaspi_group_ranks (const gaspi_group_t group, gaspi_rank_t * const group_ranks);
GPI2.LibGPI2.pgaspi_group_sizeMethod
pgaspi_group_size(group, group_size)

Prototype

gaspi_return_t pgaspi_group_size (const gaspi_group_t group, gaspi_number_t * const group_size);
GPI2.LibGPI2.pgaspi_notifyMethod
pgaspi_notify(segment_id_remote, rank, notification_id, notification_value, queue, timeout_ms)

Prototype

gaspi_return_t pgaspi_notify (const gaspi_segment_id_t segment_id_remote, const gaspi_rank_t rank, const gaspi_notification_id_t notification_id, const gaspi_notification_t notification_value, const gaspi_queue_id_t queue, const gaspi_timeout_t timeout_ms);
GPI2.LibGPI2.pgaspi_notify_resetMethod
pgaspi_notify_reset(segment_id_local, notification_id, old_notification_val)

Prototype

gaspi_return_t pgaspi_notify_reset (const gaspi_segment_id_t segment_id_local, const gaspi_notification_id_t notification_id, gaspi_notification_t * const old_notification_val);
GPI2.LibGPI2.pgaspi_notify_waitsomeMethod
pgaspi_notify_waitsome(segment_id_local, notification_begin, num, first_id, timeout_ms)

Prototype

gaspi_return_t pgaspi_notify_waitsome (const gaspi_segment_id_t segment_id_local, const gaspi_notification_id_t notification_begin, const gaspi_number_t num, gaspi_notification_id_t * const first_id, const gaspi_timeout_t timeout_ms);
GPI2.LibGPI2.pgaspi_passive_receiveMethod
pgaspi_passive_receive(segment_id_local, offset_local, rem_rank, size, timeout_ms)

Prototype

gaspi_return_t pgaspi_passive_receive (const gaspi_segment_id_t segment_id_local, const gaspi_offset_t offset_local, gaspi_rank_t * const rem_rank, const gaspi_size_t size, const gaspi_timeout_t timeout_ms);
GPI2.LibGPI2.pgaspi_passive_sendMethod
pgaspi_passive_send(segment_id_local, offset_local, rank, size, timeout_ms)

Prototype

gaspi_return_t pgaspi_passive_send (const gaspi_segment_id_t segment_id_local, const gaspi_offset_t offset_local, const gaspi_rank_t rank, const gaspi_size_t size, const gaspi_timeout_t timeout_ms);
GPI2.LibGPI2.pgaspi_proc_killMethod
pgaspi_proc_kill(rank, timeout_ms)

Prototype

gaspi_return_t pgaspi_proc_kill (const gaspi_rank_t rank, const gaspi_timeout_t timeout_ms);
GPI2.LibGPI2.pgaspi_queue_createMethod
pgaspi_queue_create(queue_id, timeout_ms)

Prototype

gaspi_return_t pgaspi_queue_create(gaspi_queue_id_t * const queue_id, const gaspi_timeout_t timeout_ms);
GPI2.LibGPI2.pgaspi_queue_purgeMethod
pgaspi_queue_purge(queue, timeout_ms)

Purge queue.

Parameters

  • queue: The queue to purge.
  • timeout_ms: Timeout for operation.

Returns

GASPI_SUCCESS in case of success, GASPI_ERROR in case of error or GASPI_TIMEOUT in case time has expired.

Prototype

gaspi_return_t pgaspi_queue_purge(const gaspi_queue_id_t queue, const gaspi_timeout_t timeout_ms);
GPI2.LibGPI2.pgaspi_queue_sizeMethod
pgaspi_queue_size(queue, queue_size)

Prototype

gaspi_return_t pgaspi_queue_size (const gaspi_queue_id_t queue, gaspi_number_t * const queue_size);
GPI2.LibGPI2.pgaspi_readMethod
pgaspi_read(segment_id_local, offset_local, rank, segment_id_remote, offset_remote, size, queue, timeout_ms)

Prototype

gaspi_return_t pgaspi_read (const gaspi_segment_id_t segment_id_local, const gaspi_offset_t offset_local, const gaspi_rank_t rank, const gaspi_segment_id_t segment_id_remote, const gaspi_offset_t offset_remote, const gaspi_size_t size, const gaspi_queue_id_t queue, const gaspi_timeout_t timeout_ms);
GPI2.LibGPI2.pgaspi_read_listMethod
pgaspi_read_list(num, segment_id_local, offset_local, rank, segment_id_remote, offset_remote, size, queue, timeout_ms)

Prototype

gaspi_return_t pgaspi_read_list (const gaspi_number_t num, gaspi_segment_id_t * const segment_id_local, gaspi_offset_t * const offset_local, const gaspi_rank_t rank, gaspi_segment_id_t * const segment_id_remote, gaspi_offset_t * const offset_remote, gaspi_size_t * const size, const gaspi_queue_id_t queue, const gaspi_timeout_t timeout_ms);
GPI2.LibGPI2.pgaspi_read_list_notifyMethod
pgaspi_read_list_notify(num, segment_id_local, offset_local, rank, segment_id_remote, offset_remote, size, segment_id_notification, notification_id, queue, timeout_ms)

Prototype

gaspi_return_t pgaspi_read_list_notify (const gaspi_number_t num, gaspi_segment_id_t * const segment_id_local, gaspi_offset_t * const offset_local, const gaspi_rank_t rank, gaspi_segment_id_t * const segment_id_remote, gaspi_offset_t * const offset_remote, gaspi_size_t * const size, const gaspi_segment_id_t segment_id_notification, const gaspi_notification_id_t notification_id, const gaspi_queue_id_t queue, const gaspi_timeout_t timeout_ms);
GPI2.LibGPI2.pgaspi_read_notifyMethod
pgaspi_read_notify(segment_id_local, offset_local, rank, segment_id_remote, offset_remote, size, notification_id, queue, timeout_ms)

Prototype

gaspi_return_t pgaspi_read_notify (const gaspi_segment_id_t segment_id_local, const gaspi_offset_t offset_local, const gaspi_rank_t rank, const gaspi_segment_id_t segment_id_remote, const gaspi_offset_t offset_remote, const gaspi_size_t size, const gaspi_notification_id_t notification_id, const gaspi_queue_id_t queue, const gaspi_timeout_t timeout_ms);
GPI2.LibGPI2.pgaspi_segment_allocMethod
pgaspi_segment_alloc(segment_id, size, alloc_policy)

Prototype

gaspi_return_t pgaspi_segment_alloc (const gaspi_segment_id_t segment_id, const gaspi_size_t size, const gaspi_alloc_t alloc_policy);
GPI2.LibGPI2.pgaspi_segment_bindMethod
pgaspi_segment_bind(segment_id, pointer, size, memory_description)

Prototype

gaspi_return_t pgaspi_segment_bind ( gaspi_segment_id_t const segment_id, gaspi_pointer_t const pointer, gaspi_size_t const size, gaspi_memory_description_t const memory_description);
GPI2.LibGPI2.pgaspi_segment_createMethod
pgaspi_segment_create(segment_id, size, group, timeout_ms, alloc_policy)

Prototype

gaspi_return_t pgaspi_segment_create (const gaspi_segment_id_t segment_id, const gaspi_size_t size, const gaspi_group_t group, const gaspi_timeout_t timeout_ms, const gaspi_alloc_t alloc_policy);
GPI2.LibGPI2.pgaspi_segment_listMethod
pgaspi_segment_list(num, segment_id_list)

Prototype

gaspi_return_t pgaspi_segment_list (const gaspi_number_t num, gaspi_segment_id_t * const segment_id_list);
GPI2.LibGPI2.pgaspi_segment_ptrMethod
pgaspi_segment_ptr(segment_id, ptr)

Prototype

gaspi_return_t pgaspi_segment_ptr (const gaspi_segment_id_t segment_id, gaspi_pointer_t * ptr);
GPI2.LibGPI2.pgaspi_segment_registerMethod
pgaspi_segment_register(segment_id, rank, timeout_ms)

Prototype

gaspi_return_t pgaspi_segment_register (const gaspi_segment_id_t segment_id, const gaspi_rank_t rank, const gaspi_timeout_t timeout_ms);
GPI2.LibGPI2.pgaspi_segment_sizeMethod
pgaspi_segment_size(segment_id, rank, size)

Prototype

gaspi_return_t pgaspi_segment_size (const gaspi_segment_id_t segment_id, const gaspi_rank_t rank, gaspi_size_t * const size);
GPI2.LibGPI2.pgaspi_segment_useMethod
pgaspi_segment_use(segment_id, pointer, size, group, timeout, memory_description)

Prototype

gaspi_return_t pgaspi_segment_use ( gaspi_segment_id_t const segment_id, gaspi_pointer_t const pointer, gaspi_size_t const size, gaspi_group_t const group, gaspi_timeout_t const timeout, gaspi_memory_description_t const memory_description);
GPI2.LibGPI2.pgaspi_statistic_counter_getMethod
pgaspi_statistic_counter_get(counter, argument, valu)

Prototype

gaspi_return_t pgaspi_statistic_counter_get (gaspi_statistic_counter_t counter, gaspi_number_t argument, unsigned long *valu);
GPI2.LibGPI2.pgaspi_statistic_counter_infoMethod
pgaspi_statistic_counter_info(counter, counter_argument, counter_name, counter_description, verbosity_leve)

Prototype

gaspi_return_t pgaspi_statistic_counter_info(gaspi_statistic_counter_t counter, gaspi_statistic_argument_t* counter_argument, gaspi_string_t* counter_name, gaspi_string_t* counter_description, gaspi_number_t* verbosity_leve);
GPI2.LibGPI2.pgaspi_waitMethod
pgaspi_wait(queue, timeout_ms)

Prototype

gaspi_return_t pgaspi_wait (const gaspi_queue_id_t queue, const gaspi_timeout_t timeout_ms);
GPI2.LibGPI2.pgaspi_writeMethod
pgaspi_write(segment_id_local, offset_local, rank, segment_id_remote, offset_remote, size, queue, timeout_ms)

Prototype

gaspi_return_t pgaspi_write (const gaspi_segment_id_t segment_id_local, const gaspi_offset_t offset_local, const gaspi_rank_t rank, const gaspi_segment_id_t segment_id_remote, const gaspi_offset_t offset_remote, const gaspi_size_t size, const gaspi_queue_id_t queue, const gaspi_timeout_t timeout_ms);
GPI2.LibGPI2.pgaspi_write_listMethod
pgaspi_write_list(num, segment_id_local, offset_local, rank, segment_id_remote, offset_remote, size, queue, timeout_ms)

Prototype

gaspi_return_t pgaspi_write_list (const gaspi_number_t num, gaspi_segment_id_t * const segment_id_local, gaspi_offset_t * const offset_local, const gaspi_rank_t rank, gaspi_segment_id_t * const segment_id_remote, gaspi_offset_t * const offset_remote, gaspi_size_t * const size, const gaspi_queue_id_t queue, const gaspi_timeout_t timeout_ms);
GPI2.LibGPI2.pgaspi_write_list_notifyMethod
pgaspi_write_list_notify(num, segment_id_local, offset_local, rank, segment_id_remote, offset_remote, size, segment_id_notification, notification_id, notification_value, queue, timeout_ms)

Prototype

gaspi_return_t pgaspi_write_list_notify (const gaspi_number_t num, gaspi_segment_id_t * const segment_id_local, gaspi_offset_t * const offset_local, const gaspi_rank_t rank, gaspi_segment_id_t * const segment_id_remote, gaspi_offset_t * const offset_remote, gaspi_size_t * const size, const gaspi_segment_id_t segment_id_notification, const gaspi_notification_id_t notification_id, const gaspi_notification_t notification_value, const gaspi_queue_id_t queue, const gaspi_timeout_t timeout_ms);
GPI2.LibGPI2.pgaspi_write_notifyMethod
pgaspi_write_notify(segment_id_local, offset_local, rank, segment_id_remote, offset_remote, size, notification_id, notification_value, queue, timeout_ms)

Prototype

gaspi_return_t pgaspi_write_notify (const gaspi_segment_id_t segment_id_local, const gaspi_offset_t offset_local, const gaspi_rank_t rank, const gaspi_segment_id_t segment_id_remote, const gaspi_offset_t offset_remote, const gaspi_size_t size, const gaspi_notification_id_t notification_id, const gaspi_notification_t notification_value, const gaspi_queue_id_t queue, const gaspi_timeout_t timeout_ms);