HP MLIB User's Guide Vol. 2 7th Ed.
684 HP MLIB LAPACK User’s Guide
XERBLA Error handler
Name XERBLA
Error handler
Purpose This subprogram is the error handler for many LAPACK subprograms, as
indicated in the “Notes” section in the applicable subprogram descriptions. As
supplied in LAPACK, XERBLA writes the following error message onto the
standard error file:
*****************************************************************************
* XERBLA: subprogram name called with invalid value of argument number iarg *
*****************************************************************************
where name is the name of the subprogram in which the error was detected,
and iarg is the argument number of the offending argument. For example, in
SGBSV, n is argument number 1 and kl is argument number 2. If the main
program is in Fortran and is executed under SPP-UX, a call traceback is also
written onto the standard error file. XERBLA does not write a call traceback
when used on HP-UX systems. XERBLA then terminates execution with a
nonzero exit status.
You can supply a version of XERBLA that alters this action. All LAPACK
subprograms that call XERBLA have a RETURN statement after the CALL
XERBLA
statement, so if your version of XERBLA exits with a RETURN
statement, you could detect the error by examining the info flag after each
LAPACK subprogram call.
Other subprograms, such as the Level 2 and 3 BLAS, also call XERBLA. All
BLAS and VECLIB subprograms that call XERBLA also follow the CALL
XERBLA
statement with a RETURN statement. However, many of those
subprograms do not have a status response variable such as info in their
argument list to alert the caller. If you write an XERBLA that does not end
with a STOP statement, you need some other mechanism to detect errors
occurring in non-LAPACK subprograms. One such mechanism is a flag in a
common block that is set by your XERBLA and tested by the calling program
after calls where errors could be detected.
Usage LAPACK:
CHARACTER*6 name
INTEGER*4 iarg
CALL XERBLA(name, iarg)
LAPACK8:
CHARACTER*6 name
INTEGER*8 iarg
CALL XERBLA(name, iarg)