[97] | 1 | .\"Copyright 2006-2008 Sun Microsystems, Inc. |
---|
| 2 | .\" Copyright (c) 1996 Thinking Machines Corporation |
---|
| 3 | .TH MPI_Type_extent 3 "Dec 08, 2009" "1.4" "Open MPI" |
---|
| 4 | .SH NAME |
---|
| 5 | \fBMPI_Type_extent\fP \- Returns the extent of a data type, the difference between the upper and lower bounds of the data type -- use of this routine is deprecated. |
---|
| 6 | |
---|
| 7 | .SH SYNTAX |
---|
| 8 | .ft R |
---|
| 9 | .SH C Syntax |
---|
| 10 | .nf |
---|
| 11 | #include <mpi.h> |
---|
| 12 | int MPI_Type_extent(MPI_Datatype \fIdatatype\fP, MPI_Aint\fI *extent\fP) |
---|
| 13 | |
---|
| 14 | .SH Fortran Syntax |
---|
| 15 | .nf |
---|
| 16 | INCLUDE 'mpif.h' |
---|
| 17 | MPI_TYPE_EXTENT(\fIDATATYPE, EXTENT, IERROR\fP) |
---|
| 18 | INTEGER \fIDATATYPE, EXTENT, IERROR\fP |
---|
| 19 | |
---|
| 20 | |
---|
| 21 | .SH INPUT PARAMETER |
---|
| 22 | .ft R |
---|
| 23 | .TP 1i |
---|
| 24 | datatype |
---|
| 25 | Datatype (handle). |
---|
| 26 | .sp |
---|
| 27 | .SH OUTPUT PARAMETERS |
---|
| 28 | .ft R |
---|
| 29 | .TP 1i |
---|
| 30 | extent |
---|
| 31 | Datatype extent (integer). |
---|
| 32 | .sp |
---|
| 33 | .ft R |
---|
| 34 | .TP 1i |
---|
| 35 | IERROR |
---|
| 36 | Fortran only: Error status (integer). |
---|
| 37 | |
---|
| 38 | .SH DESCRIPTION |
---|
| 39 | .ft R |
---|
| 40 | Note that use of this routine is \fIdeprecated\fP as of MPI-2. Please use MPI_Type_get_extent instead. |
---|
| 41 | .sp |
---|
| 42 | This deprecated routine is not available in C++. |
---|
| 43 | .sp |
---|
| 44 | MPI_Type_extent returns the extent of a data type, the difference between the upper and lower bounds of the data type. |
---|
| 45 | .sp |
---|
| 46 | In general, if |
---|
| 47 | .sp |
---|
| 48 | .nf |
---|
| 49 | Typemap = {(type(0), disp(0)), ..., (type(n-1), disp(n-1))} |
---|
| 50 | .fi |
---|
| 51 | .sp |
---|
| 52 | then the lower bound of Typemap is defined to be |
---|
| 53 | .sp |
---|
| 54 | .nf |
---|
| 55 | ( min(j) disp(j) if no entry has |
---|
| 56 | lb(Typemap)=( basic type lb |
---|
| 57 | (min(j) {disp(j) such that type(j) = lb} otherwise |
---|
| 58 | |
---|
| 59 | .fi |
---|
| 60 | .sp |
---|
| 61 | Similarly, the upper bound of Typemap is defined to be |
---|
| 62 | .sp |
---|
| 63 | .nf |
---|
| 64 | (max(j) disp(j) + sizeof(type(j)) + e if no entry has |
---|
| 65 | ub(Typemap)=( basic type ub |
---|
| 66 | (max(j) {disp(j) such that type(j) = ub} otherwise |
---|
| 67 | .fi |
---|
| 68 | .sp |
---|
| 69 | Then |
---|
| 70 | .sp |
---|
| 71 | .nf |
---|
| 72 | extent(Typemap) = ub(Typemap) - lb(Typemap) |
---|
| 73 | .fi |
---|
| 74 | .sp |
---|
| 75 | If type(i) requires alignment to a byte address that is a multiple of k(i), then e is the least nonnegative increment needed to round extent(Typemap) to the next multiple of max(i) k(i). |
---|
| 76 | |
---|
| 77 | .SH ERRORS |
---|
| 78 | 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. |
---|
| 79 | .sp |
---|
| 80 | Before the error value is returned, the current MPI error handler is |
---|
| 81 | 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. |
---|
| 82 | |
---|
| 83 | .SH SEE ALSO |
---|
| 84 | .ft R |
---|
| 85 | .sp |
---|
| 86 | MPI_Type_get_extent |
---|
| 87 | .br |
---|
| 88 | |
---|