On success, S3L_gen_iter_solve returns S3L_SUCCESS.
S3L_gen_iter_solve performs generic checking 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.
On error, it returns one of the following codes, which are organized by error type.
S3L_ERR_ARG_NULL - Invalid array x or b or sparse matrix A. They all must be preallocated S3L arrays or sparse matrix.
S3L_ERR_ARRNOTSQ - Invalid matrix size. Matrix A must be square.
S3L_ERR_ARG_RANK - Invalid rank for arrays x and b. Both must be rank 1 arrays.
S3L_ERR_MATCH_DTYPE - x, b, and A do not have the same data type.
S3L_ERR_MATCH_EXTENTS - The lengths of x and b do not match the size of sparse matrix A. Both must be equal to the order of A.
S3L_ERR_PARAM_INVALID - Invalid input for iparm or rparm. Both must be preallocated and initialized with the predefined values described in the Description section or set to 0 for the default value.
S3L_ERR_ILU_ZRPVT - Encountered a zero pivot in the course of ILU preconditioning.
S3L_ERR_JACOBI_ZRDIAG - Encountered a zero diagonal in the course of Jacobi preconditioning.
S3L_ERR_DIVERGE - Computation has diverged.
S3L_ERR_ITER_BRKDWN - A breakdown has occurred.
S3L_ERR_MAXITER - The number of iterations has exceeded the value supplied in iparm[S3L_iter_maxiter].