|
| 1 | +.\" -*- nroff -*- |
| 2 | +.\" Copyright 2013 Los Alamos National Security, LLC. All rights reserved. |
| 3 | +.\" Copyright 2010 Cisco Systems, Inc. All rights reserved. |
| 4 | +.\" Copyright 2006-2008 Sun Microsystems, Inc. |
| 5 | +.\" Copyright (c) 1996 Thinking Machines Corporation |
| 6 | +.\" Copyright (c) 2020 Google, LLC. All rights reserved. |
| 7 | +.\" $COPYRIGHT$ |
| 8 | +.TH MPI_Info_get 3 "#OMPI_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" |
| 9 | +.SH NAME |
| 10 | +\fBMPI_Info_get_string\fP \- Retrieves the value associated with a key in an info object. |
| 11 | + |
| 12 | +.SH SYNTAX |
| 13 | +.ft R |
| 14 | +.SH C Syntax |
| 15 | +.nf |
| 16 | +#include <mpi.h> |
| 17 | +int MPI_Info_get_string(MPI_Info \fIinfo\fP, const char \fI*key\fP, int *\fIbuflen\fP, char \fI*value\fP, int *\fIflag\fP) |
| 18 | + |
| 19 | +.fi |
| 20 | +.SH Fortran Syntax |
| 21 | +.nf |
| 22 | +USE MPI |
| 23 | +! or the older form: INCLUDE 'mpif.h' |
| 24 | +MPI_INFO_GET_STRING(\fIINFO, KEY, BUFLEN, VALUE, FLAG, IERROR\fP) |
| 25 | + INTEGER \fIINFO, BUFLEN, IERROR\fP |
| 26 | + CHARACTER*(*) \fIKEY, VALUE\fP |
| 27 | + LOGICAL \fIFLAG\fP |
| 28 | + |
| 29 | +.fi |
| 30 | +.SH Fortran 2008 Syntax |
| 31 | +.nf |
| 32 | +USE mpi_f08 |
| 33 | +MPI_Info_get_string(\fIinfo\fP, \fIkey\fP, \fIbuflen\fP, \fIvalue\fP, \fIflag\fP, \fIierror\fP) |
| 34 | + TYPE(MPI_Info), INTENT(IN) :: \fIinfo\fP |
| 35 | + CHARACTER(LEN=*), INTENT(IN) :: \fIkey\fP |
| 36 | + INTEGER, INTENT(INOUT) :: \fIbuflen\fP |
| 37 | + CHARACTER(LEN=valuelen), INTENT(OUT) :: \fIvalue\fP |
| 38 | + LOGICAL, INTENT(OUT) :: \fIflag\fP |
| 39 | + INTEGER, OPTIONAL, INTENT(OUT) :: \fIierror\fP |
| 40 | + |
| 41 | +.fi |
| 42 | +.SH INPUT PARAMETERS |
| 43 | +.ft R |
| 44 | +.TP 1i |
| 45 | +info |
| 46 | +Info object (handle). |
| 47 | +.ft R |
| 48 | +.TP 1i |
| 49 | +key |
| 50 | +Key (string). |
| 51 | + |
| 52 | +.SH OUTPUT PARAMETER |
| 53 | +.ft R |
| 54 | +.ft 1i |
| 55 | +buflen |
| 56 | +On entry, length of value arg. On return, set to required size to hold value string (integer). |
| 57 | +.ft R |
| 58 | +.TP 1i |
| 59 | +value |
| 60 | +Value (string). |
| 61 | +.ft R |
| 62 | +.TP 1i |
| 63 | +flag |
| 64 | +Returns true if key defined, false if not (boolean). |
| 65 | +.ft R |
| 66 | +.TP 1i |
| 67 | +IERROR |
| 68 | +Fortran only: Error status (integer). |
| 69 | + |
| 70 | +.SH DESCRIPTION |
| 71 | +.ft R |
| 72 | +MPI_Info_get_string retrieves the value associated with \fIkey\fP from \fIinfo\fP, if any. If such a key exists in info, it sets \fIflag\fP to true and returns the value in \fIvalue\fP, otherwise it sets |
| 73 | +flag to false and leaves value unchanged. \fIbuflen\fP on input is the size of the provided buffer, for the output of buflen it is the size of the buffer needed to store the value string. |
| 74 | +If the buflen passed into the function is less than the actual size needed to store the value string (including null terminator in C), the value is truncated. On return, |
| 75 | +the value of \fIbuflen\fP will be set to the required buffer size to hold the value string. If buflen is set to 0, value is not changed. In C, \fIbuflen\fP includes the required space for the |
| 76 | +null terminator. In C, this function returns a null terminated string in all cases where the \fIbuflen\fP input value is greater than 0. |
| 77 | + |
| 78 | +If \fIkey\fP is larger than MPI_MAX_INFO_KEY, the call is erroneous. |
| 79 | + |
| 80 | +.SH ERRORS |
| 81 | +Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. |
| 82 | +.sp |
| 83 | +Before the error value is returned, the current MPI error handler is |
| 84 | +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN 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. |
| 85 | + |
| 86 | +.SH SEE ALSO |
| 87 | +.ft r |
| 88 | +MPI_Info_create |
| 89 | +.br |
| 90 | +MPI_Info_delete |
| 91 | +.br |
| 92 | +MPI_Info_dup |
| 93 | +.br |
| 94 | +MPI_Info_free |
| 95 | +.br |
| 96 | +MPI_Info_get_valuelen |
| 97 | +.br |
| 98 | +MPI_Info_get_nkeys |
| 99 | +.br |
| 100 | +MPI_Info_get_nthkey |
| 101 | +.br |
| 102 | +MPI_Info_set |
| 103 | +.br |
| 104 | + |
0 commit comments