S3L_copy_array copies the contents of array A into array B, which must have the same rank, extents and data type as A.
The C and Fortran syntax for S3L_copy_array are illustrated below.
#include <s3l/s3l-c.h> #include <s3l/s3l_errno-c.h> int S3L_write_array(a, filename, format) S3L_array_t A S3L_array_t B char *format |
include `s3l/s3l-f.h' include `s3l/s3l_errno-f.h' subroutine S3L_copy_array(A, B, ier) integer*8 A integer*8 B integer*4 ier |
A - S3L_array handle for the parallel array to be copied.
This function uses the following arguments for output:
B - S3L array handle for a parallel array of the same rank, extents, and data type as A. On successful completion, B contains a copy of the contents of A.
ier (Fortran only) - When called from a Fortran program, this function returns error status in ier.
On success, S3L_copy_array returns S3L_SUCCESS.
S3L_copy_array checks 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 conditions will cause the function to terminate and return the associated code:
S3L_ERR_MATCH_RANK - The ranks of A and B do not match.
S3L_ERR_MATCH_EXTENTS - The extents of A and B do not match.
S3L_ERR_MATCH_DTYPE - The data types of A and B do not match.
S3L_ERR_ARG_DTYPE - The data type of A and/or B is invalid.
../examples/s3l/utils/copy_array.c ../examples/s3l/utils-f/copy_array.f