:orphan:
# PetscFClose
Has MPI rank 0 in the communicator close a file (usually obtained with `PetscFOpen()`; all others do nothing. 
## Synopsis
```
PetscErrorCode PetscFClose(MPI_Comm comm, FILE *fd)
```
Logically Collective; No Fortran Support


## Input Parameters

- ***comm -*** the MPI communicator
- ***fd -*** the file, opened with `PetscFOpen()`





## See Also
 `PetscFOpen()`

## Level
developer

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

## Examples
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/ksp/tutorials/ex43.c.html">src/ksp/ksp/tutorials/ex43.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/ksp/tutorials/ex49.c.html">src/ksp/ksp/tutorials/ex49.c</A><BR>


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


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