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