# PetscViewerASCIIPrintf

Prints to a file, only from the first processor in the PetscViewer

### Synopsis

    #include "petsc.h"
    PetscErrorCode  PetscViewerASCIIPrintf(PetscViewer viewer,const char format[],...)

Not Collective, but only first processor in set has any effect

### Input Parameters

| viewer | - optained with PetscViewerASCIIOpen()
| format | - the usual printf() format string

### Fortran Note

The call sequence is PetscViewerASCIIPrintf(PetscViewer, character(*), int ierr) from Fortran. That is, you can only pass a single character string from Fortran.

### See Also

PetscPrintf(), PetscSynchronizedPrintf(), PetscViewerASCIIOpen(),
PetscViewerASCIIPushTab(), PetscViewerASCIIPopTab(), PetscViewerASCIISynchronizedPrintf(), PetscViewerCreate(), PetscViewerDestroy(), PetscViewerSetType(), PetscViewerASCIIGetPointer()

Level:developer
Location:src/sys/viewer/impls/ascii/filev.c
Index of all Viewer routines
Table of Contents for all manual pages
Index of all manual pages

### Examples

src/ksp/ksp/examples/tutorials/ex29.c.html