PETSc version 3.15.5
Fix/Edit manual page

# CHKERRMPI

Checks error code returned from MPI calls, if non-zero it calls the error handler and then returns

### Synopsis

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

Not Collective

### Input Parameters

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

### Notes

Always returns the error code PETSC_ERR_MPI; the MPI error code and string are embedded in the string error message

### See Also

CHKERRQ(), PetscTraceBackErrorHandler(), PetscPushErrorHandler(), PetscError(), SETERRQ(), CHKMEMQ, SETERRQ1(), SETERRQ2(), SETERRQ2(), SETERRMPI(), SETERRABORT(), CHKERRABORT()

### Level

intermediate

### Location

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

### Examples

src/sys/classes/random/tutorials/ex1.c.html
src/sys/classes/random/tutorials/ex2.c.html
src/sys/tutorials/ex1.c.html
src/sys/tutorials/ex2.c.html
src/sys/tutorials/ex3.c.html
src/sys/tutorials/ex4.c.html
src/sys/tutorials/ex16.c.html
src/vec/vec/tutorials/ex2.c.html
src/vec/vec/tutorials/ex3.c.html
src/vec/vec/tutorials/ex5.c.html
src/vec/vec/tutorials/ex6.c.html
Index of all Sys routines
Table of Contents for all manual pages
Index of all manual pages