[97] | 1 | .\"Copyright 2006-2008 Sun Microsystems, Inc. |
---|
| 2 | .\" Copyright (c) 1996 Thinking Machines Corporation |
---|
| 3 | .TH MPI_Sizeof 3 "Dec 08, 2009" "1.4" "Open MPI" |
---|
| 4 | |
---|
| 5 | .SH NAME |
---|
| 6 | \fBMPI_Sizeof\fP \- Returns the size, in bytes, of the given type |
---|
| 7 | |
---|
| 8 | .SH SYNTAX |
---|
| 9 | .ft R |
---|
| 10 | |
---|
| 11 | .SH Fortran Syntax |
---|
| 12 | .nf |
---|
| 13 | INCLUDE 'mpif.h' |
---|
| 14 | MPI_SIZEOF(\fIX, SIZE, IERROR\fP) |
---|
| 15 | <type> \fIX\fP |
---|
| 16 | INTEGER \fISIZE, IERROR\fP |
---|
| 17 | |
---|
| 18 | .SH INPUT PARAMETER |
---|
| 19 | .ft R |
---|
| 20 | .TP 1i |
---|
| 21 | X |
---|
| 22 | A Fortran variable of numeric intrisic type (choice). |
---|
| 23 | |
---|
| 24 | .SH OUTPUT PARAMETERS |
---|
| 25 | .ft R |
---|
| 26 | .TP 1i |
---|
| 27 | SIZE |
---|
| 28 | Size of machine representation of that type (integer). |
---|
| 29 | .ft R |
---|
| 30 | .TP 1i |
---|
| 31 | IERROR |
---|
| 32 | Error status (integer). |
---|
| 33 | |
---|
| 34 | .SH DESCRIPTION |
---|
| 35 | .ft R |
---|
| 36 | MPI_SIZEOF returns the size (in bytes) of the machine representation |
---|
| 37 | of the given variable. It is a generic Fortran type and has a Fortran |
---|
| 38 | binding only. This routine is similar to the sizeof builtin in |
---|
| 39 | C/C++. However, if given an array argument, it returns the size of the |
---|
| 40 | base element, not the size of the whole array. |
---|
| 41 | |
---|
| 42 | .SH NOTES |
---|
| 43 | This function is not available in C/C++ because it is not necessary. |
---|
| 44 | |
---|
| 45 | .SH ERRORS |
---|
| 46 | .ft R |
---|
| 47 | Almost all MPI routines return an error value; C routines as |
---|
| 48 | the value of the function and Fortran routines in the last argument. C++ |
---|
| 49 | functions do not return errors. If the default error handler is set to |
---|
| 50 | MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism |
---|
| 51 | will be used to throw an MPI:Exception object. |
---|
| 52 | .sp |
---|
| 53 | Before the error value is returned, the current MPI error handler is |
---|
| 54 | called. By default, this error handler aborts the MPI job, except for |
---|
| 55 | I/O function errors. The error handler may be changed with |
---|
| 56 | MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN |
---|
| 57 | may be used to cause error values to be returned. Note that MPI does not |
---|
| 58 | guarantee that an MPI program can continue past an error. |
---|
| 59 | .sp |
---|
| 60 | See the MPI man page for a full list of MPI error codes. |
---|
| 61 | |
---|