MPI_File_preallocate(3)

MPI_File_preallocate - Preallocates storage space for a file

Showing IRIX 6.5.30 (default release). Added in IRIX 6.5.19.

NAME
     MPI_File_preallocate - Preallocates storage space for a file

SYNOPSIS
     C:

          #include "mpi.h"

          int MPI_File_preallocate(MPI_File fh, MPI_Offset size)


     Fortran:

          INCLUDE "mpif.h" (or USE MPI)

          INTEGER fh, ierror
          INTEGER(KIND=MPI_OFFSET_KIND) size

          CALL MPI_FILE_PREALLOCATE(fh, size, ierror)


DESCRIPTION
     MPI_File_preallocate ensures that storage space is allocated for the
     first size bytes of the file associated with fh.

     The MPI_File_preallocate routine accepts the following arguments:

     fh        Specifies the file handle (handle)

     size      Specifies the size to preallocate (nonnegative integer)

     ierror    Specifies the return code value for successful completion,
               which is in MPI_SUCCESS.  MPI_SUCCESS is defined in the mpif.h
               file.

     MPI_File_preallocate is collective; all processes in the group must pass
     identical values for size. Regions of the file that have been written
     previously are unaffected.  For newly allocated regions of the file,
     MPI_File_preallocate has the same effect as writing undefined data.  If
     size is larger than the current file size, the file size increases to
     size.  If size is less than or equal to the current file size, the file
     size is unchanged.

     The treatment of file pointers, pending nonblocking accesses, and file
     consistency is the same as with MPI_File_set_size.  If
     MPI_MODE_SEQUENTIAL mode was specified when the file was opened, it is
     erroneous to call this routine.

     In some implementations, file preallocation might be expensive.
   Notes for Fortran
     All MPI objects (for example, MPI_Datatype, MPI_Comm, MPI_File) are of
     type INTEGER.

SEE ALSO
     MPI_File_open(3), MPI_File_set_size(3), MPI_IO(3)