petsc-3.7.1 2016-05-15
Report Typos and Errors

PetscAbortErrorHandler

Error handler that calls abort on error. This routine is very useful when running in the debugger, because the user can look directly at the stack frames and the variables.

Synopsis

#include "petscsys.h" 
PetscErrorCode  PetscAbortErrorHandler(MPI_Comm comm,int line,const char *fun,const char *file,PetscErrorCode n,PetscErrorType p,const char *mess,void *ctx)
Not Collective Many br

Input Parameters

comm - communicator over which error occurred Many br
line - the line number of the error (indicated by __LINE__) Many br
func - function where error occured (indicated by __FUNCT__) Many br
file - the file in which the error was detected (indicated by __FILE__) Many br
mess - an error text string, usually just printed to the screen Many br
n - the generic error number Many br
p - specific error number Many br
ctx - error handler context Many br

Options Database Keys

-on_error_abort - Activates aborting when an error is encountered Many br
-start_in_debugger [noxterm,dbx,xxgdb] [- display name] - Starts all Many brprocesses in the debugger and uses PetscAbortErrorHandler(). By default the Many brdebugger is gdb; alternatives are dbx and xxgdb. Many br

Many br

Notes

Most users need not directly employ this routine and the other error Many brhandlers, but can instead use the simplified interface SETERRQ, which Many brhas the calling sequence Many br
    SETERRQ(comm,number,mess)
or its variants, SETERRQ1(number,formatstring,arg1), SETERRQ2(), ... that Many brallow including arguments in the message. Many br

Notes for experienced users

Use PetscPushErrorHandler() to set the desired error handler. The Many brcurrently available PETSc error handlers include PetscTraceBackErrorHandler(), Many brPetscAttachDebuggerErrorHandler(), and PetscAbortErrorHandler(). Many br

See Also

PetscPushErrorHandler(), PetscTraceBackErrorHandler(),
PetscAttachDebuggerErrorHandler() Many br

Level:developer
Location:
src/sys/error/errabort.c
Index of all Sys routines
Table of Contents for all manual pages
Index of all manual pages