@@ -736,6 +736,7 @@ ompi_mtl_ofi_send_excid(struct mca_mtl_base_module_t *mtl,
736
736
/**
737
737
* Create a send request, start it and wait until it completes.
738
738
*/
739
+ ofi_req -> type = OMPI_MTL_OFI_SEND ;
739
740
ofi_req -> event_callback = ompi_mtl_ofi_send_excid_callback ;
740
741
ofi_req -> error_callback = ompi_mtl_ofi_send_error_callback ;
741
742
ofi_req -> buffer = start ;
@@ -1060,6 +1061,7 @@ ompi_mtl_ofi_isend_generic(struct mca_mtl_base_module_t *mtl,
1060
1061
ompi_ret = ompi_mtl_datatype_pack (convertor , & start , & length , & free_after );
1061
1062
if (OPAL_UNLIKELY (OMPI_SUCCESS != ompi_ret )) return ompi_ret ;
1062
1063
1064
+ ofi_req -> type = OMPI_MTL_OFI_SEND ;
1063
1065
ofi_req -> buffer = (free_after ) ? start : NULL ;
1064
1066
ofi_req -> length = length ;
1065
1067
ofi_req -> status .MPI_ERROR = OMPI_SUCCESS ;
@@ -1774,9 +1776,8 @@ ompi_mtl_ofi_cancel(struct mca_mtl_base_module_t *mtl,
1774
1776
int ret , ctxt_id = 0 ;
1775
1777
ompi_mtl_ofi_request_t * ofi_req = (ompi_mtl_ofi_request_t * ) mtl_request ;
1776
1778
1777
- ctxt_id = ompi_mtl_ofi_map_comm_to_ctxt (ofi_req -> comm -> c_index );
1778
-
1779
1779
switch (ofi_req -> type ) {
1780
+ case OMPI_MTL_OFI_PROBE :
1780
1781
case OMPI_MTL_OFI_SEND :
1781
1782
/**
1782
1783
* Cannot cancel sends yet
@@ -1792,6 +1793,8 @@ ompi_mtl_ofi_cancel(struct mca_mtl_base_module_t *mtl,
1792
1793
ompi_mtl_ofi_progress ();
1793
1794
1794
1795
if (!ofi_req -> req_started ) {
1796
+ ctxt_id = ompi_mtl_ofi_map_comm_to_ctxt (ofi_req -> comm -> c_index );
1797
+
1795
1798
ret = fi_cancel ((fid_t )ompi_mtl_ofi .ofi_ctxt [ctxt_id ].rx_ep ,
1796
1799
& ofi_req -> ctx );
1797
1800
if (0 == ret ) {
0 commit comments