Next: Computational Failures and INFO Up: Failures Detected by LAPACK Previous: Failures Detected by LAPACK Contents Index

##
Invalid Arguments and XERBLA

If an illegal value is supplied for one of the input arguments to an LAPACK routine, it will call the error handler XERBLA to write a message to the standard output unit of the form:

     ** On entry to SGESV  parameter number  4 had an illegal value

This particular message would be caused by passing to SGESV a value of LDA which was less than the value of the argument N. The documentation for SGESV in Part 2 states the set of acceptable input values: ``LDA max(1,N).'' This is required in order that the array A with leading dimension LDA can store an n-by-n matrix.7.1The arguments are checked in order, beginning with the first. In the above example, it may -- from the user's point of view -- be the value of N which is in fact wrong. Invalid arguments are often caused by the kind of error listed in Section 7.2.

In the model implementation of XERBLA which is supplied with LAPACK, execution stops after the message; but the call to XERBLA is followed by a RETURN statement in the LAPACK routine, so that if the installer removes the STOP statement in XERBLA, the result will be an immediate exit from the LAPACK routine with a negative value of INFO. It is good practice always to check for a non-zero value of INFO on return from an LAPACK routine. (We recommend however that XERBLA should not be modified to return control to the calling routine, unless absolutely necessary, since this would remove one of the built-in safety-features of LAPACK.)

Next: Computational Failures and INFO Up: Failures Detected by LAPACK Previous: Failures Detected by LAPACK Contents Index