IBM Books

MPI Subroutine Reference

MPI_TYPE_COMMIT, MPI_Type_commit

Purpose

Makes a datatype ready for use in communication.

C synopsis

#include <mpi.h>
int MPI_Type_commit(MPI_Datatype *datatype);

C++ synopsis

#include mpi.h
void MPI::Datatype::Commit();

FORTRAN synopsis

include 'mpif.h' or use mpi
MPI_TYPE_COMMIT(INTEGER DATATYPE,INTEGER IERROR)

Parameters

datatype
is the datatype that is to be committed (handle) (INOUT)

IERROR
is the FORTRAN return code. It is always the last argument.

Description

A datatype object must be committed before you can use it in communication. You can use an uncommitted datatype as an argument in datatype constructors.

This subroutine makes a datatype ready for use in communication. The datatype is the formal description of a communication buffer. It is not the content of the buffer.

Once the datatype is committed it can be repeatedly reused to communicate the changing contents of a buffer or buffers with different starting addresses.

Notes

Basic datatypes are precommitted. It is not an error to call MPI_TYPE_COMMIT on a type that is already committed. Types returned by MPI_TYPE_GET_CONTENTS may or may not already be committed.

Errors

Invalid datatype

MPI not initialized

MPI already finalized

Related information

MPI_TYPE_CONTIGUOUS
MPI_TYPE_CREATE_DARRAY
MPI_TYPE_CREATE_SUBARRAY
MPI_TYPE_FREE
MPI_TYPE_GET_CONTENTS
MPI_TYPE_HINDEXED
MPI_TYPE_HVECTOR
MPI_TYPE_INDEXED
MPI_TYPE_STRUCT
MPI_TYPE_VECTOR


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