Skip to content

Commit

Permalink
TL/UCP: fix config clone and destroy (openucx#701)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergei-Lebedev authored Dec 31, 2022
1 parent 44aaa7f commit ebede18
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/components/tl/ucp/tl_ucp_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ UCC_CLASS_INIT_FUNC(ucc_tl_ucp_lib_t, const ucc_base_lib_params_t *params,

UCC_CLASS_CLEANUP_FUNC(ucc_tl_ucp_lib_t)
{
ucc_config_parser_release_opts(&self->cfg, ucc_tl_ucp_lib_config_table);
tl_info(&self->super, "finalizing lib object: %p", self);
}

Expand Down
9 changes: 6 additions & 3 deletions src/components/tl/ucp/tl_ucp_team.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,11 @@ UCC_CLASS_INIT_FUNC(ucc_tl_ucp_team_t, ucc_base_context_t *tl_context,
self->status = UCC_INPROGRESS;
self->tuning_str = "";

memcpy(&self->cfg, &UCC_TL_UCP_TEAM_LIB(self)->cfg,
sizeof(ucc_tl_ucp_team_config_t));

status = ucc_config_clone_table(&UCC_TL_UCP_TEAM_LIB(self)->cfg, &self->cfg,
ucc_tl_ucp_lib_config_table);
if (UCC_OK != status) {
return status;
}
if (ctx->topo_required) {
status = ucc_tl_ucp_get_topo(self);
if (UCC_OK != status) {
Expand All @@ -92,6 +94,7 @@ UCC_CLASS_INIT_FUNC(ucc_tl_ucp_team_t, ucc_base_context_t *tl_context,

UCC_CLASS_CLEANUP_FUNC(ucc_tl_ucp_team_t)
{
ucc_config_parser_release_opts(&self->cfg, ucc_tl_ucp_lib_config_table);
tl_info(self->super.super.context->lib, "finalizing tl team: %p", self);
}

Expand Down
2 changes: 1 addition & 1 deletion src/core/ucc_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ static ucc_status_t ucc_cl_lib_init(const ucc_lib_params_t *user_params,
}
/* Check if the combination of the selected CLs provides all the
requested coll_types: not an error, just print a message if not
all the colls are supproted */
all the colls are supported */
if (params.mask & UCC_LIB_PARAM_FIELD_COLL_TYPES &&
((params.coll_types & supported_coll_types) != params.coll_types)) {
ucc_debug("selected set of CLs does not provide all the requested "
Expand Down
1 change: 1 addition & 0 deletions src/utils/ucc_datastruct.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/**
* Copyright (c) 2022, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
*
* See file LICENSE for terms.
*/

Expand Down

0 comments on commit ebede18

Please sign in to comment.