99
1010#include "coll_ucc_common.h"
1111
12- static inline ucc_status_t mca_coll_ucc_allgatherv_init (const void * sbuf , int scount ,
12+ static inline ucc_status_t mca_coll_ucc_allgatherv_init (const void * sbuf , size_t scount ,
1313 struct ompi_datatype_t * sdtype ,
1414 void * rbuf , ompi_count_array_t rcounts , ompi_disp_array_t rdisps ,
1515 struct ompi_datatype_t * rdtype ,
@@ -19,12 +19,13 @@ static inline ucc_status_t mca_coll_ucc_allgatherv_init(const void *sbuf, int sc
1919{
2020 ucc_datatype_t ucc_sdt = UCC_DT_INT8 , ucc_rdt = UCC_DT_INT8 ;
2121 bool is_inplace = (MPI_IN_PLACE == sbuf );
22+ uint64_t flags = 0 ;
2223
2324 ucc_rdt = ompi_dtype_to_ucc_dtype (rdtype );
2425 if (!is_inplace ) {
2526 ucc_sdt = ompi_dtype_to_ucc_dtype (sdtype );
2627 }
27-
28+
2829 if (COLL_UCC_DT_UNSUPPORTED == ucc_sdt ||
2930 COLL_UCC_DT_UNSUPPORTED == ucc_rdt ) {
3031 UCC_VERBOSE (5 , "ompi_datatype is not supported: dtype = %s" ,
@@ -33,13 +34,13 @@ static inline ucc_status_t mca_coll_ucc_allgatherv_init(const void *sbuf, int sc
3334 goto fallback ;
3435 }
3536
36- uint64_t flags = ompi_count_array_is_64bit (rcounts ) ? UCC_COLL_ARGS_FLAG_COUNT_64BIT : 0 ;
37- flags |= ompi_disp_array_is_64bit (rdisps ) ? UCC_COLL_ARGS_FLAG_DISPLACEMENTS_64BIT : 0 ;
37+ flags = (ompi_count_array_is_64bit (rcounts ) ? UCC_COLL_ARGS_FLAG_COUNT_64BIT : 0 ) |
38+ (ompi_disp_array_is_64bit (rdisps ) ? UCC_COLL_ARGS_FLAG_DISPLACEMENTS_64BIT : 0 ) |
39+ (is_inplace ? UCC_COLL_ARGS_FLAG_IN_PLACE : 0 );
3840
3941 ucc_coll_args_t coll = {
42+ .mask = flags ? UCC_COLL_ARGS_FIELD_FLAGS : 0 ,
4043 .flags = flags ,
41- .mask = 0 ,
42- .flags = 0 ,
4344 .coll_type = UCC_COLL_TYPE_ALLGATHERV ,
4445 .src .info = {
4546 .buffer = (void * )sbuf ,
@@ -56,10 +57,6 @@ static inline ucc_status_t mca_coll_ucc_allgatherv_init(const void *sbuf, int sc
5657 }
5758 };
5859
59- if (is_inplace ) {
60- coll .mask = UCC_COLL_ARGS_FIELD_FLAGS ;
61- coll .flags |= UCC_COLL_ARGS_FLAG_IN_PLACE ;
62- }
6360 COLL_UCC_REQ_INIT (coll_req , req , coll , ucc_module );
6461 return UCC_OK ;
6562fallback :
0 commit comments