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