I had a question about our Fortran MPI_Improbe support.
If I look at ompi/mpi/f77/improbe_f.c I see basically (lots of code
removed):
64 void mpi_improbe_f(MPI_Fint *source, MPI_Fint *tag, MPI_Fint
*comm,
65 ompi_fortran_logical_t *flag, MPI_Fint
*message,
66 MPI_Fint *status, MPI_Fint *ierr)
67 {
94 *ierr = OMPI_INT_2_FINT(MPI_Improbe(OMPI_FINT_2_INT(*source),
95 OMPI_FINT_2_INT(*tag),
96 c_comm,
OMPI_LOGICAL_SINGLE_NAME_CONVERT(flag),
97 &c_message, c_status));
98
99 if (MPI_SUCCESS == OMPI_FINT_2_INT(*ierr)) {
106 *message = MPI_Message_c2f(c_message);
107 }
108 }
I think this logic isn't right. We reference the message at line 106 if
the call at line 94 was successful, but we should reference the message
*only* if there was a match. This condition is indicated not by ierr
but by flag.
Yes?
If someone (Brian?) would be willing to make corrections, that'd be
great. Otherwise, I'll try my hand at figuring out those preprocessor
macros that wrap around "flag".