PETSC_VIEWER_STDERR_ — PETSc 3.22.5 documentation

Skip to main content
`Ctrl`+`K`

# PETSC_VIEWER_STDERR_

Creates a `PETSCVIEWERASCII` `PetscViewer` shared by all MPI processes in a communicator.

## Synopsis

    #include "petscviewer.h"
    PetscViewer PETSC_VIEWER_STDERR_(MPI_Comm comm)

Collective

## Input Parameter

- comm - the MPI communicator to share the `PetscViewer`

## Notes

This object is destroyed in `PetscFinalize()`, `PetscViewerDestroy()` should never be called on it

Unlike almost all other PETSc routines, this does not return an error code. Usually used in the form

    XXXView(XXX object, PETSC_VIEWER_STDERR_(comm));

`PetscViewerASCIIGetStderr()` is preferred since it allows error checking

## See Also

Viewers: Looking at PETSc Objects, `PETSC_VIEWER_DRAW_`, `PetscViewerASCIIOpen()`, `PETSC_VIEWER_STDOUT_`, `PETSC_VIEWER_STDOUT_WORLD`, `PETSC_VIEWER_STDOUT_SELF`, `PETSC_VIEWER_STDERR_WORLD`, `PETSC_VIEWER_STDERR_SELF`

## Level

beginner

## Location

src/sys/classes/viewer/impls/ascii/vcreatea.c

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