Edit

Share via


MPI_Type_set_attr function

Stores attribute value associated with a key.

Syntax

int MPIAPI MPI_Type_set_attr(
       MPI_Datatype type,
       int          type_keyval,
  _In_ void         *attribute_val
);

Parameters

  • type
    MPI Datatype to which attribute will be attached.

  • type_keyval
    Key value, as returned by MPI_Type_create_keyval.

  • attribute_val [in]
    Attribute value.

Return value

Returns MPI_SUCCESS on success. Otherwise, the return value is an error code.

In Fortran, the return value is stored in the IERROR parameter.

Fortran

    MPI_TYPE_SET_ATTR(DATATYPE, TYPE_KEYVAL, ATTRIBUTE_VAL, IERROR)
        INTEGER DATATYPE, TYPE_KEYVAL, IERROR
        INTEGER(KIND=MPI_ADDRESS_KIND) ATTRIBUTE_VAL

Remarks

The datatype of the attribute value depends on whether C or Fortran is being used. In C, an attribute value is a void pointer; in Fortran, it is an address-sized integer.

If an attribute is already present, the delete function (specified when the corresponding keyval was created) will be called.

Requirements

Product

HPC Pack 2012 MS-MPI Redistributable Package, HPC Pack 2008 R2 MS-MPI Redistributable Package, HPC Pack 2008 MS-MPI Redistributable Package or HPC Pack 2008 Client Utilities

Header

Mpi.h; Mpif.h

Library

Msmpi.lib

DLL

Msmpi.dll

See also

MPI Caching Functions