LAPI_Fence Subroutine

Purpose

Enforces order on LAPI calls.

Library

Availability Library (liblapi_r.a)

C Syntax

#include <lapi.h>
 
int LAPI_Fence(hndl)
lapi_handle_t hndl;

FORTRAN Syntax

include 'lapif.h'
 
LAPI_FENCE(hndl, ierror)
INTEGER hndl
INTEGER ierror
 

Description

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.

Parameters

INPUT
hndl
Specifies the LAPI handle.
OUTPUT
ierror
Specifies a FORTRAN return code. This is always the last parameter.

Return Values

LAPI_SUCCESS
Indicates that the function call completed successfully.
LAPI_ERR_HNDL_INVALID
Indicates that the hndl passed in is not valid (not initialized or in terminated state).

C Examples

To establish a data barrier in a single task:
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.    */ 

Location

/usr/lib/liblapi_r.a