PETSc version 3.17.4
Fix/Edit manual page

# CHKERRA

Fortran-only replacement for PetscCall in the main program, which aborts immediately

### Synopsis

    #include <petscsys.h>
    PetscErrorCode CHKERRA(PetscErrorCode ierr)

Not Collective

### Input Parameters

| ierr | - nonzero error code, see the list of standard error codes in include/petscerror.h

### Notes

This should only be used with Fortran. With C/C++, use PetscCall() in normal usage, or PetscCallAbort() if wanting to abort immediately on error.

### Fortran Notes

PetscCall() may be called from Fortran subroutines but CHKERRA() must be called from the Fortran main program.

### See Also

PetscCall(), PetscCallAbort(), SETERRA(), SETERRQ(), SETERRABORT()

### Level

beginner

### Location

src/sys/error/../../../include/petscerror.h

### Examples

src/sys/classes/viewer/tutorials/ex1f90.F90.html
src/sys/tutorials/ex1f.F90.html
src/sys/tutorials/ex2f.F90.html
src/sys/tutorials/ex4f90.F90.html
src/sys/tutorials/ex5f90.F90.html
src/sys/tutorials/ex8f90.F90.html
src/sys/tutorials/ex16f.F90.html
src/sys/tutorials/ex17f.F90.html
src/vec/vec/tutorials/ex1f90.F90.html
src/vec/vec/tutorials/ex4f90.F90.html
src/vec/vec/tutorials/ex5f.F90.html
Index of all Sys routines
Table of Contents for all manual pages
Index of all manual pages