Edit

Share via


MPI_Comm_get_attr function

Retrieves attribute value by key.

Syntax

int MPIAPI MPI_Comm_get_attr(
        MPI_Comm comm,
        int      comm_keyval,
  _Out_ void     *attribute_val,
  _Out_ int      *flag
);

Parameters

  • comm
    Communicator to which attribute is attached.

  • comm_keyval
    Key value.

  • attribute_val [out]
    Attribute value, unless flag = false.

  • flag [out]
    True if an attribute value was extracted; false if no attribute is associated with the key.

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_COMM_GET_ATTR(COMM, COMM_KEYVAL, ATTRIBUTE_VAL, FLAG, IERROR)
        INTEGER COMM, COMM_KEYVAL, IERROR
        INTEGER(KIND=MPI_ADDRESS_KIND) ATTRIBUTE_VAL
        LOGICAL FLAG

Remarks

Attributes must be extracted from the same language as they were inserted in with MPI_Comm_set_attr. Even though the attribute_val argument is declared as void pointer, it is really the address of a void pointer. See the rationale in the standard for more details.

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