@@ -131,7 +131,7 @@ opal_mutex_atomic_unlock(&ompi_mtl_ofi.ofi_ctxt[ctxt_id].context_lock)
131
131
__opal_attribute_always_inline__ static inline int
132
132
ompi_mtl_ofi_context_progress (int ctxt_id )
133
133
{
134
- int count = 0 , i , events_read ;
134
+ int count = 0 , i , events_read , req_type = -1 ;
135
135
ompi_mtl_ofi_request_t * ofi_req = NULL ;
136
136
struct fi_cq_err_entry error = { 0 };
137
137
ssize_t ret ;
@@ -151,12 +151,13 @@ ompi_mtl_ofi_context_progress(int ctxt_id)
151
151
if (NULL != ompi_mtl_ofi_wc [i ].op_context ) {
152
152
ofi_req = TO_OFI_REQ (ompi_mtl_ofi_wc [i ].op_context );
153
153
assert (ofi_req );
154
+ req_type = ofi_req -> type ;
154
155
ret = ofi_req -> event_callback (& ompi_mtl_ofi_wc [i ], ofi_req );
155
156
if (OMPI_SUCCESS != ret ) {
156
157
opal_output (0 ,
157
158
"%s:%d: Error returned by request (type: %d) event callback: %zd.\n"
158
159
"*** The Open MPI OFI MTL is aborting the MPI job (via exit(3)).\n" ,
159
- __FILE__ , __LINE__ , ofi_req -> type , ret );
160
+ __FILE__ , __LINE__ , req_type , ret );
160
161
fflush (stderr );
161
162
exit (1 );
162
163
}
@@ -192,11 +193,13 @@ ompi_mtl_ofi_context_progress(int ctxt_id)
192
193
assert (error .op_context );
193
194
ofi_req = TO_OFI_REQ (error .op_context );
194
195
assert (ofi_req );
196
+ req_type = ofi_req -> type ;
195
197
ret = ofi_req -> error_callback (& error , ofi_req );
196
198
if (OMPI_SUCCESS != ret ) {
197
- opal_output (0 , "%s:%d: Error returned by request error callback: %zd.\n"
198
- "*** The Open MPI OFI MTL is aborting the MPI job (via exit(3)).\n" ,
199
- __FILE__ , __LINE__ , ret );
199
+ opal_output (0 ,
200
+ "%s:%d: Error returned by request (type: %d) error callback: %zd.\n"
201
+ "*** The Open MPI OFI MTL is aborting the MPI job (via exit(3)).\n" ,
202
+ __FILE__ , __LINE__ , req_type , ret );
200
203
fflush (stderr );
201
204
exit (1 );
202
205
}
@@ -1260,7 +1263,7 @@ __opal_attribute_always_inline__ static inline int
1260
1263
ompi_mtl_ofi_recv_callback (struct fi_cq_tagged_entry * wc ,
1261
1264
ompi_mtl_ofi_request_t * ofi_req )
1262
1265
{
1263
- int ompi_ret ;
1266
+ int ompi_ret = OMPI_SUCCESS ;
1264
1267
int src = mtl_ofi_get_source (wc );
1265
1268
ompi_status_public_t * status = NULL ;
1266
1269
@@ -1320,9 +1323,11 @@ ompi_mtl_ofi_recv_callback(struct fi_cq_tagged_entry *wc,
1320
1323
}
1321
1324
}
1322
1325
1326
+ ompi_ret = status -> MPI_ERROR ;
1327
+
1323
1328
ofi_req -> super .completion_callback (& ofi_req -> super );
1324
1329
1325
- return status -> MPI_ERROR ;
1330
+ return ompi_ret ;
1326
1331
}
1327
1332
1328
1333
/**
@@ -1462,13 +1467,13 @@ __opal_attribute_always_inline__ static inline int
1462
1467
ompi_mtl_ofi_mrecv_callback (struct fi_cq_tagged_entry * wc ,
1463
1468
ompi_mtl_ofi_request_t * ofi_req )
1464
1469
{
1470
+ int ompi_ret = OMPI_SUCCESS ;
1465
1471
struct mca_mtl_request_t * mrecv_req = ofi_req -> mrecv_req ;
1466
1472
ompi_status_public_t * status = & mrecv_req -> ompi_req -> req_status ;
1467
1473
status -> MPI_SOURCE = mtl_ofi_get_source (wc );
1468
1474
status -> MPI_TAG = MTL_OFI_GET_TAG (wc -> tag );
1469
1475
status -> MPI_ERROR = MPI_SUCCESS ;
1470
1476
status -> _ucount = wc -> len ;
1471
- int ompi_ret ;
1472
1477
1473
1478
ompi_mtl_ofi_deregister_and_free_buffer (ofi_req );
1474
1479
@@ -1483,11 +1488,12 @@ ompi_mtl_ofi_mrecv_callback(struct fi_cq_tagged_entry *wc,
1483
1488
}
1484
1489
}
1485
1490
1491
+ ompi_ret = status -> MPI_ERROR ;
1486
1492
free (ofi_req );
1487
1493
1488
1494
mrecv_req -> completion_callback (mrecv_req );
1489
1495
1490
- return status -> MPI_ERROR ;
1496
+ return ompi_ret ;
1491
1497
}
1492
1498
1493
1499
/**
0 commit comments