S3L_print_array causes the process with MPI rank 0 to print the parallel array represented by the array handle a to standard output.
S3L_print_sub_array prints a specific section of the parallel array. This array section is defined by the lbounds, ubounds, and strides arguments. lbounds and ubounds specify the array section's lower and upper index bounds. strides specifies the stride to be used along each axis; it must be greater than zero.
The values of lbounds and ubounds should refer to zero-based indexed arrays for the C interface and to one-based indexed arrays for the Fortran interface.
The C and Fortran syntax for S3L_print_array and S3L_print_sub_array are shown below.
#include <s3l/s3l-c.h> #include <s3l/s3l_errno-c.h> int S3L_print_array(a) S3L_print_sub_array(a, lbounds, ubounds, strides) S3L_array_t a int *lbounds int *ubounds int *strides |
include `s3l/s3l-f.h' include `s3l/s3l_errno-f.h' subroutine S3L_print_array(a, ier) S3L_print_sub_array(a, lbounds, ubounds, strides, ier) integer*8 a integer*4 lbounds(*) integer*4 ubounds(*) integer*4 strides(*) integer*4 ier |
S3L_print_array and S3L_print_sub_array accept the following arguments as input:
a - S3L array handle for the parallel array to be printed. This array handle was returned when the array was declared.
lbounds - Integer vector specifying the lower bounds of the indices of a along each of its axes.
ubounds - Integer vector specifying the upper bounds of the indices of a along each of its axes.
strides - Integer vector specifying the strides on the indices of a along each of its axes.
S3L_print_array and S3L_print_sub_array use the following argument for output:
ier (Fortran only) - When called from a Fortran program, S3L_print_array and S3L_print_sub_array return error status in ier.
On success, S3L_print_array and S3L_print_sub_array return S3L_SUCCESS.
S3L_print_array and S3L_print_sub_array perform generic checking of the validity of the arrays they accept 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:
S3L_ERR_ARG_RANGE_INV - The given range of indices is invalid:
A lower bound is less that the the smallest index of the array.
An upper bound is greater than the largest index of an array along the given axis.
A lower bound is larger than the corresponding upper bound.
A stride is negative or zero.
../examples/s3l/io/ex_print1.c ../examples/s3l/io/ex_io.c ../examples/s3l/io-f/ex_io.f
S3L_read_array(3) S3L_write_array(3)