Enforces order on LAPI calls.
Availability Library (liblapi_r.a)
#include <lapi.h>
int LAPI_Fence(hndl)
lapi_handle_t hndl;
include 'lapif.h'
LAPI_FENCE(hndl, ierror)
INTEGER hndl
INTEGER ierror
Type of call: Local data synchronization (blocking) (may require progress on the remote task)
Use this subroutine to enforce order on LAPI calls. If a task calls LAPI_Fence, all the LAPI operations that were initiated by that task, before the fence using the LAPI context hndl, are guaranteed to complete at the target tasks. This occurs before any of its communication operations using hndl, initiated after the LAPI_Fence, start transmission of data. This is a data fence which means that the data movement is complete. This is not an operation fence which would need to include active message completion handlers completing on the target.
LAPI_Fence may require internal protocol processing on the remote side to complete the fence request.
lapi_handle_t hndl; /* the LAPI handle */
⋮
/* API communication call 1 */
/* API communication call 2 */
⋮
/* API communication call n */
LAPI_Fence(hndl);
/* all data movement from above communication calls has completed by this point */
/* any completion handlers from active message calls could still be running. */