1 | .\"Copyright 2006-2008 Sun Microsystems, Inc. |
---|
2 | .\" Copyright (c) 1996 Thinking Machines Corporation |
---|
3 | .TH MPI_Pack_size 3 "Dec 08, 2009" "1.4" "Open MPI" |
---|
4 | .SH NAME |
---|
5 | \fBMPI_Pack_size\fP \- Returns the upper bound on the amount of space needed to pack a message. |
---|
6 | |
---|
7 | .SH SYNTAX |
---|
8 | .ft R |
---|
9 | .SH C Syntax |
---|
10 | .nf |
---|
11 | #include <mpi.h> |
---|
12 | int MPI_Pack_size(int \fIincount\fP, MPI_Datatype\fI datatype\fP, MPI_Comm\fI comm\fP, |
---|
13 | int\fI *size\fP) |
---|
14 | |
---|
15 | .SH Fortran Syntax |
---|
16 | .nf |
---|
17 | INCLUDE 'mpif.h' |
---|
18 | MPI_PACK_SIZE(\fIINCOUNT, DATATYPE, COMM, SIZE, IERROR\fP) |
---|
19 | INTEGER \fIINCOUNT, DATATYPE, COMM, SIZE, IERROR\fP |
---|
20 | |
---|
21 | .SH C++ Syntax |
---|
22 | .nf |
---|
23 | #include <mpi.h> |
---|
24 | int Datatype::Pack_size(int \fIincount\fP, const Comm& \fIcomm\fP) const |
---|
25 | |
---|
26 | .SH INPUT PARAMETERS |
---|
27 | .ft R |
---|
28 | .TP 1i |
---|
29 | incount |
---|
30 | Count argument to packing call (integer). |
---|
31 | .TP 1i |
---|
32 | datatype |
---|
33 | Datatype argument to packing call (handle). |
---|
34 | .TP 1i |
---|
35 | comm |
---|
36 | Communicator argument to packing call (handle). |
---|
37 | |
---|
38 | .SH OUTPUT PARAMETERS |
---|
39 | .ft R |
---|
40 | .TP 1i |
---|
41 | size |
---|
42 | Upper bound on size of packed message, in bytes (integer). |
---|
43 | .ft R |
---|
44 | .TP 1i |
---|
45 | IERROR |
---|
46 | Fortran only: Error status (integer). |
---|
47 | |
---|
48 | .SH DESCRIPTION |
---|
49 | .ft R |
---|
50 | MPI_Pack_size allows the application to find out how much space is needed to pack a message. A call to MPI_Pack_size(incount, datatype, comm, size) returns in size an |
---|
51 | upper bound on the increment in position that would occur in a call to MPI_Pack, with the same values for \fIincount\fP, \fIdatatype\fP, and \fIcomm\fP. |
---|
52 | .sp |
---|
53 | \fBRationale:\fP The call returns an upper bound, rather than an exact bound, since the exact amount of space needed to pack the message may depend on the context (e.g., first message packed in a packing unit may take more space). |
---|
54 | |
---|
55 | .SH ERRORS |
---|
56 | 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. |
---|
57 | .sp |
---|
58 | Before the error value is returned, the current MPI error handler is |
---|
59 | called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. |
---|
60 | |
---|
61 | .SH SEE ALSO |
---|
62 | .ft R |
---|
63 | .sp |
---|
64 | MPI_Pack |
---|
65 | .br |
---|
66 | MPI_Unpack |
---|
67 | |
---|
68 | |
---|