GPI-2
1.0.0
|
The GPI-2 interface. More...
Go to the source code of this file.
Classes | |
struct | gaspi_config |
A structure with configuration. More... |
Typedefs | |
typedef char | gaspi_char |
typedef unsigned char | gaspi_uchar |
typedef short | gaspi_short |
typedef unsigned short | gaspi_ushort |
typedef int | gaspi_int |
typedef unsigned int | gaspi_uint |
typedef long | gaspi_long |
typedef unsigned long | gaspi_ulong |
typedef float | gaspi_float |
typedef double | gaspi_double |
typedef unsigned int | gaspi_timeout_t |
typedef unsigned short | gaspi_rank_t |
typedef unsigned char | gaspi_group_t |
typedef unsigned int | gaspi_number_t |
typedef void * | gaspi_pointer_t |
typedef void * | gaspi_state_t |
typedef unsigned char * | gaspi_state_vector_t |
typedef unsigned char | gaspi_queue_id_t |
typedef unsigned long | gaspi_size_t |
typedef unsigned long | gaspi_alloc_t |
typedef unsigned char | gaspi_segment_id_t |
typedef unsigned long | gaspi_offset_t |
typedef unsigned long | gaspi_atomic_value_t |
typedef unsigned long | gaspi_time_t |
typedef unsigned short | gaspi_notification_id_t |
typedef unsigned int | gaspi_notification_t |
typedef unsigned int | gaspi_statistic_counter_t |
typedef char * | gaspi_string_t |
typedef struct gaspi_config | gaspi_config_t |
A structure with configuration. | |
typedef gaspi_return_t(* | gaspi_reduce_operation_t )(gaspi_pointer_t const operand_one, gaspi_pointer_t const operand_two, gaspi_pointer_t const result, gaspi_state_t const state, const gaspi_number_t num, const gaspi_size_t element_size, const gaspi_timeout_t timeout_ms) |
Enumerations | |
enum | gaspi_return_t { GASPI_ERROR = -1, GASPI_SUCCESS = 0, GASPI_TIMEOUT = 1 } |
Functions return type. | |
enum | gaspi_network_t { GASPI_IB = 0, GASPI_ETHERNET = 1, GASPI_GEMINI = 2, GASPI_ARIES = 3 } |
Network type. More... | |
enum | gaspi_operation_t { GASPI_OP_MIN = 0, GASPI_OP_MAX = 1, GASPI_OP_SUM = 2 } |
Operations for Collective communication. More... | |
enum | gaspi_datatype_t { GASPI_TYPE_INT = 0, GASPI_TYPE_UINT = 1, GASPI_TYPE_FLOAT = 2, GASPI_TYPE_DOUBLE = 3, GASPI_TYPE_LONG = 4, GASPI_TYPE_ULONG = 5 } |
Element types for Collective communication. | |
enum | gaspi_qp_state_t { GASPI_STATE_HEALTHY = 0, GASPI_STATE_CORRUPT = 1 } |
State of queue. | |
enum | gaspi_alloc_policy_flags { GASPI_MEM_UNINITIALIZED = 0, GASPI_MEM_INITIALIZED = 1 } |
Memory allocation policy. More... | |
enum | gaspi_statistic_argument_t { GASPI_STATISTIC_ARGUMENT_NONE } |
Statistical information. More... |
Functions | |
gaspi_return_t | gaspi_config_get (gaspi_config_t *const config) |
Get configuration structure. | |
gaspi_return_t | gaspi_config_set (const gaspi_config_t new_config) |
Set configuration values. | |
gaspi_return_t | gaspi_version (float *version) |
Get version number. | |
gaspi_return_t | gaspi_proc_init (const gaspi_timeout_t timeout_ms) |
Initialization procedure to start GPI-2. | |
gaspi_return_t | gaspi_proc_term (const gaspi_timeout_t timeout_ms) |
Shutdown procedure. | |
gaspi_return_t | gaspi_proc_rank (gaspi_rank_t *const rank) |
Get the process rank. | |
gaspi_return_t | gaspi_proc_num (gaspi_rank_t *const proc_num) |
Get the number of processes (ranks) started by the application. | |
gaspi_return_t | gaspi_proc_kill (const gaspi_rank_t rank, const gaspi_timeout_t timeout_ms) |
Kill a given process (rank). | |
gaspi_return_t | gaspi_connect (const gaspi_rank_t rank, const gaspi_timeout_t timeout_ms) |
Connect to a determined rank to be able to communicate. | |
gaspi_return_t | gaspi_disconnect (const gaspi_rank_t rank, const gaspi_timeout_t timeout_ms) |
Disconnect from a particular rank. | |
gaspi_return_t | gaspi_group_create (gaspi_group_t *const group) |
Create a group. | |
gaspi_return_t | gaspi_group_delete (const gaspi_group_t group) |
Delete a given group. | |
gaspi_return_t | gaspi_group_add (const gaspi_group_t group, const gaspi_rank_t rank) |
Add a given rank to a group. | |
gaspi_return_t | gaspi_group_commit (const gaspi_group_t group, const gaspi_timeout_t timeout_ms) |
Establish a group by committing it. | |
gaspi_return_t | gaspi_group_num (gaspi_number_t *const group_num) |
Get the current number of created groups. | |
gaspi_return_t | gaspi_group_size (const gaspi_group_t group, gaspi_number_t *const group_size) |
Get the size of a given group. | |
gaspi_return_t | gaspi_group_ranks (const gaspi_group_t group, gaspi_rank_t *const group_ranks) |
Get the list of ranks forming a given group. | |
gaspi_return_t | gaspi_group_max (gaspi_number_t *const group_max) |
Get the maximum number of groups allowed to be created. | |
gaspi_return_t | gaspi_segment_alloc (const gaspi_segment_id_t segment_id, const gaspi_size_t size, const gaspi_alloc_t alloc_policy) |
Allocate a segment. | |
gaspi_return_t | gaspi_segment_delete (const gaspi_segment_id_t segment_id) |
Delete a given segment. | |
gaspi_return_t | gaspi_segment_register (const gaspi_segment_id_t segment_id, const gaspi_rank_t rank, const gaspi_timeout_t timeout_ms) |
Register a segment for communication. | |
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) |
Create a segment. | |
gaspi_return_t | gaspi_segment_num (gaspi_number_t *const segment_num) |
Get the number of allocated segments. | |
gaspi_return_t | gaspi_segment_list (const gaspi_number_t num, gaspi_segment_id_t *const segment_id_list) |
Get a list of locally allocated segments ID's. | |
gaspi_return_t | gaspi_segment_ptr (const gaspi_segment_id_t segment_id, gaspi_pointer_t *ptr) |
Get the pointer to the location of a given segment. | |
gaspi_return_t | gaspi_segment_size (const gaspi_segment_id_t segment_id, const gaspi_rank_t rank, gaspi_size_t *const size) |
Get the size of a given segment. | |
gaspi_return_t | gaspi_segment_max (gaspi_number_t *const segment_max) |
Get the maximum number of segments allowed to be allocated/created. | |
gaspi_return_t | gaspi_barrier (const gaspi_group_t group, const gaspi_timeout_t timeout_ms) |
Barrier. | |
gaspi_return_t | gaspi_allreduce (gaspi_pointer_t const 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) |
All Reduce collective operation. | |
gaspi_return_t | gaspi_allreduce_user (gaspi_pointer_t const 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_state_t const reduce_state, const gaspi_group_t group, const gaspi_timeout_t timeout_ms) |
One-sided communication. | |
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) |
One-sided write. | |
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) |
One-sided read. | |
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) |
List of writes. | |
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) |
List of reads. | |
gaspi_return_t | gaspi_wait (const gaspi_queue_id_t queue, const gaspi_timeout_t timeout_ms) |
Wait for requests posted to a given queue. | |
Atomic operations. | |
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) |
Atomic fetch-and-add. | |
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) |
Atomic compare-and-swap. | |
Passive communication (2-sided). | |
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) |
Send data of a given size to a given rank. | |
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) |
Receive data of a given size from any rank. | |
Weak synchronisation | |
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) |
Post a notification with a particular value to a given rank. | |
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) |
Wait for some notification. | |
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) |
Reset a given notification (and retrieve its value). | |
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) |
Write data to a given node and notify it. | |
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) |
Write to different locations and notify that particular rank. | |
Utilities and informations | |
gaspi_return_t | gaspi_queue_size (const gaspi_queue_id_t queue, gaspi_number_t *const queue_size) |
Get the current number of elements on a given queue. | |
gaspi_return_t | gaspi_queue_num (gaspi_number_t *const queue_num) |
Get the number of queue available for communication. | |
gaspi_return_t | gaspi_queue_size_max (gaspi_number_t *const queue_size_max) |
Get the maximum number of elements that can be posted to a queue (outstanding requests). | |
gaspi_return_t | gaspi_transfer_size_min (gaspi_size_t *const transfer_size_min) |
Get the minimum size (in bytes) that can be communicated in a single request (write, read, etc.) | |
gaspi_return_t | gaspi_transfer_size_max (gaspi_size_t *const transfer_size_max) |
Get the maximum size (in bytes) that can be communicated in a single request (read, write, etc.). | |
gaspi_return_t | gaspi_notification_num (gaspi_number_t *const notification_num) |
Get the number of available notifications. | |
gaspi_return_t | gaspi_passive_transfer_size_max (gaspi_size_t *const passive_transfer_size_max) |
Get the maximum allowed size (in bytes) allowed in passive communication. | |
gaspi_return_t | gaspi_allreduce_buf_size (gaspi_size_t *const buf_size) |
Get the internal buffer size for gaspi_allreduce_user. | |
gaspi_return_t | gaspi_allreduce_elem_max (gaspi_number_t *const elem_max) |
Get the maximum number of elements allowed in gaspi_allreduce. | |
gaspi_return_t | gaspi_rw_list_elem_max (gaspi_number_t *const elem_max) |
Get the maximum number of elements allowed in list (read, write) operations. | |
gaspi_return_t | gaspi_network_type (gaspi_network_t *const network_type) |
Get the network type. | |
gaspi_return_t | gaspi_time_ticks (gaspi_time_t *const ticks) |
Get the number of cycles (ticks). | |
gaspi_return_t | gaspi_cpu_frequency (gaspi_float *const cpu_mhz) |
Get the CPU frequency. | |
gaspi_return_t | gaspi_machine_type (char const machine_type[16]) |
Get the machine type (CPU, accelerator...) | |
gaspi_return_t | gaspi_state_vec_get (gaspi_state_vector_t state_vector) |
Get the state vector. | |
void | gaspi_printf (const char *fmt,...) |
GASPI printf to print the gaspi_logger. | |
void | gaspi_print_affinity_mask () |
Print the CPU's affinity mask. | |
gaspi_return_t | gaspi_set_socket_affinity (const gaspi_uchar socket) |
Set socket affinity. | |
Profiling interface | |
gaspi_return_t | gaspi_statistic_verbosity_level (gaspi_number_t _verbosity_level) |
Set the verbosity level. | |
gaspi_return_t | gaspi_statistic_counter_max (gaspi_statistic_counter_t *counter_max) |
Get the maximum number of statistics counters. | |
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) |
Get information about a counter. | |
gaspi_return_t | gaspi_statistic_counter_get (gaspi_statistic_counter_t counter, gaspi_number_t argument, gaspi_number_t *value) |
Get statistical counter. | |
gaspi_return_t | gaspi_statistic_counter_reset (gaspi_statistic_counter_t counter) |
Reset a counter (set to 0). |
The GPI-2 interface.
enum gaspi_network_t |
enum gaspi_operation_t |
Statistical information.
gaspi_return_t gaspi_allreduce | ( | gaspi_pointer_t const | 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 | ||
) |
All Reduce collective operation.
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. |
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). |
gaspi_return_t gaspi_allreduce_buf_size | ( | gaspi_size_t *const | buf_size | ) |
Get the internal buffer size for gaspi_allreduce_user.
buf_size | Output parameter with the buffer size. |
gaspi_return_t gaspi_allreduce_elem_max | ( | gaspi_number_t *const | elem_max | ) |
Get the maximum number of elements allowed in gaspi_allreduce.
elem_max | Output parameter with the maximum number of elements. |
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 | ||
) |
Atomic compare-and-swap.
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). |
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 | ||
) |
Atomic fetch-and-add.
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). |
gaspi_return_t gaspi_barrier | ( | const gaspi_group_t | group, |
const gaspi_timeout_t | timeout_ms | ||
) |
Barrier.
group | The group involved in the barrier. |
timeout_ms | Timeout in milliseconds (or GASPI_BLOCK/GASPI_TEST). |
gaspi_return_t gaspi_config_get | ( | gaspi_config_t *const | config | ) |
Get configuration structure.
config | Output configuration structure. |
gaspi_return_t gaspi_config_set | ( | const gaspi_config_t | new_config | ) |
Set configuration values.
new_config | The new configuration to be set. |
gaspi_return_t gaspi_connect | ( | const gaspi_rank_t | rank, |
const gaspi_timeout_t | timeout_ms | ||
) |
Connect to a determined rank to be able to communicate.
It builds the required infrastructure for communication.
rank | Rank to connect to. |
timeout_ms | Timeout in milliseconds (or GASPI_BLOCK/GASPI_TEST). |
gaspi_return_t gaspi_cpu_frequency | ( | gaspi_float *const | cpu_mhz | ) |
Get the CPU frequency.
cpu_mhz | Output parameter with the frequency. |
gaspi_return_t gaspi_disconnect | ( | const gaspi_rank_t | rank, |
const gaspi_timeout_t | timeout_ms | ||
) |
Disconnect from a particular rank.
rank | Rank to disconnect from. |
timeout_ms | Timeout in milliseconds (or GASPI_BLOCK/GASPI_TEST). |
gaspi_return_t gaspi_group_add | ( | const gaspi_group_t | group, |
const gaspi_rank_t | rank | ||
) |
Add a given rank to a group.
group | Group to add. |
rank | Rank to add to the group. |
gaspi_return_t gaspi_group_commit | ( | const gaspi_group_t | group, |
const gaspi_timeout_t | timeout_ms | ||
) |
Establish a group by committing it.
A group needs to be committed in order to use collective operations on such group.
group | Group to commit. |
timeout_ms | Timeout in milliseconds (or GASPI_BLOCK/GASPI_TEST). |
gaspi_return_t gaspi_group_create | ( | gaspi_group_t *const | group | ) |
Create a group.
In case of success, a empty group is created (without members).
group | The created group. |
gaspi_return_t gaspi_group_delete | ( | const gaspi_group_t | group | ) |
Delete a given group.
group | Group to delete. |
gaspi_return_t gaspi_group_max | ( | gaspi_number_t *const | group_max | ) |
Get the maximum number of groups allowed to be created.
group_max | Output parameter with the maximum number of groups. |
gaspi_return_t gaspi_group_num | ( | gaspi_number_t *const | group_num | ) |
Get the current number of created groups.
group_num | Output paramter with the number of groups. |
gaspi_return_t gaspi_group_ranks | ( | const gaspi_group_t | group, |
gaspi_rank_t *const | group_ranks | ||
) |
Get the list of ranks forming a given group.
group | The group we are interested in. |
group_ranks | Output parameter: an array with the ranks belonging to the given group. |
gaspi_return_t gaspi_group_size | ( | const gaspi_group_t | group, |
gaspi_number_t *const | group_size | ||
) |
Get the size of a given group.
It returns the number of processes (ranks) in the group.
group | The group from which we want to know the size. |
group_size | Output parameter with the group size. |
gaspi_return_t gaspi_machine_type | ( | char const | machine_type[16] | ) |
Get the machine type (CPU, accelerator...)
machine_type | Output parameter with machine type. |
gaspi_return_t gaspi_network_type | ( | gaspi_network_t *const | network_type | ) |
Get the network type.
network_type | Output parameter with the network type. |
gaspi_return_t gaspi_notification_num | ( | gaspi_number_t *const | notification_num | ) |
Get the number of available notifications.
notification_num | Output parameter with the number of available notifications. |
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 | ||
) |
Post a notification with a particular value to a given rank.
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). |
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 | ||
) |
Reset a given notification (and retrieve its value).
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). |
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 | ||
) |
Wait for some notification.
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). |
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 | ||
) |
Receive data of a given size from any rank.
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). |
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 | ||
) |
Send data of a given size to a given rank.
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). |
gaspi_return_t gaspi_passive_transfer_size_max | ( | gaspi_size_t *const | passive_transfer_size_max | ) |
Get the maximum allowed size (in bytes) allowed in passive communication.
passive_transfer_size_max | Output parameter with the maximum allowed size (in bytes) for passive communication. |
void gaspi_printf | ( | const char * | fmt, |
... | |||
) |
GASPI printf to print the gaspi_logger.
fmt | printf parameters. |
gaspi_return_t gaspi_proc_init | ( | const gaspi_timeout_t | timeout_ms | ) |
Initialization procedure to start GPI-2.
It is a non-local synchronous time-based blocking procedure.
timeout_ms | Timeout in milliseconds (or GASPI_BLOCK/GASPI_TEST). |
gaspi_return_t gaspi_proc_kill | ( | const gaspi_rank_t | rank, |
const gaspi_timeout_t | timeout_ms | ||
) |
Kill a given process (rank).
rank | Rank to kill. |
timeout_ms | Timeout in milliseconds (or GASPI_BLOCK/GASPI_TEST). |
gaspi_return_t gaspi_proc_num | ( | gaspi_rank_t *const | proc_num | ) |
Get the number of processes (ranks) started by the application.
proc_num | The number of processes (ranks) started by the application. |
gaspi_return_t gaspi_proc_rank | ( | gaspi_rank_t *const | rank | ) |
Get the process rank.
rank | Rank of calling process. |
gaspi_return_t gaspi_proc_term | ( | const gaspi_timeout_t | timeout_ms | ) |
Shutdown procedure.
It is a synchronous local time-based blocking operation that releases resources and performs the required clean-up.
timeout_ms | Timeout in milliseconds (or GASPI_BLOCK/GASPI_TEST). |
gaspi_return_t gaspi_queue_num | ( | gaspi_number_t *const | queue_num | ) |
Get the number of queue available for communication.
queue_num | Output parameter with the number of queues. |
gaspi_return_t gaspi_queue_size | ( | const gaspi_queue_id_t | queue, |
gaspi_number_t *const | queue_size | ||
) |
Get the current number of elements on a given queue.
queue | The queue to get the size. |
queue_size | Output parameter with the size/elements in the queue. |
gaspi_return_t gaspi_queue_size_max | ( | gaspi_number_t *const | queue_size_max | ) |
Get the maximum number of elements that can be posted to a queue (outstanding requests).
queue_size_max | Output parameter with the maximum number of requests that can be posted to a queue. |
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 | ||
) |
One-sided read.
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). |
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 | ||
) |
List of reads.
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). |
gaspi_return_t gaspi_rw_list_elem_max | ( | gaspi_number_t *const | elem_max | ) |
Get the maximum number of elements allowed in list (read, write) operations.
elem_max | Output parameter with the maximum number of elements. |
gaspi_return_t gaspi_segment_alloc | ( | const gaspi_segment_id_t | segment_id, |
const gaspi_size_t | size, | ||
const gaspi_alloc_t | alloc_policy | ||
) |
Allocate a segment.
segment_id | The segment identifier to be created. |
size | The size of the segment to be created. |
alloc_policy | The allocation policy. |
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 | ||
) |
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.
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. |
gaspi_return_t gaspi_segment_delete | ( | const gaspi_segment_id_t | segment_id | ) |
Delete a given segment.
segment_id | The segment identifier to be deleted. |
gaspi_return_t gaspi_segment_list | ( | const gaspi_number_t | num, |
gaspi_segment_id_t *const | segment_id_list | ||
) |
Get a list of locally allocated segments ID's.
num | The number of segments. |
segment_id_list | Output parameter with an array wit the id's of the allocated segments. |
gaspi_return_t gaspi_segment_max | ( | gaspi_number_t *const | segment_max | ) |
Get the maximum number of segments allowed to be allocated/created.
segment_max | Output paramter with the maximum number of segments. |
gaspi_return_t gaspi_segment_num | ( | gaspi_number_t *const | segment_num | ) |
Get the number of allocated segments.
segment_num | Output parameter with the number of allocated segments. |
gaspi_return_t gaspi_segment_ptr | ( | const gaspi_segment_id_t | segment_id, |
gaspi_pointer_t * | ptr | ||
) |
Get the pointer to the location of a given segment.
segment_id | The segment identifier. |
ptr | Output parameter with the pointer to the memory segment. |
gaspi_return_t gaspi_segment_register | ( | const gaspi_segment_id_t | segment_id, |
const gaspi_rank_t | rank, | ||
const gaspi_timeout_t | timeout_ms | ||
) |
Register a segment for communication.
In case of success, the segment can be used for communication between the involved ranks.
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). |
gaspi_return_t gaspi_segment_size | ( | const gaspi_segment_id_t | segment_id, |
const gaspi_rank_t | rank, | ||
gaspi_size_t *const | size | ||
) |
Get the size of a given segment.
segment_id | The segment id we are interested in. |
rank | The rank. |
size | Output parameter with the size of the segment. |
gaspi_return_t gaspi_set_socket_affinity | ( | const gaspi_uchar | socket | ) |
Set socket affinity.
gaspi_return_t gaspi_state_vec_get | ( | gaspi_state_vector_t | state_vector | ) |
Get the state vector.
state_vector | Vector with state of each rank. The vector must be allocated with enough place to hold the state of all ranks. |
gaspi_return_t gaspi_statistic_counter_get | ( | gaspi_statistic_counter_t | counter, |
gaspi_number_t | argument, | ||
gaspi_number_t * | value | ||
) |
Get statistical counter.
counter | the counter to be retrieved. |
argument | the argument for the counter. |
value | Output paramter with the current value of the counter. |
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 | ||
) |
Get information about a counter.
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. |
gaspi_return_t gaspi_statistic_counter_max | ( | gaspi_statistic_counter_t * | counter_max | ) |
Get the maximum number of statistics counters.
counter_max | Output parameter with the maximum number of counters. |
gaspi_return_t gaspi_statistic_counter_reset | ( | gaspi_statistic_counter_t | counter | ) |
Reset a counter (set to 0).
counter | The counter to reset. |
gaspi_return_t gaspi_statistic_verbosity_level | ( | gaspi_number_t | _verbosity_level | ) |
Set the verbosity level.
_verbosity_level | the level of desired verbosity |
gaspi_return_t gaspi_time_ticks | ( | gaspi_time_t *const | ticks | ) |
Get the number of cycles (ticks).
ticks | Output paramter with the ticks. |
gaspi_return_t gaspi_transfer_size_max | ( | gaspi_size_t *const | transfer_size_max | ) |
Get the maximum size (in bytes) that can be communicated in a single request (read, write, etc.).
transfer_size_max | Output parameter with the maximum transfer size. |
gaspi_return_t gaspi_transfer_size_min | ( | gaspi_size_t *const | transfer_size_min | ) |
Get the minimum size (in bytes) that can be communicated in a single request (write, read, etc.)
transfer_size_min | Output parameter with the minimum size that be transfered. |
gaspi_return_t gaspi_version | ( | float * | version | ) |
Get version number.
version | Output parameter with version number. |
gaspi_return_t gaspi_wait | ( | const gaspi_queue_id_t | queue, |
const gaspi_timeout_t | timeout_ms | ||
) |
Wait for requests posted to a given queue.
queue | Queue to wait for. |
timeout_ms | Timeout in milliseconds (or GASPI_BLOCK/GASPI_TEST). |
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 | ||
) |
One-sided write.
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). |
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 | ||
) |
List of writes.
num | The number of list elements. |
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). |
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 | ||
) |
Write to different locations and notify that particular rank.
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). |
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 | ||
) |
Write data to a given node and notify it.
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). |