If a PBLAS routine is called with an invalid value for
any of its arguments, it must report the fact
and terminate the execution of the program. In the
model implementation, each routine, on detecting an
error, calls a common error-handling PBLAS routine ,
passing to it the current BLACS
context, the name of the routine and the number of
the first argument that is in error. If an error is
detected in the entry of a descriptor array,
which is the
argument in the parameter list, the
number passed to the PBLAS error-handler routine has been arbitrarily
chosen to be
. This allows the user to
distinguish an error on a descriptor entry from an
error on a scalar argument. For efficiency purposes,
the PBLAS routines performs only a local validity
check of their argument list. If an error is detected
in at least one process of the current context, the
program execution is stopped.
A global validity check of the input arguments passed to a PBLAS routine must be performed in the higher-level calling procedure. To understand the need and cost of global checking, as well as the reason why this type of checking is not performed in the PBLAS, consider the following example. The value of a global input argument is legal but differs from one process to another. The results are unpredictable. In order to detect this kind of error situation, a synchronization point would be necessary, which may result in a significant performance degradation. Since every process must call the same routine to perform the desired operation successfully, it is natural and safe to restrict somewhat the amount of checking operations performed in the PBLAS routines.
Specialized implementations may call system-specific exception-handling facilities, either via an auxiliary routine for error handling or directly from the routine. In addition, the testing programs can take advantage of this exception handling mechanism by simulating specific erroneous input argument lists and then verifying that particular errors are correctly detected.
For complete details on the specification of all routines, please refer to [26]. Appendix D.2 contains the Quick Reference Guide to the PBLAS. An html version of this Quick Reference Guide, along with the leading comments from each of the routines, is available on the ScaLAPACK homepage.