NAME
MMPPIIFFiilleesseeeekk - Updates individual file pointers (noncollective).
SSYYNNTTAAXX C Syntax#include
int MPIFileseek(MPIFile fh, MPIOffset offset, int whence)Fortran Syntax (see FORTRAN 77 NOTES)
INCLUDE 'mpif.h'MPIFILESEEK(FH, OFFSET, WHENCE, IERROR)
INTEGER FH, WHENCE, IERROR
INTEGER(KIND=MPIOFFSETKIND) OFFSET CC++++ SSyynnttaaxx#include
void MPI::File::Seek(MPI::Offset offset, int whence) IINNPPUUTT PPAARRAAMMEETTEERRSS fh File handle (handle). offset File offset (integer). whence Update mode (integer). OOUUTTPPUUTT PPAARRAAMMEETTEERRIERROR Fortran only: Error status (integer).
DESCRIPTION
MPIFileseek updates the individual file pointer according to whence, which could have the following possible values:o MPISEEKSET - The pointer is set to offset.
o MPISEEKCUR - The pointer is set to the current pointer posi-
tion plus offset.o MPISEEKEND - The pointer is set to the end of the file plus
offset. The offset can be negative, which allows seeking backwards. It is erroneous to seek to a negative position in the file. The end of the file is defined to be the location of the next elementary data item immediately after the last accessed data item, even if that location is a hole. FFOORRTTRRAANN 7777 NNOOTTEESS The MPI standard prescribes portable Fortran syntax for the OFFSETargument only for Fortran 90. FORTRAN 77 users may use the non-porta-
ble syntax INTEGER*MPIOFFSETKIND OFFSET where MPIOFFSETKIND is a constant defined in mpif.h and gives the length of the declared integer in bytes. EERRRROORRSS Almost all MPI routines return an error value; C routines as the valueof the function and Fortran routines in the last argument. C++ func-
tions do not return errors. If the default error handler is set toMPI::ERRORSTHROWEXCEPTIONS, then on error the C++ exception mechanism
will be used to throw an MPI:Exception object. Before the error value is returned, the current MPI error handler is called. For MPI I/O function errors, the default error handler is setto MPIERRORSRETURN. The error handler may be changed with
MPIFileseterrhandler; the predefined error handlerMPIERRORSAREFATAL may be used to make I/O errors fatal. Note that
MPI does not guarantee that an MPI program can continue past an error. Open MPI 1.2 September 2006 MPIFileseek(3OpenMPI)