PETSc version 3.17.4
Fix/Edit manual page

# PETSCABORT

Call MPI_Abort with an informative error code

### Synopsis

    #include <petscsys.h>
    PETSCABORT(MPI_Comm comm, PetscErrorCode ierr)

Collective

### Input Parameters

| comm | - A communicator, so that the error can be collective
| ierr | - nonzero error code, see the list of standard error codes in include/petscerror.h

### Notes

We pass MPI_Abort() an error code of format XX_YYYY_ZZZ, where XX, YYYY are an index and line number of the file where PETSCABORT is called, respectively. ZZZ is the PETSc error code.

If XX is zero, this means that the call was made in the routine main(). If XX is one, that means 1) the file is not in PETSc (it may be in users code); OR 2) the file is in PETSc but PetscAbortSourceFiles[] is out of date. PETSc developers have to update it. Otherwise, look up the value of XX in the table PetscAbortSourceFiles[] in src/sys/error/err.c to map XX back to the source file where the PETSCABORT() was called.

If the option -start_in_debugger was used then this calls abort() to stop the program in the debugger.

### Level

advanced

### Location

src/sys/error/../../../include/petscerror.h
Index of all Sys routines
Table of Contents for all manual pages
Index of all manual pages