MPI_COMM_SET_ATTR(3)MPI_COMM_SET_ATTR(3)NAMEMPI_Comm_set_attr - Stores the communicator attribute value associated
with a key
SYNOPSIS
C:
#include <mpi.h>
int MPI_Comm_set_attr ( comm, comm_keyval, attribute_val )
MPI_Comm comm;
int comm_keyval;
void *attribute_val;
Fortran:
INCLUDE "mpif.h" (or USE MPI)
INTEGER comm, comm_keyval, ierror
INTEGER(KIND=MPI_ADDRESS_KIND) attribute_val
CALL MPI_COMM_SET_ATTR(comm, comm_keyval, attribute_val,
ierror)
STANDARDS
This function is defined in the MPI-2 standard.
This release implements the MPI 1.2 standard, as documented by the MPI
Forum in the spring 1997 release of MPI: A Message Passing Interface
Standard.
DESCRIPTION
The MPI_Comm_set_attr routine stores the communicator attribute value
associated with a key. This function replaces MPI_Attr_put, whose use is
deprecated.
This routine accepts the following parameters:
comm Specifies the communicator to which the attribute will be
attached (handle)
comm_keyval Specifies the key value, as returned by
MPI_Comm_create_keyval(3) (integer)
attribute_val Specifies the attribute value
ierror Specifies the return code value for successful completion,
which is in MPI_SUCCESS. MPI_SUCCESS is defined in the
mpif.h file.
Page 1
MPI_COMM_SET_ATTR(3)MPI_COMM_SET_ATTR(3)NOTES
Values of the permanent attributes MPI_TAG_UB, MPI_HOST,
MPI_IO,MPI_WTIME_IS_GLOBAL, MPI_UNIVERSE_SIZE, and MPI_APPNUM cannot be
changed.
The type of the attribute value depends on whether C or Fortran is being
used. In C, an attribute value is a pointer (void *). In Fortran, it is
a single integer of kind MPI_ADDRESS_KIND. Note this is different from
the kind of the attribute value used in the deprecated MPI_Attr_put
routine.
If an attribute is already present, the MPI_Comm_delete_attr(3) function
(specified when the corresponding keyval was created) will be called.
SEE ALSOMPI_Comm_delete_attr(3), MPI_Comm_get_attr(3), MPI_Comm_create_keyval(3)
Page 2