petsc-3.14.5 2021-03-03
Report Typos and Errors

# SETERRMPI

Macro to be called when an error has been detected within an MPI callback function

### Synopsis

    #include <petscsys.h>
    PetscErrorCode SETERRMPI(MPI_Comm comm,PetscErrorCode ierr,char *message)

Collective

### Input Parameters

| comm | - A communicator, use PETSC_COMM_SELF unless you know all ranks of another communicator will detect the error
| ierr | - nonzero error code, see the list of standard error codes in include/petscerror.h
| message | - error message

### Notes

This macro is FOR USE IN MPI CALLBACK FUNCTIONS ONLY, such as those passed to MPI_Comm_create_keyval(). It always returns the error code PETSC_MPI_ERROR_CODE which is registered with MPI_Add_error_code() when PETSc is initialized.

### See Also

SETERRQ(), CHKERRQ(), CHKERRMPI(), PetscTraceBackErrorHandler(), PetscPushErrorHandler(), PetscError(), CHKERRQ(), CHKMEMQ, SETERRQ1(), SETERRQ2(), SETERRQ3()

### Level

developer

### Location

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