Skip to content

Commit 8510a91

Browse files
committed
REVIEW: fix compile error
1 parent 73abeb4 commit 8510a91

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/components/tl/ucp/tl_ucp_coll.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,8 @@ UCC_TL_UCP_PROFILE_FUNC(ucc_status_t, ucc_tl_ucp_coll_dynamic_segment_exchange,
330330
void *exchange_buffer = NULL;
331331
void *global_buffer = NULL;
332332
int i = 0;
333+
size_t local_pack_size = 0;
334+
size_t *global_sizes = NULL;
333335
ucc_service_coll_req_t *scoll_req;
334336

335337
if (core_team->size == 0) {
@@ -355,10 +357,10 @@ UCC_TL_UCP_PROFILE_FUNC(ucc_status_t, ucc_tl_ucp_coll_dynamic_segment_exchange,
355357
dst_pack_size = dst_memh_local->tl_h->packed_size;
356358

357359
/* Calculate total pack size for this rank */
358-
size_t local_pack_size = ucc_max(src_pack_size, dst_pack_size) + sizeof(size_t) * 2;
360+
local_pack_size = ucc_max(src_pack_size, dst_pack_size) + sizeof(size_t) * 2;
359361

360362
/* Allgather to find the maximum pack size across all ranks */
361-
size_t *global_sizes =
363+
global_sizes =
362364
ucc_calloc(core_team->size, sizeof(size_t), "global sizes");
363365
if (!global_sizes) {
364366
tl_error(UCC_TASK_LIB(task), "failed to allocate global sizes buffer");

0 commit comments

Comments
 (0)