Manual Pages for UNIX Darwin command on man MPI_Type_create_hindexed
MyWebUniversity

Manual Pages for UNIX Darwin command on man MPI_Type_create_hindexed

MPITypecreatehindexed(3OpenMPI) MPITypecreatehindexed(3OpenMPI)

NAME

MMPPIITTyyppeeccrreeaatteehhiinnddeexxeedd - Creates an indexed data type with offsets in

bytes. SSYYNNTTAAXX CC SSyynnttaaxx

#include

int MPITypecreatehindexed(int count, int arrayofblocklengths, MPIAint arrayofdisplacements[], MPIDatatype oldtype, MPIDatatype *newtype) FFoorrttrraann SSyynnttaaxx ((sseeee FFOORRTTRRAANN 7777 NNOOTTEESS)) INCLUDE 'mpif.h' MPITYPECREATEHINDEXED(COUNT, ARRAYOFBLOCKLENGTHS,

ARRAYOFDISPLACEMENTS, OLDTYPE, NEWTYPE, IERROR)

INTEGER COUNT, ARRAYOFBLOCKLENGTHS(*), OLDTYPE, NEWTYPE, IERROR

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

#include

MPI::Datatype MPI::Datatype::Createhindexed(int count, const int arrayofblocklengths, const MPI::Aint arrayofdisplacements[]) const IINNPPUUTT PPAARRAAMMEETTEERRSS count Number of blocks (nonnegative integer). arrayofblocklengths

Number of elements in each block (array of nonnegative inte-

gers). arrayofdisplacements Byte displacement of each block (array of integers). oldtype Old data type (handle). OOUUTTPPUUTT PPAARRAAMMEETTEERRSS newtype New data type (handle).

IERROR Fortran only: Error status (integer).

DESCRIPTION

MPITypecreatehindexed is identical to MPITypeindexed, except that block displacements in arrayofdisplacements are specified in bytes, rather than in multiples of the oldtype extent. Assume that oldtype has type map

{(type(0), disp(0)), ..., (type(n-1), disp(n-1))},

with extent ex. Let B be the arrayofblocklengths argument and D be the arrayofdisplacements argument. The newly created data type has

n x S^count-1

(i=0) B[i] entries:

{(type(0), disp(0) + D[0]),...,(type(n-1), disp(n-1) + D[0]),...,

(type(0), disp(0) + (D[0] + B[0]-1)* ex),...,

type(n-1), disp(n-1) + (D[0]+ B[0]-1)* ex),...,

(type(0), disp(0) + D[count-1]),...,(type(n-1), disp(n-1) + D[count-1]),...,

(type(0), disp(0) + D[count-1] + (B[count-1] -1)* ex),...,

(type(n-1), disp(n-1) + D[count-1] + (B[count-1] -1)* ex)}

NOTE - This routine replaces MPITypehindexed, which is deprecated.

See the man page MPITypehindexed(3) for information about that rou-

tine. FFOORRTTRRAANN 7777 NNOOTTEESS The MPI standard prescribes portable Fortran syntax for the ARRAYOFDISPLACEMENTS(*) argument only for Fortran 90. FORTRAN 77

users may use the non-portable syntax

INTEGER*MPIADDRESSKIND ARRAYOFDISPLACEMENTS(*) 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 the MPI(3) man page for a full list of MPI error codes.

SEE ALSO

MPITypeindexed MPITypehindexed Open MPI 1.2 September 200M6PITypecreatehindexed(3OpenMPI)




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