|
39 | 39 | #include "ompi/datatype/ompi_datatype.h" |
40 | 40 | #include "ompi/datatype/ompi_datatype_internal.h" |
41 | 41 | #include "ompi/mca/pml/pml.h" |
42 | | - |
| 42 | +#include "ompi/mca/coll/base/coll_base_util.h" |
43 | 43 |
|
44 | 44 | #include "hcoll/api/hcoll_dte.h" |
45 | 45 | #include "hcoll/api/hcoll_api.h" |
@@ -151,25 +151,13 @@ void hcoll_rte_fns_setup(void) |
151 | 151 | { |
152 | 152 | init_module_fns(); |
153 | 153 | OBJ_CONSTRUCT(&mca_coll_hcoll_component.requests, opal_free_list_t); |
154 | | - opal_free_list_init( |
155 | | - &(mca_coll_hcoll_component.requests), |
156 | | - sizeof(ompi_request_t), |
157 | | - /* no special alignment needed */ |
158 | | - 8, |
159 | | - OBJ_CLASS(ompi_request_t), |
160 | | - /* no payload data */ |
161 | | - 0, 0, |
162 | | - /* NOTE: hack - need to parametrize this */ |
163 | | - 10, |
164 | | - -1, |
165 | | - 10, |
166 | | - /* No Mpool or init function */ |
167 | | - NULL, |
168 | | - 0, |
169 | | - NULL, |
170 | | - NULL, |
171 | | - NULL |
172 | | - ); |
| 154 | + opal_free_list_init(&(mca_coll_hcoll_component.requests), |
| 155 | + sizeof(ompi_coll_base_nbc_request_t), |
| 156 | + opal_cache_line_size, OBJ_CLASS(ompi_coll_base_nbc_request_t), |
| 157 | + /* no payload data */ |
| 158 | + 0, 0, 10, -1, 10, |
| 159 | + /* No Mpool or init function */ |
| 160 | + NULL, 0, NULL, NULL, NULL); |
173 | 161 | } |
174 | 162 |
|
175 | 163 | static int recv_nb(struct dte_data_representation_t data, |
@@ -349,20 +337,23 @@ request_free(struct ompi_request_t **ompi_req) |
349 | 337 |
|
350 | 338 | static void* get_coll_handle(void) |
351 | 339 | { |
352 | | - ompi_request_t *ompi_req; |
| 340 | + ompi_coll_base_nbc_request_t *ompi_req; |
353 | 341 | opal_free_list_item_t *item; |
354 | 342 | item = opal_free_list_wait (&(mca_coll_hcoll_component.requests)); |
355 | 343 | if (OPAL_UNLIKELY(NULL == item)) { |
356 | 344 | HCOL_ERROR("Wait for free list failed.\n"); |
357 | 345 | return NULL; |
358 | 346 | } |
359 | | - ompi_req = (ompi_request_t *)item; |
360 | | - OMPI_REQUEST_INIT(ompi_req,false); |
361 | | - ompi_req->req_complete_cb = NULL; |
362 | | - ompi_req->req_status.MPI_ERROR = MPI_SUCCESS; |
363 | | - ompi_req->req_state = OMPI_REQUEST_ACTIVE; |
364 | | - ompi_req->req_free = request_free; |
365 | | - ompi_req->req_type = OMPI_REQUEST_COLL; |
| 347 | + ompi_req = (ompi_coll_base_nbc_request_t *)item; |
| 348 | + OMPI_REQUEST_INIT(&ompi_req->super,false); |
| 349 | + ompi_req->super.req_complete_cb = NULL; |
| 350 | + ompi_req->super.req_complete_cb_data = NULL; |
| 351 | + ompi_req->super.req_status.MPI_ERROR = MPI_SUCCESS; |
| 352 | + ompi_req->super.req_state = OMPI_REQUEST_ACTIVE; |
| 353 | + ompi_req->super.req_free = request_free; |
| 354 | + ompi_req->super.req_type = OMPI_REQUEST_COLL; |
| 355 | + ompi_req->data.objs.objs[0] = NULL; |
| 356 | + ompi_req->data.objs.objs[1] = NULL; |
366 | 357 | return (void *)ompi_req; |
367 | 358 | } |
368 | 359 |
|
|
0 commit comments