NAME
MMPPIIFFiilleesseeeekksshhaarreedd - Updates the global shared file pointer (collec-
tive). SSYYNNTTAAXX C Syntax#include
int MPIFileseekshared(MPIFile fh, MPIOffset offset, int whence)Fortran Syntax (see FORTRAN 77 NOTES)
INCLUDE 'mpif.h'MPIFILESEEKSHARED(FH, OFFSET, WHENCE, IERROR)
INTEGER FH, WHENCE, IERROR
INTEGER(KIND=MPIOFFSETKIND) OFFSET CC++++ SSyynnttaaxx#include
void MPI::File::Seekshared(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
MPIFileseekshared updates the shared 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. MPIFileseekshared is collective; all the processes in the communicator group associated with the file handle fh must call MPIFileseekshared withthe same offset and whence. All processes in the communicator group are syn-
chronized before the shared file pointer is updated. The offset can be negative, which allows seeking backwards. It is erroneous to seek to a negative position in the view. The end of the view is defined to be the position of the next elementary data item, relative to the current view, following the last whole elementary data item accessible. 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 MPIFileseekshared(3OpenMPI)