LCI

One of the completion mechanisms. More...

Collaboration diagram for LCI synchronizer:

Functions

LCI_API LCI_error_t LCI_sync_create (LCI_device_t device, int threshold, LCI_comp_t *completion)
 Create a synchronizer. More...
 
LCI_API LCI_error_t LCI_sync_free (LCI_comp_t *completion)
 Free a synchronizer. More...
 
LCI_API LCI_error_t LCI_sync_signal (LCI_comp_t completion, LCI_request_t request)
 Signal a synchronizer once. A synchronizer needs to be signaled threshold time to be considered triggered. More...
 
LCI_API LCI_error_t LCI_sync_wait (LCI_comp_t completion, LCI_request_t request[])
 Wait for a synchronizer to be triggered. A synchronizer will be triggered if all the associated operations are completed. More...
 
LCI_API LCI_error_t LCI_sync_test (LCI_comp_t completion, LCI_request_t request[])
 Test whether a synchronizer has been triggered. A synchronizer will be triggered if all the associated operations are completed. More...
 

Variables

int LCI_MAX_SYNC_LENGTH
 Maximum number of request a synchronizer may be waiting for. More...
 

Detailed Description

One of the completion mechanisms.

In its simplest form, it is an object similar to MPI_Request. Every synchronizer can be associated with one or more asynchronous operations. The synchronizer will be triggered after all the associated operations are completed. Users can know whether the corresponding operations have been completed by querying the synchronizer.

It can also be scheduler-aware when executing in the context of a task-based runtime (This is still an ongoing work).

Function Documentation

◆ LCI_sync_create()

LCI_API LCI_error_t LCI_sync_create ( LCI_device_t  device,
int  threshold,
LCI_comp_t completion 
)

Create a synchronizer.

Parameters
[in]deviceThe device it should be associated to.
[in]thresholdHow many asynchronous operations it will be associated to.
[out]completionThe pointer to the synchronizer to create.
Returns
Should always be LCI_OK. All the other errors are fatal as defined by LCI_error_t.

◆ LCI_sync_free()

LCI_API LCI_error_t LCI_sync_free ( LCI_comp_t completion)

Free a synchronizer.

Parameters
[in,out]completionThe pointer to the synchronizer to free.
Returns
Should always be LCI_OK. All the other errors are fatal as defined by LCI_error_t.

◆ LCI_sync_signal()

LCI_API LCI_error_t LCI_sync_signal ( LCI_comp_t  completion,
LCI_request_t  request 
)

Signal a synchronizer once. A synchronizer needs to be signaled threshold time to be considered triggered.

Parameters
[in]completionThe synchronizer to be triggered.
[in]requestA request containing the completion information of one completed operation.
Returns
Should always be LCI_OK. All the other errors are fatal as defined by LCI_error_t.

◆ LCI_sync_test()

LCI_API LCI_error_t LCI_sync_test ( LCI_comp_t  completion,
LCI_request_t  request[] 
)

Test whether a synchronizer has been triggered. A synchronizer will be triggered if all the associated operations are completed.

Parameters
[in]completionThe synchronizer to be tested.
[out]requestAn array of length threshold passed to LCI_sync_create. Every entry of the array will contain the completion information of one completed operation.
Returns
LCI_OK if successfully popped one. LCI_ERR_RETRY if there is no entry to be popped in the queue. All the other errors are fatal as defined by LCI_error_t.

◆ LCI_sync_wait()

LCI_API LCI_error_t LCI_sync_wait ( LCI_comp_t  completion,
LCI_request_t  request[] 
)

Wait for a synchronizer to be triggered. A synchronizer will be triggered if all the associated operations are completed.

Parameters
[in]completionThe synchronizer to be waited.
[out]requestAn array of length threshold passed to LCI_sync_create. Every entry of the array will contain the completion information of one completed operation.
Returns
Should always be LCI_OK. All the other errors are fatal as defined by LCI_error_t.

Variable Documentation

◆ LCI_MAX_SYNC_LENGTH

int LCI_MAX_SYNC_LENGTH

Maximum number of request a synchronizer may be waiting for.

Note
Unlimited for now.