# PetscSynchronizedFlush
Flushes to the screen output from all processors involved in previous `PetscSynchronizedPrintf()`/`PetscSynchronizedFPrintf()` calls. 
## Synopsis
```
PetscErrorCode PetscSynchronizedFlush(MPI_Comm comm, FILE *fd)
```
Collective


## Input Parameters

- ***comm -*** the communicator
- ***fd -*** the file pointer (valid on process 0 of the communicator)





## Note
If `PetscSynchronizedPrintf()` and/or `PetscSynchronizedFPrintf()` are called with
different MPI communicators there must be an intervening call to `PetscSynchronizedFlush()` between the calls with different MPI communicators.


## Fortran Note
Pass `PETSC_STDOUT` if the flush is for standard out; otherwise pass a value obtained from `PetscFOpen()`


## See Also
 `PetscSynchronizedPrintf()`, `PetscFPrintf()`, `PetscPrintf()`, `PetscViewerASCIIPrintf()`,
`PetscViewerASCIISynchronizedPrintf()`

## Level
intermediate

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/sys/fileio/mprint.c.html#PetscSynchronizedFlush">src/sys/fileio/mprint.c</A>

## Examples
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/sys/tutorials/ex2.c.html">src/sys/tutorials/ex2.c.html</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/sys/tutorials/ex2f.F90.html">src/sys/tutorials/ex2f.F90.html</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/vec/vec/tutorials/ex31.c.html">src/vec/vec/tutorials/ex31.c.html</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/vec/vec/tutorials/ex9.c.html">src/vec/vec/tutorials/ex9.c.html</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/vec/is/sf/tutorials/ex1.c.html">src/vec/is/sf/tutorials/ex1.c.html</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/dm/tutorials/ex22.c.html">src/dm/tutorials/ex22.c.html</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/dm/tutorials/ex5.c.html">src/dm/tutorials/ex5.c.html</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/dm/tutorials/ex51.c.html">src/dm/tutorials/ex51.c.html</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/pc/tutorials/ex3.c.html">src/ksp/pc/tutorials/ex3.c.html</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/snes/tutorials/ex63.c.html">src/snes/tutorials/ex63.c.html</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/tutorials/ex10.c.html">src/ts/tutorials/ex10.c.html</A><BR>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/sys/fileio/mprint.c)


[Index of all Sys routines](index.md)  
[Table of Contents for all manual pages](/docs/manualpages/index.md)  
[Index of all manual pages](/docs/manualpages/singleindex.md)  
