petsc-3.7.1 2016-05-15
Report Typos and Errors

# PetscBinarySeek

Moves the file pointer on a PETSc binary file.

### Synopsis

    PetscErrorCode  PetscBinarySeek(int fd,off_t off,PetscBinarySeekType whence,off_t *offset)

Not Collective Many br

### Input Parameters

| fd | - the file Many br
| off | - number of bytes to move. Use PETSC_BINARY_INT_SIZE, PETSC_BINARY_SCALAR_SIZE, Many bretc. in your calculation rather than sizeof() to compute byte lengths. Many br
| whence | - if PETSC_BINARY_SEEK_SET then off is an absolute location in the file Many brif PETSC_BINARY_SEEK_CUR then off is an offset from the current location Many brif PETSC_BINARY_SEEK_END then off is an offset from the end of file Many br

### Output Parameter

offset -new offset in file Many br

Many br

### Notes

Integers are stored on the file as 32 long, regardless of whether Many brthey are stored in the machine as 32 or 64, this means the same Many brbinary file may be read on any machine. Hence you CANNOT use sizeof() Many brto determine the offset or location. Many br

### See Also

PetscBinaryRead(), PetscBinaryWrite(), PetscBinaryOpen(), PetscBinarySynchronizedWrite(), PetscBinarySynchronizedRead(),
PetscBinarySynchronizedSeek() Many br

Level:developer
Location:src/sys/fileio/sysio.c
Index of all Sys routines
Table of Contents for all manual pages
Index of all manual pages