1 | .\"Copyright 2006-2008 Sun Microsystems, Inc. |
---|
2 | .\" Copyright (c) 1996 Thinking Machines Corporation |
---|
3 | .TH MPI_File_seek_shared 3 "Dec 08, 2009" "1.4" "Open MPI" |
---|
4 | .SH NAME |
---|
5 | \fBMPI_File_seek_shared\fP \- Updates the global shared file pointer (collective). |
---|
6 | |
---|
7 | .SH SYNTAX |
---|
8 | .ft R |
---|
9 | .nf |
---|
10 | C Syntax |
---|
11 | #include <mpi.h> |
---|
12 | int MPI_File_seek_shared(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_SHARED(\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_shared(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_shared updates the shared 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 | MPI_File_seek_shared is collective; all the processes in the communicator |
---|
64 | group associated with the file handle |
---|
65 | .I fh |
---|
66 | must call MPI_File_seek_shared with the same |
---|
67 | .I offset |
---|
68 | and |
---|
69 | .I whence. |
---|
70 | All processes in the communicator group are synchronized before the shared file pointer is updated. |
---|
71 | |
---|
72 | .sp |
---|
73 | The |
---|
74 | .I offset |
---|
75 | can be negative, which allows seeking backwards. It is erroneous to |
---|
76 | seek to a negative position in the view. The end of the view is |
---|
77 | defined to be the position of the next elementary data item, relative |
---|
78 | to the current view, following the last whole elementary data item |
---|
79 | accessible. |
---|
80 | |
---|
81 | .SH FORTRAN 77 NOTES |
---|
82 | .ft R |
---|
83 | The MPI standard prescribes portable Fortran syntax for |
---|
84 | the \fIOFFSET\fP argument only for Fortran 90. FORTRAN 77 |
---|
85 | users may use the non-portable syntax |
---|
86 | .sp |
---|
87 | .nf |
---|
88 | INTEGER*MPI_OFFSET_KIND \fIOFFSET\fP |
---|
89 | .fi |
---|
90 | .sp |
---|
91 | where MPI_OFFSET_KIND is a constant defined in mpif.h |
---|
92 | and gives the length of the declared integer in bytes. |
---|
93 | |
---|
94 | .SH ERRORS |
---|
95 | 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. |
---|
96 | .sp |
---|
97 | Before the error value is returned, the current MPI error handler is |
---|
98 | 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. |
---|
99 | |
---|