[97] | 1 | .\"Copyright 2006-2008 Sun Microsystems, Inc. |
---|
| 2 | .\" Copyright (c) 1996 Thinking Machines Corporation |
---|
| 3 | .TH MPI_Type_ub 3 "Dec 08, 2009" "1.4" "Open MPI" |
---|
| 4 | .SH NAME |
---|
| 5 | \fBMPI_Type_ub\fP \- Returns the upper bound of a datatype. This will differ from zero if the type was constructed using MPI_UB. The upper bound will take into account any alignment considerations. 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_ub(MPI_Datatype \fIdatatype\fP, MPI_Aint\fI *displacement\fP) |
---|
| 13 | |
---|
| 14 | .SH Fortran Syntax |
---|
| 15 | .nf |
---|
| 16 | INCLUDE 'mpif.h' |
---|
| 17 | MPI_TYPE_UB(\fIDATATYPE, DISPLACEMENT, IERROR\fP) |
---|
| 18 | INTEGER \fIDATATYPE, DISPLACEMENT, IERROR\fP |
---|
| 19 | |
---|
| 20 | |
---|
| 21 | .SH INPUT PARAMETER |
---|
| 22 | .ft R |
---|
| 23 | .TP 1i |
---|
| 24 | datatype |
---|
| 25 | Datatype (handle). |
---|
| 26 | .sp |
---|
| 27 | |
---|
| 28 | .SH OUTPUT PARAMETERS |
---|
| 29 | .ft R |
---|
| 30 | .TP 1i |
---|
| 31 | displacement |
---|
| 32 | Displacement of upper bound from origin, in bytes (integer). |
---|
| 33 | .sp |
---|
| 34 | .ft R |
---|
| 35 | .TP 1i |
---|
| 36 | IERROR |
---|
| 37 | Fortran only: Error status (integer). |
---|
| 38 | |
---|
| 39 | .SH DESCRIPTION |
---|
| 40 | .ft R |
---|
| 41 | Note that use of this routine is \fIdeprecated\fP as of MPI-2. Please use MPI_Type_get_extent instead. |
---|
| 42 | .sp |
---|
| 43 | This deprecated routine is not available in C++. |
---|
| 44 | .sp |
---|
| 45 | MPI_Type_ub returns the lower bound of a data type. |
---|
| 46 | .sp |
---|
| 47 | The "pseudo-datatypes," MPI_LB and MPI_UB, can be used, respectively, to mark the upper bound (or the lower bound) of a datatype. These pseudo-datatypes occupy no space (extent (MPI_LB) = extent (MPI_UB) =0. They do not affect the size or count of a datatype, and do not affect the context of a message created with this datatype. However, they do affect the definition of the extent of a datatype and, therefore, affect the outcome of a replication of this datatype by a datatype constructor. |
---|
| 48 | .sp |
---|
| 49 | In general, if |
---|
| 50 | .nf |
---|
| 51 | |
---|
| 52 | Typemap = {(type(0), disp(0)), ..., (type(n-1), disp(n-1))} |
---|
| 53 | |
---|
| 54 | .fi |
---|
| 55 | then the lower bound of Typemap is defined to be |
---|
| 56 | .nf |
---|
| 57 | |
---|
| 58 | (min(j) disp(j) if no entry has |
---|
| 59 | lb(Typemap) = ( basic type lb |
---|
| 60 | (min(j) {disp(j) such that type(j) = lb} otherwise |
---|
| 61 | |
---|
| 62 | .fi |
---|
| 63 | Similarly, the upper bound of Typemap is defined to be |
---|
| 64 | .nf |
---|
| 65 | |
---|
| 66 | (max(j) disp(j) + sizeof(type(j) = lb} if no entry has |
---|
| 67 | ub(Typemap) = ( basic type ub |
---|
| 68 | (max(j) {disp(j) such that type(j) = ub} otherwise |
---|
| 69 | |
---|
| 70 | Then |
---|
| 71 | .nf |
---|
| 72 | |
---|
| 73 | extent(Typemap) = ub(Typemap) - lb(Typemap) |
---|
| 74 | |
---|
| 75 | .fi |
---|
| 76 | 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). |
---|
| 77 | |
---|
| 78 | .SH ERRORS |
---|
| 79 | 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. |
---|
| 80 | .sp |
---|
| 81 | Before the error value is returned, the current MPI error handler is |
---|
| 82 | 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. |
---|
| 83 | |
---|
| 84 | .SH SEE ALSO |
---|
| 85 | .ft R |
---|
| 86 | .sp |
---|
| 87 | MPI_Type_get_extent |
---|
| 88 | .br |
---|
| 89 | |
---|