MPI_Comm_get_attr - Retrieves a communicator attribute
value by key
SYNOPSIS
C:
#include <mpi.h>
int MPI_Comm_get_attr ( comm, comm_keyval, attribute_val, flag )
MPI_Comm comm;
int comm_keyval;
void *attribute_val;
int *flag;
Fortran:
INCLUDE "mpif.h" (or USE MPI)
INTEGER comm, comm_keyval, ierror
INTEGER(KIND=MPI_ADDRESS_KIND) attribute_val
LOGICAL flag
CALL MPI_COMM_GET_ATTR(comm, comm_keyval, attribute_val,
flag, 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_get_attr routine retrieves a communicator
attribute value by key. This function replaces
MPI_Attr_get, whose use is deprecated. This routine
accepts the following parameters:
comm Specifies the communicator to which the
attribute is attached (handle).
comm_keyval
Specifies the key value (integer).
attribute_val
Returns the attribute value, unless flag is set
to false.
flag Specifies the presence of an attribute value.
If an attribute value was extracted, flag is set
to true. If no attribute is associated with the
ierror Specifies the return code value for successful
completion, which is in MPI_SUCCESS.
MPI_SUCCESS is defined in the mpif.h file.
NOTES
Attributes must be extracted from the same language as
that in which they were inserted.
For C programs, even though the attribute_val argument is
declared as void, it is really the address of a void
pointer. See the standard for more details.
For Fortran programs, the attribute_val is a pointer to a
Fortran integer of kind MPI_ADDRESS_KIND, not a pointer to
a void. Note this is different from the deprecated
function MPI_Attr_get.
ENVIRONMENTAL INQUIRIES
MPI predefines the following attributes attached to
MPI_COMM_WORLD. These attributes may not be deleted,
their keys freed, nor their values changed.
MPI_TAG_UB
Upper bound for tag value.
MPI_HOST
Host process rank, if such exists, otherwise
MPI_PROC_NULL.
MPI_IO Rank of a node that has regular I/O facilities.
Nodes in the same communicator may return different
valus for this parameter.
MPI_WTIME_IS_GLOBAL
Boolean variable that indicates whether clocks are
synchronized.
SEE ALSO
MPI_Attr_delete(3), MPI_Attr_put(3), MPI_Keyval_create(3)
Section 7.1.1 of the MPI-1.2 Standard for more discussion
of the environmental inquiries.
Man(1) output converted with
man2html