Sun S3L 3.0 Programming and Reference Guide

Extracting Information About S3L Parallel Arrays

The functions described in this section allow users to retrieve information about parallel arrays for which an array handle exists.

S3L_describe

Description

S3L_describe prints information about a parallel array or a process grid to standard output. If an array handle is supplied in argument A, the parallel array is described. If a process grid is supplied in A, the associated process grid is described. The info_node argument specifies the MPI rank of the process on which the subgrid of interest is located.

If A is an S3L array handle, the following is provided:

Note: If the entire array fits on the process specified by info_node, all parts of the S3L_describe output apply to the full array. Otherwise, some parts of the output, such as subgrid size, will apply only to the portion of the array that is on process info_node.

If A is a process grid handle, S3L_describe provides only a description of the underlying grid of processes to which data is mapped.

To determine what value to enter for info_node, run MPI_Comm_rank on the process of interest.

Syntax

The C and Fortran syntax for S3L_describe are shown below.

C/C++ Syntax


Example 7-37

#include <s3l/s3l-c.h>
#include <s3l/s3l_errno-c.h>
int
S3L_describe(A, info_node)
    S3L_array_t        A
    int                info_node

F77/F90 Syntax


Example 7-38

include `s3l/s3l-f.h'
include `s3l/s3l_errno-f.h'
subroutine
S3L_zero_elements(A, ier)
    integer*8          A
    integer*4          info_node
    integer*4          ier

Input

S3L_describe accepts the following arguments as input:

Output

S3L_describe uses the following argument for output:

Error Handling

On success, S3L_describe returns S3L_SUCCESS.

S3L_describe performs generic checking of the validity of the arrays it accepts as arguments. If an array argument contains an invalid or corrupted value, the function terminates and an error code indicating which value of the array handle was invalid is returned. See Appendix A of this manual for a detailed list of these error codes.

In addition, the following condition will cause the function to terminate and return the associated error code.

Examples

../examples/s3l/utils/scalapack_conv.c
../examples/s3l/utils-f/scalapack_conv.f

Related Functions

MPI_Comm_rank(3)
S3L_declare(3)
S3L_declare_detailed(3)
S3L_set_process_grid(3)

S3L_get_attribute

Description

S3L_get_attribute returns a requested attribute of an S3L dense array or sparse matrix. The user specifies one of a set of predefined req_attr values and, on return, the integer value of the requested attribute is stored in attr. For attributes associated with array axes--such as the extents or blocksizes of an array--the user specifies the axis as well.

The req_attr entry must be one of the following:

For an S3L sparse matrix stored in the S3L_SPARSE_CSR format, S3L_RIDX_SGRID_ADDR returns in attr the starting address of an array containing the pointers to the beginning of each row of the local submatrix (per-process).

Note: Users must not change the data returned in attr. It is created for internal use only.

Note: User must not change the data returned in attr. It is created for internal use only.

For an S3L sparse matrix stored in the S3L_SPARSE_CSR format, S3L_RIDX_SGRID_SIZE returns in attr the size of an array containing the pointers to the beginning of each row of the local submatrix (per-process).

Syntax

The C and Fortran syntax for S3L_get_attribute are shown below.

C/C++ Syntax


Example 7-39

#include <s3l/s3l-c.h>
#include <s3l/s3l_errno-c.h>
int
S3L_S3L_get_attribute(a, req_attr, axis, attr)
    S3L_array_t           a
    int                   req_attr
    int                   axis
    void                  *attr

F77/F90 Syntax


Example 7-40

include `s3l/s3l-f.h'
include `s3l/s3l_errno-f.h'
subroutine
S3L_get_attribute(a, req_attr, axis, attr, ier)
    integer*8          a
    integer*4          req_attr
    integer*4          axis
    <type>             attr
    integer*4          ier

where <type> is either of integer*4 type or of pointer type. When attr is an address, it should be of type pointer. In all other cases, it should be of type integer*4.

Input

S3L_get_attribute accepts the following arguments as input:

Output

S3L_get_attribute uses the following argument for output:

Error Handling

On success, S3L_get_attribute returns S3L_SUCCESS.

S3L_get_attribute performs generic checking of the validity of the arrays it accepts as arguments. If an array argument contains an invalid or corrupted value, the function terminates and an error code indicating which value of the array handle was invalid is returned. See Appendix A of this manual for a detailed list of these error codes.

In addition, the following condition will cause the function to terminate and return the associated error code:

Examples

../examples/s3l/utils/get_attribute.c
../examples/s3l/utils-f/get_attribute.f

Related Functions

S3L_set_array_element(3)
S3L_set_array_element_on_proc(3)