LAPI_Addr_set 子例程

用途

注册函数的地址。

可用性库 (liblapi_r.a)

C 语法

#include <lapi.h>
 
int LAPI_Addr_set(hndl, addr, addr_hndl)
lapi_handle_t  hndl;
void          *addr;
int            addr_hndl;

FORTRAN 语法

include 'lapif.h'
 
LAPI_ADDR_SET(hndl, addr, addr_hndl, ierror)
INTEGER hndl
INTEGER (KIND=LAPI_ADDR_TYPE) :: addr
INTEGER addr_hndl
INTEGER ierror

描述

Type of call: 本地地址操作

使用此子例程来注册函数 (addr) 的地址。 LAPI 在内部表中维护函数地址。 函数地址在位置 addr_hndl上建立索引。 在后续 LAPI 调用中,可以使用 addr_hndl 来代替 addr。 The value of 地址 (addr_hndl) must be in the range 1 <= 地址 (addr_hndl) < LOC_ADDRTBL_SZ.

对于活动消息通信,可以使用 addr_hndl 来代替相应的头处理程序地址。 LAPI 仅支持对远程头处理程序地址 (但不支持其他远程地址,例如目标计数器或基本数据地址) 进行此已建立索引的替换。 对于这些其他类型的地址,必须将实际地址值传递到 API 调用。

参数

INPUT
hndl
指定 LAPI 句柄。
地址
指定用户要向 LAPI 注册的函数处理程序的地址。
addr_hndl
指定可以传递到 LAPI 调用以代替头处理程序地址的用户函数地址。 The value of this parameter must be in the range 1 <= 地址 (addr_hndl) < LOC_ADDRTBL_SZ.
输出
ierror
指定 FORTRAN 返回码。 这始终是最后一个参数。

C 示例

要注册头处理程序地址:

lapi_handle_t  hndl;      /* the LAPI handle                   */
void          *addr;      /* the remote header handler address */
int            addr_hndl; /* the index to associate            */
      
⋮      

addr = my_func;      
addr_hndl = 1;
LAPI_Addr_set(hndl, addr, addr_hndl);
      
/* addr_hndl can now be used in place of addr in LAPI_Amsend, */ 
/* LAPI_Amsendv, and LAPI_Xfer calls                          */ 

⋮

返回值

成功 (LAPI_SUCCESS)
指示函数调用已成功完成。
LAPI_ERR_ADDR_HNDL_RANGE
Indicates that the value of 地址 (addr_hndl) is not in the range 1 <= 地址 (addr_hndl) < LOC_ADDRTBL_SZ.
LAPI_ERR_HNDL_INVALID
指示传入的 hndl 无效 (未初始化或处于终止状态)。

位置

/usr/lib/liblapi_r.a