writes to a binary file.


#include "petscsys.h"    
PetscErrorCode  PetscSynchronizedBinaryWrite(MPI_Comm comm,int fd,void *p,PetscInt n,PetscDataType type,PetscTruth istemp)
Collective on MPI_Comm

Input Parameters

comm - the MPI communicator
fd - the file
n - the number of items to write
p - the buffer
istemp - the buffer may be changed
type - the type of items to write (PETSC_INT, PETSC_DOUBLE or PETSC_SCALAR)


Process 0 does a PetscBinaryWrite()

PetscSynchronizedBinaryWrite() uses byte swapping to work on all machines. Integers are stored on the file as 32 long, regardless of whether they are stored in the machine as 32 or 64, this means the same binary file may be read on any machine.

See Also

PetscBinaryWrite(), PetscBinaryOpen(), PetscBinaryClose(), PetscBinaryRead()

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