On success, S3L_read_sparse returns S3L_SUCCESS.
The S3L_read_sparse routine 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 conditions will cause this function to terminate and return the associated error code:
S3L_ERR_ARG_EXTENTS - Invalid m, n, or nnz. These arguments must all be > 0.
S3L_ERR_SPARSE_FORMAT - Invalid storage format. It must be either S3L_SPARSE_COO or S3L_SPARSE_CRS.
S3L_ERR_ARG_DTYPE - Invalid data type. It must be S3L_float, S3L_double, S3L_complex, or S3L_dcomplex.
S3L_ERR_IO_FILENAME - Invalid file name.
S3L_ERR_IO_FORMAT - Invalid data file format. The error could be either of the following:
The dfmt value supplied was not 'ascii'.
An unsupported MatrixMarket format was supplied. When a MatrixMarket file is used, the first line of its comment section must contain either the words 'real general' or 'complex general'.
S3L_ERR_FILE_OPEN - Failed to open the data file; the file either does not exist or the name is specified incorrectly.
S3L_ERR_EOF - The input data ends before expected.