[97] | 1 | .\"Copyright 2006-2008 Sun Microsystems, Inc. |
---|
| 2 | .\" Copyright (c) 1996 Thinking Machines Corporation |
---|
| 3 | .TH MPI_File_seek 3 "Dec 08, 2009" "1.4" "Open MPI" |
---|
| 4 | .SH NAME |
---|
| 5 | \fBMPI_File_seek\fP \- Updates individual file pointers (noncollective). |
---|
| 6 | |
---|
| 7 | .SH SYNTAX |
---|
| 8 | .ft R |
---|
| 9 | .nf |
---|
| 10 | C Syntax |
---|
| 11 | #include <mpi.h> |
---|
| 12 | int MPI_File_seek(MPI_File \fIfh\fP, MPI_Offset \fIoffset\fP, |
---|
| 13 | int \fIwhence\fP) |
---|
| 14 | |
---|
| 15 | Fortran Syntax (see FORTRAN 77 NOTES) |
---|
| 16 | INCLUDE 'mpif.h' |
---|
| 17 | MPI_FILE_SEEK(\fIFH\fP,\fI OFFSET\fP,\fI WHENCE\fP,\fI IERROR\fP) |
---|
| 18 | INTEGER \fIFH, WHENCE, IERROR\fP |
---|
| 19 | INTEGER(KIND=MPI_OFFSET_KIND) \fIOFFSET\fP |
---|
| 20 | |
---|
| 21 | .SH C++ Syntax |
---|
| 22 | .nf |
---|
| 23 | #include <mpi.h> |
---|
| 24 | void MPI::File::Seek(MPI::Offset \fIoffset\fP, int \fIwhence\fP) |
---|
| 25 | |
---|
| 26 | .SH INPUT PARAMETERS |
---|
| 27 | .ft R |
---|
| 28 | .TP 1i |
---|
| 29 | fh |
---|
| 30 | File handle (handle). |
---|
| 31 | .TP 1i |
---|
| 32 | offset |
---|
| 33 | File offset (integer). |
---|
| 34 | .TP 1i |
---|
| 35 | whence |
---|
| 36 | Update mode (integer). |
---|
| 37 | |
---|
| 38 | .SH OUTPUT PARAMETER |
---|
| 39 | .ft R |
---|
| 40 | .TP 1i |
---|
| 41 | IERROR |
---|
| 42 | Fortran only: Error status (integer). |
---|
| 43 | |
---|
| 44 | .SH DESCRIPTION |
---|
| 45 | .ft R |
---|
| 46 | MPI_File_seek updates the individual file pointer according to |
---|
| 47 | .I whence, |
---|
| 48 | which could have the following possible values: |
---|
| 49 | .TP |
---|
| 50 | o |
---|
| 51 | MPI_SEEK_SET - The pointer is set to |
---|
| 52 | .I offset. |
---|
| 53 | .TP |
---|
| 54 | o |
---|
| 55 | MPI_SEEK_CUR - The pointer is set to the current pointer position plus |
---|
| 56 | .I offset. |
---|
| 57 | .TP |
---|
| 58 | o |
---|
| 59 | MPI_SEEK_END - The pointer is set to the end of the file plus |
---|
| 60 | .I offset. |
---|
| 61 | .sp |
---|
| 62 | .RE |
---|
| 63 | The |
---|
| 64 | .I offset |
---|
| 65 | can be negative, which allows seeking backwards. It is erroneous to |
---|
| 66 | seek to a negative position in the file. The end of the file is |
---|
| 67 | defined to be the location of the next elementary data item |
---|
| 68 | immediately after the last accessed data item, even if that location |
---|
| 69 | is a hole. |
---|
| 70 | |
---|
| 71 | .SH FORTRAN 77 NOTES |
---|
| 72 | .ft R |
---|
| 73 | The MPI standard prescribes portable Fortran syntax for |
---|
| 74 | the \fIOFFSET\fP argument only for Fortran 90. FORTRAN 77 |
---|
| 75 | users may use the non-portable syntax |
---|
| 76 | .sp |
---|
| 77 | .nf |
---|
| 78 | INTEGER*MPI_OFFSET_KIND \fIOFFSET\fP |
---|
| 79 | .fi |
---|
| 80 | .sp |
---|
| 81 | where MPI_OFFSET_KIND is a constant defined in mpif.h |
---|
| 82 | and gives the length of the declared integer in bytes. |
---|
| 83 | |
---|
| 84 | .SH ERRORS |
---|
| 85 | Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI:Exception object. |
---|
| 86 | .sp |
---|
| 87 | Before the error value is returned, the current MPI error handler is |
---|
| 88 | called. For MPI I/O function errors, the default error handler is set to MPI_ERRORS_RETURN. The error handler may be changed with MPI_File_set_errhandler; the predefined error handler MPI_ERRORS_ARE_FATAL may be used to make I/O errors fatal. Note that MPI does not guarantee that an MPI program can continue past an error. |
---|
| 89 | |
---|