LAPI_Senv Subroutine
Purpose
Used to set a runtime variable.
Library
Availability Library (liblapi_r.a)
C Syntax
#include <lapif.h>
int LAPI_Senv(hndl, query, set_val)
lapi_handle_t hndl;
lapi_query_t query;
int set_val;
FORTRAN Syntax
include 'lapif.h'
LAPI_SENV(hndl, query, set_val, ierror)
INTEGER hndl
INTEGER query
INTEGER set_val
INTEGER ierror
Description
Type of call: local queries
Use this subroutine to set runtime attributes for a specific LAPI instance. In C, the lapi_query_t enumeration defines the attributes that can be set at runtime. These attributes are defined explicitly in FORTRAN. See LAPI_Qenv for more information.
You can use LAPI_Senv to set these runtime attributes: ACK_THRESHOLD, ERROR_CHK, INTERRUPT_SET, and TIMEOUT.
Parameters
- INPUT
- hndl
- Specifies the LAPI handle.
- query
- Specifies the type of query that you want to set. In C, the values for query are defined by the lapi_query_t enumeration in lapi.h. In FORTRAN, these values are defined explicitly in the 32-bit version and the 64-bit version of lapif.h.
- set_val
- Specifies the integer value of the query that you want to set.
- OUTPUT
- ierror
- Specifies a FORTRAN return code. This is always the last parameter.
Restrictions
LAPI statistics are not reported for shared memory communication and data transfer, or for messages that a task sends to itself.
C Examples
The following
values can be set using LAPI_Senv:
ACK_THRESHOLD:
int value;
LAPI_Senv(hndl, ACK_THRESHOLD, value);
/* LAPI sends packet acknowledgements (acks) in groups, waiting until */
/* ACK_THRESHOLD packets have arrived before returning a group of acks */
/* The valid range for ACK_THRESHOLD is (1 <= value <= 30) */
/* The default is 30. */
ERROR_CHK:
boolean toggle;
LAPI_Senv(hndl, ERROR_CHK, toggle);
/* Indicates whether LAPI should perform error checking. If set, LAPI */
/* calls will perform bounds-checking on parameters. Error checking */
/* is disabled by default. */
INTERRUPT_SET:
boolean toggle;
LAPI_Senv(hndl, INTERRUPT_SET, toggle);
/* Determines whether LAPI will respond to interrupts. If interrupts */
/* are disabled, LAPI will poll for message completion. */
/* toggle==True will enable interrupts, False will disable. */
/* Interrupts are enabled by default. */
TIMEOUT:
int value;
LAPI_Senv(hndl, TIMEOUT, value);
/* LAPI will time out on a communication if no response is received */
/* within timeout seconds. Valid range is (10 <= timeout <= 86400). */
/* 86400 seconds = 24 hours. Default value is 900 (15 minutes). */
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).
- LAPI_ERR_QUERY_TYPE
- Indicates the query passed in is not valid.
- LAPI_ERR_SET_VAL
- Indicates the set_val pointer is not in valid range.
Location
- /usr/lib/liblapi_r.a