File tree Expand file tree Collapse file tree 1 file changed +10
-11
lines changed Expand file tree Collapse file tree 1 file changed +10
-11
lines changed Original file line number Diff line number Diff line change @@ -122,24 +122,23 @@ static void ompi_grequest_construct(ompi_grequest_t* greq)
122
122
*/
123
123
static void ompi_grequest_destruct (ompi_grequest_t * greq )
124
124
{
125
- int rc = 0 ;
126
- MPI_Fint ierr ;
127
-
128
125
if (greq -> greq_free .c_free != NULL ) {
126
+ /* We were already putting query_fn()'s return value into
127
+ * status.MPI_ERROR but for MPI_{Wait,Test}*. If there's a
128
+ * free callback to invoke, the standard says to use the
129
+ * return value from free_fn() callback, too.
130
+ */
129
131
if (greq -> greq_funcs_are_c ) {
130
- rc = greq -> greq_free .c_free (greq -> greq_state );
132
+ greq -> greq_base .req_status .MPI_ERROR =
133
+ greq -> greq_free .c_free (greq -> greq_state );
131
134
} else {
135
+ MPI_Fint ierr ;
132
136
greq -> greq_free .f_free ((MPI_Aint * )greq -> greq_state , & ierr );
133
- rc = OMPI_FINT_2_INT (ierr );
137
+ greq -> greq_base .req_status .MPI_ERROR =
138
+ OMPI_FINT_2_INT (ierr );
134
139
}
135
140
}
136
141
137
- /* We were already putting query_fn()'s return value into
138
- * status.MPI_ERROR but for MPI_{Wait,Test}* the standard
139
- * says use the free_fn() callback too.
140
- */
141
- greq -> greq_base .req_status .MPI_ERROR = rc ;
142
-
143
142
OMPI_REQUEST_FINI (& greq -> greq_base );
144
143
}
145
144
You can’t perform that action at this time.
0 commit comments