@@ -61,17 +61,14 @@ static inline int check_sync_state(ompi_osc_ucx_module_t *module, int target,
61
61
62
62
static inline int incr_and_check_ops_num (ompi_osc_ucx_module_t * module , int target ,
63
63
ucp_ep_h ep ) {
64
- ucs_status_t status ;
64
+ int status ;
65
65
66
66
module -> global_ops_num ++ ;
67
67
module -> per_target_ops_nums [target ]++ ;
68
68
if (module -> global_ops_num >= OSC_UCX_OPS_THRESHOLD ) {
69
69
status = opal_common_ucx_ep_flush (ep , mca_osc_ucx_component .ucp_worker );
70
- if (status != UCS_OK ) {
71
- opal_output_verbose (1 , ompi_osc_base_framework .framework_output ,
72
- "%s:%d: ucp_ep_flush failed: %d\n" ,
73
- __FILE__ , __LINE__ , status );
74
- return OMPI_ERROR ;
70
+ if (status != OMPI_SUCCESS ) {
71
+ return status ;
75
72
}
76
73
module -> global_ops_num -= module -> per_target_ops_nums [target ];
77
74
module -> per_target_ops_nums [target ] = 0 ;
@@ -309,16 +306,13 @@ static inline int end_atomicity(ompi_osc_ucx_module_t *module, ucp_ep_h ep, int
309
306
uint64_t result_value = 0 ;
310
307
ucp_rkey_h rkey = (module -> state_info_array )[target ].rkey ;
311
308
uint64_t remote_addr = (module -> state_info_array )[target ].addr + OSC_UCX_STATE_ACC_LOCK_OFFSET ;
312
- ucs_status_t status ;
309
+ int ret ;
313
310
314
- status = opal_common_ucx_atomic_fetch (ep , UCP_ATOMIC_FETCH_OP_SWAP , TARGET_LOCK_UNLOCKED ,
315
- & result_value , sizeof (result_value ),
316
- remote_addr , rkey , mca_osc_ucx_component .ucp_worker );
317
- if (status != UCS_OK ) {
318
- opal_output_verbose (1 , ompi_osc_base_framework .framework_output ,
319
- "%s:%d: ucp_atomic_swap64 failed: %d\n" ,
320
- __FILE__ , __LINE__ , status );
321
- return OMPI_ERROR ;
311
+ ret = opal_common_ucx_atomic_fetch (ep , UCP_ATOMIC_FETCH_OP_SWAP , TARGET_LOCK_UNLOCKED ,
312
+ & result_value , sizeof (result_value ),
313
+ remote_addr , rkey , mca_osc_ucx_component .ucp_worker );
314
+ if (OMPI_SUCCESS != ret ) {
315
+ return ret ;
322
316
}
323
317
324
318
assert (result_value == TARGET_LOCK_EXCLUSIVE );
@@ -336,6 +330,7 @@ static inline int get_dynamic_win_info(uint64_t remote_addr, ompi_osc_ucx_module
336
330
uint64_t win_count ;
337
331
int contain , insert = -1 ;
338
332
ucs_status_t status ;
333
+ int ret ;
339
334
340
335
if ((module -> win_info_array [target ]).rkey_init == true) {
341
336
ucp_rkey_destroy ((module -> win_info_array [target ]).rkey );
@@ -350,12 +345,9 @@ static inline int get_dynamic_win_info(uint64_t remote_addr, ompi_osc_ucx_module
350
345
return OMPI_ERROR ;
351
346
}
352
347
353
- status = opal_common_ucx_ep_flush (ep , mca_osc_ucx_component .ucp_worker );
354
- if (status != UCS_OK ) {
355
- opal_output_verbose (1 , ompi_osc_base_framework .framework_output ,
356
- "%s:%d: ucp_ep_flush failed: %d\n" ,
357
- __FILE__ , __LINE__ , status );
358
- return OMPI_ERROR ;
348
+ ret = opal_common_ucx_ep_flush (ep , mca_osc_ucx_component .ucp_worker );
349
+ if (ret != OMPI_SUCCESS ) {
350
+ return ret ;
359
351
}
360
352
361
353
memcpy (& win_count , temp_buf , sizeof (uint64_t ));
@@ -529,7 +521,6 @@ int ompi_osc_ucx_accumulate(const void *origin_addr, int origin_count,
529
521
uint32_t temp_count ;
530
522
ompi_datatype_t * temp_dt ;
531
523
ptrdiff_t temp_lb , temp_extent ;
532
- ucs_status_t status ;
533
524
bool is_origin_contig = ompi_datatype_is_contiguous_memory_layout (origin_dt , origin_count );
534
525
535
526
if (ompi_datatype_is_predefined (target_dt )) {
@@ -553,12 +544,9 @@ int ompi_osc_ucx_accumulate(const void *origin_addr, int origin_count,
553
544
return ret ;
554
545
}
555
546
556
- status = opal_common_ucx_ep_flush (ep , mca_osc_ucx_component .ucp_worker );
557
- if (status != UCS_OK ) {
558
- opal_output_verbose (1 , ompi_osc_base_framework .framework_output ,
559
- "%s:%d: ucp_ep_flush failed: %d\n" ,
560
- __FILE__ , __LINE__ , status );
561
- return OMPI_ERROR ;
547
+ ret = opal_common_ucx_ep_flush (ep , mca_osc_ucx_component .ucp_worker );
548
+ if (ret != OMPI_SUCCESS ) {
549
+ return ret ;
562
550
}
563
551
564
552
if (ompi_datatype_is_predefined (origin_dt ) || is_origin_contig ) {
@@ -610,12 +598,9 @@ int ompi_osc_ucx_accumulate(const void *origin_addr, int origin_count,
610
598
return ret ;
611
599
}
612
600
613
- status = opal_common_ucx_ep_flush (ep , mca_osc_ucx_component .ucp_worker );
614
- if (status != UCS_OK ) {
615
- opal_output_verbose (1 , ompi_osc_base_framework .framework_output ,
616
- "%s:%d: ucp_ep_flush failed: %d\n" ,
617
- __FILE__ , __LINE__ , status );
618
- return OMPI_ERROR ;
601
+ ret = opal_common_ucx_ep_flush (ep , mca_osc_ucx_component .ucp_worker );
602
+ if (ret != OMPI_SUCCESS ) {
603
+ return ret ;
619
604
}
620
605
621
606
free (temp_addr_holder );
@@ -781,7 +766,6 @@ int ompi_osc_ucx_get_accumulate(const void *origin_addr, int origin_count,
781
766
uint32_t temp_count ;
782
767
ompi_datatype_t * temp_dt ;
783
768
ptrdiff_t temp_lb , temp_extent ;
784
- ucs_status_t status ;
785
769
bool is_origin_contig = ompi_datatype_is_contiguous_memory_layout (origin_dt , origin_count );
786
770
787
771
if (ompi_datatype_is_predefined (target_dt )) {
@@ -805,12 +789,9 @@ int ompi_osc_ucx_get_accumulate(const void *origin_addr, int origin_count,
805
789
return ret ;
806
790
}
807
791
808
- status = opal_common_ucx_ep_flush (ep , mca_osc_ucx_component .ucp_worker );
809
- if (status != UCS_OK ) {
810
- opal_output_verbose (1 , ompi_osc_base_framework .framework_output ,
811
- "%s:%d: ucp_ep_flush failed: %d\n" ,
812
- __FILE__ , __LINE__ , status );
813
- return OMPI_ERROR ;
792
+ ret = opal_common_ucx_ep_flush (ep , mca_osc_ucx_component .ucp_worker );
793
+ if (ret != OMPI_SUCCESS ) {
794
+ return ret ;
814
795
}
815
796
816
797
if (ompi_datatype_is_predefined (origin_dt ) || is_origin_contig ) {
@@ -861,12 +842,9 @@ int ompi_osc_ucx_get_accumulate(const void *origin_addr, int origin_count,
861
842
return ret ;
862
843
}
863
844
864
- status = opal_common_ucx_ep_flush (ep , mca_osc_ucx_component .ucp_worker );
865
- if (status != UCS_OK ) {
866
- opal_output_verbose (1 , ompi_osc_base_framework .framework_output ,
867
- "%s:%d: ucp_ep_flush failed: %d\n" ,
868
- __FILE__ , __LINE__ , status );
869
- return OMPI_ERROR ;
845
+ ret = opal_common_ucx_ep_flush (ep , mca_osc_ucx_component .ucp_worker );
846
+ if (ret != OMPI_SUCCESS ) {
847
+ return ret ;
870
848
}
871
849
872
850
free (temp_addr_holder );
0 commit comments