1111#include "coll_ucc_common.h"
1212
1313static inline ucc_status_t
14- mca_coll_ucc_allgatherv_iniz (const void * sbuf , size_t scount , struct ompi_datatype_t * sdtype ,
15- void * rbuf , ompi_count_array_t rcounts , ompi_disp_array_t rdisps ,
16- struct ompi_datatype_t * rdtype , bool persistent ,
17- mca_coll_ucc_module_t * ucc_module , ucc_coll_req_h * req ,
18- mca_coll_ucc_req_t * coll_req )
14+ mca_coll_ucc_allgatherv_init_common (const void * sbuf , size_t scount ,
15+ struct ompi_datatype_t * sdtype ,
16+ void * rbuf , ompi_count_array_t rcounts , ompi_disp_array_t rdisps ,
17+ struct ompi_datatype_t * rdtype ,
18+ bool persistent , mca_coll_ucc_module_t * ucc_module ,
19+ ucc_coll_req_h * req ,
20+ mca_coll_ucc_req_t * coll_req )
1921{
2022 ucc_datatype_t ucc_sdt = UCC_DT_INT8 , ucc_rdt = UCC_DT_INT8 ;
2123 bool is_inplace = (MPI_IN_PLACE == sbuf );
@@ -36,7 +38,8 @@ mca_coll_ucc_allgatherv_iniz(const void *sbuf, size_t scount, struct ompi_dataty
3638
3739 flags = (ompi_count_array_is_64bit (rcounts ) ? UCC_COLL_ARGS_FLAG_COUNT_64BIT : 0 ) |
3840 (ompi_disp_array_is_64bit (rdisps ) ? UCC_COLL_ARGS_FLAG_DISPLACEMENTS_64BIT : 0 ) |
39- (is_inplace ? UCC_COLL_ARGS_FLAG_IN_PLACE : 0 );
41+ (is_inplace ? UCC_COLL_ARGS_FLAG_IN_PLACE : 0 ) |
42+ (persistent ? UCC_COLL_ARGS_FLAG_PERSISTENT : 0 );
4043
4144 ucc_coll_args_t coll = {
4245 .mask = flags ? UCC_COLL_ARGS_FIELD_FLAGS : 0 ,
@@ -57,10 +60,6 @@ mca_coll_ucc_allgatherv_iniz(const void *sbuf, size_t scount, struct ompi_dataty
5760 }
5861 };
5962
60- if (true == persistent ) {
61- coll .mask |= UCC_COLL_ARGS_FIELD_FLAGS ;
62- coll .flags |= UCC_COLL_ARGS_FLAG_PERSISTENT ;
63- }
6463 COLL_UCC_REQ_INIT (coll_req , req , coll , ucc_module );
6564 return UCC_OK ;
6665fallback :
@@ -79,8 +78,9 @@ int mca_coll_ucc_allgatherv(const void *sbuf, size_t scount,
7978
8079 UCC_VERBOSE (3 , "running ucc allgatherv" );
8180
82- COLL_UCC_CHECK (mca_coll_ucc_allgatherv_iniz (sbuf , scount , sdtype , rbuf , rcounts , rdisps , rdtype ,
83- false, ucc_module , & req , NULL ));
81+ COLL_UCC_CHECK (mca_coll_ucc_allgatherv_init_common (sbuf , scount , sdtype ,
82+ rbuf , rcounts , rdisps , rdtype ,
83+ false, ucc_module , & req , NULL ));
8484 COLL_UCC_POST_AND_CHECK (req );
8585 COLL_UCC_CHECK (coll_ucc_req_wait (req ));
8686 return OMPI_SUCCESS ;
@@ -105,8 +105,9 @@ int mca_coll_ucc_iallgatherv(const void *sbuf, size_t scount,
105105
106106 UCC_VERBOSE (3 , "running ucc iallgatherv" );
107107 COLL_UCC_GET_REQ (coll_req );
108- COLL_UCC_CHECK (mca_coll_ucc_allgatherv_iniz (sbuf , scount , sdtype , rbuf , rcounts , rdisps , rdtype ,
109- false, ucc_module , & req , coll_req ));
108+ COLL_UCC_CHECK (mca_coll_ucc_allgatherv_init_common (sbuf , scount , sdtype ,
109+ rbuf , rcounts , rdisps , rdtype ,
110+ false, ucc_module , & req , coll_req ));
110111 COLL_UCC_POST_AND_CHECK (req );
111112 * request = & coll_req -> super ;
112113 return OMPI_SUCCESS ;
@@ -130,10 +131,11 @@ int mca_coll_ucc_allgatherv_init(const void *sbuf, size_t scount, struct ompi_da
130131 ucc_coll_req_h req ;
131132 mca_coll_ucc_req_t * coll_req = NULL ;
132133
133- COLL_UCC_GET_REQ_PC (coll_req );
134+ COLL_UCC_GET_REQ_PERSISTENT (coll_req );
134135 UCC_VERBOSE (3 , "allgatherv_init init %p" , coll_req );
135- COLL_UCC_CHECK (mca_coll_ucc_allgatherv_iniz (sbuf , scount , sdtype , rbuf , rcounts , rdisps , rdtype ,
136- true, ucc_module , & req , coll_req ));
136+ COLL_UCC_CHECK (mca_coll_ucc_allgatherv_init_common (sbuf , scount , sdtype ,
137+ rbuf , rcounts , rdisps , rdtype ,
138+ true, ucc_module , & req , coll_req ));
137139 * request = & coll_req -> super ;
138140 return OMPI_SUCCESS ;
139141fallback :
0 commit comments