Skip to content

Commit 43d0169

Browse files
hppritchaawlauria
authored andcommitted
fix a problem with f77 binding generation
not sure why this only showed up for me with MAC compiler. Signed-off-by: Howard Pritchard <howardp@lanl.gov> (cherry picked from commit 883257f)
1 parent 9591736 commit 43d0169

File tree

2 files changed

+106
-2
lines changed

2 files changed

+106
-2
lines changed

ompi/mpi/fortran/mpif-h/info_get_string_f.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ OMPI_GENERATE_F77_BINDINGS (PMPI_INFO_GET_STRING,
4343
pmpi_info_get_string__,
4444
pompi_info_get_string_f,
4545
(MPI_Fint *info, char *key, MPI_Fint *buflen, char *value, ompi_fortran_logical_t *flag, MPI_Fint *ierr, int key_len, int value_len),
46-
(info, key, valuelen, value, flag, ierr, key_len, value_len) )
46+
(info, key, buflen, value, flag, ierr, key_len, value_len) )
4747
#endif
4848
#endif
4949

@@ -63,7 +63,7 @@ OMPI_GENERATE_F77_BINDINGS (MPI_INFO_GET_STRING,
6363
mpi_info_get_string__,
6464
ompi_info_get_string_f,
6565
(MPI_Fint *info, char *key, MPI_Fint *buflen, char *value, ompi_fortran_logical_t *flag, MPI_Fint *ierr, int key_len, int value_len),
66-
(info, key, valuelen, value, flag, ierr, key_len, value_len) )
66+
(info, key, buflen, value, flag, ierr, key_len, value_len) )
6767
#else
6868
#define ompi_info_get_string_f pompi_info_get_string_f
6969
#endif
Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
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

Comments
 (0)