MPI_ATTR_GET(3)MPI_ATTR_GET(3)NAMEMPI_Attr_get - Retrieves an attribute value by key
SYNOPSIS
C:
#include <mpi.h>
int MPI_Attr_get ( comm, keyval, attr_value, flag )
MPI_Comm comm;
int keyval;
void *attr_value;
int *flag;
C++:
#include <mpi.h>
bool Comm::Get_attr(
int comm_keyval,
void* attribute_val) const
Fortran:
INCLUDE "mpif.h" (or USE MPI)
INTEGER comm, keyval, attr_value, ierror
LOGICAL flag
CALL MPI_ATTR_GET(comm, keyval, attr_value,
flag, ierror)
STANDARDS
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_Attr_get routine retrieves an attribute value by key. This
routine accepts the following parameters:
comm Specifies the communicator to which the attribute is attached
(handle).
keyval Specifies the key value (integer).
attr_value
Returns the attribute value, unless flag is set to false.
Page 1
MPI_ATTR_GET(3)MPI_ATTR_GET(3)
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 key, flag is set to false.
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 attr_value argument is declared as void,
it is really the address of a void pointer. See the standard for more
details.
For Fortran programs, the attr_value is a pointer to a Fortran integer,
not a pointer to a void.
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 ALSOMPI_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.
Page 2