Skip to main content
`Ctrl`+`K`

# PetscFClose

Has MPI rank 0 in the communicator close a file (usually obtained with `PetscFOpen()`; all others do nothing.

## Synopsis

    #include "petscsys.h"
    PetscErrorCode PetscFClose(MPI_Comm comm, FILE *fd)

Logically Collective

## Input Parameters

- comm - the MPI communicator

- fd - the file, opened with `PetscFOpen()`

## See Also

`PetscFOpen()`

## Level

developer

## Location

src/sys/fileio/mpiuopen.c

## Examples

src/ml/da/tutorials/ex3.c
src/ksp/ksp/tutorials/ex49.c
src/ksp/ksp/tutorials/ex43.c
src/ml/da/tutorials/ex4.c

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