NAME
MMPPIIIInnffooggeett - Retrieves the value associated with a key in an info
object. SSYYNNTTAAXX CC SSyynnttaaxx#include
int MPIInfoget(MPIInfo info, char *key, int valuelen, char *value, int *flag) FFoorrttrraann SSyynnttaaxx INCLUDE 'mpif.h'MPIINFOGET(INFO, KEY, VALUELEN, VALUE, FLAG, IERROR)
INTEGER INFO, VALUELEN, IERROR
CHARACTER*(*) KEY, VALUE LOGICAL FLAG CC++++ SSyynnttaaxx#include
bool MPI::Info::Get(const char* key, int valuelen, char* value) const IINNPPUUTT PPAARRAAMMEETTEERRSS info Info object (handle). key Key (string). valuelen Length of value arg (integer). OOUUTTPPUUTT PPAARRAAMMEETTEERR value Value (string). flag Returns true if key defined, false if not (boolean).IERROR Fortran only: Error status (integer).
DESCRIPTION
MPIInfoget retrieves the value associated with key in a previous call to MPIInfoset. If such a key exists, it sets flag to true and returns the value in value; otherwise it sets flag to false and leaves value unchanged. valuelen is the number of characters available in value. If it is less than the actual size of the value, the returned value istruncated. In C, valuelen should be one less than the amount of allo-
cated space to allow for the null terminator. If key is larger than MPIMAXINFOKEY, the call is erroneous. EERRRROORRSS Almost all MPI routines return an error value; C routines as the valueof the function and Fortran routines in the last argument. C++ func-
tions do not return errors. If the default error handler is set toMPI::ERRORSTHROWEXCEPTIONS, then on error the C++ exception mechanism
will be used to throw an MPI:Exception object. Before the error value is returned, the current MPI error handler is called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed withMPICommseterrhandler; the predefined error handler MPIERRORSRETURN
may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error.SEE ALSO
MPIInfocreate MPIInfodelete MPIInfodup MPIInfofree MPIInfogetvaluelen MPIInfogetnkeys MPIInfogetnthkey MPIInfoset Open MPI 1.2 September 2006 MPIInfoget(3OpenMPI)