Skip to main content
`Ctrl`+`K`

# PetscMPIErrorString

Given an MPI error code returns the `MPI_Error_string()` appropriately formatted for displaying with the PETSc error handlers.

## Synopsis

    #include "petscsys.h"
    void PetscMPIErrorString(PetscMPIInt err, size_t slen, char *string)

Not Collective, No Fortran Support

## Input Parameters

- err - the MPI error code

- slen - length of `string`, should be at least as large as `MPI_MAX_ERROR_STRING`

## Output Parameter

- string - the MPI error message

## Note

Does not return an error code or do error handling because it may be called from inside an error handler

## See Also

`PetscErrorCode` `PetscErrorMessage()`

## Level

developer

## Location

src/sys/error/err.c

Index of all Sys routines
Table of Contents for all manual pages
Index of all manual pages