1 | .\"Copyright 2006-2008 Sun Microsystems, Inc. |
---|
2 | .\" Copyright (c) 1996 Thinking Machines Corporation |
---|
3 | .TH MPI_File_write_at 3 "Dec 08, 2009" "1.4" "Open MPI" |
---|
4 | .SH NAME |
---|
5 | \fBMPI_File_write_at\fP \- Writes a file at an explicitly specified offset (blocking, noncollective). |
---|
6 | |
---|
7 | .SH SYNTAX |
---|
8 | .ft R |
---|
9 | .nf |
---|
10 | C Syntax |
---|
11 | #include <mpi.h> |
---|
12 | int MPI_File_write_at(MPI_File \fIfh\fP, MPI_Offset \fIoffset\fP, void \fI*buf\fP, |
---|
13 | int \fIcount\fP, MPI_Datatype \fIdatatype\fP, MPI_Status \fI*status\fP) |
---|
14 | |
---|
15 | Fortran Syntax (see FORTRAN 77 NOTES) |
---|
16 | INCLUDE 'mpif.h' |
---|
17 | MPI_FILE_WRITE_AT(\fIFH\fP, \fI OFFSET\fP, \fI BUF\fP, \fICOUNT\fP, |
---|
18 | \fI DATATYPE\fP, \fISTATUS\fP, \fI IERROR\fP) |
---|
19 | <type> \fIBUF\fP(*) |
---|
20 | INTEGER \fIFH, COUNT, DATATYPE, STATUS(MPI_STATUS_SIZE), IERROR\fP |
---|
21 | INTEGER(KIND=MPI_OFFSET_KIND) \fIOFFSET\fP |
---|
22 | |
---|
23 | .SH C++ Syntax |
---|
24 | .nf |
---|
25 | #include <mpi.h> |
---|
26 | void MPI::File::Write_at(MPI::Offset \fIoffset\fP, const void* \fIbuf\fP, |
---|
27 | int \fIcount\fP, const MPI::Datatype& \fIdatatype\fP, MPI::Status& \fIstatus\fP) |
---|
28 | |
---|
29 | void MPI::File::Write_at(MPI::Offset \fIoffset\fP, const void* \fIbuf\fP, |
---|
30 | int \fIcount\fP, const MPI::Datatype& \fIdatatype\fP) |
---|
31 | |
---|
32 | .SH INPUT PARAMETERS |
---|
33 | .ft R |
---|
34 | .TP 1i |
---|
35 | fh |
---|
36 | File handle (handle). |
---|
37 | .TP 1i |
---|
38 | offset |
---|
39 | File offset (integer). |
---|
40 | .TP 1i |
---|
41 | buf |
---|
42 | Initial address of buffer (choice). |
---|
43 | .TP 1i |
---|
44 | count |
---|
45 | Number of elements in buffer (integer). |
---|
46 | .TP 1i |
---|
47 | datatype |
---|
48 | Data type of each buffer element (handle). |
---|
49 | |
---|
50 | .SH OUTPUT PARAMETERS |
---|
51 | .ft R |
---|
52 | .TP 1i |
---|
53 | status |
---|
54 | Status object (status). |
---|
55 | .TP 1i |
---|
56 | IERROR |
---|
57 | Fortran only: Error status (integer). |
---|
58 | |
---|
59 | .SH DESCRIPTION |
---|
60 | .ft R |
---|
61 | MPI_File_write_at attempts to write into the file associated with |
---|
62 | .I fh |
---|
63 | (at the |
---|
64 | .I offset |
---|
65 | position) a total number of |
---|
66 | .I count |
---|
67 | data items having |
---|
68 | .I datatype |
---|
69 | type from the user's buffer |
---|
70 | .I buf. |
---|
71 | The offset is in |
---|
72 | .I etype |
---|
73 | units relative to the current view. That is, holes are not counted |
---|
74 | when locating an offset. The data is written into those parts of the |
---|
75 | file specified by the current view. MPI_File_write_at stores the |
---|
76 | number of |
---|
77 | .I datatype |
---|
78 | elements actually written in |
---|
79 | .I status. |
---|
80 | All other fields of |
---|
81 | .I status |
---|
82 | are undefined. |
---|
83 | .sp |
---|
84 | It is erroneous to call this function if MPI_MODE_SEQUENTIAL mode was specified when the file was opened. |
---|
85 | |
---|
86 | .SH FORTRAN 77 NOTES |
---|
87 | .ft R |
---|
88 | The MPI standard prescribes portable Fortran syntax for |
---|
89 | the \fIOFFSET\fP argument only for Fortran 90. FORTRAN 77 |
---|
90 | users may use the non-portable syntax |
---|
91 | .sp |
---|
92 | .nf |
---|
93 | INTEGER*MPI_OFFSET_KIND \fIOFFSET\fP |
---|
94 | .fi |
---|
95 | .sp |
---|
96 | where MPI_OFFSET_KIND is a constant defined in mpif.h |
---|
97 | and gives the length of the declared integer in bytes. |
---|
98 | |
---|
99 | .SH ERRORS |
---|
100 | 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. |
---|
101 | .sp |
---|
102 | Before the error value is returned, the current MPI error handler is |
---|
103 | 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. |
---|
104 | |
---|
105 | .SH SEE ALSO |
---|
106 | .ft R |
---|
107 | MPI_File_iwrite_at |
---|
108 | .br |
---|
109 | MPI_File_write_at_all |
---|
110 | .br |
---|
111 | MPI_File_write_at_all_begin |
---|
112 | .br |
---|
113 | MPI_File_write_at_all_end |
---|
114 | .br |
---|
115 | |
---|