API and Semantics for RMA Operations with Requests

In this section, first, we introduce the interfaces required for non-blocking RMA operations with requests. We then look at two possible ways to merge the requests. One way is to create a single merged request handle (which is a collection of requests), and the other approach is to merge existing requests into a single request.

Explicit Non-blocking RMA Operations

The interfaces for the Put operations are in Box 1, and the Get operations are in Box 2. They are used for transferring data from the origin PE to the target PE (pe) and form the destination PE to the origin PE respectively. The source of the data is passed as the source and the target buffer is passed as the target. The handle to track the Put operation is created by the library and returned with handle.

shmem_TYPE_put_nbe (TYPE *target, const TYPE *source, size_t nelems, int pe, shmem_request_handle_t **handle);

shmem_putSIZE_nbe (TYPE *target, const TYPE *source, size_t nelems, int pe, shmem_request_handle_t **handle);

Box 1. Put operations with requests

These operations return after initiating the Put (or Get) operation, but not necessarily before copying data out of the source variable/array. These semantics are similar to implicit RMA operations introduced in OpenSHMEM 1.3 [1].

shmem_TYPE_get_nbe (TYPE *target, const TYPE *source, size_t nelems, int pe, shmem_request_handle_t **handle);

shmem_getSIZE_nbe (TYPE *target, const TYPE *source, size_t nelems, int pe, shmem_request_handle_t **handle);

Box 2. Get operations with requests

However, the difference is in the completion of operations. The RMA operations with requests are required to call the Wait (Box 3) function to guarantee completion, or they can use the Test (Box 3) function to query the status of the operations.

void shmem_wait_req( shmem_request_handle_t *handle); void shmem_test_req( shmem_request_handle_t *handle);

Box 3. Wait and Test operations for completing and testing the status of requests, respectively.

 
Source
< Prev   CONTENTS   Source   Next >