PetscInfoSetFile — PETSc 3.21.4 documentation

Skip to main content
`Ctrl`+`K`

# PetscInfoSetFile

Sets the printing destination for all `PetscInfo()` calls

## Synopsis

    #include "petscsys.h"
    PetscErrorCode PetscInfoSetFile(const char filename[], const char mode[])

Not Collective

## Input Parameters

- filename - Name of the file where `PetscInfo()` will print to, use `NULL` to write to `PETSC_STDOUT`.

- mode - Write mode passed to `PetscFOpen()`

## See Also

Interpreting -info Output: Informative Messages, `PetscInfo()`, `PetscInfoGetFile()`, `PetscInfoSetFromOptions()`, `PetscFOpen()`

## Level

advanced

## Location

src/sys/info/verboseinfo.c

## Examples

src/mat/tutorials/ex7.c

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