📄 mpi_type_create_f90_integer.3
字号:
.\"Copyright 2006, Sun Microsystems, Inc..\"Copyright (c) 1996 Thinking Machines.TH MPI_Type_create_f90_integer 3OpenMPI "September 2006" "Open MPI 1.2" " ".SH NAME.nf\fBMPI_Type_create_f90_integer\fP \- Returns a bounded MPI integer datatype.SH SYNTAX.ft R.SH C Syntax.nf#include <mpi.h>int MPI_Type_create_f90_integer(int \fIr\fP, MPI_Datatype *\fInewtype\fP).SH Fortran Syntax.nfINCLUDE 'mpif.h'MPI_TYPE_CREATE_F90_INTEGER (\fIR, NEWTYPE, IERROR\fP) INTEGER \fIR, NEWTYPE, IERROR\fP.SH C++ Syntax.nf#include <mpi.h>static MPI::Datatype MPI::Datatype::Create_f90_integer(int \fIr\fP).SH INPUT PARAMETER.ft R.TP 1irPrecision, in decimal digits (integer)..SH OUTPUT PARAMETERS.ft R.TP 1inewtypeNew data type (handle)..TP 1iIERRORFortran only: Error status (integer). .SH DESCRIPTION.ft RThis function provides a way to declare KIND-parameterized INTEGER MPIdatatypes. The argument is interpreted in a similar fashion to the F90function SELECTED_INT_KIND: \fIr\fP must be a scalar integer, andrepresents the desired level of numerical precision, in decimaldigits..SH NOTES.ft RIt is erroneous to supply a value for \fIr\fP not supported by thecompiler..spThe Fortran function SELECTED_INT_KIND maps a large number of \fIr\fPvalues to a much smaller number of KIND parameters supported by thecompiler. KIND parameters are not specified by the language and arenot portable. From the point of view of the language, variables of thesame base type and KIND parameter are equivalent, even if their KINDparameters were generated by different \fIr\fP arguments toSELECTED_INT_KIND. However, to help facilitate interoperability in aheterogeneous environment, equivalency is more strictly defined fordatatypes returned by MPI_Type_create_f90_integer. Two MPI datatypes,each generated by this function, will match if and only if they haveidentical values for \fIr\fP..spThe interaction between the datatypes returned by this function andthe external32 data representation \- used by MPI_Pack_external,MPI_Unpack_external and many MPI_File functions \- is subtle. Theexternal32 representation of returned datatypes is as follows..sp.nf if (\fIr\fP > 38): external32 size = n/a (undefined) else if (\fIr\fP > 18): external32 size = 16 else if (\fIr\fP > 9): external32 size = 8 else if (\fIr\fP > 4): external32 size = 4 else if (\fIr\fP > 2): external32 size = 2 else: external32 size = 1.fi.spIf the external32 representation of a datatype is undefined, so arethe results of using that datatype in operations that require theexternal32 format. Care should be taken not to use incompatibledatatypes indirectly, e.g., as part of another datatype or through aduplicated datatype, in these functions..spIf a variable is declared specifying a nondefault KIND value that wasnot obtained with SELECTED_INT_KIND (i.e., \fIr\fP is unknown), theonly way to obtain a matching MPI datatype is to use the functionsMPI_Sizeof and MPI_Type_match_size..SH ERRORS.ft RAlmost all MPI routines return an error value; C routines asthe value of the function and Fortran routines in the last argument. C++functions do not return errors. If the default error handler is set toMPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanismwill be used to throw an MPI:Exception object..spBefore the error value is returned, the current MPI error handler iscalled. By default, this error handler aborts the MPI job, except forI/O function errors. The error handler may be changed withMPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURNmay be used to cause error values to be returned. Note that MPI does notguarantee that an MPI program can continue past an error. .spSee the MPI man page for a full list of MPI error codes..SH SEE ALSO.ft R.nfMPI_Pack_externalMPI_SizeofMPI_Type_match_sizeMPI_Unpack_externalSELECTED_INT_KIND' @(#)MPI_Type_create_f90_integer.3 1.5 06/03/09
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -