1010
1111#include "coll_ucc_common.h"
1212
13- static inline ucc_status_t mca_coll_ucc_allgatherv_iniz (const void * sbuf , size_t scount ,
14- struct ompi_datatype_t * sdtype ,
15- void * rbuf , ompi_count_array_t rcounts , ompi_disp_array_t rdisps ,
16- struct ompi_datatype_t * rdtype ,
17- mca_coll_ucc_module_t * ucc_module ,
18- ucc_coll_req_h * req ,
19- mca_coll_ucc_req_t * coll_req )
13+ static 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 )
2019{
2120 ucc_datatype_t ucc_sdt = UCC_DT_INT8 , ucc_rdt = UCC_DT_INT8 ;
2221 bool is_inplace = (MPI_IN_PLACE == sbuf );
@@ -58,6 +57,10 @@ static inline ucc_status_t mca_coll_ucc_allgatherv_iniz(const void *sbuf, size_t
5857 }
5958 };
6059
60+ if (true == persistent ) {
61+ coll .mask |= UCC_COLL_ARGS_FIELD_FLAGS ;
62+ coll .flags |= UCC_COLL_ARGS_FLAG_PERSISTENT ;
63+ }
6164 COLL_UCC_REQ_INIT (coll_req , req , coll , ucc_module );
6265 return UCC_OK ;
6366fallback :
@@ -76,9 +79,8 @@ int mca_coll_ucc_allgatherv(const void *sbuf, size_t scount,
7679
7780 UCC_VERBOSE (3 , "running ucc allgatherv" );
7881
79- COLL_UCC_CHECK (mca_coll_ucc_allgatherv_iniz (sbuf , scount , sdtype ,
80- rbuf , rcounts , rdisps , rdtype ,
81- ucc_module , & req , NULL ));
82+ COLL_UCC_CHECK (mca_coll_ucc_allgatherv_iniz (sbuf , scount , sdtype , rbuf , rcounts , rdisps , rdtype ,
83+ false, ucc_module , & req , NULL ));
8284 COLL_UCC_POST_AND_CHECK (req );
8385 COLL_UCC_CHECK (coll_ucc_req_wait (req ));
8486 return OMPI_SUCCESS ;
@@ -103,9 +105,8 @@ int mca_coll_ucc_iallgatherv(const void *sbuf, size_t scount,
103105
104106 UCC_VERBOSE (3 , "running ucc iallgatherv" );
105107 COLL_UCC_GET_REQ (coll_req );
106- COLL_UCC_CHECK (mca_coll_ucc_allgatherv_iniz (sbuf , scount , sdtype ,
107- rbuf , rcounts , rdisps , rdtype ,
108- ucc_module , & 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 ));
109110 COLL_UCC_POST_AND_CHECK (req );
110111 * request = & coll_req -> super ;
111112 return OMPI_SUCCESS ;
@@ -118,3 +119,29 @@ int mca_coll_ucc_iallgatherv(const void *sbuf, size_t scount,
118119 rbuf , rcounts , rdisps , rdtype ,
119120 comm , request , ucc_module -> previous_iallgatherv_module );
120121}
122+
123+ int mca_coll_ucc_allgatherv_init (const void * sbuf , size_t scount , struct ompi_datatype_t * sdtype ,
124+ void * rbuf , ompi_count_array_t rcounts , ompi_disp_array_t rdisps ,
125+ struct ompi_datatype_t * rdtype , struct ompi_communicator_t * comm ,
126+ struct ompi_info_t * info , ompi_request_t * * request ,
127+ mca_coll_base_module_t * module )
128+ {
129+ mca_coll_ucc_module_t * ucc_module = (mca_coll_ucc_module_t * ) module ;
130+ ucc_coll_req_h req ;
131+ mca_coll_ucc_req_t * coll_req = NULL ;
132+
133+ COLL_UCC_GET_REQ_PC (coll_req );
134+ 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 ));
137+ * request = & coll_req -> super ;
138+ return OMPI_SUCCESS ;
139+ fallback :
140+ UCC_VERBOSE (3 , "running fallback allgatherv_init" );
141+ if (coll_req ) {
142+ mca_coll_ucc_req_free ((ompi_request_t * * ) & coll_req );
143+ }
144+ return ucc_module -> previous_allgatherv_init (sbuf , scount , sdtype , rbuf , rcounts , rdisps , rdtype ,
145+ comm , info , request ,
146+ ucc_module -> previous_allgatherv_init_module );
147+ }
0 commit comments