[97] | 1 | .\"Copyright 2006-2008 Sun Microsystems, Inc. |
---|
| 2 | .\"Copyright (c) 1996 Thinking Machines |
---|
| 3 | .TH MPI_Type_create_f90_complex 3 "Dec 08, 2009" "1.4" "Open MPI" |
---|
| 4 | |
---|
| 5 | .SH NAME |
---|
| 6 | .nf |
---|
| 7 | \fBMPI_Type_create_f90_complex\fP \- Returns a bounded MPI complex datatype |
---|
| 8 | |
---|
| 9 | .SH SYNTAX |
---|
| 10 | .ft R |
---|
| 11 | |
---|
| 12 | .SH C Syntax |
---|
| 13 | .nf |
---|
| 14 | #include <mpi.h> |
---|
| 15 | int MPI_Type_create_f90_complex(int \fIp\fP, int \fIr\fP, |
---|
| 16 | MPI_Datatype *\fInewtype\fP) |
---|
| 17 | |
---|
| 18 | .SH Fortran Syntax |
---|
| 19 | .nf |
---|
| 20 | INCLUDE 'mpif.h' |
---|
| 21 | MPI_TYPE_CREATE_F90_COMPLEX (\fIP, R, NEWTYPE, IERROR\fP) |
---|
| 22 | INTEGER \fIP, R, NEWTYPE, IERROR\fP |
---|
| 23 | |
---|
| 24 | .SH C++ Syntax |
---|
| 25 | .nf |
---|
| 26 | #include <mpi.h> |
---|
| 27 | static MPI::Datatype MPI::Datatype::Create_f90_complex(int \fIp\fP, int \fIr\fP) |
---|
| 28 | |
---|
| 29 | .SH INPUT PARAMETERS |
---|
| 30 | .ft R |
---|
| 31 | .TP 1i |
---|
| 32 | p |
---|
| 33 | Precision, in decimal digits (integer). |
---|
| 34 | .TP 1i |
---|
| 35 | r |
---|
| 36 | Decimal exponent range (integer). |
---|
| 37 | |
---|
| 38 | .SH OUTPUT PARAMETERS |
---|
| 39 | .ft R |
---|
| 40 | .TP 1i |
---|
| 41 | newtype |
---|
| 42 | New data type (handle). |
---|
| 43 | .TP 1i |
---|
| 44 | IERROR |
---|
| 45 | Fortran only: Error status (integer). |
---|
| 46 | |
---|
| 47 | .SH DESCRIPTION |
---|
| 48 | .ft R |
---|
| 49 | This function provides a way to declare KIND-parameterized COMPLEX MPI |
---|
| 50 | datatypes. The arguments are interpreted in a similar fashion to the |
---|
| 51 | F90 function SELECTED_REAL_KIND. The parameters \fIp\fP and \fIr\fP |
---|
| 52 | must be scalar integers. The argument \fIp\fP represents the required |
---|
| 53 | level of numerical precision, in decimal digits. The \fIr\fP parameter |
---|
| 54 | indicates the range of exponents desired: the returned datatype will |
---|
| 55 | have at least one exponent between \+\fIr\fP and \-\fIr\fP (inclusive). |
---|
| 56 | .sp |
---|
| 57 | Either \fIp\fP or \fIr\fP, but not both, may be omitted from calls to |
---|
| 58 | SELECTED_REAL_KIND. Similarly, either argument to |
---|
| 59 | MPI_Type_create_f90_complex may be set to MPI_UNDEFINED. |
---|
| 60 | |
---|
| 61 | .SH NOTES |
---|
| 62 | .ft R |
---|
| 63 | It is erroneous to supply values for \fIp\fP and \fIr\fP not supported by |
---|
| 64 | the compiler. |
---|
| 65 | .sp |
---|
| 66 | The Fortran function SELECTED_REAL_KIND maps a large number of |
---|
| 67 | (\fIp,r\fP) pairs to a much smaller number of KIND parameters |
---|
| 68 | supported by the compiler. KIND parameters are not specified by the |
---|
| 69 | language and are not portable. From the point of view of the language, |
---|
| 70 | variables of the same base type and KIND parameter are equivalent, |
---|
| 71 | even if their KIND parameters were generated by different (\fIp,r\fP) |
---|
| 72 | arguments to SELECTED_REAL_KIND. However, to help facilitate |
---|
| 73 | interoperability in a heterogeneous environment, equivalency is more |
---|
| 74 | strictly defined for datatypes returned by |
---|
| 75 | MPI_Type_create_f90_complex. Two MPI datatypes, each generated by this |
---|
| 76 | function, will match if and only if they have identical values for |
---|
| 77 | both \fIp\fP and \fIr\fP. |
---|
| 78 | .sp |
---|
| 79 | The interaction between the datatypes returned by this function and |
---|
| 80 | the external32 data representation \- used by MPI_Pack_external, |
---|
| 81 | MPI_Unpack_external, and many MPI_File functions \- is subtle. The |
---|
| 82 | external32 representation of returned datatypes is as follows. |
---|
| 83 | .sp |
---|
| 84 | .nf |
---|
| 85 | if (\fIp\fP > 33) and/or (\fIr\fP > 4931): |
---|
| 86 | external32 size = n/a (undefined) |
---|
| 87 | else if (\fIp\fP > 15) and/or (\fIr\fP > 307): |
---|
| 88 | external32 size = 32 |
---|
| 89 | else if (\fIp\fP > 6) and/or (\fIr\fP > 37): |
---|
| 90 | external32 size = 16 |
---|
| 91 | else: |
---|
| 92 | external32 size = 8 |
---|
| 93 | .fi |
---|
| 94 | .sp |
---|
| 95 | If the external32 representation of a datatype is undefined, so are |
---|
| 96 | the results of using that datatype in operations that require the |
---|
| 97 | external32 format. Care should be taken not to use incompatible |
---|
| 98 | datatypes indirectly, e.g., as part of another datatype or through a |
---|
| 99 | duplicated datatype, in these functions. |
---|
| 100 | .sp |
---|
| 101 | If a variable is declared specifying a nondefault KIND value that was |
---|
| 102 | not obtained with SELECTED_REAL_KIND (i.e., \fIp\fP and/or \fIr\fP are |
---|
| 103 | unknown), the only way to obtain a matching MPI datatype is to use the |
---|
| 104 | functions MPI_Sizeof and MPI_Type_match_size. |
---|
| 105 | |
---|
| 106 | .SH ERRORS |
---|
| 107 | .ft R |
---|
| 108 | Almost all MPI routines return an error value; C routines as |
---|
| 109 | the value of the function and Fortran routines in the last argument. C++ |
---|
| 110 | functions do not return errors. If the default error handler is set to |
---|
| 111 | MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism |
---|
| 112 | will be used to throw an MPI:Exception object. |
---|
| 113 | .sp |
---|
| 114 | Before the error value is returned, the current MPI error handler is |
---|
| 115 | called. By default, this error handler aborts the MPI job, except for |
---|
| 116 | I/O function errors. The error handler may be changed with |
---|
| 117 | MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN |
---|
| 118 | may be used to cause error values to be returned. Note that MPI does not |
---|
| 119 | guarantee that an MPI program can continue past an error. |
---|
| 120 | .sp |
---|
| 121 | See the MPI man page for a full list of MPI error codes. |
---|
| 122 | |
---|
| 123 | .SH SEE ALSO |
---|
| 124 | .ft R |
---|
| 125 | .nf |
---|
| 126 | MPI_Pack_external |
---|
| 127 | MPI_Sizeof |
---|
| 128 | MPI_Type_match_size |
---|
| 129 | MPI_Unpack_external |
---|
| 130 | SELECTED_REAL_KIND |
---|
| 131 | |
---|