MPI_TYPE_INDEXED, MPI_Type_indexed Purpose Returns a new datatype that represents count blocks. Each block is defined by an entry in array_of_blocklengths and array_of_displacements. Displacements are expressed in units of extent(oldtype). C synopsis #include int MPI_Type_indexed(int count,int *array_of_blocklengths, int *array_of_displacements, MPI_Datatype oldtype,MPI_datatype *newtype); C++ synopsis #include mpi.h MPI::Datatype MPI::Datatype::Create_indexed(int count, const int array_of_blocklengths[], const int array_of_displacements[]) const; FORTRAN synopsis include 'mpif.h' or use mpi MPI_TYPE_INDEXED(INTEGER COUNT,INTEGER ARRAY_OF_BLOCKLENGTHS(*), INTEGER ARRAY_OF DISPLACEMENTS(*),INTEGER OLDTYPE, INTEGER NEWTYPE,INTEGER IERROR) Parameters count is the number of blocks and the number of entries in array_of_displacements and array_of_blocklengths (non-negative integer) (IN) array_of_blocklengths is the number of instances of oldtype in each block (array of non-negative integers) (IN) array_of_displacements is the displacement of each block in units of extent(oldtype) (array of integer) (IN) oldtype is the old datatype (handle) (IN) newtype is the new datatype (handle) (OUT) IERROR is the FORTRAN return code. It is always the last argument. Description This subroutine returns a new datatype that represents count blocks. Each is defined by an entry in array_of_blocklengths and array_of_displacements. Displacements are expressed in units of extent(oldtype). Notes newtype must be committed using MPI_TYPE_COMMIT before being used for communication. Errors Invalid count count < 0 Invalid count blocklength [i] < 0 Undefined oldtype Oldtype is MPI_LB, MPI_UB or MPI_PACKED MPI not initialized MPI already finalized Related information MPI_TYPE_COMMIT MPI_TYPE_FREE MPI_TYPE_GET_CONTENTS MPI_TYPE_GET_ENVELOPE