IBM Books

MPI Subroutine Reference

MPI_TYPE_CREATE_DARRAY, MPI_Type_create_darray

Purpose

Generates the datatypes corresponding to the distribution of an ndims-dimensional array of oldtype elements onto an ndims-dimensional grid of logical tasks.

C synopsis

#include <mpi.h>
int MPI_Type_create_darray (int size,int rank,int ndims,int array_of_gsizes[],
			    int array_of_distribs[],int array_of_dargs[],
			    int array_of_psizes[],int order,MPI_Datatype oldtype,
			    MPI_Datatype *newtype);

C++ synopsis

#include mpi.h
MPI::Datatype MPI::Datatype::Create_darray(int size, int rank, int ndims,
					   const int array_of_gsizes[],
					   const int array_of_distribs[],
					   const int array_of_dargs[],
					   const int array_of_psizes[],
					   int order) const;

FORTRAN synopsis

include 'mpif.h' or use mpi
MPI_TYPE_CREATE_DARRAY (INTEGER SIZE,INTEGER RANK,INTEGER NDIMS,
			INTEGER ARRAY_OF_GSIZES(*),INTEGER ARRAY_OF_DISTRIBS(*),
			INTEGER ARRAY_OF_DARGS(*),INTEGER ARRAY_OF_PSIZES(*),
			INTEGER ORDER,INTEGER OLDTYPE,INTEGER NEWTYPE,INTEGER IERROR)
    

Parameters

size
is the size of the task group (positive integer)(IN)

rank
is the rank in the task group (nonnegative integer)(IN)

ndims
is the number of array dimensions as well as task grid dimensions (positive integer)(IN)

array_of_gsizes
is the number of elements of type oldtype in each dimension of the global array (array of positive integers) (IN)

array_of_distribs
is the distribution of the global array in each dimension (array of state) (IN)

array_of_dargs
is the distribution argument in each dimension of the global array (array of positive integers) (IN)

array_of_psizes
is the size of the logical grid of tasks in each dimension (array of positive integers)(IN)

order
is the array storage order flag (state)(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

MPI_TYPE_CREATE_DARRAY generates the datatypes corresponding to an HPF-like distribution of an ndims-dimensional array of oldtype elements onto an ndims-dimensional grid of logical tasks. The ordering of tasks in the task grid is assumed to be row-major. See The High Performance FORTRAN Handbook for more information.

Errors

Fatal errors:

MPI not initialized

MPI already finalized

Invalid group size
size must be a positive integer

Invalid rank
rank must be a nonnegative integer

Invalid dimension count
ndims must be a positive integer

Invalid array element
Each element of array_of_gsizes and array_of_psizes must be a positive integer

Invalid distribution element
Each element of array_of_distribs must be either MPI_DISTRIBUTE_BLOCK, MPI_DISTRIBUTE_CYCLIC, or MPI_DISTRIBUTE_NONE

Invalid darg element
Each element of array_of_dargs must be a positive integer or equal to MPI_DISTRIBUTE_DFLT_DARG

Invalid order
order must either be MPI_ORDER_C or MPI_ORDER_FORTRAN

MPI_DATATYPE_NULL not valid
oldtype cannot be equal to MPI_DATATYPE_NULL

Undefined datatype
oldtype is not a defined datatype

Invalid datatype
oldtype cannot be: MPI_LB, MPI_PACKED, or MPI_UB

Invalid grid size
The product of the elements of array_of_psizes must be equal to size

Invalid block distribution
The condition (array_of_psizes[i]* array_of_dargs[i])<array_of_gsizes[i] must be satisfied for all indices i between 0 and (ndims-1) for which a block distribution is specified

Invalid psize element
Each element of array_of_psizes must be equal to 1 if the same element of array_of_distribs has a value of MPI_DISTRIBUTE_NONE

Stride overflow

Extent overflow

Size overflow

Upper or lower bound overflow

Related information

MPI_TYPE_COMMIT
MPI_TYPE_FREE
MPI_TYPE_GET_CONTENTS
MPI_TYPE_GET_ENVELOPE


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]