LAPI_Address_init Subroutine

Purpose

Creates a remote address table.

Library

Availability Library (liblapi_r.a)

C Syntax

#include <lapi.h>
 
int LAPI_Address_init(hndl, my_addr, add_tab)
lapi_handle_t  hndl;
void          *my_addr;
void          *add_tab[ ];

FORTRAN Syntax

include 'lapif.h'
 
LAPI_ADDRESS_INIT(hndl, my_addr, add_tab, ierror)
INTEGER hndl
INTEGER (KIND=LAPI_ADDR_TYPE) :: my_addr
INTEGER (KIND=LAPI_ADDR_TYPE) :: add_tab(*)
INTEGER ierror

Description

Type of call: collective communication (blocking)

LAPI_Address_init exchanges virtual addresses among tasks of a parallel application. Use this subroutine to create tables of such items as header handlers, target counters, and data buffer addresses.

LAPI_Address_init is a collective call over the LAPI handle hndl, which fills the table add_tab with the virtual address entries that each task supplies. Collective calls must be made in the same order at all participating tasks.

The addresses that are stored in the table add_tab are passed in using the my_addr parameter. Upon completion of this call, add_tab[i] contains the virtual address entry that was provided by task i. The array is opaque to the user.

Parameters

INPUT
hndl
Specifies the LAPI handle.
my_addr
Specifies the entry supplied by each task. The value of this parameter can be NULL (in C) or LAPI_ADDR_NULL (in FORTRAN).
OUTPUT
add_tab
Specifies the address table containing the addresses that are to be supplied by all tasks. add_tab is an array of pointers, the size of which is greater than or equal to NUM_TASKS. The value of this parameter cannot be NULL (in C) or LAPI_ADDR_NULL (in FORTRAN).
ierror
Specifies a FORTRAN return code. This is always the last parameter.

C Examples

To collectively transfer target counter addresses for use in a communication API call, in which all nodes are either 32-bit or 64-bit:
lapi_handle_t  hndl;                /* the LAPI handle                    */
void          *addr_tbl[NUM_TASKS]; /* the table for all tasks' addresses */
lapi_cntr_t    tgt_cntr;            /* the target counter                 */
      
⋮
      
LAPI_Address_init(hndl, (void *)&tgt_cntr, addr_tbl);
      
/* for communication with task t, use addr_tbl[t] */ 
/* as the address of the target counter           */ 
      
⋮ 
For a combination of 32-bit and 64-bit nodes, use LAPI_Address_init64.

Return Values

LAPI_SUCCESS
Indicates that the function call completed successfully.
LAPI_ERR_COLLECTIVE_PSS
Indicates that a collective call was made while in persistent subsystem (PSS) mode.
LAPI_ERR_HNDL_INVALID
Indicates that the hndl passed in is not valid (not initialized or in terminated state).
LAPI_ERR_RET_PTR_NULL
Indicates that the value of the add_tab pointer is NULL (in C) or that the value of add_tab is LAPI_ADDR_NULL (in FORTRAN).

Location

/usr/lib/liblapi_r.a