@@ -1023,13 +1023,20 @@ ompi_mtl_ofi_gen_ssend_ack(struct fi_cq_tagged_entry *wc,
10231023 * If a failure occurs the provider will notify the error
10241024 * in the cq_readerr during OFI progress. Once the message has been
10251025 * 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.
10261032 */
10271033 int ctxt_id = 0 ;
10281034 ssize_t ret ;
10291035 ompi_proc_t * ompi_proc = NULL ;
10301036 mca_mtl_ofi_endpoint_t * endpoint = NULL ;
10311037 int src = mtl_ofi_get_source (wc );
10321038 struct fi_msg_tagged tagged_msg ;
1039+ struct iovec d_iovec = {.iov_base = NULL , .iov_len = 0 };
10331040
10341041 if (ompi_mtl_ofi .total_ctxts_used > 0 ) {
10351042 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,
10471054 endpoint = ompi_mtl_ofi_get_endpoint (ofi_req -> mtl , ompi_proc );
10481055 ofi_req -> remote_addr = fi_rx_addr (endpoint -> peer_fiaddr , ctxt_id , ompi_mtl_ofi .rx_ctx_bits );
10491056
1050- tagged_msg .msg_iov = NULL ;
1057+ tagged_msg .msg_iov = & d_iovec ;
10511058 tagged_msg .desc = NULL ;
1052- tagged_msg .iov_count = 0 ;
1059+ tagged_msg .iov_count = 1 ;
10531060 tagged_msg .addr = ofi_req -> remote_addr ;
10541061 /**
10551062 * We must continue to use the user's original tag but remove the
0 commit comments