@@ -263,7 +263,7 @@ static inline int get_dynamic_win_info(uint64_t remote_addr,
263263 OSC_UCX_GET_DEFAULT_EP (ep , module , target );
264264 uint64_t remote_state_addr = (module -> state_addrs )[target ] + OSC_UCX_STATE_DYNAMIC_WIN_CNT_OFFSET ;
265265 size_t remote_state_len = sizeof (uint64_t ) + sizeof (ompi_osc_dynamic_win_info_t ) * OMPI_OSC_UCX_ATTACH_MAX ;
266- char * temp_buf ;
266+ char * temp_buf = NULL ;
267267 ompi_osc_dynamic_win_info_t * temp_dynamic_wins ;
268268 int contain = 0 ;
269269 uint64_t win_count ;
@@ -870,11 +870,10 @@ static inline int ompi_osc_ucx_acc_rputget(void *stage_addr, int stage_count,
870870 }
871871 }
872872 ucx_req -> target = target ;
873- if (target_dt != NULL ) {
874- ucx_req -> target_dt = target_dt ;
875- if (!ompi_datatype_is_predefined (target_dt )) {
876- OBJ_RETAIN (ucx_req -> target_dt );
877- }
873+ assert (target_dt != NULL );
874+ ucx_req -> target_dt = target_dt ;
875+ if (!ompi_datatype_is_predefined (target_dt )) {
876+ OBJ_RETAIN (ucx_req -> target_dt );
878877 }
879878 ucx_req -> target_disp = target_disp ;
880879 ucx_req -> target_count = target_count ;
@@ -884,9 +883,11 @@ static inline int ompi_osc_ucx_acc_rputget(void *stage_addr, int stage_count,
884883 module -> skip_sync_check = true; /* we already hold the acc lock, so no need for sync check*/
885884
886885 if (is_put ) {
886+ assert (origin_dt != NULL );
887887 ret = ompi_osc_ucx_put (origin_addr , origin_count , origin_dt , target , target_disp ,
888888 target_count , target_dt , win );
889889 } else {
890+ assert (stage_dt != NULL );
890891 ret = ompi_osc_ucx_get (stage_addr , stage_count , stage_dt , target , target_disp ,
891892 target_count , target_dt , win );
892893 }
@@ -1615,7 +1616,7 @@ void ompi_osc_ucx_req_completion(void *request) {
16151616 assert (req -> phase != ACC_INIT );
16161617 void * free_addr = NULL ;
16171618 bool release_lock = false;
1618- ptrdiff_t temp_extent ;
1619+ ptrdiff_t temp_lb , temp_extent ;
16191620 const void * origin_addr = req -> origin_addr ;
16201621 int origin_count = req -> origin_count ;
16211622 struct ompi_datatype_t * origin_dt = req -> origin_dt ;
@@ -1723,6 +1724,7 @@ void ompi_osc_ucx_req_completion(void *request) {
17231724 } else {
17241725 int i ;
17251726 void * curr_origin_addr = origin_ucx_iov [origin_ucx_iov_idx ].addr ;
1727+ ompi_datatype_get_true_extent (temp_dt , & temp_lb , & temp_extent );
17261728 for (i = 0 ; i < (int )temp_count ; i ++ ) {
17271729 ompi_op_reduce (op , curr_origin_addr ,
17281730 (void * )((char * )temp_addr + i * temp_extent ),
0 commit comments