Keywords: slug

Next: System Error Messages Up: Error Handling in the Previous: Error Handling in the

## BLACS Warning and Error Messages

All BLACS warning messages are printed by the internal routine `BlacsWarn`, and all BLACS error messages are printed by the internal routine `BlacsErr`. The only real difference between `BlacsWarn` and `BlacsErr` is that `BlacsErr` calls BLACS_ABORT after the message is printed.

With these central routines handling BLACS error messages, it should be relatively easy for the programmer to modify error handling if the default routines are not adequate for his needs. One particularly annoying problem is that on many systems a print to the screen takes a long time to finish. `BlacsErr` may then kill the machine before the print reaches the screen, and the error message is lost. In this case, the user may wish to make `BlacsErr` wait before killing, or not kill at all, for instance.

BLACS warning messages have the following form:

    BLACS WARNING '<explanation string>'
    from {<p>,<q>}, pnum=<pnum>, Contxt=<ictxt>, on line <#> of file '<fname>'.

BLACS error messages have the following form:

    BLACS ERROR '<explanation string>'
    from {<p>,<q>}, pnum=<pnum>, Contxt=<ictxt>, on line <#> of file '<fname>'.

The meaning of these parameters are as follows:

- `explanation string` The message that should help the user determine what is wrong. For example, on an incorrect call to BLACS_GRIDINIT, the user might get:
  `Process 0 had 2 x 4 grid; correct is 1 x 4`.
- `{p, q}`: The row and column process grid coordinates of the process issuing the warning/error.
- `pnum`: The process number returned in the first argument of BLACS_PINFO.
- `ictxt`: The integer context handle. Please note that this value is not the same across all processes. For instance, process {0, 0} may have `ictxt` = 0 and process {0, 1} have `ictxt` = 1 for the same context. However, the `pnum` and `ictxt` together provide an unambiguous process/context identifier.
- `#`: The line number within the file `fname` that issued the warning.
- `fname`: The file name where the routine that issued the warning/error is located.

Not all of this information may be available at the time an error or warning is issued. For instance, if the error occurs before the creation of the grid, the process grid coordinates will be unavailable. For any value that the BLACS cannot figure out, a -1 is printed to indicate that the value is unknown.

Examples of these BLACS error messages can be found on the BLACS homepage
(`http://www.netlib.org/blacs/index.html`) or in ``A User's Guide to the BLACS'' [54].

Next: System Error Messages Up: Error Handling in the Previous: Error Handling in the