PetscErrorCode PetscBinaryRead(int fd,void *data,PetscInt num,PetscInt *count,PetscDataType type)Not Collective
|fd||- the file descriptor|
|num||- the maximum number of items to read|
|type||- the type of items to read (PETSC_INT, PETSC_REAL, PETSC_SCALAR, etc.)|
|data||- the buffer|
|count||- the number of items read, optional|
PetscBinaryRead() uses byte swapping to work on all machines; the files are written to file ALWAYS using big-endian ordering. On little-endian machines the numbers are converted to the little-endian format when they are read in from the file. When PETSc is ./configure with --with-64-bit-indices the integers are written to the file as 64 bit integers, this means they can only be read back in when the option --with-64-bit-indices is used.