@@ -1023,13 +1023,20 @@ ompi_mtl_ofi_gen_ssend_ack(struct fi_cq_tagged_entry *wc,
1023
1023
* If a failure occurs the provider will notify the error
1024
1024
* in the cq_readerr during OFI progress. Once the message has been
1025
1025
* successfully processed the request is marked as completed.
1026
+ *
1027
+ * Turns out that there is a bug in the argument checking
1028
+ * in the CXI provider (at least the vendor 1.15.2.0 and earlier versions)
1029
+ * fi_tsendmsg method. So we have to feed a dummy iovec argument
1030
+ * into fi_tsendmsg with a NULL buffer and zero iov_len, hence
1031
+ * the d_iovect, etc.
1026
1032
*/
1027
1033
int ctxt_id = 0 ;
1028
1034
ssize_t ret ;
1029
1035
ompi_proc_t * ompi_proc = NULL ;
1030
1036
mca_mtl_ofi_endpoint_t * endpoint = NULL ;
1031
1037
int src = mtl_ofi_get_source (wc );
1032
1038
struct fi_msg_tagged tagged_msg ;
1039
+ struct iovec d_iovec = {.iov_base = NULL , .iov_len = 0 };
1033
1040
1034
1041
if (ompi_mtl_ofi .total_ctxts_used > 0 ) {
1035
1042
ctxt_id = ofi_req -> comm -> c_contextid .cid_sub .u64 % ompi_mtl_ofi .total_ctxts_used ;
@@ -1047,9 +1054,9 @@ ompi_mtl_ofi_gen_ssend_ack(struct fi_cq_tagged_entry *wc,
1047
1054
endpoint = ompi_mtl_ofi_get_endpoint (ofi_req -> mtl , ompi_proc );
1048
1055
ofi_req -> remote_addr = fi_rx_addr (endpoint -> peer_fiaddr , ctxt_id , ompi_mtl_ofi .rx_ctx_bits );
1049
1056
1050
- tagged_msg .msg_iov = NULL ;
1057
+ tagged_msg .msg_iov = & d_iovec ;
1051
1058
tagged_msg .desc = NULL ;
1052
- tagged_msg .iov_count = 0 ;
1059
+ tagged_msg .iov_count = 1 ;
1053
1060
tagged_msg .addr = ofi_req -> remote_addr ;
1054
1061
/**
1055
1062
* We must continue to use the user's original tag but remove the
0 commit comments