:orphan: # SETERRA Fortran-only macro that can be called when an error has been detected from the main program ## Synopsis ``` #include PetscErrorCode SETERRA(MPI_Comm comm,PetscErrorCode ierr,char *message) ``` 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 - ***message -*** error message in the printf format ## Notes This should only be used with Fortran. With C/C++, use `SETERRQ()`. `SETERRQ()` may be called from Fortran subroutines but `SETERRA()` must be called from the Fortran main program. ## See Also `SETERRQ()`, `SETERRABORT()`, `PetscCall()`, `CHKERRA()`, `PetscCallAbort()` ## Level beginner ## Location include/petscerror.h ## Examples src/dm/impls/plex/tutorials/ex1f90.F90
src/ksp/ksp/tutorials/ex13f90.F90
src/ksp/ksp/tutorials/ex1f.F90
src/ksp/ksp/tutorials/ex77f.F90
src/ksp/ksp/tutorials/ex83f.F90
src/snes/tutorials/ex1f.F90
src/snes/tutorials/ex5f.F90
src/snes/tutorials/ex5f90.F90
src/snes/tutorials/ex5f90t.F90
src/snes/tutorials/ex73f90t.F90
src/sys/tutorials/ex17f.F90
--- [Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/include/petscerror.h) [Index of all Sys routines](index.md) [Table of Contents for all manual pages](/manualpages/index.md) [Index of all manual pages](/manualpages/singleindex.md)