Manual Pages for UNIX Darwin command on man MPI_Type_get_contents
MyWebUniversity

Manual Pages for UNIX Darwin command on man MPI_Type_get_contents

MPITypegetcontents(3OpenMPI) MPITypegetcontents(3OpenMPI)

NAME

MMPPIITTyyppeeggeettccoonntteennttss - Returns information about arguments used in

creation of a data type. SSYYNNTTAAXX CC SSyynnttaaxx

#include

int MPITypegetcontents(MPIDatatype datatype, int maxintegers, int maxaddresses, int maxdatatypes, int arrayofintegers[], MPIAint arrayofaddresses[], MPIDatatype arrayofdatatypes[]) FFoorrttrraann SSyynnttaaxx ((sseeee FFOORRTTRRAANN 7777 NNOOTTEESS)) INCLUDE 'mpif.h' MPITYPEGETCONTENTS(DATATYPE, MAXINTEGERS, MAXADDRESSES, MAXDATATYPES, ARRAYOFINTEGERS, ARRAYOFADDRESSES,

ARRAYOFDATATYPES, IERROR)

INTEGER DATATYPE, MAXINTEGERS, MAXADDRESSES, MAXDATATYPES

INTEGER ARRAYOFINTEGERS(*), ARRAYOFDATATYPES(*), IERROR

INTEGER(KIND=MPIADDRESSKIND) ARRAYOFADDRESSES(*) CC++++ SSyynnttaaxx

#include

void MPI::Datatype::Getcontents(int maxintegers, int maxaddresses, int maxdatatypes, int arrayofintegers[], MPI::Aint arrayofaddresses[], MPI::Datatype arrayofdatatypes[]) const IINNPPUUTT PPAARRAAMMEETTEERRSS datatype Data type to access (handle). maxintegers

Number of elements in arrayofintegers (nonnegative inte-

ger). maxaddresses

Number of elements in arrayofaddresses (nonnegative inte-

ger). maxdatatypes

Number of elements in arrayofdatatypes (nonnegative inte-

ger). OOUUTTPPUUTT PPAARRAAMMEETTEERRSS arrayofintegers Contains integer arguments used in constructing datatype (array of integers). arrayofaddresses Contains address arguments used in constructing datatype (array of integers). arrayofdatatypes

Contains data-type arguments used in constructing datatype

(array of integers).

IERROR Fortran only: Error status (integer).

DESCRIPTION

For the given data type, MPITypegetenvelope returns information on the number and type of input arguments used in the call that created

the data type. The number-of-arguments values returned can be used to

provide sufficiently large arrays in the decoding routine MPITypegetcontents. This call and the meaning of the returned values is described below. The combiner reflects the MPI data type constructor call that was used in creating datatype. The parameter datatype must be a predefined unnamed or a derived data type. The call is erroneous if datatype is a predefined named data type. The values given for maxintegers, maxaddresses, and maxdatatypes must be at least as large as the value returned in numintegers, numaddresses, and numdatatypes, respectively, in the call MPITypegetenvelope for the same datatype argument.

The data types returned in arrayofdatatypes are handles to data-type

objects that are equivalent to the data types used in the original con-

struction call. If these were derived data types, then the returned

data types are new data-type objects, and the user is responsible for

freeing these datatypes with MPITypefree. If these were predefined data types, then the returned data type is equal to that (constant) predefined data type and cannot be freed. The committed state of returned derived data types is undefined, that

is, the data types may or may not be committed. Furthermore, the con-

tent of attributes of returned data types is undefined.

Note that MPITypegetcontents can be invoked with a data-type argu-

ment that was constructed using MPITypecreatef90real, MPITypecre-

atef90integer, or MPITypecreatef90complex (an unnamed predefined data type). In such a case, an empty arrayofdatatypes is returned.

In the MPI-1 data-type constructor calls, the address arguments in For-

tran are of type INTEGER. In the new MPI-2 calls, the address arguments

are of type INTEGER(KIND=MPI ADDRESS KIND). The call MPITypegetcon-

tents returns all addresses in an argument of type INTEGER(KIND=MPI

ADDRESS KIND). This is true even if the old MPI-1 calls were used.

Thus, the location of values returned can be thought of as being returned by the C bindings. It can also be determined by examining the

new MPI-2 calls for data-type constructors for the deprecated MPI-1

calls that involve addresses. FFOORRTTRRAANN 7777 NNOOTTEESS The MPI standard prescribes portable Fortran syntax for the ARRAYOFADDRESSES argument only for Fortran 90. FORTRAN 77 users may

use the non-portable syntax

INTEGER*MPIADDRESSKIND ARRAYOFADDRESSES(*) where MPIADDRESSKIND is a constant defined in mpif.h and gives the length of the declared integer in bytes. EERRRROORRSS Almost all MPI routines return an error value; C routines as the value

of the function and Fortran routines in the last argument. C++ func-

tions do not return errors. If the default error handler is set to

MPI::ERRORSTHROWEXCEPTIONS, then on error the C++ exception mechanism

will be used to throw an MPI:Exception object. Before the error value is returned, the current MPI error handler is called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with

MPICommseterrhandler; the predefined error handler MPIERRORSRETURN

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.

SEE ALSO

MPITypegetenvelope Open MPI 1.2 September 2006 MPITypegetcontents(3OpenMPI)




Contact us      |      About us      |      Term of use      |       Copyright © 2000-2019 MyWebUniversity.com ™