[petsc-dev] error messages

Patrick Sanan patrick.sanan at gmail.com
Sat Feb 22 21:27:18 CST 2014


Some assorted ideas:

1) Taking the error message pasted below as an example, there are
[A] items that everyone will/should usually look at (the text of the error message and the stack trace / source location),
[B] things that the support team want less experienced users to see (notes about where to look for help), and 
[C] things which the user will want some of the time and that the support team will always need (the configuration and version). 

These three categories are somewhat mixed up, which might increase the perceived blobosity. If it's possible given uncertainty about output order, one might consolidate the items mentioned and arrange them BCA, in reverse order of how likely the information is to change between error messages, so as to minimize upward eyeball-scanning time and make it more likely that the user will quickly notice when the problem is correctly diagnosed by the error-handling system.

2) It'd perhaps be worth it to reduce B to list a single reference (e.g. docs/troubleshooting.html) which provides hints for dealing with error messages, or otherwise shave off some extra characters to increase information density. (And it seems like there's work being done to see if the MPI_abort messages can be silenced when they aren't needed)

3) The current format makes it tempting to excerpt from the top of the error message under the false assumption that the rest isn't relevant, so some formatting could be done to try and make the error message more monolothic (putting the error text near the end rather than the beginning might help by itself). 

With those suggestions this:

[0]PETSC ERROR: --------------------- Error Message ------------------------------------
[0]PETSC ERROR: Object is in wrong state!
[0]PETSC ERROR: Vec object's type is not set: Argument # 1!
[0]PETSC ERROR: ------------------------------------------------------------------------
[0]PETSC ERROR: Petsc Release Version 3.4.2, Jul, 02, 2013 
[0]PETSC ERROR: See docs/changes/index.html for recent updates.
[0]PETSC ERROR: See docs/faq.html for hints about trouble shooting.
[0]PETSC ERROR: See docs/index.html for manual pages.
[0]PETSC ERROR: ------------------------------------------------------------------------
[0]PETSC ERROR: ./ex1 on a arch-darwin-c-debug named Patricks-MacBook-Pro.local by patricksanan Thu Feb 13 09:48:59 2014
[0]PETSC ERROR: Libraries linked from /Users/patricksanan/program/petsc-3.4.2/arch-darwin-c-debug/lib
[0]PETSC ERROR: Configure run at Mon Jul 15 11:19:14 2013
[0]PETSC ERROR: Configure options --download-mpich --download-f-blas-laplack --cc-gcc --with-fc=/usr/local/bin/gfortran
[0]PETSC ERROR: ------------------------------------------------------------------------
[0]PETSC ERROR: VecDuplicate() line 513 in /Users/patricksanan/program/petsc-3.4.2/src/vec/vec/interface/vector.c
[0]PETSC ERROR: main() line 56 in src/ksp/ksp/examples/tutorials/ex1.c
application called MPI_Abort(MPI_COMM_WORLD, 73) - process 0
[unset]: aborting job:
application called MPI_Abort(MPI_COMM_WORLD, 73) - process 0

could (without MPI_abort messages) look more like this:

[0]PETSC ERR: --------------------------------- PETSc Error -------------------------- 
[0]PETSC ERR: See docs/troubleshooting.html for hints about trouble shooting.
[0]PETSC ERR: ------------------------------------------------------------------------
[0]PETSC ERR: Petsc Release Version 3.4.2, Jul, 02, 2013 
[0]PETSC ERR: ./ex1 on a arch-darwin-c-debug named Patricks-MacBook-Pro.local by patricksanan Thu Feb 13 09:48:59 2014
[0]PETSC ERR: Libraries linked from /Users/patricksanan/program/petsc-3.4.2/arch-darwin-c-debug/lib
[0]PETSC ERR: Configure run at Mon Jul 15 11:19:14 2013 
[0]PETSC ERR: Configure options --download-mpich --download-f-blas-laplack --cc-gcc --with-fc=/usr/local/bin/gfortran
[0]PETSC ERR: ------------------------------------------------------------------------
[0]PETSC ERR: Object is in wrong state!
[0]PETSC ERR: Vec object's type is not set: Argument # 1!
[0]PETSC ERR: VecDuplicate() line 513 in /Users/patricksanan/program/petsc-3.4.2/src/vec/vec/interface/vector.c
[0]PETSC ERR: main() line 56 in src/ksp/ksp/examples/tutorials/ex1.c
[0]PETSC ERR: ----------------------- End of PETSc Error -----------------------------

On Feb 17, 2014, at 7:18 AM, Jed Brown wrote:

> Barry Smith <bsmith at mcs.anl.gov> writes:
> 
>> On Feb 17, 2014, at 7:30 AM, Matthew Knepley <knepley at gmail.com> wrote:
>> 
>>> On Thu, Feb 13, 2014 at 7:46 AM, Barry Smith <bsmith at mcs.anl.gov> wrote:
>>> 
>>>   90 plus percent of PETSc users must view error messages as a “useless blob of gunk that merely tells you an error has occurred”.  How can we get them to understand that they contain useful information? Better formatting? Color?
>>> 
>>> There is a lot of ASCII noise around the message. Maybe we repeat the main error message above with
>>> nothing around it, and tell them to look below for more info?
>> 
>>    It is tricky to print the right information in the right place (like the stack). I like color but Jed and Satish frown on it.
> 
> We have to test whether we're sending output to a TTY, otherwise it's
> just weird control characters.  When a parallel job crashes and we hit a
> non-collective error condition, the control characters will be all
> jumbled up producing something even more confusing than we have now.
> 
> We could make an FAQ explaining why the whole thing is important, and
> one-line-reply with it every time someone truncates or paraphrases an
> error message.  Maybe make an auto-responder bot that bounces emails
> that have snipped error messages.. ;-)




More information about the petsc-dev mailing list