HP MLIB User's Guide Vol. 2 7th Ed.
Chapter 8 Introduction to LAPACK 649
Error handling
The performance of these subprograms can be improved, often dramatically, by
providing at least the optimum amount of work space. This amount can be a
complicated function of the problem size and job arguments, so you should
make lwork large enough or compare it to the value returned in work(1).
Error handling
Most documented subprograms have a diagnostic argument info, which reports
the success or failure of the computation as follows:
info = 0 Successful exit
info < 0 Invalid value of an argument—computation not
completed
info > 0 Failure during the computation
All LAPACK driver and computational subprograms, and some auxiliary
subprograms, check that input arguments such as n and lda, and option
arguments such as trans and uplo, have valid numeric and character values
respectively. If the k-th argument is invalid, the subprogram sets
info = −k and calls the error handling subprogram XERBLA.
The standard version of XERBLA writes an error message onto the standard
error file, and terminates execution with a nonzero exit status. Thus, using the
standard version of XERBLA, no LAPACK subprogram would ever return to
the calling program with info < 0. You may supply a version of XERBLA that
alters this action.
The description of each high-level subprogram defines the specific error code
numbers and the related error conditions when info ≠ 0. Always check the
output argument info after calling an LAPACK subprogram that has info as an
argument, and take appropriate action if the output argument suggests a
problem.
Refer to “XERBLA” on page 684 for details about the error handling
subprogram.