Rate This Document
Findability
Accuracy
Completeness
Readability

Data Type

Function Syntax

  • Create a contiguous data type.

    MPI_Type_contiguous(int count, MPI_Datatype oldtype, MPI_Datatype *newtype)

    PMPI_Type_contiguous(int count, MPI_Datatype oldtype, MPI_Datatype *newtype)

  • Creates a vector data type.

    MPI_Type_vector(int count, int blocklength, int stride, MPI­_Datatype oldtype, MPI_Datatype *newtype)

    PMPI_Type_vector(int count, int blocklength, int stride, MPI­_Datatype oldtype, MPI_Datatype *newtype)

  • Create an hvector data type with byte displacements.

    MPI_Type_create_hvector(int count, int blocklength, MPI_Aint stride, MPI_Datatype oldtype, MPI_Datatype *newtype)

    PMPI_Type_create_hvector(int count, int blocklength, MPI_Aint stride, MPI_Datatype oldtype, MPI_Datatype *newtype)

  • Create a subarray data type describing an n-dimensional array.

    MPI_Type_create_subarray(int ndims, const int sizeArray[], const int subSizeArray[], const int subStartArray[], int order, MPI_Datatype oldtype, MPI_Datatype *newtype)

    PMPI_Type_create_subarray(int ndims, const int sizeArray[], const int subSizeArray[], const int subStartArray[], int order, MPI_Datatype oldtype, MPI_Datatype *newtype)

  • Commit a data type.

    MPI_Type_commit(MPI_Datatype *type)

    PMPI_Type_commit(MPI_Datatype *type)

  • Duplicate a data type with associated key values.

    MPI_Type_dup(MPI_Datatype oldtype, MPI_Datatype *newtype)

    PMPI_Type_dup(MPI_Datatype oldtype, MPI_Datatype *newtype)

  • Free a custom data type.

    MPI_Type_free(MPI_Datatype *type)

    PMPI_Type_free(MPI_Datatype *type)

Parameters

Parameter

Description

Value Range

Input/Output

count

Number of blocks

Positive integer

Input

blocklength

Number of elements in each block

Positive integer

Input

stride

Number of elements between the start of each block

Positive integer

Input

ndims

Number of array dimensions

Positive integer [1, 10]

Input

order

Array storage order flag

Positive integer (MPI_ORDER_C, MPI_ORDER_FORTRAN)

Input

sizeArray[]

Number of oldtype elements in each dimension of a complete array

Positive integer array

Input

subSizeArray[]

Number of oldtype elements in each dimension of a subarray

Positive integer array

Input

subStartArray[]

Start coordinates of the subarray in each dimension

Non-negative array

Input

oldtype

Old data type (handle)

Valid handle

Input

*newtype

Destination address for storing the new type (handle)

Non-empty

Output

*type

Custom data type (handle) to free

Non-empty

Input

Return Value

  • Success: MPI_SUCCESS
  • Failure: An error code is returned.

Error Code

Error Code

Description

MPI_ERR_COUNT

Invalid count argument

MPI_ERR_TYPE

Invalid data type argument

MPI_ERR_ARG

Other invalid arguments

MPI_ERR_OTHER

Other errors

Notes

  • Currently, oldtype supports only basic MPI data types.
  • count × (oldtype bytes) must not be greater than INT_MAX.
  • blocklength × count × (oldtype bytes) must not be greater than INT_MAX.