# PetscPClose
Closes (ends) a program on processor zero run with `PetscPOpen()` 
## Synopsis
```
PetscErrorCode PetscPClose(MPI_Comm comm, FILE *fd)
```
Collective, but only process 0 runs the command


## Input Parameters

- ***comm -*** MPI communicator, only processor zero runs the program
- ***fp -*** the file pointer where program input or output may be read or NULL if don't care





## Note
Does not work under Windows


## See Also
 `PetscFOpen()`, `PetscFClose()`, `PetscPOpen()`

## Level
intermediate

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


---
[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](/docs/manualpages/index.md)  
[Index of all manual pages](/docs/manualpages/singleindex.md)  
