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.
The C and Fortran syntax for S3L_init are illustrated below.
#include <s3l/s3l-c.h> #include <s3l/s3l_errno-c.h> int S3L_init() |
include `s3l/s3l-f.h' include s3l/s3l_errno-f.h' subroutine S3L_init(ier) integer*4 ier |
S3L_init takes no input arguments.
When called from a Fortran program, S3L_init returns error status in ier.
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/s3l/utils/copy_array.c ../examples/s3l/utils/copy_array.f
S3L_exit(3)