[97] | 1 | .\"Copyright 2006-2008 Sun Microsystems, Inc. |
---|
| 2 | .\" Copyright (c) 1996 Thinking Machines Corporation |
---|
| 3 | .TH MPI_Pack_external_size 3 "Dec 08, 2009" "1.4" "Open MPI" |
---|
| 4 | |
---|
| 5 | .SH NAME |
---|
| 6 | \fBMPI_Pack_external_size\fP \- Calculates upper bound on space needed |
---|
| 7 | to write to a portable format |
---|
| 8 | |
---|
| 9 | .SH SYNTAX |
---|
| 10 | .ft R |
---|
| 11 | |
---|
| 12 | .SH C Syntax |
---|
| 13 | .nf |
---|
| 14 | #include <mpi.h> |
---|
| 15 | int MPI_Pack_external_size(char *\fIdatarep\fP, int \fIincount\fP, |
---|
| 16 | MPI_Datatype \fIdatatype\fP, MPI_Aint *\fIsize\fP) |
---|
| 17 | |
---|
| 18 | .SH Fortran Syntax |
---|
| 19 | .nf |
---|
| 20 | INCLUDE 'mpif.h' |
---|
| 21 | MPI_PACK_EXTERNAL_SIZE(\fIDATAREP, INCOUNT, DATATYPE, SIZE, IERROR\fP) |
---|
| 22 | |
---|
| 23 | INTEGER \fIINCOUNT, DATATYPE, IERROR\fP |
---|
| 24 | INTEGER (KIND=MPI_ADDRESS_KIND) \fISIZE\fP |
---|
| 25 | CHARACTER*(*) \fIDATAREP\fP |
---|
| 26 | |
---|
| 27 | .SH C++ Syntax |
---|
| 28 | .nf |
---|
| 29 | #include <mpi.h> |
---|
| 30 | MPI::Aint MPI::Datatype::Pack_external_size(const char* \fIdatarep\fP, |
---|
| 31 | int \fIincount\fP) const |
---|
| 32 | |
---|
| 33 | .SH INPUT PARAMETERS |
---|
| 34 | .ft R |
---|
| 35 | .TP 1i |
---|
| 36 | datarep |
---|
| 37 | Data representation (string). |
---|
| 38 | .TP 1i |
---|
| 39 | incount |
---|
| 40 | Number of input data items (integer). |
---|
| 41 | .TP 1i |
---|
| 42 | datatype |
---|
| 43 | Datatype of each input data item (handle). |
---|
| 44 | |
---|
| 45 | .SH OUTPUT PARAMETERS |
---|
| 46 | .ft R |
---|
| 47 | .TP 1i |
---|
| 48 | size |
---|
| 49 | Upper bound on size of packed message, in bytes (integer). |
---|
| 50 | .TP 1i |
---|
| 51 | IERROR |
---|
| 52 | Fortran only: Error status (integer). |
---|
| 53 | |
---|
| 54 | .SH DESCRIPTION |
---|
| 55 | .ft R |
---|
| 56 | MPI_Pack_external_size allows the application to find out how much |
---|
| 57 | space is needed to pack a message in the portable format defined by |
---|
| 58 | the MPI Forum. It returns in \fIsize\fP an upper bound on the |
---|
| 59 | increment in \fIposition\fP that would occur in a call to |
---|
| 60 | MPI_Pack_external with the same values for \fIdatarep\fP, |
---|
| 61 | \fIincount\fP, and \fIdatatype\fP. |
---|
| 62 | .sp |
---|
| 63 | The call returns an upper bound, rather than an exact bound, as the |
---|
| 64 | exact amount of space needed to pack the message may depend on context |
---|
| 65 | and alignment (e.g., the first message packed in a packing unit may |
---|
| 66 | take more space). |
---|
| 67 | |
---|
| 68 | .SH NOTES |
---|
| 69 | .ft R |
---|
| 70 | The \fIdatarep\fP argument specifies the data format. The only valid |
---|
| 71 | value in the current version of MPI is "external32". The argument is |
---|
| 72 | provided for future extensibility. |
---|
| 73 | |
---|
| 74 | .SH ERRORS |
---|
| 75 | .ft R |
---|
| 76 | Almost all MPI routines return an error value; C routines as |
---|
| 77 | the value of the function and Fortran routines in the last argument. C++ |
---|
| 78 | functions do not return errors. If the default error handler is set to |
---|
| 79 | MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism |
---|
| 80 | will be used to throw an MPI:Exception object. |
---|
| 81 | .sp |
---|
| 82 | Before the error value is returned, the current MPI error handler is |
---|
| 83 | called. By default, this error handler aborts the MPI job, except for |
---|
| 84 | I/O function errors. The error handler may be changed with |
---|
| 85 | MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN |
---|
| 86 | may be used to cause error values to be returned. Note that MPI does not |
---|
| 87 | guarantee that an MPI program can continue past an error. |
---|
| 88 | .sp |
---|
| 89 | See the MPI man page for a full list of MPI error codes. |
---|
| 90 | |
---|
| 91 | .SH SEE ALSO |
---|
| 92 | .ft R |
---|
| 93 | .nf |
---|
| 94 | MPI_Pack_external |
---|
| 95 | MPI_Unpack_external |
---|
| 96 | |
---|