@@ -631,6 +631,10 @@ int accumulate_req(const void *origin_addr, int origin_count,
631
631
632
632
ompi_osc_ucx_module_t * module = (ompi_osc_ucx_module_t * ) win -> w_osc_module ;
633
633
int ret = OMPI_SUCCESS ;
634
+ int win_idx = -1 ;
635
+ uint64_t remote_addr = (module -> addrs [target ]) + target_disp *
636
+ OSC_UCX_GET_DISP (module , target );
637
+ opal_common_ucx_wpmem_t * mem = module -> mem ;
634
638
void * free_ptr = NULL ;
635
639
bool lock_acquired = false;
636
640
@@ -650,6 +654,14 @@ int accumulate_req(const void *origin_addr, int origin_count,
650
654
target_disp , NULL , ucx_req );
651
655
}
652
656
657
+ if (module -> flavor == MPI_WIN_FLAVOR_DYNAMIC ) {
658
+ ret = get_dynamic_win_info (remote_addr , module , target , & win_idx );
659
+ if (ret != OMPI_SUCCESS ) {
660
+ return ret ;
661
+ }
662
+ mem = module -> local_dynamic_win_info [win_idx ].mem ;
663
+ }
664
+
653
665
ret = start_atomicity (module , target , & lock_acquired );
654
666
if (ret != OMPI_SUCCESS ) {
655
667
return ret ;
@@ -691,7 +703,7 @@ int accumulate_req(const void *origin_addr, int origin_count,
691
703
return ret ;
692
704
}
693
705
694
- ret = opal_common_ucx_wpmem_flush (module -> mem , OPAL_COMMON_UCX_SCOPE_EP , target );
706
+ ret = opal_common_ucx_wpmem_flush (mem , OPAL_COMMON_UCX_SCOPE_EP , target );
695
707
if (ret != OMPI_SUCCESS ) {
696
708
free (temp_addr );
697
709
return ret ;
@@ -936,6 +948,10 @@ int get_accumulate_req(const void *origin_addr, int origin_count,
936
948
ompi_osc_ucx_request_t * ucx_req ) {
937
949
ompi_osc_ucx_module_t * module = (ompi_osc_ucx_module_t * ) win -> w_osc_module ;
938
950
int ret = OMPI_SUCCESS ;
951
+ int win_idx = -1 ;
952
+ uint64_t remote_addr = (module -> addrs [target ]) + target_disp *
953
+ OSC_UCX_GET_DISP (module , target );
954
+ opal_common_ucx_wpmem_t * mem = module -> mem ;
939
955
void * free_addr = NULL ;
940
956
bool lock_acquired = false;
941
957
@@ -951,6 +967,14 @@ int get_accumulate_req(const void *origin_addr, int origin_count,
951
967
target_disp , result_addr , ucx_req );
952
968
}
953
969
970
+ if (module -> flavor == MPI_WIN_FLAVOR_DYNAMIC ) {
971
+ ret = get_dynamic_win_info (remote_addr , module , target , & win_idx );
972
+ if (ret != OMPI_SUCCESS ) {
973
+ return ret ;
974
+ }
975
+ mem = module -> local_dynamic_win_info [win_idx ].mem ;
976
+ }
977
+
954
978
ret = start_atomicity (module , target , & lock_acquired );
955
979
if (ret != OMPI_SUCCESS ) {
956
980
return ret ;
@@ -962,7 +986,7 @@ int get_accumulate_req(const void *origin_addr, int origin_count,
962
986
return ret ;
963
987
}
964
988
965
- ret = opal_common_ucx_wpmem_flush (module -> mem , OPAL_COMMON_UCX_SCOPE_EP , target );
989
+ ret = opal_common_ucx_wpmem_flush (mem , OPAL_COMMON_UCX_SCOPE_EP , target );
966
990
if (ret != OMPI_SUCCESS ) {
967
991
return ret ;
968
992
}
@@ -1004,7 +1028,7 @@ int get_accumulate_req(const void *origin_addr, int origin_count,
1004
1028
return ret ;
1005
1029
}
1006
1030
1007
- ret = opal_common_ucx_wpmem_flush (module -> mem , OPAL_COMMON_UCX_SCOPE_EP , target );
1031
+ ret = opal_common_ucx_wpmem_flush (mem , OPAL_COMMON_UCX_SCOPE_EP , target );
1008
1032
if (ret != OMPI_SUCCESS ) {
1009
1033
return ret ;
1010
1034
}
0 commit comments