LAPI_Nopoll_wait Subroutine

Purpose

Waits for a counter update without polling.

Library

Availability Library (liblapi_r.a)

C Syntax

#include <lapi.h>
 
void LAPI_Nopoll_wait(hndl, cntr_ptr, val, cur_cntr_val)
lapi_handle_t  hndl;
lapi_cntr_t   *cntr_ptr;
int            val;
int           *cur_cntr_val;
 

FORTRAN Syntax

include 'lapif.h'
 
int LAPI_NOPOLL_WAIT(hndl, cntr, val, cur_cntr_val, ierror)
INTEGER hndl
TYPE (LAPI_CNTR_T) :: cntr
INTEGER val
INTEGER cur_cntr_val
INTEGER ierror

Description

Type of call: recovery (blocking)

This subroutine waits for a counter update without polling (that is, without explicitly invoking LAPI's internal communication dispatcher). This call may or may not check for message arrivals over the LAPI context hndl. The cur_cntr_val variable is set to the current counter value. Although it has higher latency than LAPI_Waitcntr, LAPI_Nopoll_wait frees up the processor for other uses.

Note: To use this subroutine, the lib_vers field in the lapi_info_t structure must be set to L2_LIB or LAST_LIB.

Parameters

INPUT
hndl
Specifies the LAPI handle.
val
Specifies the relative counter value (starting from 1) that the counter needs to reach before returning.
cur_cntr_val
Specifies the integer value of the current counter. The value of The value of this parameter can be NULL (in C) or LAPI_ADDR_NULL (in FORTRAN).
INPUT/OUTPUT
cntr_ptr
Points to the lapi_cntr_t structure in C.
cntr
Is the lapi_cntr_t structure in FORTRAN.
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_CNTR_NULL
Indicates that the cntr_ptr pointer is NULL (in C) or that the value of cntr is LAPI_ADDR_NULL (in FORTRAN).
LAPI_ERR_CNTR_VAL
Indicates that the val passed in is less than or equal to 0.
LAPI_ERR_HNDL_INVALID
Indicates that the hndl passed in is not valid (not initialized or in terminated state).
LAPI_ERR_MULTIPLE_WAITERS
Indicates that more than one thread is waiting for the counter.
LAPI_ERR_TGT_PURGED
Indicates that the subroutine returned early because LAPI_Purge_totask() was called.

Restrictions

Use of this subroutine is not recommended on a system that is running Parallel Environment (PE).

Location

/usr/lib/liblapi_r.a