petsc-3.10.5 2019-03-28
Report Typos and Errors

# PetscBinaryOpen

Opens a PETSc binary file.

### Synopsis

    PetscErrorCode  PetscBinaryOpen(const char name[],PetscFileMode mode,int *fd)

Not Collective

### Input Parameters

| name | - filename
| type | - type of binary file, one of FILE_MODE_READ, FILE_MODE_APPEND, FILE_MODE_WRITE

### Output Parameter

fd -the file

### Notes

Files access with PetscBinaryRead() and PetscBinaryWrite() are ALWAYS written in big-endian format. This means the file can be accessed using PetscBinaryOpen() and PetscBinaryRead() and PetscBinaryWrite() on any machine.

### See Also

PetscBinaryRead(), PetscBinaryWrite(), PetscFileMode, PetscViewerFileSetMode(), PetscViewerBinaryGetDescriptor(),
PetscBinarySynchronizedWrite(), PetscBinarySynchronizedRead(), PetscBinarySynchronizedSeek()

### Level

advanced

### Location

src/sys/fileio/sysio.c

### Examples

src/dm/examples/tutorials/ex15.c.html
Index of all Sys routines
Table of Contents for all manual pages
Index of all manual pages