Sun S3L 3.0 Programming and Reference Guide

Setting Up a Sun S3L Environment

S3L_init

Description

Before an application can start using Sun S3L functions, every process involved in the application must call S3L_init to initialize the S3L environment. S3L_init initializes the BLACS environment as well.

S3L_init also initializes the Sun MPI layer if the user has not done so. If S3L_init calls MPI_Init internally, subsequent use of S3L_exit will also result in an internal call to MPI_Finalize.

S3L_init tests the MPI library to verify that it is Sun MPI. If not, it returns an error message and terminates.

If the MPI layer is Sun MPI, S3L_init proceeds to initialize the S3L environment, the BLACS environment, and if not already initialized, the Sun MPI environment. It also enables the Prism library to access Sun S3L operations.

Syntax

The C and Fortran syntax for S3L_init are illustrated below.

C/C++ Syntax


Example 7-1

#include <s3l/s3l-c.h>
#include <s3l/s3l_errno-c.h>
int
S3L_init()

F77/F90 Syntax


Example 7-2

include `s3l/s3l-f.h'
include s3l/s3l_errno-f.h'
subroutine
S3L_init(ier)
    integer*4          ier

Input

S3L_init takes no input arguments.

Output

When called from a Fortran program, S3L_init returns error status in ier.

Error Handling

On successful completion, S3L_init returns S3L_SUCCESS.

S3L_init tests to see if the MPI library is Sun MPI. If not, it returns the following error message and terminates.

S3L error: invalid
MPI. Please use Sun HPC MPI.

Examples

../examples/s3l/utils/copy_array.c 
../examples/s3l/utils/copy_array.f

Related Functions

S3L_exit(3)