@@ -564,7 +564,9 @@ int mca_pml_ucx_irecv_init(void *buf, size_t count, ompi_datatype_t *datatype,
564
564
req -> flags = 0 ;
565
565
req -> buffer = buf ;
566
566
req -> count = count ;
567
- req -> datatype .datatype = mca_pml_ucx_get_datatype (datatype );
567
+ req -> ompi_datatype = datatype ;
568
+ req -> datatype = mca_pml_ucx_get_datatype (datatype );
569
+ OMPI_DATATYPE_RETAIN (datatype );
568
570
569
571
PML_UCX_MAKE_RECV_TAG (req -> tag , req -> recv .tag_mask , tag , src , comm );
570
572
@@ -699,12 +701,13 @@ int mca_pml_ucx_isend_init(const void *buf, size_t count, ompi_datatype_t *datat
699
701
req -> tag = PML_UCX_MAKE_SEND_TAG (tag , comm );
700
702
req -> send .mode = mode ;
701
703
req -> send .ep = ep ;
704
+ req -> ompi_datatype = datatype ;
705
+ OMPI_DATATYPE_RETAIN (datatype );
702
706
703
707
if (MCA_PML_BASE_SEND_BUFFERED == mode ) {
704
- req -> datatype .ompi_datatype = datatype ;
705
- OBJ_RETAIN (datatype );
708
+ req -> datatype = NULL ;
706
709
} else {
707
- req -> datatype . datatype = mca_pml_ucx_get_datatype (datatype );
710
+ req -> datatype = mca_pml_ucx_get_datatype (datatype );
708
711
}
709
712
710
713
* request = & req -> ompi ;
@@ -1113,16 +1116,16 @@ int mca_pml_ucx_start(size_t count, ompi_request_t** requests)
1113
1116
tmp_req = (ompi_request_t * )mca_pml_ucx_common_send (preq -> send .ep ,
1114
1117
preq -> buffer ,
1115
1118
preq -> count ,
1116
- preq -> datatype . ompi_datatype ,
1117
- preq -> datatype . datatype ,
1119
+ preq -> ompi_datatype ,
1120
+ preq -> datatype ,
1118
1121
preq -> tag ,
1119
1122
preq -> send .mode ,
1120
1123
mca_pml_ucx_psend_completion );
1121
1124
} else {
1122
1125
PML_UCX_VERBOSE (8 , "start recv request %p" , (void * )preq );
1123
1126
tmp_req = (ompi_request_t * )ucp_tag_recv_nb (ompi_pml_ucx .ucp_worker ,
1124
1127
preq -> buffer , preq -> count ,
1125
- preq -> datatype . datatype ,
1128
+ preq -> datatype ,
1126
1129
preq -> tag ,
1127
1130
preq -> recv .tag_mask ,
1128
1131
mca_pml_ucx_precv_completion );
0 commit comments